Skip to content
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

Make debug easier #854

Merged
merged 5 commits into from
Sep 13, 2019
Merged

Make debug easier #854

merged 5 commits into from
Sep 13, 2019

Conversation

dtaniwaki
Copy link
Contributor

@dtaniwaki dtaniwaki commented Sep 11, 2019

Currently, some types of errors occurred in models are swallowed and it's really hard to debug because the server doesn't show any log and we don't know if an error occurred or the response is really empty.

To make debugging easier, I made the following changes in this PR.

  • Do not rescue AttributeError as the methods should not raise this error.
  • Log swallowed NotImplementedError.

Fixes #700

@seldondev
Copy link
Collaborator

Hi @dtaniwaki. Thanks for your PR.

I'm waiting for a SeldonIO member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@ukclivecox
Copy link
Contributor

Are we sure this covers cases discussed in #700 where the user has not extended the Seldon class but simply created their own so you would get a AttributeError?

@@ -78,16 +78,18 @@ def send_feedback(user_model: Any, request: prediction_pb2.Feedback,
else:
try:
return user_model.send_feedback_raw(request)
except (NotImplementedError, AttributeError):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do AttributeErrors can handled now? Can we add a test

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to rescue AttributeError? send_feedback_raw originally raises NotImplementedError.

Copy link
Contributor Author

@dtaniwaki dtaniwaki Sep 11, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got your point. I'll add has_attr check. Can I also include the error class change for #700?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I added Fix in your top level comment. So yes if you could extend to cover #700

@ukclivecox ukclivecox added this to the 0.4.x milestone Sep 11, 2019
@dtaniwaki
Copy link
Contributor Author

Hi @cliveseldon I updated the code. Could you check it again?

@ukclivecox
Copy link
Contributor

/approve

@seldondev
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cliveseldon

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ukclivecox
Copy link
Contributor

/ok-to-test

@seldondev seldondev merged commit f613ddd into SeldonIO:master Sep 13, 2019
@dtaniwaki dtaniwaki deleted the make-debug-easier branch September 13, 2019 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change NotImplementedError in SeldonMethods for SeldonNotImplementedError
3 participants