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

Seldon component exit on failure without passing to next component in the seldon graph #2730

Closed
divyadilip91 opened this issue Dec 2, 2020 · 7 comments

Comments

@divyadilip91
Copy link

Hi team,

My current scenario uses a seldon graph containing two components chained together - that is 2 models.
INPUT----> MODEL1------> MODEL2------> OUTPUT.
I have included error handling in the code for both components.
So my query is, if model1 fails ,can it return the error directly to the user after exiting the seldon graph rather than passing the error to the model2 which will inturn return the error of model2 to the user which is wrong coz the main error that occured was in model1 and the user should see the error message of model1 rather than model2.
Kindly help if there is some solution existing to solve this.

@divyadilip91 divyadilip91 added the triage Needs to be triaged and prioritised accordingly label Dec 2, 2020
@ukclivecox
Copy link
Contributor

If you return an exception or non-200 it should fail immediatly

@ukclivecox ukclivecox added awaiting-feedback and removed triage Needs to be triaged and prioritised accordingly labels Dec 3, 2020
@divyadilip91
Copy link
Author

divyadilip91 commented Dec 4, 2020

Hi @cliveseldon ,

Is this possible only if I use the seldon UserCustomException for handling exceptions?
My current code has exceptions handled in this manner.

try: 
    print("hello")
except Exception as e:
    logging.error(e,sys.exc_info())
    return {"error":str(sys.exc_info())}

I find that the error is returned to the second component rather than exiting from the first component.
Is there something that I have missed by which it doesnt exit?
Awaiting your reply

@ukclivecox
Copy link
Contributor

yes - as in above you would be a 200 OK result returned.

@divyadilip91
Copy link
Author

divyadilip91 commented Dec 4, 2020

Ok..so if I want to exit from the first component , I need to use the seldon user custom exception ?

@ukclivecox
Copy link
Contributor

Yes

@ukclivecox
Copy link
Contributor

You can also have a router after the first model and return -2 see https://docs.seldon.io/projects/seldon-core/en/latest/analytics/routers.html
This way you can keep your current design

@ukclivecox
Copy link
Contributor

Closing. Please reopen if still an issue.

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

No branches or pull requests

2 participants