Skip to content

Allow TensorFlow json serializer to accept dicts with ndarray values #404

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 4, 2018

Conversation

winstonaws
Copy link
Contributor

@winstonaws winstonaws commented Sep 26, 2018

Issue #, if available:
#394

Description of changes:
Allows the tf json serializer (which is the default for the tf predictor) to accept dicts with ndarray values. This only makes sense, since currently we accept lists, dicts of lists, and ndarrays, but not dicts of ndarrays.

Also did a small refactor to remove redundancy from the existing implementation of the Json serializer class.

Merge Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have updated the changelog with a description of my changes (if appropriate)
  • I have updated any necessary documentation (if appropriate)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@codecov-io
Copy link

codecov-io commented Sep 26, 2018

Codecov Report

Merging #404 into master will decrease coverage by 0.16%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #404      +/-   ##
==========================================
- Coverage   93.11%   92.94%   -0.17%     
==========================================
  Files          51       51              
  Lines        3572     3559      -13     
==========================================
- Hits         3326     3308      -18     
- Misses        246      251       +5
Impacted Files Coverage Δ
src/sagemaker/predictor.py 96.59% <100%> (+0.34%) ⬆️
src/sagemaker/local/image.py 87.42% <0%> (-1.8%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eb68540...ba20915. Read the comment docs.

mvsusp
mvsusp previously approved these changes Sep 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants