Skip to content

Conversation

@reasonsolo
Copy link
Collaborator

@reasonsolo reasonsolo commented Aug 8, 2025

Summary by CodeRabbit

  • New Features

    • Reported updated GSM8K accuracy for Qwen3/Qwen3-30B-A3B (83.43).
  • Tests

    • Added validation for distinct context and generation model combinations in disaggregated serving.
    • Introduced a mixed-model test scenario covering multiple benchmarks (e.g., GSM8K, MMLU).
    • Enabled running multiple test sets in parallel within a single test flow.
    • Updated test lists to include the new mixed-model scenario and parameters.
  • Chores

    • Updated test gating to align with newer hardware availability.

Description

Test Coverage

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.

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.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 8, 2025

📝 Walkthrough

Walkthrough

Adds a new GSM8K accuracy entry and extends disaggregated-serving tests to allow separate context and generation models plus multiple test sets; adds a Qwen3-30B-A3B mixed ctx/gen test and updates QA and DB test lists to include it.

Changes

Cohort / File(s) Summary of changes
Accuracy references
tests/integration/defs/accuracy/references/gsm8k.yaml
Prepends a new accuracy entry (83.43) for Qwen3/Qwen3-30B-A3B without quantization/decoding metadata.
Disaggregated serving tests
tests/integration/defs/accuracy/test_disaggregated_serving.py
Updates launch_disaggregated_llm and run_parallel_test signatures to accept optional ctx_model/gen_model and multiple test_sets; splits common args into ctx_args/gen_args; adds TestQwen3_30B_A3B class with FP4_MODEL/FP8_MODEL and test_mixed_ctx_gen_model; imports/uses skip_pre_blackwell.
Test lists
tests/integration/test_lists/qa/llm_function_sanity.txt, tests/integration/test_lists/test-db/l0_dgx_b200.yml
Adds test invocation accuracy/test_disaggregated_serving.py::TestQwen3_30B_A3B::test_mixed_ctx_gen_model[ctxpp2gentp2].

Sequence Diagram(s)

sequenceDiagram
  participant Tester
  participant run_parallel_test
  participant launch_disaggregated_llm
  participant CtxServer
  participant GenServer
  participant Harness

  Tester->>run_parallel_test: invoke with model_name, model_path, ctx_pp/tp, gen_pp/tp, test_sets, ctx_model, gen_model
  run_parallel_test->>launch_disaggregated_llm: pass disaggregated configs + ctx_model/gen_model
  launch_disaggregated_llm->>CtxServer: start using ctx_args (ctx_model)
  launch_disaggregated_llm->>GenServer: start using gen_args (gen_model)
  run_parallel_test->>Harness: iterate test_sets and evaluate on servers
  Harness-->>Tester: return aggregated results
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

Disaggregated Serving, CI

Suggested reviewers

  • pcastonguay
  • Tabrizian
  • Shixiaowei02
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • 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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@reasonsolo reasonsolo changed the title [TRTLLM-7014][test] add accuracy test for ctx/gen worker with mixed-precision models [TRTLLM-7014][chore] add accuracy test for ctx/gen worker with mixed-precision models Aug 8, 2025
@reasonsolo
Copy link
Collaborator Author

/bot run --add-multi-gpu-test

@tensorrt-cicd
Copy link
Collaborator

PR_Github #14584 [ run ] triggered by Bot

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: 0

🔭 Outside diff range comments (1)
tests/integration/defs/accuracy/test_disaggregated_serving.py (1)

733-746: Remove the unused testset parameter to avoid a PyTest collection error

test_mixed_ctx_gen_model() declares a testset argument, but no fixture / parametrize provides it.
PyTest will raise “fixture ‘testset’ not found” and the whole class will be deselected.

-    def test_mixed_ctx_gen_model(self, ctxpp, gentp, testset):
+    def test_mixed_ctx_gen_model(self, ctxpp, gentp):
🧹 Nitpick comments (1)
tests/integration/defs/accuracy/test_disaggregated_serving.py (1)

240-250: Parameter list is growing – consider a dataclass for clarity

run_parallel_test() now carries nine positional / keyword arguments; readability is slipping.

Refactor by grouping launch parameters into a small dataclass or a dict to keep the call-sites concise and less error-prone.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9687bb4 and 5f88d28.

📒 Files selected for processing (4)
  • tests/integration/defs/accuracy/references/gsm8k.yaml (1 hunks)
  • tests/integration/defs/accuracy/test_disaggregated_serving.py (8 hunks)
  • tests/integration/test_lists/qa/llm_function_sanity.txt (1 hunks)
  • tests/integration/test_lists/test-db/l0_dgx_b200.yml (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.py

📄 CodeRabbit Inference Engine (CODING_GUIDELINES.md)

**/*.py: Python code 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.
Python filenames should use snake_case (e.g., some_file.py).
Python classes should use PascalCase (e.g., class SomeClass).
Python functions and methods should use snake_case (e.g., def my_awesome_function():).
Python local variables should use snake_case. Prefix k for variable names that start with a number (e.g., k_99th_percentile).
Python global variables should use upper snake_case and prefix G (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 interfaces that may be used outside a Python file, prefer docstrings over comments.
Comments in Python 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.
Attributes and variables in Python can be documented inline; attribute docstrings will be rendered under the class docstring.
Avoid using reflection in Python when functionality can be easily achieved without it.
When using try-except blocks in Python, limit the except to the smallest set of errors possible.
When using try-except blocks to handle multiple possible variable types in Python, keep the body of the try as small as possible, using the else block to implement the logic.

Files:

  • tests/integration/defs/accuracy/test_disaggregated_serving.py
**/*.{cpp,h,hpp,cc,cxx,cu,py}

📄 CodeRabbit Inference Engine (CODING_GUIDELINES.md)

All TensorRT-LLM Open Source Software code should contain an NVIDIA copyright header that includes the current year. This includes .cpp, .h, .cu, .py, and any other source files which are compiled or interpreted.

Files:

  • tests/integration/defs/accuracy/test_disaggregated_serving.py
🧠 Learnings (4)
📓 Common learnings
Learnt from: moraxu
PR: NVIDIA/TensorRT-LLM#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.
Learnt from: galagam
PR: NVIDIA/TensorRT-LLM#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.
📚 Learning: 2025-07-28T17:06:08.621Z
Learnt from: moraxu
PR: NVIDIA/TensorRT-LLM#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/test_lists/test-db/l0_dgx_b200.yml
  • tests/integration/test_lists/qa/llm_function_sanity.txt
  • tests/integration/defs/accuracy/test_disaggregated_serving.py
📚 Learning: 2025-08-06T13:58:07.506Z
Learnt from: galagam
PR: NVIDIA/TensorRT-LLM#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/integration/test_lists/test-db/l0_dgx_b200.yml
  • tests/integration/test_lists/qa/llm_function_sanity.txt
  • tests/integration/defs/accuracy/test_disaggregated_serving.py
📚 Learning: 2025-08-01T15:14:45.673Z
Learnt from: yibinl-nvidia
PR: NVIDIA/TensorRT-LLM#6506
File: examples/models/core/mixtral/requirements.txt:3-3
Timestamp: 2025-08-01T15:14:45.673Z
Learning: In TensorRT-LLM, examples directory can have different dependency versions than the root requirements.txt file. Version conflicts between root and examples dependencies are acceptable because examples are designed to be standalone and self-contained.

Applied to files:

  • tests/integration/defs/accuracy/test_disaggregated_serving.py
🔇 Additional comments (4)
tests/integration/defs/accuracy/test_disaggregated_serving.py (1)

97-115: model_name now carries a path – verify OpenAI routing

openai.OpenAI(...).completions.create(model=model_name, …) will send the filesystem path (ctx_model) as the model identifier.
If the serving layer registers the model under a logical name (e.g. "Qwen3/Qwen3-30B-A3B"), requests will 404.

Please confirm that the router expects the same path string or pass an explicit logical name instead.

tests/integration/defs/accuracy/references/gsm8k.yaml (1)

83-89: Duplicate baseline entry – clarify intent

A plain accuracy value (83.43) was added for Qwen3/Qwen3-30B-A3B, but an identical 83.43 entry already exists later with quant_algo: FP8.

If both refer to the same configuration, keep only one to avoid ambiguous look-ups; otherwise annotate the new entry with its specific quant / decoding settings.

tests/integration/test_lists/test-db/l0_dgx_b200.yml (1)

71-71: Addition fits the 4-GPU envelope – LGTM

ctxpp2gentp2 uses 2 PP + 1 TP for ctx (2 GPU) and 1 PP + 2 TP for gen (2 GPU) → total 4 GPU, matching the list’s 4-GPU constraint.

tests/integration/test_lists/qa/llm_function_sanity.txt (1)

28-28: New sanity test registered – no issues spotted

Entry syntactically correct and keeps alphabetical order.

@tensorrt-cicd
Copy link
Collaborator

PR_Github #14584 [ run ] completed with state FAILURE
/LLM/main/L0_MergeRequest_PR pipeline #11017 completed with status: 'FAILURE'

@reasonsolo reasonsolo changed the title [TRTLLM-7014][chore] add accuracy test for ctx/gen worker with mixed-precision models [TRTLLM-7014][chore] Add accuracy test for ctx/gen worker with mixed-precision models Aug 8, 2025
@reasonsolo reasonsolo changed the title [TRTLLM-7014][chore] Add accuracy test for ctx/gen worker with mixed-precision models [TRTLLM-7014][chore] Add accuracy test for ctx/gen worker with different models Aug 8, 2025
@reasonsolo reasonsolo changed the title [TRTLLM-7014][chore] Add accuracy test for ctx/gen worker with different models [TRTLLM-7014][chore] Add accuracy test for ctx and gen workers with different models Aug 8, 2025
@reasonsolo reasonsolo changed the title [TRTLLM-7014][chore] Add accuracy test for ctx and gen workers with different models [TRTLLM-7014][chore] Add accuracy test for ctx and gen workers with different models Aug 8, 2025
@reasonsolo reasonsolo force-pushed the mixed_ctxgen_models branch from 5f88d28 to 025e01e Compare August 8, 2025 09:17
@reasonsolo
Copy link
Collaborator Author

/bot run

@tensorrt-cicd
Copy link
Collaborator

PR_Github #14597 [ run ] triggered by Bot

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

🧹 Nitpick comments (5)
tests/integration/defs/accuracy/test_disaggregated_serving.py (5)

70-76: Add docstring for new ctx/gen model parameters

launch_disaggregated_llm now accepts ctx_model and gen_model, but the function-level comment/docstring wasn’t updated. Document the purpose and default behaviour of these parameters so future readers know why separate model paths are allowed.


102-116: Redundant argument construction

ctx_args and gen_args repeat identical --host … --backend pytorch fragments. Consider extracting the common part into a helper to avoid drift when flags change.


241-249: Update docstring when expanding API

run_parallel_test now accepts test_sets, ctx_model, and gen_model. Please extend the docstring to describe the expected type/semantics of these new parameters (e.g. that test_sets is a list of harness classes).


294-296: Inefficient sequential execution of independent test sets

for test_set in test_sets: runs each accuracy harness serially inside a single server lifetime. If the harnesses are independent you could parallelise them (or parameterise via pytest) to shorten wall-clock CI time.


730-732: Use constant naming for model paths

fp4_model and fp8_model represent immutable paths; per project guidelines they should be FP4_MODEL / FP8_MODEL to signal constants.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5f88d28 and 025e01e.

📒 Files selected for processing (4)
  • tests/integration/defs/accuracy/references/gsm8k.yaml (1 hunks)
  • tests/integration/defs/accuracy/test_disaggregated_serving.py (8 hunks)
  • tests/integration/test_lists/qa/llm_function_sanity.txt (1 hunks)
  • tests/integration/test_lists/test-db/l0_dgx_b200.yml (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • tests/integration/test_lists/qa/llm_function_sanity.txt
🚧 Files skipped from review as they are similar to previous changes (2)
  • tests/integration/test_lists/test-db/l0_dgx_b200.yml
  • tests/integration/defs/accuracy/references/gsm8k.yaml
🧰 Additional context used
📓 Path-based instructions (2)
**/*.py

📄 CodeRabbit Inference Engine (CODING_GUIDELINES.md)

**/*.py: Python code 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.
Python filenames should use snake_case (e.g., some_file.py).
Python classes should use PascalCase (e.g., class SomeClass).
Python functions and methods should use snake_case (e.g., def my_awesome_function():).
Python local variables should use snake_case. Prefix k for variable names that start with a number (e.g., k_99th_percentile).
Python global variables should use upper snake_case and prefix G (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 interfaces that may be used outside a Python file, prefer docstrings over comments.
Comments in Python 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.
Attributes and variables in Python can be documented inline; attribute docstrings will be rendered under the class docstring.
Avoid using reflection in Python when functionality can be easily achieved without it.
When using try-except blocks in Python, limit the except to the smallest set of errors possible.
When using try-except blocks to handle multiple possible variable types in Python, keep the body of the try as small as possible, using the else block to implement the logic.

Files:

  • tests/integration/defs/accuracy/test_disaggregated_serving.py
**/*.{cpp,h,hpp,cc,cxx,cu,py}

📄 CodeRabbit Inference Engine (CODING_GUIDELINES.md)

All TensorRT-LLM Open Source Software code should contain an NVIDIA copyright header that includes the current year. This includes .cpp, .h, .cu, .py, and any other source files which are compiled or interpreted.

Files:

  • tests/integration/defs/accuracy/test_disaggregated_serving.py
🧠 Learnings (4)
📓 Common learnings
Learnt from: moraxu
PR: NVIDIA/TensorRT-LLM#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.
📚 Learning: 2025-07-28T17:06:08.621Z
Learnt from: moraxu
PR: NVIDIA/TensorRT-LLM#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/accuracy/test_disaggregated_serving.py
📚 Learning: 2025-08-06T13:58:07.506Z
Learnt from: galagam
PR: NVIDIA/TensorRT-LLM#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/integration/defs/accuracy/test_disaggregated_serving.py
📚 Learning: 2025-08-01T15:14:45.673Z
Learnt from: yibinl-nvidia
PR: NVIDIA/TensorRT-LLM#6506
File: examples/models/core/mixtral/requirements.txt:3-3
Timestamp: 2025-08-01T15:14:45.673Z
Learning: In TensorRT-LLM, examples directory can have different dependency versions than the root requirements.txt file. Version conflicts between root and examples dependencies are acceptable because examples are designed to be standalone and self-contained.

Applied to files:

  • tests/integration/defs/accuracy/test_disaggregated_serving.py
⏰ 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

@tensorrt-cicd
Copy link
Collaborator

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

@reasonsolo reasonsolo force-pushed the mixed_ctxgen_models branch from 025e01e to 0a1a125 Compare August 11, 2025 02:55
@reasonsolo
Copy link
Collaborator Author

/bot run --add-multi-gpu-test

@reasonsolo reasonsolo self-assigned this Aug 11, 2025
@tensorrt-cicd
Copy link
Collaborator

PR_Github #14734 [ run ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #14734 [ run ] completed with state FAILURE
/LLM/main/L0_MergeRequest_PR pipeline #11121 completed with status: 'FAILURE'

@reasonsolo reasonsolo force-pushed the mixed_ctxgen_models branch from 0a1a125 to a8c8005 Compare August 11, 2025 03:31
@reasonsolo
Copy link
Collaborator Author

/bot run --add-multi-gpu-test

@tensorrt-cicd
Copy link
Collaborator

PR_Github #14738 [ run ] triggered by Bot

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: 3

🧹 Nitpick comments (3)
tests/integration/defs/accuracy/test_disaggregated_serving.py (3)

102-119: Reduce duplication: factor server args builder

ctx_args/gen_args and ctx_server_args/gen_server_args are near-duplicates differing by model/port/tp/pp. Consider a small helper to build these to cut repetition and lower the chance of drift.

Example refactor:

+def _build_server_args(bin_path: str, model: str, host: str, backend: str,
+                       port: int, tp: int, pp: int, extra_opts_path: str,
+                       max_num_tokens: Optional[int]) -> List[str]:
+    args = [bin_path, model, "--host", host, "--backend", backend,
+            "--port", str(port), "--extra_llm_api_options", extra_opts_path,
+            f"--tp_size={tp}", f"--pp_size={pp}"]
+    if max_num_tokens is not None:
+        args.append(f"--max_num_tokens={max_num_tokens}")
+    return args

Then call _build_server_args(...) for ctx/gen.

Also applies to: 140-147


289-297: Iterating multiple datasets is correct; consider per-task isolation

Looping over multiple test sets under the same server context is efficient. If you want one failing dataset not to abort the others, wrap per-task evaluate in try/except and aggregate results.

-        for test_set in test_sets:
-            task = test_set(model_name)
-            task.evaluate(llm)
+        errors = []
+        for test_set in test_sets:
+            task = test_set(model_name)
+            try:
+                task.evaluate(llm)
+            except Exception as e:
+                errors.append((test_set.__name__, e))
+        if errors:
+            msg = "; ".join(f"{name}: {exc}" for name, exc in errors)
+            pytest.fail(f"One or more accuracy tasks failed: {msg}")

1-1: Missing NVIDIA copyright header

Per repository guidelines, source files should carry the NVIDIA copyright header with the current year. Consider adding it to this file if it’s missing at the repository head.

Would you like me to generate the header snippet?

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0a1a125 and a8c8005.

📒 Files selected for processing (4)
  • tests/integration/defs/accuracy/references/gsm8k.yaml (1 hunks)
  • tests/integration/defs/accuracy/test_disaggregated_serving.py (8 hunks)
  • tests/integration/test_lists/qa/llm_function_sanity.txt (1 hunks)
  • tests/integration/test_lists/test-db/l0_dgx_b200.yml (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • tests/integration/test_lists/qa/llm_function_sanity.txt
🚧 Files skipped from review as they are similar to previous changes (2)
  • tests/integration/defs/accuracy/references/gsm8k.yaml
  • tests/integration/test_lists/test-db/l0_dgx_b200.yml
🧰 Additional context used
📓 Path-based instructions (2)
**/*.py

📄 CodeRabbit Inference Engine (CODING_GUIDELINES.md)

**/*.py: Python code 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.
Python filenames should use snake_case (e.g., some_file.py).
Python classes should use PascalCase (e.g., class SomeClass).
Python functions and methods should use snake_case (e.g., def my_awesome_function():).
Python local variables should use snake_case. Prefix k for variable names that start with a number (e.g., k_99th_percentile).
Python global variables should use upper snake_case and prefix G (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 interfaces that may be used outside a Python file, prefer docstrings over comments.
Comments in Python 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.
Attributes and variables in Python can be documented inline; attribute docstrings will be rendered under the class docstring.
Avoid using reflection in Python when functionality can be easily achieved without it.
When using try-except blocks in Python, limit the except to the smallest set of errors possible.
When using try-except blocks to handle multiple possible variable types in Python, keep the body of the try as small as possible, using the else block to implement the logic.

Files:

  • tests/integration/defs/accuracy/test_disaggregated_serving.py
**/*.{cpp,h,hpp,cc,cxx,cu,py}

📄 CodeRabbit Inference Engine (CODING_GUIDELINES.md)

All TensorRT-LLM Open Source Software code should contain an NVIDIA copyright header that includes the current year. This includes .cpp, .h, .cu, .py, and any other source files which are compiled or interpreted.

Files:

  • tests/integration/defs/accuracy/test_disaggregated_serving.py
🧠 Learnings (1)
📚 Learning: 2025-07-28T17:06:08.621Z
Learnt from: moraxu
PR: NVIDIA/TensorRT-LLM#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/accuracy/test_disaggregated_serving.py
🧬 Code Graph Analysis (1)
tests/integration/defs/accuracy/test_disaggregated_serving.py (2)
tests/integration/defs/accuracy/accuracy_core.py (6)
  • LlmapiAccuracyTestHarness (765-776)
  • evaluate (146-203)
  • evaluate (684-694)
  • get_accuracy_task (779-787)
  • GSM8K (290-305)
  • MMLU (273-287)
tests/integration/defs/conftest.py (2)
  • parametrize_with_ids (1786-1811)
  • llm_models_root (77-83)
⏰ 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 (3)
tests/integration/defs/accuracy/test_disaggregated_serving.py (3)

26-26: Import looks good

Adding skip_pre_blackwell is appropriate and used below.


534-535: Call site updated to pass a single task class in a list — LGTM

This aligns with the new run_parallel_test signature.


541-542: Call site updated to pass a single task class in a list — LGTM

Consistent with the new interface.

@tensorrt-cicd
Copy link
Collaborator

PR_Github #14738 [ run ] completed with state FAILURE
/LLM/main/L0_MergeRequest_PR pipeline #11125 completed with status: 'FAILURE'

@reasonsolo reasonsolo requested review from a team as code owners August 12, 2025 02:43
@reasonsolo reasonsolo force-pushed the mixed_ctxgen_models branch from f694274 to 92edebd Compare August 12, 2025 02:46
@reasonsolo reasonsolo force-pushed the mixed_ctxgen_models branch from 92edebd to 08a06bf Compare August 12, 2025 09:17
@reasonsolo
Copy link
Collaborator Author

/bot run

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

♻️ Duplicate comments (2)
tests/integration/defs/accuracy/test_disaggregated_serving.py (2)

241-249: Fix type hint for test_sets parameter.

The test_sets parameter is used as a sequence of task classes (not instances) that are instantiated within the loop (line 295). The current type hint List[LlmapiAccuracyTestHarness] is misleading.

Update the imports and type hint:

-from typing import Any, Dict, List, Optional
+from typing import Any, Dict, List, Optional, Type

def run_parallel_test(model_name: str,
                      model_path: str,
                      ctx_pp: int,
                      ctx_tp: int,
                      gen_pp: int,
                      gen_tp: int,
-                      test_sets: List[LlmapiAccuracyTestHarness],
+                      test_sets: List[Type[LlmapiAccuracyTestHarness]],
                      ctx_model: str = None,
                      gen_model: str = None):

727-746: Improve test robustness and code organization.

The new test class needs improvements for better maintainability and consistency:

  1. Add a MODEL_NAME class constant for consistency with other test classes
  2. Use uppercase naming for model path constants following Python conventions
  3. Consider using snake_case for parameter names to match Python style guidelines

Apply this diff to improve the test class:

@skip_pre_blackwell
@pytest.mark.timeout(3600)
class TestQwen3_30B_A3B(LlmapiAccuracyTestHarness):
-    FP4_MODEL = f"{llm_models_root()}/Qwen3/saved_models_Qwen3-30B-A3B_nvfp4_hf"
-    FP8_MODEL = f"{llm_models_root()}/Qwen3/saved_models_Qwen3-30B-A3B_fp8_hf"
+    MODEL_NAME = "Qwen3/Qwen3-30B-A3B"
+    FP4_MODEL = f"{llm_models_root()}/Qwen3/saved_models_Qwen3-30B-A3B_nvfp4_hf"
+    FP8_MODEL = f"{llm_models_root()}/Qwen3/saved_models_Qwen3-30B-A3B_fp8_hf"

    @pytest.mark.skip_less_device(4)
-    @pytest.mark.parametrize("ctx_pp,gen_tp", [(2, 2)], ids=["ctxpp2gentp2"])
+    @pytest.mark.parametrize("ctx_pp, gen_tp", [(2, 2)], ids=["ctxpp2gentp2"])
    def test_mixed_ctx_gen_model(self, ctx_pp, gen_tp):
        ctx_model = self.FP4_MODEL
        gen_model = self.FP8_MODEL
-        return run_parallel_test("Qwen3/Qwen3-30B-A3B",
+        return run_parallel_test(self.MODEL_NAME,
                                 ctx_model,
                                 ctx_pp=ctx_pp,
                                 ctx_tp=1,
                                 gen_pp=1,
                                 gen_tp=gen_tp,
                                 test_sets=[GSM8K, MMLU],
                                 ctx_model=ctx_model,
                                 gen_model=gen_model)
🧹 Nitpick comments (1)
tests/integration/defs/accuracy/test_disaggregated_serving.py (1)

70-76: Consider renaming model_name parameter for clarity.

The parameter model_name actually receives a model path in all call sites (see line 291 where model_path is passed). This naming inconsistency could confuse future maintainers. Additionally, the optional ctx_model and gen_model parameters should have explicit type hints.

Apply this diff to improve clarity:

def launch_disaggregated_llm(disaggregated_server_config: Dict[str, Any],
                             ctx_server_config: Dict[str, Any],
                             gen_server_config: Dict[str, Any],
-                             model_name: str,
+                             model_path: str,
                             tensor_parallel_size: int = 1,
-                             ctx_model: str = None,
-                             gen_model: str = None):
+                             ctx_model: Optional[str] = None,
+                             gen_model: Optional[str] = None):

Then update the usage on lines 97, 102-103, 204, and 227:

-    args = LlmArgs.from_kwargs(model=model_name,
+    args = LlmArgs.from_kwargs(model=model_path,
                               tensor_parallel_size=tensor_parallel_size)

-    ctx_model = ctx_model or model_name
-    gen_model = gen_model or model_name
+    ctx_model = ctx_model or model_path
+    gen_model = gen_model or model_path

-            response = client.completions.create(model=model_name,
+            response = client.completions.create(model=os.path.basename(model_path.rstrip("/")),

-        tokenizer = load_hf_tokenizer(model_name)
+        tokenizer = load_hf_tokenizer(model_path)
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 92edebd and 08a06bf.

📒 Files selected for processing (4)
  • tests/integration/defs/accuracy/references/gsm8k.yaml (1 hunks)
  • tests/integration/defs/accuracy/test_disaggregated_serving.py (8 hunks)
  • tests/integration/test_lists/qa/llm_function_sanity.txt (1 hunks)
  • tests/integration/test_lists/test-db/l0_dgx_b200.yml (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • tests/integration/defs/accuracy/references/gsm8k.yaml
🚧 Files skipped from review as they are similar to previous changes (2)
  • tests/integration/test_lists/qa/llm_function_sanity.txt
  • tests/integration/test_lists/test-db/l0_dgx_b200.yml
🧰 Additional context used
📓 Path-based instructions (2)
**/*.py

📄 CodeRabbit Inference Engine (CODING_GUIDELINES.md)

**/*.py: Python code 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.
Python filenames should use snake_case (e.g., some_file.py).
Python classes should use PascalCase (e.g., class SomeClass).
Python functions and methods should use snake_case (e.g., def my_awesome_function():).
Python local variables should use snake_case. Prefix k for variable names that start with a number (e.g., k_99th_percentile).
Python global variables should use upper snake_case and prefix G (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 interfaces that may be used outside a Python file, prefer docstrings over comments.
Comments in Python 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.
Attributes and variables in Python can be documented inline; attribute docstrings will be rendered under the class docstring.
Avoid using reflection in Python when functionality can be easily achieved without it.
When using try-except blocks in Python, limit the except to the smallest set of errors possible.
When using try-except blocks to handle multiple possible variable types in Python, keep the body of the try as small as possible, using the else block to implement the logic.

Files:

  • tests/integration/defs/accuracy/test_disaggregated_serving.py
**/*.{cpp,h,hpp,cc,cxx,cu,py}

📄 CodeRabbit Inference Engine (CODING_GUIDELINES.md)

All TensorRT-LLM Open Source Software code should contain an NVIDIA copyright header that includes the current year. This includes .cpp, .h, .cu, .py, and any other source files which are compiled or interpreted.

Files:

  • tests/integration/defs/accuracy/test_disaggregated_serving.py
🧠 Learnings (1)
📚 Learning: 2025-07-28T17:06:08.621Z
Learnt from: moraxu
PR: NVIDIA/TensorRT-LLM#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/accuracy/test_disaggregated_serving.py
🧬 Code Graph Analysis (1)
tests/integration/defs/accuracy/test_disaggregated_serving.py (4)
tests/integration/defs/disaggregated/test_disaggregated_single_gpu.py (1)
  • model_path (39-44)
tests/integration/defs/conftest.py (2)
  • parametrize_with_ids (1786-1811)
  • llm_models_root (77-83)
tests/integration/defs/accuracy/test_llm_api_pytorch.py (1)
  • TestQwen3_30B_A3B (2105-2307)
tensorrt_llm/evaluate/mmlu.py (1)
  • MMLU (51-339)
⏰ 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/integration/defs/accuracy/test_disaggregated_serving.py (6)

26-26: LGTM!

The addition of skip_pre_blackwell import is appropriate for gating the new test class on Blackwell architecture support.


102-119: LGTM!

The conditional logic for setting context and generation models with fallback to the base model is correctly implemented. The server argument lists are properly configured for each worker type.


140-147: LGTM!

The server arguments are correctly updated to use the worker-specific argument lists and configurations.


288-296: LGTM!

The function correctly passes the optional ctx_model and gen_model parameters to launch_disaggregated_llm and properly iterates over multiple test sets for evaluation.


534-534: LGTM!

The test function correctly wraps the test set string in a list for compatibility with the updated run_parallel_test signature that expects a list of test sets.


541-541: LGTM!

The test function correctly wraps the test set in a list, consistent with the updated function signature.

@reasonsolo
Copy link
Collaborator Author

/bot run

3 similar comments
@reasonsolo
Copy link
Collaborator Author

/bot run

@ZhanruiSunCh
Copy link
Collaborator

/bot run

@reasonsolo
Copy link
Collaborator Author

/bot run

@tensorrt-cicd
Copy link
Collaborator

PR_Github #15225 [ run ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #15227 [ run ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #15225 [ run ] completed with state ABORTED

@tensorrt-cicd
Copy link
Collaborator

PR_Github #15227 [ run ] completed with state SUCCESS
/LLM/main/L0_MergeRequest_PR pipeline #11501 completed with status: 'FAILURE'

@reasonsolo reasonsolo force-pushed the mixed_ctxgen_models branch from 08a06bf to 49c27fc Compare August 14, 2025 07:25
@reasonsolo
Copy link
Collaborator Author

/bot run

@tensorrt-cicd
Copy link
Collaborator

PR_Github #15253 [ run ] triggered by Bot

@reasonsolo
Copy link
Collaborator Author

/bot run

@reasonsolo reasonsolo force-pushed the mixed_ctxgen_models branch from 49c27fc to f4ec496 Compare August 18, 2025 01:35
@tensorrt-cicd
Copy link
Collaborator

PR_Github #15557 [ run ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #15557 [ run ] completed with state SUCCESS
/LLM/main/L0_MergeRequest_PR pipeline #11717 completed with status: 'ABORTED'

@reasonsolo
Copy link
Collaborator Author

/bot run --reuse-test

@tensorrt-cicd
Copy link
Collaborator

PR_Github #15581 [ run ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

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

@reasonsolo reasonsolo removed request for a team and ruodil August 19, 2025 01:47
@Shixiaowei02 Shixiaowei02 merged commit 71e28ea into NVIDIA:main Aug 19, 2025
4 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