[https://nvbugs/5726066][fix] fix auto-scaling related failures - #9845
Conversation
c50efe8 to
83464b7
Compare
|
/bot run --disable-fail-fast |
|
PR_Github #27507 [ run ] triggered by Bot. Commit: |
📝 WalkthroughWalkthroughThis change refactors error handling in cluster storage via a decorator pattern, adds watch initialization validation, introduces logging flexibility to integration tests, and removes previously-waived tests from the exception list. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25–30 minutes
Pre-merge checks and finishing touches❌ Failed checks (3 warnings)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 5
🧹 Nitpick comments (2)
tensorrt_llm/serve/disagg_auto_scaling.py (1)
101-109: Prefer explicit error handling overassertfor watch handle, and mirror the check for the secondwatch()callThe new assertion gives a much clearer failure mode when
watch()returnsNone, but:
assertis removed when Python is run with optimizations (python -O), so this safety net can silently disappear.- The second
watch()call (Line 124) is still unchecked and can also returnNone, which would surface later as a less clear runtime error when calling.drain().Consider something along these lines to keep behavior explicit and symmetric:
- self._watch_handle = await self._cluster_storage.watch( - self.worker_key_prefix) - - assert self._watch_handle is not None, "failed to watch workers" + self._watch_handle = await self._cluster_storage.watch( + self.worker_key_prefix) + if self._watch_handle is None: + raise RuntimeError("failed to watch workers (initial watch)") if get_existing_first: ... - await self._watch_handle.add_events(events) + await self._watch_handle.add_events(events) - self._watch_handle = await self._cluster_storage.watch( - self.worker_key_prefix) + self._watch_handle = await self._cluster_storage.watch( + self.worker_key_prefix) + if self._watch_handle is None: + raise RuntimeError("failed to watch workers (second watch)")This keeps the failure path robust regardless of optimization flags and ensures both watch initializations are validated.
Also applies to: 124-125
tensorrt_llm/serve/cluster_storage.py (1)
515-517: Minor: silence unusedmetavariable to satisfy lintersStatic analysis correctly points out that
metais unused here:data, meta = self.client.get(key) return data.decode('utf-8') if data else NoneTo keep the intent clear and quiet the warning:
- data, meta = self.client.get(key) + data, _meta = self.client.get(key)No behavior change, just linter hygiene.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
tensorrt_llm/serve/cluster_storage.py(4 hunks)tensorrt_llm/serve/disagg_auto_scaling.py(1 hunks)tests/integration/defs/disaggregated/test_auto_scaling.py(5 hunks)tests/integration/test_lists/waives.txt(0 hunks)
💤 Files with no reviewable changes (1)
- tests/integration/test_lists/waives.txt
🧰 Additional context used
📓 Path-based instructions (2)
**/*.py
📄 CodeRabbit inference engine (CODING_GUIDELINES.md)
**/*.py: The code developed for TensorRT-LLM should conform to Python 3.8+
Indent Python code with 4 spaces; do not use tabs
Always maintain the namespace when importing in Python, even if only one class or function from a module is used (e.g., usefrom package.subpackage import fooand thenfoo.SomeClass()instead offrom package.subpackage.foo import SomeClass)
Python filenames should use snake_case (e.g.,some_file.py)
Python class names should use PascalCase (e.g.,class SomeClass)
Python function and method names should use snake_case (e.g.,def my_awesome_function():)
Python local variable names should use snake_case, with prefixkfor variable names that start with a number (e.g.,k_99th_percentile = ...)
Python global variables should use upper snake_case with prefixG(e.g.,G_MY_GLOBAL = ...)
Python constants should use upper snake_case (e.g.,MY_CONSTANT = ...)
Avoid shadowing variables declared in an outer scope in Python
Initialize all externally visible members of a Python class in the constructor
For Python interfaces that may be used outside a file, prefer docstrings over comments
Python comments should be reserved for code within a function, or interfaces that are local to a file
Use Google style docstrings for Python classes and functions, which can be parsed by Sphinx
Python attributes and variables can be documented inline with type and description (e.g.,self.x = 5followed by"""<type>: Description of 'x'""")
Avoid using reflection in Python when functionality can be easily achieved without reflection
When using try-except blocks in Python, limit the except clause to the smallest set of specific errors possible instead of catching all exceptions
When using try-except blocks in Python to handle multiple possible variable types (duck-typing), keep the body of the try as small as possible and use the else block to implement the logic
Files:
tensorrt_llm/serve/cluster_storage.pytensorrt_llm/serve/disagg_auto_scaling.pytests/integration/defs/disaggregated/test_auto_scaling.py
**/*.{cpp,h,cu,py}
📄 CodeRabbit inference engine (CODING_GUIDELINES.md)
All TensorRT-LLM Open Source Software code files should contain an NVIDIA copyright header that includes the current year at the top
Files:
tensorrt_llm/serve/cluster_storage.pytensorrt_llm/serve/disagg_auto_scaling.pytests/integration/defs/disaggregated/test_auto_scaling.py
🪛 Ruff (0.14.8)
tensorrt_llm/serve/cluster_storage.py
515-515: Unpacked variable meta is never used
Prefix it with an underscore or any other dummy variable pattern
(RUF059)
525-525: Avoid specifying long messages outside the exception class
(TRY003)
tests/integration/defs/disaggregated/test_auto_scaling.py
175-175: subprocess call: check for execution of untrusted input
(S603)
211-211: subprocess call: check for execution of untrusted input
(S603)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Pre-commit Check
|
PR_Github #27507 [ run ] completed with state |
83464b7 to
e516247
Compare
|
/bot run --disable-fail-fast |
|
PR_Github #27613 [ run ] triggered by Bot. Commit: |
|
/bot run --disable-fail-fast |
|
PR_Github #27781 [ run ] triggered by Bot. Commit: |
e516247 to
ba282b1
Compare
|
/bot run --disable-fail-fast |
|
PR_Github #27819 [ run ] triggered by Bot. Commit: |
ba282b1 to
c0ca2f1
Compare
|
/bot run --disable-fail-fast |
|
PR_Github #27850 [ run ] triggered by Bot. Commit: |
|
/bot run --disable-fail-fast |
1 similar comment
|
/bot run --disable-fail-fast |
|
PR_Github #27937 [ run ] triggered by Bot. Commit: |
|
/bot run --stage-list "DGX_H100-2_GPUs-PyTorch-Others-1,DGX_H100-4_GPUs-PyTorch-Others-1" |
|
PR_Github #27958 [ run ] triggered by Bot. Commit: |
|
PR_Github #27958 [ run ] completed with state |
Signed-off-by: Lizhi Zhou <1432185+reasonsolo@users.noreply.github.com>
Signed-off-by: Lizhi Zhou <1432185+reasonsolo@users.noreply.github.com>
|
/bot run --disable-fail-fast |
|
PR_Github #28822 [ run ] triggered by Bot. Commit: |
|
PR_Github #28822 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #28885 [ run ] triggered by Bot. Commit: |
Signed-off-by: Lizhi Zhou <1432185+reasonsolo@users.noreply.github.com>
|
/bot run --disable-fail-fast |
|
PR_Github #28901 [ run ] triggered by Bot. Commit: |
Signed-off-by: Lizhi Zhou <1432185+reasonsolo@users.noreply.github.com>
6073a03 to
2d0e6e4
Compare
Signed-off-by: Lizhi Zhou <1432185+reasonsolo@users.noreply.github.com>
|
/bot run --disable-fail-fast |
|
PR_Github #28919 [ run ] triggered by Bot. Commit: |
|
PR_Github #28919 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #29004 [ run ] triggered by Bot. Commit: |
|
@pcastonguay Thanks for retrying. I misunderstood the test config in test_disaggregated.py, all tests in that file use a symbolic link from |
Yeah it's failing due to "address already in use" again. @JunyiXu-nv has an open port to try to fix. |
|
PR_Github #29004 [ run ] completed with state |
…IA#9845) Signed-off-by: Lizhi Zhou <1432185+reasonsolo@users.noreply.github.com> Co-authored-by: Emma Qiao <qqiao@nvidia.com>
…IA#9845) Signed-off-by: Lizhi Zhou <1432185+reasonsolo@users.noreply.github.com> Co-authored-by: Emma Qiao <qqiao@nvidia.com> Signed-off-by: lkomali <lkomali@nvidia.com>
…IA#9845) Signed-off-by: Lizhi Zhou <1432185+reasonsolo@users.noreply.github.com> Co-authored-by: Emma Qiao <qqiao@nvidia.com>
…IA#9845) Signed-off-by: Lizhi Zhou <1432185+reasonsolo@users.noreply.github.com> Co-authored-by: Emma Qiao <qqiao@nvidia.com> Signed-off-by: Daniil Kulko <kulkodaniil@gmail.com>
All tests in test_auto_scaling.py are still flaky. Run them in CI and collect logs directly to debug.
Root cause:
Summary by CodeRabbit
Bug Fixes
Tests
✏️ Tip: You can customize this high-level summary in your review settings.
Description
Test Coverage
PR Checklist
Please review the following before submitting your PR:
PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.
PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.
Test cases are provided for new code paths (see test instructions)
Any new dependencies have been scanned for license and vulnerabilities
CODEOWNERS updated if ownership changes
Documentation updated as needed
Update tava architecture diagram if there is a significant design change in PR.
The reviewers assigned automatically/manually are appropriate for the PR.
Please check this after reviewing the above items as appropriate for this PR.
GitHub Bot Help
/bot [-h] ['run', 'kill', 'skip', 'reuse-pipeline'] ...Provide a user friendly way for developers to interact with a Jenkins server.
Run
/bot [-h|--help]to print this help message.See details below for each supported subcommand.
Details
run [--reuse-test (optional)pipeline-id --disable-fail-fast --skip-test --stage-list "A10-PyTorch-1, xxx" --gpu-type "A30, H100_PCIe" --test-backend "pytorch, cpp" --add-multi-gpu-test --only-multi-gpu-test --disable-multi-gpu-test --post-merge --extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx" --detailed-log --debug(experimental)]Launch build/test pipelines. All previously running jobs will be killed.
--reuse-test (optional)pipeline-id(OPTIONAL) : Allow the new pipeline to reuse build artifacts and skip successful test stages from a specified pipeline or the last pipeline if no pipeline-id is indicated. If the Git commit ID has changed, this option will be always ignored. The DEFAULT behavior of the bot is to reuse build artifacts and successful test results from the last pipeline.--disable-reuse-test(OPTIONAL) : Explicitly prevent the pipeline from reusing build artifacts and skipping successful test stages from a previous pipeline. Ensure that all builds and tests are run regardless of previous successes.--disable-fail-fast(OPTIONAL) : Disable fail fast on build/tests/infra failures.--skip-test(OPTIONAL) : Skip all test stages, but still run build stages, package stages and sanity check stages. Note: Does NOT update GitHub check status.--stage-list "A10-PyTorch-1, xxx"(OPTIONAL) : Only run the specified test stages. Examples: "A10-PyTorch-1, xxx". Note: Does NOT update GitHub check status.--gpu-type "A30, H100_PCIe"(OPTIONAL) : Only run the test stages on the specified GPU types. Examples: "A30, H100_PCIe". Note: Does NOT update GitHub check status.--test-backend "pytorch, cpp"(OPTIONAL) : Skip test stages which don't match the specified backends. Only support [pytorch, cpp, tensorrt, triton]. Examples: "pytorch, cpp" (does not run test stages with tensorrt or triton backend). Note: Does NOT update GitHub pipeline status.--only-multi-gpu-test(OPTIONAL) : Only run the multi-GPU tests. Note: Does NOT update GitHub check status.--disable-multi-gpu-test(OPTIONAL) : Disable the multi-GPU tests. Note: Does NOT update GitHub check status.--add-multi-gpu-test(OPTIONAL) : Force run the multi-GPU tests in addition to running L0 pre-merge pipeline.--post-merge(OPTIONAL) : Run the L0 post-merge pipeline instead of the ordinary L0 pre-merge pipeline.--extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx"(OPTIONAL) : Run the ordinary L0 pre-merge pipeline and specified test stages. Examples: --extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx".--detailed-log(OPTIONAL) : Enable flushing out all logs to the Jenkins console. This will significantly increase the log volume and may slow down the job.--debug(OPTIONAL) : Experimental feature. Enable access to the CI container for debugging purpose. Note: Specify exactly one stage in thestage-listparameter to access the appropriate container environment. Note: Does NOT update GitHub check status.For guidance on mapping tests to stage names, see
docs/source/reference/ci-overview.mdand the
scripts/test_to_stage_mapping.pyhelper.kill
killKill all running builds associated with pull request.
skip
skip --comment COMMENTSkip testing for latest commit on pull request.
--comment "Reason for skipping build/test"is required. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break.reuse-pipeline
reuse-pipelineReuse a previous pipeline to validate current commit. This action will also kill all currently running builds associated with the pull request. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break.