-
Notifications
You must be signed in to change notification settings - Fork 831
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
Option to return proto OR dict for SeldonClient methods #1175
Conversation
…for Seldon Client functions
/cc @cliveseldon @adriangonz |
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.
Besides the small comment (where it may not even be necessary to change anything), I think it looks good!
As an aside, something out of the scope of this PR, I think that SeldonClient
may have too many parameters now? I'm not sure if this is the case, and even if it is, I'm not sure if it would even be an issue.
assert "jsonData" in mock_post.call_args[1]["json"] | ||
assert mock_post.call_args[1]["json"]["jsonData"] == JSON_TEST_DATA | ||
assert response.success is True | ||
assert json_response["jsonData"] == JSON_TEST_DATA |
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.
Perhaps it would be good to add an assertion here for having a dict
type? I think something like this should work:
assert isinstance(json_response, dict)
Similarly, we could add assertions on the existing tests for SeldonMessage
?
PS: I just realised that the SeldonMessage
ones use seldon_message_to_json(...)
so perhaps this is not necessary.
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: adriangonz The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Added functionality to specify proto return type or json return type for Seldon Client functions
Fixes #1083