Repository navigation
[CI/Build] Avoid busy polling in stage memory lifecycle tests - #9406
Conversation
Signed-off-by: amy-why-3459 <wuhaiyan17@huawei.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
This PR was classified as CI work. Routing: @yenuo26 via CI owner, CODEOWNERS; @NickCao via CODEOWNERS @amy-why-3459, please review your own changes and leave a short self-review comment describing what you checked. PRs without author self-review may not be assigned a reviewer. Please take a look when you have a chance. If you would like an automated review, mention @vllm-omni-review-bot in a comment. |
Omni ReviewBot triage noteAutomated triage of commit
These are automated triage suggestions only — the final decision belongs to the maintainers. |
Purpose
Fixes #9401.
The stage-memory lifecycle tests poll Prometheus samples with
asyncio.sleep(0)while replica registration waits for anasyncio.to_threadworker. The continuously runnable poller can starve that worker of the GIL and exhaust the two-second deadline before the replacement snapshot is published.Use a 1 ms polling interval so the event loop can actually suspend between checks. Keep the two-second deadline and every lifecycle assertion, including protection against a detached RPC overwriting its replacement's snapshot.
This only changes the test helper. Runtime behavior, the metrics contract, configuration, and user documentation are unchanged.
Contributor intent
Test plan and results
Environment: Linux, Python 3.12.13, vLLM 0.32.0, PyTorch 2.13.0+cu130, pytest 9.1.1, pytest-asyncio 1.4.0. Base:
2c324487942a04fb29ee82d74781292080b070b9.The unmodified file passed 550 ordinary repeated cases. To expose scheduling sensitivity, pin execution to one CPU after collection and increase the interpreter's thread-switch interval. On this host, the following command reproduced the exact
jointimeout while waiting for(101, 103): 1 failed, 141 passed before the change; 220 passed after it. This is a local stress reproducer, not a replay of the Buildkite environment. CPU 110 must be replaced with an allowed CPU on other hosts; requires pytest-repeat.Related regression tests: 45 passed.
pre-commit run --files tests/engine/test_stage_memory_lifecycle.py: all applicable hooks passed, including Ruff, mypy, CI marks, SPDX and forbidden-import checks. Full pre-submit self-check found no additional diff-scoped issues or simplification candidates.For a focused CI-style run in an environment with the repository's test dependencies (no model weights or GPU execution required):
python -m pytest tests/engine/test_stage_memory_lifecycle.py -m 'core_model and cpu' --run-level core_model -qThe full READY suite was not run locally. The local environment emitted an existing package-version warning: installed vLLM-Omni metadata reports 0.31.0rc2 while vLLM reports 0.32.0; tests imported this worktree's source.
Need help on this PR? Tag
@codesmith-botwith what you need.