Concurrent CPU Integration Tests + Reuse Model Artifacts #655
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.
Description
There are two things that get added in this PR:
2, 4, and 8
requests at the same time.Reusing model aritfacts
Currently, our
cpu_llm_server_integration_tests
generate new model artifacts for each tests, even when they are requesting the exact same artifacts. This causes the tests to take much longer to run than they should, and makes it harder to add more tests without drastically increasing overall test time.We add a static
MODEL_DIR_CACHE
, which is just a hashmap that stores{ request.params_hash: temporary_dir }
. If a test requests the same artifacts as a previous test, we reuse the already existing artifacts, instead of generating new ones.Adding concurrency tests
We recenly found a bug in concurrency with the Shortfin LLM Server. When sending multiple requests at the same time, we end up with responses that have incorrect tokens.
This adds basic concurrent integration tests for 2, 4, and 8 requests sent in parallel. Currently, they are xfailed, but we will be able to use these to validate our fix, when we get there, and ensure that we don't have a regression in concurrency in the future. Will extend the
periodic SGLang Integration tests
to further test concurrency on GPU, with more complex prompts, but for a PR triggered test, this should serve as a good guard.