-
Couldn't load subscription status.
- Fork 1.8k
[TRTLLM-7014][chore] Add accuracy test for ctx and gen workers with different models #6741
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📝 WalkthroughWalkthroughAdds 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
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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
|
/bot run --add-multi-gpu-test |
|
PR_Github #14584 [ run ] triggered by Bot |
There was a problem hiding this 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 unusedtestsetparameter to avoid a PyTest collection error
test_mixed_ctx_gen_model()declares atestsetargument, 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
📒 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.ymltests/integration/test_lists/qa/llm_function_sanity.txttests/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.ymltests/integration/test_lists/qa/llm_function_sanity.txttests/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_namenow 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 intentA plain accuracy value (83.43) was added for
Qwen3/Qwen3-30B-A3B, but an identical 83.43 entry already exists later withquant_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
ctxpp2gentp2uses 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 spottedEntry syntactically correct and keeps alphabetical order.
|
PR_Github #14584 [ run ] completed with state |
5f88d28 to
025e01e
Compare
|
/bot run |
|
PR_Github #14597 [ run ] triggered by Bot |
There was a problem hiding this 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_llmnow acceptsctx_modelandgen_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_argsandgen_argsrepeat identical--host … --backend pytorchfragments. Consider extracting the common part into a helper to avoid drift when flags change.
241-249: Update docstring when expanding API
run_parallel_testnow acceptstest_sets,ctx_model, andgen_model. Please extend the docstring to describe the expected type/semantics of these new parameters (e.g. thattest_setsis 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_modelandfp8_modelrepresent immutable paths; per project guidelines they should beFP4_MODEL/FP8_MODELto signal constants.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 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
|
PR_Github #14597 [ run ] completed with state |
025e01e to
0a1a125
Compare
|
/bot run --add-multi-gpu-test |
|
PR_Github #14734 [ run ] triggered by Bot |
|
PR_Github #14734 [ run ] completed with state |
0a1a125 to
a8c8005
Compare
|
/bot run --add-multi-gpu-test |
|
PR_Github #14738 [ run ] triggered by Bot |
There was a problem hiding this 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 builderctx_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 argsThen call _build_server_args(...) for ctx/gen.
Also applies to: 140-147
289-297: Iterating multiple datasets is correct; consider per-task isolationLooping 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 headerPer 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
📒 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 goodAdding skip_pre_blackwell is appropriate and used below.
534-535: Call site updated to pass a single task class in a list — LGTMThis aligns with the new run_parallel_test signature.
541-542: Call site updated to pass a single task class in a list — LGTMConsistent with the new interface.
|
PR_Github #14738 [ run ] completed with state |
f694274 to
92edebd
Compare
92edebd to
08a06bf
Compare
|
/bot run |
There was a problem hiding this 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 fortest_setsparameter.The
test_setsparameter is used as a sequence of task classes (not instances) that are instantiated within the loop (line 295). The current type hintList[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:
- Add a
MODEL_NAMEclass constant for consistency with other test classes- Use uppercase naming for model path constants following Python conventions
- 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 renamingmodel_nameparameter for clarity.The parameter
model_nameactually receives a model path in all call sites (see line 291 wheremodel_pathis passed). This naming inconsistency could confuse future maintainers. Additionally, the optionalctx_modelandgen_modelparameters 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
📒 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_blackwellimport 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_modelandgen_modelparameters tolaunch_disaggregated_llmand 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_testsignature 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.
|
/bot run |
3 similar comments
|
/bot run |
|
/bot run |
|
/bot run |
|
PR_Github #15225 [ run ] triggered by Bot |
|
PR_Github #15227 [ run ] triggered by Bot |
|
PR_Github #15225 [ run ] completed with state |
|
PR_Github #15227 [ run ] completed with state |
08a06bf to
49c27fc
Compare
|
/bot run |
|
PR_Github #15253 [ run ] triggered by Bot |
|
/bot run |
Signed-off-by: Lizhi Zhou <[email protected]>
Signed-off-by: Lizhi Zhou <[email protected]>
49c27fc to
f4ec496
Compare
|
PR_Github #15557 [ run ] triggered by Bot |
|
PR_Github #15557 [ run ] completed with state |
|
/bot run --reuse-test |
|
PR_Github #15581 [ run ] triggered by Bot |
|
PR_Github #15581 [ run ] completed with state |
Summary by CodeRabbit
New Features
Tests
Chores
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 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.