-
Notifications
You must be signed in to change notification settings - Fork 835
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
Meta data field not modifiable by subsequent components #829
Comments
Hi @shirishph, do you think saving the result in a class property The model class is instantiated only once when flask starts so In think that "result" property might be unexpectedly changed when you get multiple requests at the same time I have a similar problem and this might be a cleaner solution than changing |
Hey @gmattar. Thanks for your very valid points. The only way I could think of to save Actually, I did not know we can have flask inside a Seldon inference graph. My actual code implementation serves ML models and there's no flask. I will not be having that instance-per-http-request issue confusion which flask brings. Could you please elaborate on what you meant by "this might be a cleaner solution than changing predict_raw if it works"? I could get away with setting a unique flag in each component, but then the graph would be brittle. Ideally the |
@shirishph we had a look at this today, it's was expected behaviour but upon discussion it's clear that it makes sense to have latter steps to overwrite previous ones. This will be fixed once #829 is landed. In regards to the points raised by @gmattar, you shouldn't experience sporadic changes of the values as the server deals with requests synchronously. You would have to take this into consideration if you use our Gunicorn implementation (which is activated if you add extra workers). Otherwise you just have to make sure you don't send the previous metadata when returning the latest request. |
this worked for single model deployments but failed to inference graph because meta was overwritten. |
Thx @axsaucedo. I will use a workaround for now |
@gmattar You may reopen the issue if you'd like to keep it open |
@shirishph this PR fixes your issue, you can try it by running it through that branch #833. I'll reopen the issue so we can close it once that PR gets merged, as it fully addresses the bug you found. |
Closing as PR #833 merged |
I'm not able to modify the value of a dictionary key which is passed as meta data between Seldon components
I have an inference graph like so:
The components are like so:
Alpha Component
Beta Component
Gamma Component
As you can see when the inference graph is run, we would expect the value of
proceed
to beGamma
, but what we get isAlpha
Is this expected? Can we not modify the value of
proceed
in say Beta or Gamma components?The text was updated successfully, but these errors were encountered: