-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Bug fix: https://github.com/aws/sagemaker-python-sdk/issues/123 #294
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
Conversation
setup.py
Outdated
@@ -49,7 +49,7 @@ def read(fname): | |||
|
|||
extras_require={ | |||
'test': ['tox', 'flake8', 'pytest', 'pytest-cov', 'pytest-xdist', | |||
'mock', 'tensorflow>=1.3.0', 'contextlib2', 'awslogs', 'pandas']}, | |||
'mock', 'tensorflow>=1.3.0', 'protobuf3-to-dict', 'contextlib2', 'awslogs', 'pandas']}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you move protobuf3-to-dict
to install_requires
(and add a version)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, thank you.
|
||
for possible_response in _POSSIBLE_RESPONSES: | ||
try: | ||
return protobuf_to_dict(json_format.Parse(data, possible_response())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would google.protobuf.json_format.MessageToDict
(with json.loads
) be suitable here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually tried and won't work. google.protobuf.json_format.MessageToDict
serializes the values again, which is the bug behavior that we won't to avoid.
Codecov Report
@@ Coverage Diff @@
## master #294 +/- ##
==========================================
- Coverage 92.94% 92.92% -0.03%
==========================================
Files 50 50
Lines 3472 3475 +3
==========================================
+ Hits 3227 3229 +2
- Misses 245 246 +1
Continue to review full report at Codecov.
|
Issue #, if available:
Bug fix for #123
Description of changes:
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.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.