Skip to content

Conversation

@shuyixiong
Copy link
Collaborator

@shuyixiong shuyixiong commented Nov 6, 2025

Summary by CodeRabbit

  • New Features

    • Added --model command-line option to enable customizable model path configuration in serving scripts.
    • Improved model path flexibility for better control over deployment options.
  • Tests

    • Updated test suite to support and validate the new configurable model path parameter across distributed and local serving scenarios.

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 the stage-list parameter 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.md
and the scripts/test_to_stage_mapping.py helper.

kill

kill

Kill all running builds associated with pull request.

skip

skip --comment COMMENT

Skip 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-pipeline

Reuse 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.

Signed-off-by: shuyix <219646547+shuyixiong@users.noreply.github.com>
@shuyixiong shuyixiong requested a review from a team as a code owner November 6, 2025 05:21
@shuyixiong shuyixiong self-assigned this Nov 6, 2025
@shuyixiong
Copy link
Collaborator Author

/bot run --stage-list "DGX_H100-2_GPUs-PyTorch-Ray-1"

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 6, 2025

📝 Walkthrough

Walkthrough

The PR generalizes hardcoded model paths in Ray orchestrator examples and tests by introducing configurable command-line options and utility-based path resolution, replacing direct TinyLlama model references with parameterized variables and dynamic path construction.

Changes

Cohort / File(s) Summary
Ray orchestrator shell script
examples/ray_orchestrator/disaggregated/disagg_serving_local.sh
Introduces MODEL_DIR variable with default path and --model command-line option to override it; replaces hardcoded model path references in config generation and server invocations with $MODEL_DIR variable.
Integration tests
tests/integration/defs/examples/test_ray.py
Adds model_dir variable holding TinyLlama path; passes --model argument to disaggregated serving script; updates curl request payload to reference model path variable.
Unit tests
tests/unittest/_torch/ray_orchestrator/multi_gpu/test_executor.py
Replaces hardcoded model string with dynamic path constructed from llm_models_root() utility function; adds import of llm_models_root from utils.llm_data.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • Straightforward parameterization and refactoring pattern applied consistently across three files
  • No complex logic or control flow changes; primarily variable introduction and path resolution updates
  • Minimal interaction between files; each change is relatively isolated

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is empty, containing only the template with unfilled sections (Description, Test Coverage, PR Checklist unchecked). Fill in the Description section explaining what changes were made and why. Complete the Test Coverage section listing relevant tests. Review and check the PR Checklist items as appropriate.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed Title clearly describes the main change: using cached models across ray tests, which aligns with the code modifications in the three files.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e822184 and 80c244a.

📒 Files selected for processing (3)
  • examples/ray_orchestrator/disaggregated/disagg_serving_local.sh (5 hunks)
  • tests/integration/defs/examples/test_ray.py (3 hunks)
  • tests/unittest/_torch/ray_orchestrator/multi_gpu/test_executor.py (3 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{h,hpp,hh,hxx,cpp,cxx,cc,cu,cuh,py}

📄 CodeRabbit inference engine (CODING_GUIDELINES.md)

Use only spaces, no tabs; indent with 4 spaces.

Files:

  • tests/integration/defs/examples/test_ray.py
  • tests/unittest/_torch/ray_orchestrator/multi_gpu/test_executor.py
**/*.py

📄 CodeRabbit inference engine (CODING_GUIDELINES.md)

**/*.py: Python code must target Python 3.8+.
Indent Python code with 4 spaces; do not use tabs.
Maintain module namespace when importing; prefer 'from package.subpackage import foo' then 'foo.SomeClass()' instead of importing the class directly.
Python filenames should be snake_case (e.g., some_file.py).
Python classes use PascalCase names.
Functions and methods use snake_case names.
Local variables use snake_case; prefix 'k' for variables that start with a number (e.g., k_99th_percentile).
Global variables use upper SNAKE_CASE prefixed with 'G' (e.g., G_MY_GLOBAL).
Constants use upper SNAKE_CASE (e.g., MY_CONSTANT).
Avoid shadowing variables from an outer scope.
Initialize all externally visible members of a class in the constructor.
Prefer docstrings for interfaces that may be used outside a file; comments for in-function or file-local interfaces.
Use Google-style docstrings for classes and functions (Sphinx-parsable).
Document attributes and variables inline so they render under the class/function docstring.
Avoid reflection when a simpler, explicit approach suffices (e.g., avoid dict(**locals()) patterns).
In try/except, catch the most specific exceptions possible.
For duck-typing try/except, keep the try body minimal and use else for the main logic.

Files:

  • tests/integration/defs/examples/test_ray.py
  • tests/unittest/_torch/ray_orchestrator/multi_gpu/test_executor.py
**/*.{cpp,cxx,cc,h,hpp,hh,hxx,cu,cuh,py}

📄 CodeRabbit inference engine (CODING_GUIDELINES.md)

Prepend the NVIDIA Apache-2.0 copyright header with current year to the top of all source files (e.g., .cpp, .h, .cu, .py).

Files:

  • tests/integration/defs/examples/test_ray.py
  • tests/unittest/_torch/ray_orchestrator/multi_gpu/test_executor.py
🧠 Learnings (6)
📓 Common learnings
Learnt from: achartier
Repo: NVIDIA/TensorRT-LLM PR: 6763
File: tests/integration/defs/triton_server/conftest.py:16-22
Timestamp: 2025-08-11T20:09:24.389Z
Learning: In the TensorRT-LLM test infrastructure, the team prefers simple, direct solutions (like hard-coding directory traversal counts) over more complex but robust approaches when dealing with stable directory structures. They accept the maintenance cost of updating tests if the layout changes.
📚 Learning: 2025-07-28T17:06:08.621Z
Learnt from: moraxu
Repo: NVIDIA/TensorRT-LLM PR: 6303
File: tests/integration/test_lists/qa/examples_test_list.txt:494-494
Timestamp: 2025-07-28T17:06:08.621Z
Learning: In TensorRT-LLM testing, it's common to have both CLI flow tests (test_cli_flow.py) and PyTorch API tests (test_llm_api_pytorch.py) for the same model. These serve different purposes: CLI flow tests validate the traditional command-line workflow, while PyTorch API tests validate the newer LLM API backend. Both are legitimate and should coexist.

Applied to files:

  • tests/integration/defs/examples/test_ray.py
  • tests/unittest/_torch/ray_orchestrator/multi_gpu/test_executor.py
📚 Learning: 2025-08-26T06:07:02.166Z
Learnt from: shaharmor98
Repo: NVIDIA/TensorRT-LLM PR: 7231
File: tensorrt_llm/_torch/pyexecutor/_util.py:504-509
Timestamp: 2025-08-26T06:07:02.166Z
Learning: In tensorrt_llm/_torch/pyexecutor/_util.py, when calling model_engine.set_lora_model_config(), pass model_binding_config.mlp_hidden_size directly without multiplying by mapping.tp_size, as the mlp_hidden_size from get_bindings_model_config() is already the per-TP rank value needed for LoRA weight packaging.

Applied to files:

  • tests/unittest/_torch/ray_orchestrator/multi_gpu/test_executor.py
📚 Learning: 2025-08-26T09:49:04.956Z
Learnt from: pengbowang-nv
Repo: NVIDIA/TensorRT-LLM PR: 7192
File: tests/integration/test_lists/test-db/l0_dgx_b200.yml:56-72
Timestamp: 2025-08-26T09:49:04.956Z
Learning: In TensorRT-LLM test configuration files, the test scheduling system handles wildcard matching with special rules that prevent duplicate test execution even when the same tests appear in multiple yaml files with overlapping GPU wildcards (e.g., "*b200*" and "*gb200*").

Applied to files:

  • tests/unittest/_torch/ray_orchestrator/multi_gpu/test_executor.py
📚 Learning: 2025-08-19T12:45:11.997Z
Learnt from: amitz-nv
Repo: NVIDIA/TensorRT-LLM PR: 7033
File: tensorrt_llm/_torch/pyexecutor/model_engine.py:0-0
Timestamp: 2025-08-19T12:45:11.997Z
Learning: In tensorrt_llm/_torch/pyexecutor/model_engine.py, DoRA (Delta Orthogonal Rank Adaptation) functionality was removed from the PyTorch flow to eliminate issues with inverted DoRA detection logic. The original is_dora condition was checking if scaling_vec_pointer == 0, which was potentially incorrect.

Applied to files:

  • tests/unittest/_torch/ray_orchestrator/multi_gpu/test_executor.py
📚 Learning: 2025-08-06T13:58:07.506Z
Learnt from: galagam
Repo: NVIDIA/TensorRT-LLM PR: 6487
File: tests/unittest/_torch/auto_deploy/unit/singlegpu/test_ad_trtllm_bench.py:1-12
Timestamp: 2025-08-06T13:58:07.506Z
Learning: In TensorRT-LLM, test files (files under tests/ directories) do not require NVIDIA copyright headers, unlike production source code files. Test files typically start directly with imports, docstrings, or code.

Applied to files:

  • tests/unittest/_torch/ray_orchestrator/multi_gpu/test_executor.py
🧬 Code graph analysis (1)
tests/integration/defs/examples/test_ray.py (2)
tensorrt_llm/llmapi/llm_args.py (2)
  • model_dir (1496-1498)
  • model_dir (1501-1505)
tests/integration/defs/conftest.py (1)
  • llm_models_root (80-94)
🪛 Ruff (0.14.3)
tests/integration/defs/examples/test_ray.py

65-65: subprocess call with shell=True seems safe, but may be changed in the future; consider rewriting without shell

(S602)


65-65: Starting a process with a partial executable path

(S607)


67-67: subprocess call: check for execution of untrusted input

(S603)


68-72: Starting a process with a partial executable path

(S607)

⏰ 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
🔇 Additional comments (6)
tests/unittest/_torch/ray_orchestrator/multi_gpu/test_executor.py (1)

17-18: Good refactoring to use centralized model path resolution.

Replacing the hardcoded model path with llm_models_root() makes the tests more maintainable and aligns with the PR objective to use cached models in Ray tests.

Also applies to: 30-31

examples/ray_orchestrator/disaggregated/disagg_serving_local.sh (2)

6-6: LGTM: Clean addition of configurable model path.

The --model option with a sensible default makes the script more flexible while maintaining backward compatibility.

Also applies to: 20-23, 33-33


86-86: LGTM: Consistent usage of MODEL_DIR variable.

All hardcoded model paths are correctly replaced with $MODEL_DIR, making the script consistent with the new command-line option.

Also applies to: 132-132, 139-139

tests/integration/defs/examples/test_ray.py (3)

49-51: LGTM: Explicit model path for TinyLlama case.

Making the TinyLlama model path explicit in the else block improves consistency and aligns with the PR objective to use cached models.


64-64: LGTM: Correct integration with script's new --model option.

The test now properly passes the model directory to the disaggregated serving script via the new --model flag.

Also applies to: 68-72


85-85: Model name format change is correct.

The server extracts the basename from directory paths using Path(model).name, so the model identifier in the curl payload should use only the basename. The change from "TinyLlama/TinyLlama-1.1B-Chat-v1.0" to "TinyLlama-1.1B-Chat-v1.0" aligns with how the disaggregated server exposes the model name in responses.

@tensorrt-cicd
Copy link
Collaborator

PR_Github #23707 [ run ] triggered by Bot. Commit: 80c244a

@tensorrt-cicd
Copy link
Collaborator

PR_Github #23707 [ run ] completed with state SUCCESS. Commit: 80c244a
/LLM/main/L0_MergeRequest_PR pipeline #17839 (Partly Tested) completed with status: 'SUCCESS'

@shuyixiong
Copy link
Collaborator Author

/bot run

@tensorrt-cicd
Copy link
Collaborator

PR_Github #23738 [ run ] triggered by Bot. Commit: 80c244a

Copy link
Collaborator

@nv-guomingz nv-guomingz left a comment

Choose a reason for hiding this comment

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

LGTM

@tensorrt-cicd
Copy link
Collaborator

PR_Github #23738 [ run ] completed with state SUCCESS. Commit: 80c244a
/LLM/main/L0_MergeRequest_PR pipeline #17868 completed with status: 'SUCCESS'
Pipeline passed with automatic retried tests. Check the rerun report for details.

@Funatiq Funatiq merged commit c73efe1 into NVIDIA:main Nov 6, 2025
7 of 9 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.

4 participants