-
Notifications
You must be signed in to change notification settings - Fork 2k
Draft: [None][chore] Refactor disagg integration tests #8848
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
📝 WalkthroughWalkthroughThis PR consolidates disaggregated inference testing by removing ~40 YAML configuration files and the monolithic test_disaggregated.py module, replacing them with a parametrized test harness (test_disaggregated_parametrized.py) that dynamically generates configurations, and introduces a separate benchmark test module (test_disaggregated_benchmark.py). Test lists across multiple environments are updated to reference the new parametrized tests. Changes
Sequence Diagram(s)sequenceDiagram
participant Old as Old Test Approach
participant Param as New Parametrized Test
rect rgb(220, 240, 255)
Note over Old,Param: Test Discovery & Parametrization
Old->>Old: Load 50+ discrete test functions<br/>from test_disaggregated.py
Param->>Param: pytest_generate_tests() hook<br/>iterates TEST_CONFIGS list
Param->>Param: Dynamically creates test variants<br/>with [param_id] suffixes
end
rect rgb(240, 255, 240)
Note over Old,Param: Configuration Generation
Old->>Old: Each test function<br/>hardcodes YAML path
Param->>Param: DisaggregatedTestConfig.generate_yaml_config()<br/>dynamically assembles YAML<br/>in temp directory
end
rect rgb(255, 245, 230)
Note over Old,Param: Test Execution
Old->>Old: run_disaggregated_test()<br/>with fixed config
Param->>Param: run_disaggregated_test_parametrized()<br/>with config object
Param->>Param: Server startup, client tests,<br/>optional validation hooks
end
rect rgb(255, 235, 235)
Note over Old,Param: Benchmark Tests
Old->>Old: Discrete benchmark tests<br/>in same module
Param->>Param: Separated into<br/>test_disaggregated_benchmark.py<br/>run_disaggregated_benchmark()
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Areas requiring extra attention during review:
Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (2 warnings, 1 inconclusive)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (53)
tests/integration/defs/disaggregated/disagg_test_utils.py(1 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_cache_aware_balance.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_cache_aware_balance_deepseek_v3.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_cache_reuse.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_cache_reuse_deepseek_v3.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_conditional.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_conditional_deepseek_v3.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ctxpp2_genpp2.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ctxpp2_gentp2.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ctxpp4_genpp4.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ctxpp4_gentp4.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp1_gentp1_deepseek_v3_lite.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp1_gentp1_deepseek_v3_lite_one_mtp.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp1_gentp1_deepseek_v3_lite_one_mtp_attention_dp_overlap.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp1_gentp1_deepseek_v3_lite_one_mtp_ctxpp2_gentp2.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp1_gentp1_deepseek_v3_lite_two_mtp.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_genpp2.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp1.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp1_trt_backend.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp2_deepseek_v3_lite.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp2_deepseek_v3_lite_attention_dp.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp2_deepseek_v3_lite_attention_dp_one.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp2_deepseek_v3_lite_attention_dp_one_mtp.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp2_deepseek_v3_lite_attention_dp_overlap.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp2_deepseek_v3_lite_attention_dp_overlap_cuda_graph.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp2_deepseek_v3_lite_mpi.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp2_deepseek_v3_lite_nixl.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp2_deepseek_v3_lite_overlap_cuda_graph.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp2_deepseek_v3_lite_ucx.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2pp2_gentp2pp2.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_cuda_graph_padding.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_diff_max_tokens.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_gen_only.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_gen_only_bs1.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_gen_only_trt_backend.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_load_balance.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_metrics.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_mixed.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ngram.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_overlap.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_trt_backend.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_trtllm_sampler.yaml(0 hunks)tests/integration/defs/disaggregated/test_disaggregated.py(0 hunks)tests/integration/defs/disaggregated/test_disaggregated_benchmark.py(1 hunks)tests/integration/defs/disaggregated/test_disaggregated_parametrized.py(1 hunks)tests/integration/test_lists/qa/llm_function_core.txt(1 hunks)tests/integration/test_lists/qa/llm_function_core_sanity.txt(1 hunks)tests/integration/test_lists/test-db/l0_a10.yml(1 hunks)tests/integration/test_lists/test-db/l0_dgx_b200.yml(3 hunks)tests/integration/test_lists/test-db/l0_dgx_b300.yml(1 hunks)tests/integration/test_lists/test-db/l0_dgx_h100.yml(2 hunks)tests/integration/test_lists/test-db/l0_dgx_h200.yml(2 hunks)tests/integration/test_lists/test-db/l0_h100.yml(1 hunks)
💤 Files with no reviewable changes (42)
- tests/integration/defs/disaggregated/test_configs/disagg_config_ctxpp4_gentp4.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp1.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_gen_only_trt_backend.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_mixed.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp2_deepseek_v3_lite.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_cache_aware_balance.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp1_gentp1_deepseek_v3_lite.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_load_balance.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp2_deepseek_v3_lite_attention_dp_overlap.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp1_gentp1_deepseek_v3_lite_one_mtp_ctxpp2_gentp2.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_diff_max_tokens.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_metrics.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp2_deepseek_v3_lite_attention_dp.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_cache_reuse_deepseek_v3.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2pp2_gentp2pp2.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp1_gentp1_deepseek_v3_lite_one_mtp.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp2_deepseek_v3_lite_attention_dp_one_mtp.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp2_deepseek_v3_lite_nixl.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_trtllm_sampler.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_trt_backend.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp1_gentp1_deepseek_v3_lite_one_mtp_attention_dp_overlap.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp2_deepseek_v3_lite_attention_dp_overlap_cuda_graph.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_ctxpp4_genpp4.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp2_deepseek_v3_lite_attention_dp_one.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_ngram.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_genpp2.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_gen_only_bs1.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_cache_reuse.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp2_deepseek_v3_lite_ucx.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_cuda_graph_padding.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_overlap.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_gen_only.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_cache_aware_balance_deepseek_v3.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_ctxpp2_genpp2.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp2_deepseek_v3_lite_overlap_cuda_graph.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_ctxpp2_gentp2.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp2_deepseek_v3_lite_mpi.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp1_gentp1_deepseek_v3_lite_two_mtp.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_conditional_deepseek_v3.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_conditional.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp1_trt_backend.yaml
- tests/integration/defs/disaggregated/test_disaggregated.py
🧰 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/disaggregated/disagg_test_utils.pytests/integration/defs/disaggregated/test_disaggregated_benchmark.pytests/integration/defs/disaggregated/test_disaggregated_parametrized.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/disaggregated/disagg_test_utils.pytests/integration/defs/disaggregated/test_disaggregated_benchmark.pytests/integration/defs/disaggregated/test_disaggregated_parametrized.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/disaggregated/disagg_test_utils.pytests/integration/defs/disaggregated/test_disaggregated_benchmark.pytests/integration/defs/disaggregated/test_disaggregated_parametrized.py
🧠 Learnings (9)
📚 Learning: 2025-09-09T09:40:45.658Z
Learnt from: fredricz-20070104
Repo: NVIDIA/TensorRT-LLM PR: 7645
File: tests/integration/test_lists/qa/llm_function_core.txt:648-648
Timestamp: 2025-09-09T09:40:45.658Z
Learning: In TensorRT-LLM test lists, it's common and intentional for the same test to appear in multiple test list files when they serve different purposes (e.g., llm_function_core.txt for comprehensive core functionality testing and llm_function_core_sanity.txt for quick sanity checks). This duplication allows tests to be run in different testing contexts.
Applied to files:
tests/integration/test_lists/test-db/l0_h100.ymltests/integration/test_lists/test-db/l0_dgx_b300.ymltests/integration/test_lists/qa/llm_function_core_sanity.txttests/integration/test_lists/test-db/l0_dgx_h100.ymltests/integration/test_lists/qa/llm_function_core.txttests/integration/test_lists/test-db/l0_dgx_b200.ymltests/integration/test_lists/test-db/l0_dgx_h200.ymltests/integration/test_lists/test-db/l0_a10.yml
📚 Learning: 2025-09-17T02:48:52.732Z
Learnt from: tongyuantongyu
Repo: NVIDIA/TensorRT-LLM PR: 7781
File: tests/integration/test_lists/waives.txt:313-313
Timestamp: 2025-09-17T02:48:52.732Z
Learning: In TensorRT-LLM, `tests/integration/test_lists/waives.txt` is specifically for waiving/skipping tests, while other test list files like those in `test-db/` and `qa/` directories are for different test execution contexts (pre-merge, post-merge, QA tests). The same test appearing in both waives.txt and execution list files is intentional - the test is part of test suites but will be skipped due to the waiver.
Applied to files:
tests/integration/test_lists/test-db/l0_h100.ymltests/integration/test_lists/test-db/l0_dgx_b300.ymltests/integration/test_lists/qa/llm_function_core_sanity.txttests/integration/test_lists/test-db/l0_dgx_h100.ymltests/integration/test_lists/qa/llm_function_core.txttests/integration/test_lists/test-db/l0_dgx_b200.ymltests/integration/test_lists/test-db/l0_a10.yml
📚 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/integration/test_lists/test-db/l0_h100.ymltests/integration/test_lists/test-db/l0_dgx_b300.ymltests/integration/test_lists/qa/llm_function_core_sanity.txttests/integration/test_lists/test-db/l0_dgx_h100.ymltests/integration/test_lists/qa/llm_function_core.txttests/integration/test_lists/test-db/l0_dgx_b200.ymltests/integration/test_lists/test-db/l0_dgx_h200.ymltests/integration/defs/disaggregated/test_disaggregated_parametrized.pytests/integration/test_lists/test-db/l0_a10.yml
📚 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/test_lists/test-db/l0_h100.ymltests/integration/test_lists/test-db/l0_dgx_b300.ymltests/integration/test_lists/qa/llm_function_core_sanity.txttests/integration/test_lists/test-db/l0_dgx_h100.ymltests/integration/test_lists/qa/llm_function_core.txttests/integration/defs/disaggregated/test_disaggregated_benchmark.pytests/integration/test_lists/test-db/l0_dgx_b200.ymltests/integration/test_lists/test-db/l0_dgx_h200.yml
📚 Learning: 2025-08-14T06:36:40.701Z
Learnt from: timlee0212
Repo: NVIDIA/TensorRT-LLM PR: 6886
File: tensorrt_llm/_torch/models/modeling_deepseekv3.py:0-0
Timestamp: 2025-08-14T06:36:40.701Z
Learning: In DeepSeek V3 model (tensorrt_llm/_torch/models/modeling_deepseekv3.py), the disagreement between AllReduce.__init__ guard and _compute_mlp_tp_size logic for MNNVL usage is expected by design. The AllReduce component and MLP TP-size computation intentionally use different criteria for MNNVL availability decisions.
Applied to files:
tests/integration/test_lists/test-db/l0_h100.yml
📚 Learning: 2025-08-29T14:07:45.863Z
Learnt from: EmmaQiaoCh
Repo: NVIDIA/TensorRT-LLM PR: 7370
File: tests/unittest/trt/model_api/test_model_quantization.py:24-27
Timestamp: 2025-08-29T14:07:45.863Z
Learning: In TensorRT-LLM's CI infrastructure, pytest skip markers (pytest.mark.skip) are properly honored even when test files have __main__ blocks that call test functions directly. The testing system correctly skips tests without requiring modifications to the __main__ block execution pattern.
Applied to files:
tests/integration/test_lists/test-db/l0_h100.ymltests/integration/test_lists/test-db/l0_dgx_b200.ymltests/integration/test_lists/test-db/l0_dgx_h200.yml
📚 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/integration/test_lists/test-db/l0_h100.ymltests/integration/test_lists/test-db/l0_dgx_b200.yml
📚 Learning: 2025-09-17T06:01:01.836Z
Learnt from: fredricz-20070104
Repo: NVIDIA/TensorRT-LLM PR: 7785
File: tests/integration/defs/perf/utils.py:321-333
Timestamp: 2025-09-17T06:01:01.836Z
Learning: In test infrastructure code for disaggregated serving tests, prefer logging errors and continuing execution rather than raising exceptions on timeout, to avoid disrupting test cleanup and causing cascading failures.
Applied to files:
tests/integration/defs/disaggregated/disagg_test_utils.py
📚 Learning: 2025-10-13T19:45:03.518Z
Learnt from: nv-lschneider
Repo: NVIDIA/TensorRT-LLM PR: 7910
File: tests/unittest/_torch/multi_gpu/test_nccl_device.py:138-149
Timestamp: 2025-10-13T19:45:03.518Z
Learning: In test_nccl_device.py, the NCCL device AllReduce implementation compares the entire residual tensor on each rank, unlike the UB implementation which compares per-rank chunks. The residual chunking calculations in the test are intentionally overridden to reflect this design difference.
Applied to files:
tests/integration/test_lists/qa/llm_function_core.txt
🧬 Code graph analysis (3)
tests/integration/defs/disaggregated/disagg_test_utils.py (3)
tests/integration/defs/trt_test_alternative.py (1)
check_call(250-258)tests/integration/defs/disaggregated/test_disaggregated_parametrized.py (2)
validate_timing_metrics(52-152)extra_endpoints_test(1487-1499)tests/unittest/llmapi/apps/_test_disagg_serving_multi_nodes.py (1)
env(61-68)
tests/integration/defs/disaggregated/test_disaggregated_benchmark.py (5)
tests/integration/defs/trt_test_alternative.py (2)
check_call(250-258)popen(199-218)tests/integration/defs/conftest.py (4)
llm_root(192-193)disaggregated_test_root(2527-2532)disaggregated_example_root(285-290)llm_venv(702-719)tests/integration/defs/triton_server/conftest.py (1)
models_root(280-284)tensorrt_llm/logger.py (1)
error(126-127)tests/integration/defs/local_venv.py (1)
get_working_directory(43-49)
tests/integration/defs/disaggregated/test_disaggregated_parametrized.py (5)
tests/integration/defs/trt_test_alternative.py (2)
check_call(250-258)popen(199-218)tensorrt_llm/_utils.py (1)
mpi_disabled(522-524)tensorrt_llm/logger.py (1)
error(126-127)tests/integration/defs/conftest.py (3)
llm_venv(702-719)disaggregated_test_root(2527-2532)disaggregated_example_root(285-290)tensorrt_llm/serve/openai_disagg_server.py (1)
perf_metrics(247-298)
🪛 Ruff (0.14.2)
tests/integration/defs/disaggregated/disagg_test_utils.py
204-204: Consider [*worker_processes, server_proc] instead of concatenation
Replace with [*worker_processes, server_proc]
(RUF005)
208-210: Consider iterable unpacking instead of concatenation
Replace with iterable unpacking
(RUF005)
215-217: Consider iterable unpacking instead of concatenation
Replace with iterable unpacking
(RUF005)
220-222: Consider iterable unpacking instead of concatenation
Replace with iterable unpacking
(RUF005)
tests/integration/defs/disaggregated/test_disaggregated_benchmark.py
56-56: Avoid specifying long messages outside the exception class
(TRY003)
155-155: Abstract raise to an inner function
(TRY301)
155-155: Avoid specifying long messages outside the exception class
(TRY003)
218-218: Unused function argument: disaggregated_test_root
(ARG001)
tests/integration/defs/disaggregated/test_disaggregated_parametrized.py
203-203: Consider [*worker_processes, server_proc] instead of concatenation
Replace with [*worker_processes, server_proc]
(RUF005)
207-209: Consider iterable unpacking instead of concatenation
Replace with iterable unpacking
(RUF005)
214-216: Consider iterable unpacking instead of concatenation
Replace with iterable unpacking
(RUF005)
219-221: Consider iterable unpacking instead of concatenation
Replace with iterable unpacking
(RUF005)
1305-1305: Unused function argument: suffix
(ARG001)
1427-1427: Starting a process with a partial executable path
(S607)
1444-1444: Unused function argument: request
(ARG001)
1463-1463: Unused function argument: disaggregated_test_root
(ARG001)
1466-1466: Unused function argument: model_root_fixture
(ARG001)
1491-1492: Audit URL open for permitted schemes. Allowing use of file: or custom schemes is often unexpected.
(S310)
tests/integration/defs/disaggregated/test_disaggregated_parametrized.py
Outdated
Show resolved
Hide resolved
ea61a72 to
3a71369
Compare
|
@coderabbitai help |
ChatThere are 3 ways to chat with CodeRabbit:
CodeRabbit commands
Other keywords and placeholders
Status, support, documentation and community
|
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
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
♻️ Duplicate comments (2)
tests/integration/defs/disaggregated/test_disaggregated_benchmark.py (1)
87-177: Critical: Guard process cleanup against uninitialized variables.If either
popen(...)call raises an exception before the context manager assignsworkers_procorserver_proc(e.g.,mpirunnot found, invalid configuration), thefinallyblock will trigger anUnboundLocalErrorwhen trying to call.terminate()and.wait()on undefined variables. This masks the real error and prevents proper cleanup.Initialize both variables to
Nonebefore thetryblock and guard the cleanup operations:def run_disaggregated_benchmark(...): """Run disaggregated benchmark with given configuration.""" run_env = env.copy() run_env["UCX_TLS"] = "^ib" + workers_proc = None + server_proc = None + workers_cmd = [ 'mpirun', '--allow-run-as-root', '--oversubscribe', '-n', str(num_ranks), 'trtllm-serve', 'disaggregated_mpi_worker', '-c', config_file ] server_start_timeout = 1200 server_cmd = [ 'trtllm-serve', 'disaggregated', '--server_start_timeout', str(server_start_timeout), '-c', config_file ] try: with ( # Start workers open('output_workers.log', 'w') as output_workers, popen(workers_cmd, stdout=output_workers, stderr=subprocess.STDOUT, env=run_env, cwd=cwd) as workers_proc, # Start server open('output_disagg.log', 'w') as output_disagg, popen(server_cmd, stdout=output_disagg, stderr=subprocess.STDOUT, env=run_env, cwd=cwd) as server_proc): # ... rest of the code ... except Exception: # Print outputs on error logger.error("-------- Workers output --------") with open('output_workers.log', 'r') as f: logger.error(f.read()) logger.error("-------- Disagg server output --------") with open('output_disagg.log', 'r') as f: logger.error(f.read()) raise finally: - server_proc.terminate() - workers_proc.terminate() - server_proc.wait() - workers_proc.wait() + if server_proc: + server_proc.terminate() + server_proc.wait() + if workers_proc: + workers_proc.terminate() + workers_proc.wait()tests/integration/defs/disaggregated/test_disaggregated_parametrized.py (1)
1311-1315: Remove redundant terminate/wait cleanup.Line 1312 is still calling
terminate()/wait()on handles that were already torn down by the surroundingwith popen(...)context managers. This recreates theProcessLookupErrorrace that was raised earlier. Please drop the manual cleanup (or guard it with apoll() is Nonecheck); relying on the context manager keeps the run green.- else: - if 'server_proc' in locals() and 'workers_proc' in locals(): - server_proc.terminate() - workers_proc.terminate() - server_proc.wait() - workers_proc.wait() + else: + pass # popen contexts already handled cleanup
🧹 Nitpick comments (1)
tests/integration/defs/disaggregated/test_disaggregated_benchmark.py (1)
218-225: Remove unused function parameter.The
disaggregated_test_rootparameter is not used anywhere in the function body.def test_disaggregated_benchmark_on_diff_backends( - disaggregated_test_root, disaggregated_example_root, llm_venv, + disaggregated_example_root, llm_venv, benchmark_model_root, benchmark_root, shared_gpt_path):
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (52)
tests/integration/defs/disaggregated/test_configs/disagg_config_cache_aware_balance.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_cache_aware_balance_deepseek_v3.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_cache_reuse.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_cache_reuse_deepseek_v3.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_conditional.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_conditional_deepseek_v3.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ctxpp2_genpp2.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ctxpp2_gentp2.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ctxpp4_genpp4.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ctxpp4_gentp4.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp1_gentp1_deepseek_v3_lite.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp1_gentp1_deepseek_v3_lite_one_mtp.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp1_gentp1_deepseek_v3_lite_one_mtp_attention_dp_overlap.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp1_gentp1_deepseek_v3_lite_one_mtp_ctxpp2_gentp2.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp1_gentp1_deepseek_v3_lite_two_mtp.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_genpp2.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp1.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp1_trt_backend.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp2_deepseek_v3_lite.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp2_deepseek_v3_lite_attention_dp.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp2_deepseek_v3_lite_attention_dp_one.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp2_deepseek_v3_lite_attention_dp_one_mtp.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp2_deepseek_v3_lite_attention_dp_overlap.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp2_deepseek_v3_lite_attention_dp_overlap_cuda_graph.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp2_deepseek_v3_lite_mpi.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp2_deepseek_v3_lite_nixl.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp2_deepseek_v3_lite_overlap_cuda_graph.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp2_deepseek_v3_lite_ucx.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2pp2_gentp2pp2.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_cuda_graph_padding.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_diff_max_tokens.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_gen_only.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_gen_only_bs1.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_gen_only_trt_backend.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_load_balance.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_metrics.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_mixed.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_ngram.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_overlap.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_trt_backend.yaml(0 hunks)tests/integration/defs/disaggregated/test_configs/disagg_config_trtllm_sampler.yaml(0 hunks)tests/integration/defs/disaggregated/test_disaggregated.py(0 hunks)tests/integration/defs/disaggregated/test_disaggregated_benchmark.py(1 hunks)tests/integration/defs/disaggregated/test_disaggregated_parametrized.py(1 hunks)tests/integration/test_lists/qa/llm_function_core.txt(1 hunks)tests/integration/test_lists/qa/llm_function_core_sanity.txt(1 hunks)tests/integration/test_lists/test-db/l0_a10.yml(1 hunks)tests/integration/test_lists/test-db/l0_dgx_b200.yml(3 hunks)tests/integration/test_lists/test-db/l0_dgx_b300.yml(1 hunks)tests/integration/test_lists/test-db/l0_dgx_h100.yml(2 hunks)tests/integration/test_lists/test-db/l0_dgx_h200.yml(2 hunks)tests/integration/test_lists/test-db/l0_h100.yml(1 hunks)
💤 Files with no reviewable changes (42)
- tests/integration/defs/disaggregated/test_configs/disagg_config_gen_only_bs1.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp2_deepseek_v3_lite_attention_dp_overlap.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp1.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_cache_aware_balance.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_trt_backend.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_conditional.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_cache_reuse.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_conditional_deepseek_v3.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_ctxpp2_genpp2.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_ctxpp4_genpp4.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp1_trt_backend.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_gen_only.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_cache_aware_balance_deepseek_v3.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp2_deepseek_v3_lite_attention_dp.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_metrics.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_ctxpp4_gentp4.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp2_deepseek_v3_lite_attention_dp_overlap_cuda_graph.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp2_deepseek_v3_lite_overlap_cuda_graph.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp1_gentp1_deepseek_v3_lite.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_trtllm_sampler.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp1_gentp1_deepseek_v3_lite_two_mtp.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_gen_only_trt_backend.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_cache_reuse_deepseek_v3.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp2_deepseek_v3_lite_mpi.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_diff_max_tokens.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_cuda_graph_padding.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_ngram.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_genpp2.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp1_gentp1_deepseek_v3_lite_one_mtp_ctxpp2_gentp2.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp1_gentp1_deepseek_v3_lite_one_mtp_attention_dp_overlap.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_overlap.yaml
- tests/integration/defs/disaggregated/test_disaggregated.py
- tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp2_deepseek_v3_lite.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp2_deepseek_v3_lite_attention_dp_one_mtp.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp2_deepseek_v3_lite_nixl.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_mixed.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_ctxpp2_gentp2.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp2_deepseek_v3_lite_ucx.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp1_gentp1_deepseek_v3_lite_one_mtp.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_load_balance.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2_gentp2_deepseek_v3_lite_attention_dp_one.yaml
- tests/integration/defs/disaggregated/test_configs/disagg_config_ctxtp2pp2_gentp2pp2.yaml
🧰 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/disaggregated/test_disaggregated_parametrized.pytests/integration/defs/disaggregated/test_disaggregated_benchmark.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/disaggregated/test_disaggregated_parametrized.pytests/integration/defs/disaggregated/test_disaggregated_benchmark.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/disaggregated/test_disaggregated_parametrized.pytests/integration/defs/disaggregated/test_disaggregated_benchmark.py
🧠 Learnings (11)
📚 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/integration/test_lists/test-db/l0_dgx_h100.ymltests/integration/test_lists/test-db/l0_a10.ymltests/integration/test_lists/test-db/l0_h100.ymltests/integration/test_lists/test-db/l0_dgx_b300.ymltests/integration/test_lists/test-db/l0_dgx_b200.ymltests/integration/test_lists/qa/llm_function_core_sanity.txttests/integration/defs/disaggregated/test_disaggregated_parametrized.pytests/integration/test_lists/qa/llm_function_core.txttests/integration/test_lists/test-db/l0_dgx_h200.yml
📚 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/test_lists/test-db/l0_dgx_h100.ymltests/integration/test_lists/test-db/l0_h100.ymltests/integration/test_lists/test-db/l0_dgx_b300.ymltests/integration/test_lists/test-db/l0_dgx_b200.ymltests/integration/test_lists/qa/llm_function_core_sanity.txttests/integration/defs/disaggregated/test_disaggregated_parametrized.pytests/integration/test_lists/qa/llm_function_core.txttests/integration/defs/disaggregated/test_disaggregated_benchmark.pytests/integration/test_lists/test-db/l0_dgx_h200.yml
📚 Learning: 2025-09-09T09:40:45.658Z
Learnt from: fredricz-20070104
Repo: NVIDIA/TensorRT-LLM PR: 7645
File: tests/integration/test_lists/qa/llm_function_core.txt:648-648
Timestamp: 2025-09-09T09:40:45.658Z
Learning: In TensorRT-LLM test lists, it's common and intentional for the same test to appear in multiple test list files when they serve different purposes (e.g., llm_function_core.txt for comprehensive core functionality testing and llm_function_core_sanity.txt for quick sanity checks). This duplication allows tests to be run in different testing contexts.
Applied to files:
tests/integration/test_lists/test-db/l0_dgx_h100.ymltests/integration/test_lists/test-db/l0_a10.ymltests/integration/test_lists/test-db/l0_h100.ymltests/integration/test_lists/test-db/l0_dgx_b300.ymltests/integration/test_lists/test-db/l0_dgx_b200.ymltests/integration/test_lists/qa/llm_function_core_sanity.txttests/integration/defs/disaggregated/test_disaggregated_parametrized.pytests/integration/test_lists/qa/llm_function_core.txttests/integration/test_lists/test-db/l0_dgx_h200.yml
📚 Learning: 2025-09-17T02:48:52.732Z
Learnt from: tongyuantongyu
Repo: NVIDIA/TensorRT-LLM PR: 7781
File: tests/integration/test_lists/waives.txt:313-313
Timestamp: 2025-09-17T02:48:52.732Z
Learning: In TensorRT-LLM, `tests/integration/test_lists/waives.txt` is specifically for waiving/skipping tests, while other test list files like those in `test-db/` and `qa/` directories are for different test execution contexts (pre-merge, post-merge, QA tests). The same test appearing in both waives.txt and execution list files is intentional - the test is part of test suites but will be skipped due to the waiver.
Applied to files:
tests/integration/test_lists/test-db/l0_a10.ymltests/integration/test_lists/test-db/l0_h100.ymltests/integration/test_lists/test-db/l0_dgx_b200.ymltests/integration/test_lists/qa/llm_function_core_sanity.txttests/integration/test_lists/qa/llm_function_core.txt
📚 Learning: 2025-08-14T06:36:40.701Z
Learnt from: timlee0212
Repo: NVIDIA/TensorRT-LLM PR: 6886
File: tensorrt_llm/_torch/models/modeling_deepseekv3.py:0-0
Timestamp: 2025-08-14T06:36:40.701Z
Learning: In DeepSeek V3 model (tensorrt_llm/_torch/models/modeling_deepseekv3.py), the disagreement between AllReduce.__init__ guard and _compute_mlp_tp_size logic for MNNVL usage is expected by design. The AllReduce component and MLP TP-size computation intentionally use different criteria for MNNVL availability decisions.
Applied to files:
tests/integration/test_lists/test-db/l0_h100.yml
📚 Learning: 2025-08-29T14:07:45.863Z
Learnt from: EmmaQiaoCh
Repo: NVIDIA/TensorRT-LLM PR: 7370
File: tests/unittest/trt/model_api/test_model_quantization.py:24-27
Timestamp: 2025-08-29T14:07:45.863Z
Learning: In TensorRT-LLM's CI infrastructure, pytest skip markers (pytest.mark.skip) are properly honored even when test files have __main__ blocks that call test functions directly. The testing system correctly skips tests without requiring modifications to the __main__ block execution pattern.
Applied to files:
tests/integration/test_lists/test-db/l0_h100.ymltests/integration/test_lists/test-db/l0_dgx_b200.ymltests/integration/test_lists/test-db/l0_dgx_h200.yml
📚 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/integration/test_lists/test-db/l0_h100.ymltests/integration/test_lists/test-db/l0_dgx_b200.yml
📚 Learning: 2025-08-11T20:09:24.389Z
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.
Applied to files:
tests/integration/test_lists/qa/llm_function_core_sanity.txt
📚 Learning: 2025-09-17T06:01:01.836Z
Learnt from: fredricz-20070104
Repo: NVIDIA/TensorRT-LLM PR: 7785
File: tests/integration/defs/perf/utils.py:321-333
Timestamp: 2025-09-17T06:01:01.836Z
Learning: In test infrastructure code for disaggregated serving tests, prefer logging errors and continuing execution rather than raising exceptions on timeout, to avoid disrupting test cleanup and causing cascading failures.
Applied to files:
tests/integration/defs/disaggregated/test_disaggregated_parametrized.pytests/integration/defs/disaggregated/test_disaggregated_benchmark.py
📚 Learning: 2025-09-02T13:43:22.657Z
Learnt from: pcastonguay
Repo: NVIDIA/TensorRT-LLM PR: 7455
File: tensorrt_llm/_torch/pyexecutor/py_executor.py:728-731
Timestamp: 2025-09-02T13:43:22.657Z
Learning: The user pcastonguay prefers creating dedicated handler classes to encapsulate complex subsystem logic rather than spreading it across the main class. For disaggregated pipeline parallel termination, they suggest creating a `_disagg_pp_termination_handler` with a `cleanup()` method instead of manually waiting on termination handles during shutdown.
Applied to files:
tests/integration/defs/disaggregated/test_disaggregated_parametrized.py
📚 Learning: 2025-10-13T19:45:03.518Z
Learnt from: nv-lschneider
Repo: NVIDIA/TensorRT-LLM PR: 7910
File: tests/unittest/_torch/multi_gpu/test_nccl_device.py:138-149
Timestamp: 2025-10-13T19:45:03.518Z
Learning: In test_nccl_device.py, the NCCL device AllReduce implementation compares the entire residual tensor on each rank, unlike the UB implementation which compares per-rank chunks. The residual chunking calculations in the test are intentionally overridden to reflect this design difference.
Applied to files:
tests/integration/test_lists/qa/llm_function_core.txt
🪛 Ruff (0.14.3)
tests/integration/defs/disaggregated/test_disaggregated_parametrized.py
237-237: Consider [*worker_processes, server_proc] instead of concatenation
Replace with [*worker_processes, server_proc]
(RUF005)
241-241: Consider iterable unpacking instead of concatenation
Replace with iterable unpacking
(RUF005)
246-246: Consider iterable unpacking instead of concatenation
Replace with iterable unpacking
(RUF005)
249-253: Consider iterable unpacking instead of concatenation
Replace with iterable unpacking
(RUF005)
1156-1156: Unused function argument: suffix
(ARG001)
1306-1306: Starting a process with a partial executable path
(S607)
1323-1323: Unused function argument: request
(ARG001)
1347-1347: Unused function argument: disaggregated_test_root
(ARG001)
1350-1350: Unused function argument: model_root_fixture
(ARG001)
1373-1373: Audit URL open for permitted schemes. Allowing use of file: or custom schemes is often unexpected.
(S310)
tests/integration/defs/disaggregated/test_disaggregated_benchmark.py
56-56: Avoid specifying long messages outside the exception class
(TRY003)
161-161: Abstract raise to an inner function
(TRY301)
161-161: Avoid specifying long messages outside the exception class
(TRY003)
224-224: Unused function argument: disaggregated_test_root
(ARG001)
⏰ 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 (16)
tests/integration/test_lists/test-db/l0_a10.yml (1)
31-42: LGTM! Migration to parametrized test harness is well-structured.The replacement of explicit test invocations with parametrized variants (
test_disagg[...]) consolidates test coverage while maintaining the same test scenarios through parameterization. The test identifiers are clear and follow pytest conventions.tests/integration/test_lists/test-db/l0_h100.yml (1)
79-82: LGTM! DeepSeek v3 Lite test parametrization looks correct.The parametrized variants properly cover the tensor parallelism and MTP (Multi-Token Prediction) configurations that were previously tested individually.
tests/integration/test_lists/test-db/l0_dgx_b300.yml (2)
62-63: LGTM! Backend-specific parametrization is appropriate.The UCX and NIXL backend variants are correctly parametrized, supporting the different cache transceiver backend testing.
70-73: LGTM! Benchmark test entries properly reference the new module.The benchmark tests for different models and configurations correctly reference
test_disaggregated_benchmark.py::test_disaggregated_benchmark_on_diff_backends[...].tests/integration/test_lists/test-db/l0_dgx_h100.yml (2)
79-86: LGTM! Multi-GPU configuration parametrization is well-organized.The parametrized variants cover various tensor parallel (TP) and pipeline parallel (PP) configurations for context and generation servers, maintaining comprehensive test coverage.
149-161: LGTM! DeepSeek v3 Lite test coverage is comprehensive.The parametrized tests cover multiple backend options (MPI, UCX, NIXL, ADP) and feature combinations (MTP, overlap, CUDA graph), plus the benchmark test for empty batch handling.
tests/integration/test_lists/qa/llm_function_core_sanity.txt (1)
209-219: LGTM! QA sanity test parametrization covers core scenarios.The parametrized test entries maintain comprehensive coverage of disaggregation features including various backends, balancing strategies, and DeepSeek v3 Lite configurations.
tests/integration/test_lists/test-db/l0_dgx_b200.yml (4)
46-47: LGTM! Backend parametrization is consistent.
55-56: LGTM! Benchmark test entries are correct.
78-81: LGTM! TP/PP configuration parametrization is appropriate.
195-196: Verify potential duplicate test entry.Line 195 references
disaggregated/test_disaggregated.py::test_disaggregated_benchmark_on_diff_backends[llama-v3-8b-hf]while line 196 references the newdisaggregated/test_disaggregated_benchmark.py::test_disaggregated_benchmark_on_diff_backends[llama-v3-8b-hf]. This appears to be a duplicate where the old module reference wasn't removed.Based on learnings, the test scheduling system handles duplicates, but this may cause the same test to run twice unnecessarily. Verify whether line 195 should be removed.
tests/integration/test_lists/test-db/l0_dgx_h200.yml (2)
35-36: LGTM! Configuration parametrization is correct.
123-126: LGTM! Benchmark test entries are properly structured.tests/integration/defs/disaggregated/test_disaggregated_benchmark.py (3)
1-14: LGTM! Copyright header is correct.The NVIDIA Apache-2.0 copyright header is properly formatted with the current year.
As per coding guidelines
180-215: LGTM! Configuration generation is well-structured.The
get_config_for_benchmarkfunction generates appropriate configurations for disaggregated serving with context and generation servers, including proper cache transceiver backend settings.
226-261: LGTM! Benchmark comparison logic is sound.The test properly compares NIXL vs UCX backends and validates that NIXL performance is within 5% of UCX for both E2EL and TTFT metrics. The assertions ensure both metrics are positive and NIXL is not significantly worse than UCX.
|
/bot run --disable-fail-fast |
|
PR_Github #23763 [ run ] triggered by Bot. Commit: |
|
/bot kill |
|
/bot run --disable-fail-fast |
|
PR_Github #23772 [ kill ] triggered by Bot. Commit: |
|
PR_Github #23763 [ run ] completed with state |
|
PR_Github #23772 [ kill ] completed with state |
|
PR_Github #23773 [ run ] triggered by Bot. Commit: |
|
PR_Github #23773 [ run ] completed with state |
|
/bot run --disable-fail-fast |
|
PR_Github #23858 [ run ] triggered by Bot. Commit: |
|
PR_Github #23858 [ run ] completed with state |
e99b7a3 to
f73baa5
Compare
|
/bot run --disable-fail-fast |
|
PR_Github #24024 [ run ] triggered by Bot. Commit: |
|
PR_Github #24024 [ run ] completed with state |
|
/bot run --disable-fail-fast |
|
PR_Github #24054 [ run ] triggered by Bot. Commit: |
|
PR_Github #24054 [ run ] completed with state |
|
/bot run --disable-fail-fast |
|
PR_Github #24208 [ run ] triggered by Bot. Commit: |
Signed-off-by: Patrice Castonguay <[email protected]>
|
/bot run --disable-fail-fast |
|
PR_Github #27395 [ run ] triggered by Bot. Commit: |
|
PR_Github #27395 [ run ] completed with state |
Signed-off-by: Patrice Castonguay <[email protected]>
|
/bot run --disable-fail-fast |
|
PR_Github #27522 [ run ] triggered by Bot. Commit: |
|
PR_Github #27522 [ run ] completed with state |
Signed-off-by: Patrice Castonguay <[email protected]>
|
/bot run --disable-fail-fast |
|
PR_Github #27705 [ run ] triggered by Bot. Commit: |
|
/bot run --disable-fail-fast |
Signed-off-by: Patrice Castonguay <[email protected]>
|
/bot run --disable-fail-fast |
|
PR_Github #27909 [ run ] triggered by Bot. Commit: |
|
PR_Github #27909 [ run ] completed with state |
Signed-off-by: Patrice Castonguay <[email protected]>
|
/bot run --disable-fail-fast |
|
PR_Github #28061 [ run ] triggered by Bot. Commit: |
|
PR_Github #28061 [ run ] completed with state |
Signed-off-by: Patrice Castonguay <[email protected]>
|
/bot run --disable-fail-fast |
|
PR_Github #28393 [ run ] triggered by Bot. Commit: |
|
PR_Github #28393 [ run ] completed with state |
Signed-off-by: Patrice Castonguay <[email protected]>
|
/bot run --disable-fail-fast |
|
PR_Github #28432 [ run ] triggered by Bot. Commit: |
|
PR_Github #28432 [ run ] completed with state |
Summary by CodeRabbit
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
The reviewers assigned automatically/manually are appropriate for the PR.
Please check this after reviewing the above items as appropriate for this PR.
GitHub Bot Help
/bot [-h] ['run', 'kill', 'skip', 'reuse-pipeline'] ...Provide a user friendly way for developers to interact with a Jenkins server.
Run
/bot [-h|--help]to print this help message.See details below for each supported subcommand.
Details
run [--reuse-test (optional)pipeline-id --disable-fail-fast --skip-test --stage-list "A10-PyTorch-1, xxx" --gpu-type "A30, H100_PCIe" --test-backend "pytorch, cpp" --add-multi-gpu-test --only-multi-gpu-test --disable-multi-gpu-test --post-merge --extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx" --detailed-log --debug(experimental)]Launch build/test pipelines. All previously running jobs will be killed.
--reuse-test (optional)pipeline-id(OPTIONAL) : Allow the new pipeline to reuse build artifacts and skip successful test stages from a specified pipeline or the last pipeline if no pipeline-id is indicated. If the Git commit ID has changed, this option will be always ignored. The DEFAULT behavior of the bot is to reuse build artifacts and successful test results from the last pipeline.--disable-reuse-test(OPTIONAL) : Explicitly prevent the pipeline from reusing build artifacts and skipping successful test stages from a previous pipeline. Ensure that all builds and tests are run regardless of previous successes.--disable-fail-fast(OPTIONAL) : Disable fail fast on build/tests/infra failures.--skip-test(OPTIONAL) : Skip all test stages, but still run build stages, package stages and sanity check stages. Note: Does NOT update GitHub check status.--stage-list "A10-PyTorch-1, xxx"(OPTIONAL) : Only run the specified test stages. Examples: "A10-PyTorch-1, xxx". Note: Does NOT update GitHub check status.--gpu-type "A30, H100_PCIe"(OPTIONAL) : Only run the test stages on the specified GPU types. Examples: "A30, H100_PCIe". Note: Does NOT update GitHub check status.--test-backend "pytorch, cpp"(OPTIONAL) : Skip test stages which don't match the specified backends. Only support [pytorch, cpp, tensorrt, triton]. Examples: "pytorch, cpp" (does not run test stages with tensorrt or triton backend). Note: Does NOT update GitHub pipeline status.--only-multi-gpu-test(OPTIONAL) : Only run the multi-GPU tests. Note: Does NOT update GitHub check status.--disable-multi-gpu-test(OPTIONAL) : Disable the multi-GPU tests. Note: Does NOT update GitHub check status.--add-multi-gpu-test(OPTIONAL) : Force run the multi-GPU tests in addition to running L0 pre-merge pipeline.--post-merge(OPTIONAL) : Run the L0 post-merge pipeline instead of the ordinary L0 pre-merge pipeline.--extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx"(OPTIONAL) : Run the ordinary L0 pre-merge pipeline and specified test stages. Examples: --extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx".--detailed-log(OPTIONAL) : Enable flushing out all logs to the Jenkins console. This will significantly increase the log volume and may slow down the job.--debug(OPTIONAL) : Experimental feature. Enable access to the CI container for debugging purpose. Note: Specify exactly one stage in thestage-listparameter to access the appropriate container environment. Note: Does NOT update GitHub check status.For guidance on mapping tests to stage names, see
docs/source/reference/ci-overview.mdand the
scripts/test_to_stage_mapping.pyhelper.kill
killKill all running builds associated with pull request.
skip
skip --comment COMMENTSkip testing for latest commit on pull request.
--comment "Reason for skipping build/test"is required. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break.reuse-pipeline
reuse-pipelineReuse a previous pipeline to validate current commit. This action will also kill all currently running builds associated with the pull request. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break.