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

fix(agent): set context deadline for grpc model server control plane #5329

Merged

Conversation

sakoush
Copy link
Member

@sakoush sakoush commented Feb 19, 2024

What this PR does / why we need it:

Previously we have a Background context used in the control plane operations (load/unload) issued from the agent to the model servers (mlserver and triton). The background context will wait indefinitely if the model servers do not respond back and we have seen cases (on unload) that mlserver did not respond back to the unload (not sure why).

Anyway in the case that mlserver did not respond back the agent will be stuck indefinitely on this particular model and therefore the scheduler state of this model is also stuck.

To get around that we use a Deadline context now on these control plane operations as follows:

  • GRPCModelServerLoadTimeout = 30 Minutes
  • GRPCModelServerUnloadTimeout = 2 Minutes
  • GRPCControlPlaneTimeout = 1 Minutes (for other control plane ops)

We currently use the hardocded defaults and perhaps in a future PR we can make these configurable (per model?).

Which issue(s) this PR fixes:

Fixes INFRA-751 (internal)

Special notes for your reviewer:

  • Introduced GRPCModelServerLoadTimeout, GRPCModelServerUnloadTimeout and GRPCControlPlaneTimeout
  • Refactor code to define a V2Config where these parameters and others can be set and used (so that in the future can be configured)
  • Added unit test

@sakoush sakoush requested a review from lc525 as a code owner February 19, 2024 11:25
Copy link
Member

@lc525 lc525 left a comment

Choose a reason for hiding this comment

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

lgtm; can take another look if needed when you add the timeouts for the other ops

@sakoush
Copy link
Member Author

sakoush commented Feb 19, 2024

lgtm; can take another look if needed when you add the timeouts for the other ops

now added

@sakoush sakoush merged commit b61d1ee into SeldonIO:v2 Feb 19, 2024
3 of 4 checks passed
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

Successfully merging this pull request may close these issues.

2 participants