Repository navigation
feat: Only allow one Chipper call at a time - #296
Merged
Merged
Conversation
Chipper V2 is very memory hungry. While we work to optimize this, we need to restrict the server to one call at a time. While the model is in use, we'll return a 503 "Please try again". Our hosted API should scale up to meet demand, so the next call should route to an available server. To verify, try calling Chipper twice: ``` curl -X POST 'http://localhost:8000/general/v0/general' --form files="@$file" --form strategy=hi_res --form hi_res_model_name=chipper & curl -X POST 'http://localhost:8000/general/v0/general' --form files="@$file" --form strategy=hi_res --form hi_res_model_name=chipper ``` The second call will get a 503 response.
If you have a huggingface token, make sure we pass it into the container.
ryannikolaidis
approved these changes
Oct 26, 2023
ryannikolaidis
left a comment
Contributor
There was a problem hiding this comment.
running locally in a container on a mac m2 (with docker resources maxed out), I'm hitting a segmentation fault while processing with chipper, but that's outside the concern of this PR. I am able to see with two concurrent requests that the first one has processing attempted while the other immediately gets a 503, which is good enough for me!
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Chipper V2 is very memory hungry. While we work to optimize this, we need to restrict the server to one call at a time. While the model is in use, we'll return a 503 "Please try again". Our hosted API should scale up to meet demand, so the next call should route to an available server.
This includes a refactor to how partition_kwargs are passed to either parallel mode, local partition, or local partition with the new Chipper protection.
To verify, try calling Chipper twice:
The second call will get a 503 response.
Other changes:
make docker-start-apifor better dev experiencemake docker-start-bashwhile we're in here