[#9306][refactor] Refactor AutoDeployConfig into LlmArgs - #10613
Conversation
9ce7d91 to
a7fe19d
Compare
|
/bot run |
📝 WalkthroughWalkthroughThe pull request consolidates configuration handling by migrating from Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
tensorrt_llm/_torch/auto_deploy/llm_args.py (1)
1-3: Missing NVIDIA copyright header.As per coding guidelines, all TensorRT-LLM source files should contain an NVIDIA copyright header with the year of latest meaningful modification. This file is missing the required header.
🤖 Fix all issues with AI agents
In @tensorrt_llm/_torch/auto_deploy/llm_args.py:
- Around line 104-115: The setup_hidden_state_capture validator assumes
self.transforms["detect_hidden_states_for_capture"] exists and can KeyError;
before setting keys ensure the transform dict exists by checking if
"detect_hidden_states_for_capture" in self.transforms and creating/initializing
it if missing (e.g., set to an empty dict or with default structure), then
assign capture_hidden_states=True and
eagle3_layers_to_capture=self.speculative_config.eagle3_layers_to_capture; keep
the method signature and return self (target symbols:
setup_hidden_state_capture, self.transforms, "detect_hidden_states_for_capture",
speculative_config.eagle3_layers_to_capture).
🧹 Nitpick comments (2)
tensorrt_llm/_torch/auto_deploy/llm_args.py (2)
261-276: Variable shadowing:kwargsparameter is reassigned.The parameter
kwargsis reassigned on line 263 to the result ofsuper().model_dump(), which shadows the original function parameter. As per coding guidelines, avoid shadowing variables declared in an outer scope.♻️ Proposed fix
- def model_dump(self, *args, **kwargs): + def model_dump(self, *args, **dump_kwargs): """Convert the arguments to a dictionary that can be used as kwargs for the LLM API.""" - kwargs = super().model_dump(*args, **kwargs) + result = super().model_dump(*args, **dump_kwargs) # ensure we remove the mode and yaml_default fields since they otherwise may conflict each # other. if "mode" not in self.model_fields_set: - kwargs.pop("mode", None) + result.pop("mode", None) if "yaml_default" not in self.model_fields_set: - kwargs.pop("yaml_default", None) + result.pop("yaml_default", None) # We never want these. - kwargs.pop("build_config", None) - kwargs.pop("mpi_session", None) + result.pop("build_config", None) + result.pop("mpi_session", None) - return kwargs + return result
76-80: Usedefault_factoryto defertorch.cuda.device_count()evaluation to instance creation time.The current default
torch.cuda.device_count()is evaluated at module import time. If CUDA is unavailable when the module is imported (e.g., in CPU-only environments), the default becomes 0 permanently for all instances. Usingdefault_factory=torch.cuda.device_countwould defer the evaluation to instance creation, allowing each instance to capture the GPU count at the moment it's created, which is more robust and aligns with the pattern already used elsewhere in the codebase (e.g.,openai_protocol.py). The existing test would still pass with this change.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
examples/auto_deploy/build_and_run_ad.pytensorrt_llm/_torch/auto_deploy/llm_args.pytests/unittest/_torch/auto_deploy/unit/singlegpu/models/test_hybrid_patches.pytests/unittest/_torch/auto_deploy/unit/singlegpu/models/test_modeling_nemotron_h.pytests/unittest/_torch/auto_deploy/unit/singlegpu/test_ad_build_small_single.py
🧰 Additional context used
📓 Path-based instructions (2)
**/*.py
📄 CodeRabbit inference engine (CODING_GUIDELINES.md)
**/*.py: The code developed for TensorRT-LLM should conform to Python 3.8+
Indent Python code with 4 spaces. Do not use tabs
Always maintain the namespace when importing Python modules, 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, with prefixkfor variable names that start with a number (e.g.,k_99th_percentile)
Python global variables should use upper snake_case with prefixG(e.g.,G_MY_GLOBAL)
Python constants should use upper snake_case (e.g.,MY_CONSTANT)
Avoid shadowing variables declared in an outer scope in Python
Initialize all externally visible members of a Python class in the constructor
For Python interfaces that may be used outside a file, prefer docstrings over comments
Use comments in Python for code within a function, or interfaces that are local to a file
Use Google-style docstrings for Python classes and functions, which can be parsed by Sphinx
Python attributes and variables can be documented inline with the format"""<type>: Description"""
Avoid using reflection in Python when functionality can be easily achieved without reflection
When using try-except blocks in Python, limit the except clause to the smallest set of errors possible
When using try-except blocks in Python to handle multiple possible variable types (duck-typing), keep the body of the try as small as possible and use the else block for the main logic
Files:
tests/unittest/_torch/auto_deploy/unit/singlegpu/models/test_modeling_nemotron_h.pytests/unittest/_torch/auto_deploy/unit/singlegpu/test_ad_build_small_single.pytests/unittest/_torch/auto_deploy/unit/singlegpu/models/test_hybrid_patches.pytensorrt_llm/_torch/auto_deploy/llm_args.pyexamples/auto_deploy/build_and_run_ad.py
**/*.{cpp,cc,cxx,h,hpp,hxx,cu,cuh,py}
📄 CodeRabbit inference engine (CODING_GUIDELINES.md)
All TensorRT-LLM source files (.cpp, .h, .cu, .py, and other source files) should contain an NVIDIA copyright header with the year of latest meaningful modification
Files:
tests/unittest/_torch/auto_deploy/unit/singlegpu/models/test_modeling_nemotron_h.pytests/unittest/_torch/auto_deploy/unit/singlegpu/test_ad_build_small_single.pytests/unittest/_torch/auto_deploy/unit/singlegpu/models/test_hybrid_patches.pytensorrt_llm/_torch/auto_deploy/llm_args.pyexamples/auto_deploy/build_and_run_ad.py
🧠 Learnings (15)
📓 Common learnings
Learnt from: jiaganc
Repo: NVIDIA/TensorRT-LLM PR: 7031
File: tensorrt_llm/bench/dataclasses/configuration.py:90-104
Timestamp: 2025-08-26T09:37:10.463Z
Learning: In TensorRT-LLM, the `get_pytorch_perf_config()` method returns `self.pytorch_config` which can contain default `cuda_graph_config` values, so `llm_args` may already have this config before the extra options processing.
Learnt from: venkywonka
Repo: NVIDIA/TensorRT-LLM PR: 6029
File: .github/pull_request_template.md:45-53
Timestamp: 2025-08-27T17:50:13.264Z
Learning: For PR templates in TensorRT-LLM, avoid suggesting changes that would increase developer overhead, such as converting plain bullets to mandatory checkboxes. The team prefers guidance-style bullets that don't require explicit interaction to reduce friction in the PR creation process.
📚 Learning: 2025-08-26T09:37:10.463Z
Learnt from: jiaganc
Repo: NVIDIA/TensorRT-LLM PR: 7031
File: tensorrt_llm/bench/dataclasses/configuration.py:90-104
Timestamp: 2025-08-26T09:37:10.463Z
Learning: In TensorRT-LLM, the `get_pytorch_perf_config()` method returns `self.pytorch_config` which can contain default `cuda_graph_config` values, so `llm_args` may already have this config before the extra options processing.
Applied to files:
tests/unittest/_torch/auto_deploy/unit/singlegpu/models/test_modeling_nemotron_h.pytests/unittest/_torch/auto_deploy/unit/singlegpu/test_ad_build_small_single.pytests/unittest/_torch/auto_deploy/unit/singlegpu/models/test_hybrid_patches.pytensorrt_llm/_torch/auto_deploy/llm_args.pyexamples/auto_deploy/build_and_run_ad.py
📚 Learning: 2025-08-06T13:58:07.506Z
Learnt from: galagam
Repo: NVIDIA/TensorRT-LLM PR: 6487
File: tests/unittest/_torch/auto_deploy/unit/singlegpu/test_ad_trtllm_bench.py:1-12
Timestamp: 2025-08-06T13:58:07.506Z
Learning: In TensorRT-LLM, test files (files under tests/ directories) do not require NVIDIA copyright headers, unlike production source code files. Test files typically start directly with imports, docstrings, or code.
Applied to files:
tests/unittest/_torch/auto_deploy/unit/singlegpu/models/test_modeling_nemotron_h.py
📚 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/unittest/_torch/auto_deploy/unit/singlegpu/models/test_modeling_nemotron_h.pytests/unittest/_torch/auto_deploy/unit/singlegpu/test_ad_build_small_single.pytests/unittest/_torch/auto_deploy/unit/singlegpu/models/test_hybrid_patches.pytensorrt_llm/_torch/auto_deploy/llm_args.py
📚 Learning: 2025-08-01T15:14:45.673Z
Learnt from: yibinl-nvidia
Repo: NVIDIA/TensorRT-LLM PR: 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/unittest/_torch/auto_deploy/unit/singlegpu/models/test_modeling_nemotron_h.py
📚 Learning: 2025-08-26T09:37:10.463Z
Learnt from: jiaganc
Repo: NVIDIA/TensorRT-LLM PR: 7031
File: tensorrt_llm/bench/dataclasses/configuration.py:90-104
Timestamp: 2025-08-26T09:37:10.463Z
Learning: In TensorRT-LLM's bench configuration, the `get_pytorch_perf_config()` method returns `self.pytorch_config` which is a Dict[str, Any] that can contain default values including `cuda_graph_config`, making the fallback `llm_args["cuda_graph_config"]` safe to use.
Applied to files:
tests/unittest/_torch/auto_deploy/unit/singlegpu/models/test_modeling_nemotron_h.pytests/unittest/_torch/auto_deploy/unit/singlegpu/models/test_hybrid_patches.pytensorrt_llm/_torch/auto_deploy/llm_args.pyexamples/auto_deploy/build_and_run_ad.py
📚 Learning: 2025-08-19T12:45:11.997Z
Learnt from: amitz-nv
Repo: NVIDIA/TensorRT-LLM PR: 7033
File: tensorrt_llm/_torch/pyexecutor/model_engine.py:0-0
Timestamp: 2025-08-19T12:45:11.997Z
Learning: In tensorrt_llm/_torch/pyexecutor/model_engine.py, DoRA (Delta Orthogonal Rank Adaptation) functionality was removed from the PyTorch flow to eliminate issues with inverted DoRA detection logic. The original is_dora condition was checking if scaling_vec_pointer == 0, which was potentially incorrect.
Applied to files:
tests/unittest/_torch/auto_deploy/unit/singlegpu/test_ad_build_small_single.py
📚 Learning: 2025-08-26T09:49:04.956Z
Learnt from: pengbowang-nv
Repo: NVIDIA/TensorRT-LLM PR: 7192
File: tests/integration/test_lists/test-db/l0_dgx_b200.yml:56-72
Timestamp: 2025-08-26T09:49:04.956Z
Learning: In TensorRT-LLM test configuration files, the test scheduling system handles wildcard matching with special rules that prevent duplicate test execution even when the same tests appear in multiple yaml files with overlapping GPU wildcards (e.g., "*b200*" and "*gb200*").
Applied to files:
tests/unittest/_torch/auto_deploy/unit/singlegpu/models/test_hybrid_patches.py
📚 Learning: 2025-08-09T02:04:49.623Z
Learnt from: Fridah-nv
Repo: NVIDIA/TensorRT-LLM PR: 6760
File: tensorrt_llm/_torch/auto_deploy/models/quant_config_reader.py:81-98
Timestamp: 2025-08-09T02:04:49.623Z
Learning: In TensorRT-LLM's auto_deploy module, torch.dtype values in configuration dictionaries must be stored as string representations (e.g., "float16" instead of torch.float16) because OmegaConf.merge does not support torch.dtype types. These string representations are converted to actual torch.dtype objects in downstream code.
Applied to files:
tests/unittest/_torch/auto_deploy/unit/singlegpu/models/test_hybrid_patches.pytensorrt_llm/_torch/auto_deploy/llm_args.pyexamples/auto_deploy/build_and_run_ad.py
📚 Learning: 2025-08-14T15:38:01.771Z
Learnt from: MatthiasKohl
Repo: NVIDIA/TensorRT-LLM PR: 6904
File: cpp/tensorrt_llm/pybind/thop/bindings.cpp:55-57
Timestamp: 2025-08-14T15:38:01.771Z
Learning: In TensorRT-LLM Python bindings, tensor parameter collections like mla_tensor_params and spec_decoding_tensor_params are kept as required parameters without defaults to maintain API consistency, even when it might affect backward compatibility.
Applied to files:
tensorrt_llm/_torch/auto_deploy/llm_args.py
📚 Learning: 2026-01-06T03:07:15.754Z
Learnt from: CR
Repo: NVIDIA/TensorRT-LLM PR: 0
File: CODING_GUIDELINES.md:0-0
Timestamp: 2026-01-06T03:07:15.754Z
Learning: Applies to **/*.{md,rst} : When documenting CLI commands for TensorRT-LLM tools like `trtllm-serve`, `trtllm-bench`, or `trtllm-eval`, prefer using `--config` over `--extra_llm_api_options` for specifying configuration files
Applied to files:
tensorrt_llm/_torch/auto_deploy/llm_args.py
📚 Learning: 2026-01-06T03:07:15.754Z
Learnt from: CR
Repo: NVIDIA/TensorRT-LLM PR: 0
File: CODING_GUIDELINES.md:0-0
Timestamp: 2026-01-06T03:07:15.754Z
Learning: Applies to **/*.py : The code developed for TensorRT-LLM should conform to Python 3.8+
Applied to files:
tensorrt_llm/_torch/auto_deploy/llm_args.py
📚 Learning: 2025-08-27T14:23:55.566Z
Learnt from: ixlmar
Repo: NVIDIA/TensorRT-LLM PR: 7294
File: tensorrt_llm/_torch/modules/rms_norm.py:17-17
Timestamp: 2025-08-27T14:23:55.566Z
Learning: The TensorRT-LLM project requires Python 3.10+ as evidenced by the use of TypeAlias from typing module, match/case statements, and union type | syntax throughout the codebase, despite some documentation still mentioning Python 3.8+.
Applied to files:
tensorrt_llm/_torch/auto_deploy/llm_args.py
📚 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:
tensorrt_llm/_torch/auto_deploy/llm_args.py
📚 Learning: 2025-09-04T07:33:10.618Z
Learnt from: MrGeva
Repo: NVIDIA/TensorRT-LLM PR: 7219
File: tensorrt_llm/_torch/auto_deploy/compile/backends/torch_cudagraph.py:162-168
Timestamp: 2025-09-04T07:33:10.618Z
Learning: When users explicitly provide cuda_graph_batch_sizes in TorchCudagraphCompiler, respect their choices and only sanitize the values (clamp, dedupe, sort) without forcing additional batch sizes like 1 or max_batch_size. Only add commonly-used batch sizes when falling back to the heuristic.
Applied to files:
tensorrt_llm/_torch/auto_deploy/llm_args.py
🧬 Code graph analysis (5)
tests/unittest/_torch/auto_deploy/unit/singlegpu/models/test_modeling_nemotron_h.py (1)
tensorrt_llm/_torch/auto_deploy/llm_args.py (1)
LlmArgs(58-379)
tests/unittest/_torch/auto_deploy/unit/singlegpu/test_ad_build_small_single.py (3)
tensorrt_llm/_torch/auto_deploy/llm_args.py (2)
LlmArgs(58-379)model_dump(261-276)tensorrt_llm/llmapi/llm_args.py (1)
_ParallelConfig(525-590)examples/auto_deploy/build_and_run_ad.py (1)
ExperimentConfig(126-238)
tests/unittest/_torch/auto_deploy/unit/singlegpu/models/test_hybrid_patches.py (1)
tensorrt_llm/_torch/auto_deploy/llm_args.py (1)
LlmArgs(58-379)
tensorrt_llm/_torch/auto_deploy/llm_args.py (7)
tensorrt_llm/llmapi/llm_args.py (6)
Field(68-95)EagleDecodingConfig(843-966)KvCacheConfig(1598-1742)_ParallelConfig(525-590)world_size(557-558)world_size(567-571)tensorrt_llm/builder.py (2)
BuildConfig(453-611)default(45-50)tests/integration/defs/perf/allowed_configs.py (1)
BuildConfig(26-35)tensorrt_llm/_torch/auto_deploy/utils/_config.py (1)
DynamicYamlMixInForSettings(99-200)tensorrt_llm/_torch/distributed/communicator.py (1)
tp_size(64-65)tensorrt_llm/_torch/auto_deploy/custom_ops/attention_interface.py (1)
args(590-592)tensorrt_llm/_torch/auto_deploy/shim/interface.py (1)
args(28-30)
examples/auto_deploy/build_and_run_ad.py (2)
tensorrt_llm/_torch/auto_deploy/llm.py (1)
LLM(103-152)tensorrt_llm/_torch/auto_deploy/llm_args.py (2)
LlmArgs(58-379)model_dump(261-276)
⏰ 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 (14)
tensorrt_llm/_torch/auto_deploy/llm_args.py (4)
58-69: LGTM on the new LlmArgs class with build_config field.The class hierarchy and the internal-only
build_configfield with appropriate markers (exclude_from_json,frozen,repr=False) look correct for maintaining compatibility withBaseLlmArgswhile preventing misuse.
82-102: LGTM on field validators preventing unsupported configurations.The validators correctly enforce that
build_configand parallel configuration fields remain at their default values, with clear error messages guiding users to useworld_sizeinstead.
117-137: LGTM on validate_parallel_config and validate_and_init_tokenizer.The parallel config setup correctly maps
world_sizetotp_sizefor compatibility with other runtime components. The tokenizer validator appropriately defers initialization to the LLM class.
226-247: LGTM on TODO comments for field deprecation.The TODO comments at lines 226 and 239 appropriately flag that
free_mem_ratioandcuda_graph_batch_sizesshould be folded into their respective config classes (KvCacheConfigandCudaGraphConfig).examples/auto_deploy/build_and_run_ad.py (4)
17-18: LGTM on import updates.The imports correctly reflect the new API surface, importing
LLMandDemoLLMfrom the auto_deploy module andLlmArgsfrom the llm_args submodule.
143-146: LGTM on ExperimentConfig.args type update.The type annotation correctly reflects the transition from
AutoDeployConfigtoLlmArgs, with appropriate description pointing to the new class location.
215-216: LGTM on type hint updates in validators.The type annotations for
argsinsync_model_with_args,sync_prompt_batch_size_with_args_max_batch_size, andadjust_args_for_benchmarkare correctly updated toLlmArgs.Also applies to: 223-224, 233-234
248-249: LGTM on LLM construction using model_dump.The change from
to_llm_kwargs()tomodel_dump(exclude_unset=True)aligns with the new LlmArgs API. Usingexclude_unset=Trueis appropriate to avoid passing default values that might conflict with the LLM class's own defaults.tests/unittest/_torch/auto_deploy/unit/singlegpu/models/test_hybrid_patches.py (2)
7-7: LGTM on import update.The import correctly reflects the new API, importing
LlmArgsinstead ofAutoDeployConfig.
54-54: LGTM on constructor usage update.The test correctly uses
LlmArgs(**llm_args)to construct the configuration object, aligning with the new API.tests/unittest/_torch/auto_deploy/unit/singlegpu/models/test_modeling_nemotron_h.py (2)
14-14: LGTM on import update.The import correctly reflects the new API, importing
LlmArgsinstead ofAutoDeployConfig.
167-167: LGTM on constructor usage update.The test correctly uses
LlmArgs(**llm_args)to construct the configuration object, aligning with the new API.tests/unittest/_torch/auto_deploy/unit/singlegpu/test_ad_build_small_single.py (2)
7-8: LGTM on import updates.The imports correctly reflect the new API, importing
LlmArgsand_ParallelConfigfrom the llm_args module. The removal ofAutoDeployConfigaligns with the PR's goal.
11-21: LGTM on test assertion updates.The test correctly:
- Uses
isinstance(llm_args, LlmArgs)for type checking (line 16).- Constructs
expected_llm_argsviaLlmArgs(**expected_ad_config.model_dump())(line 20).This aligns with the new model_dump-based API for LlmArgs.
|
PR_Github #31825 [ run ] triggered by Bot. Commit: |
lucaslie
left a comment
There was a problem hiding this comment.
lgtm. just a few questions
|
PR_Github #31825 [ run ] completed with state
|
a7fe19d to
71406e8
Compare
|
/bot run |
|
PR_Github #31906 [ run ] triggered by Bot. Commit: |
|
PR_Github #31906 [ run ] completed with state
|
71406e8 to
5e61b15
Compare
|
/bot run |
5e61b15 to
2e4c2a6
Compare
|
/bot run |
|
PR_Github #32020 [ run ] triggered by Bot. Commit: |
|
PR_Github #32020 [ run ] completed with state |
lucaslie
left a comment
There was a problem hiding this comment.
Lgtm. I am re-running the CI with multi-gpu tests. AutoDeploy test stages are separate. So as long all of single-gpu (including PyTorch) and all AD-related multi-gpu tests pass we can merge with /bot skip if non-AD multi-gpu tests fail
|
/bot run --extra-stage "DGX_B200-4_GPUs-AutoDeploy-1, DGX_H100-4_GPUs-AutoDeploy-1" |
|
PR_Github #32470 [ run ] triggered by Bot. Commit: |
|
PR_Github #32470 [ run ] completed with state
|
2e4c2a6 to
3690655
Compare
3690655 to
8b2a559
Compare
|
/bot run --extra-stage "DGX_B200-4_GPUs-AutoDeploy-1, DGX_H100-4_GPUs-AutoDeploy-1" |
|
PR_Github #32809 [ run ] triggered by Bot. Commit: |
|
PR_Github #32809 [ run ] completed with state
|
|
/bot run --extra-stage "DGX_B200-4_GPUs-AutoDeploy-1, DGX_H100-4_GPUs-AutoDeploy-1" |
|
PR_Github #32824 [ run ] triggered by Bot. Commit: |
|
PR_Github #32824 [ run ] completed with state
|
* Why? We would like to be able to use a TorchLlmArgs config in AutoDeploy's own version with minimal changes. * What? This PR refactors the configs such, that: - `AutoDeployConfig` is inlined into AD's `LlmArgs`. - `LlmArgs` now inherits from the `TorchLlmArgs`. As a result, fields that could be removed (due to having exactly the same schema as in the base class). Signed-off-by: William Zhang <133824995+2ez4bz@users.noreply.github.com>
8b2a559 to
a949e61
Compare
|
/bot run --extra-stage "DGX_B200-4_GPUs-AutoDeploy-1, DGX_H100-4_GPUs-AutoDeploy-1" |
|
PR_Github #32893 [ run ] triggered by Bot. Commit: |
|
PR_Github #32893 [ run ] completed with state
|
|
/bot run --extra-stage "DGX_B200-4_GPUs-AutoDeploy-1, DGX_H100-4_GPUs-AutoDeploy-1" |
|
PR_Github #33017 [ run ] triggered by Bot. Commit: |
|
PR_Github #33017 [ run ] completed with state
|
|
/bot run --extra-stage "DGX_B200-4_GPUs-AutoDeploy-1, DGX_H100-4_GPUs-AutoDeploy-1" |
|
PR_Github #33103 [ run ] triggered by Bot. Commit: |
|
PR_Github #33103 [ run ] completed with state
|
|
/bot run --extra-stage "DGX_B200-4_GPUs-AutoDeploy-1, DGX_H100-4_GPUs-AutoDeploy-1" |
|
PR_Github #33197 [ run ] triggered by Bot. Commit: |
|
PR_Github #33197 [ run ] completed with state |
Summary by CodeRabbit
AutoDeployConfigwith a unifiedLlmArgsclass for consistent argument handling across the framework.✏️ Tip: You can customize this high-level summary in your review settings.
Description
We would like to be able to use a
TorchLlmArgsconfig inAutoDeploy's own version with minimal changes.
This PR refactors the configs such, that:
AutoDeployConfigis inlined into AD'sLlmArgs.LlmArgsnow inherits from theTorchLlmArgs. As a result,fields that could be removed (due to literally having exactly the
same schema as in the base class)
free_mem_ratioandcuda_graph_batch_sizesare deprecatedand moved to their respective config classes.
Test Coverage
PR Checklist
Please review the following before submitting your PR:
PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.
PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.
Test cases are provided for new code paths (see test instructions)
Any new dependencies have been scanned for license and vulnerabilities
CODEOWNERS updated if ownership changes
Documentation updated as needed
Update tava architecture diagram if there is a significant design change in PR.
The reviewers assigned automatically/manually are appropriate for the PR.
Please check this after reviewing the above items as appropriate for this PR.
GitHub Bot Help
/bot [-h] ['run', 'kill', 'skip', 'reuse-pipeline'] ...Provide a user friendly way for developers to interact with a Jenkins server.
Run
/bot [-h|--help]to print this help message.See details below for each supported subcommand.
Details
run [--reuse-test (optional)pipeline-id --disable-fail-fast --skip-test --stage-list "A10-PyTorch-1, xxx" --gpu-type "A30, H100_PCIe" --test-backend "pytorch, cpp" --add-multi-gpu-test --only-multi-gpu-test --disable-multi-gpu-test --post-merge --extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx" --detailed-log --debug(experimental)]Launch build/test pipelines. All previously running jobs will be killed.
--reuse-test (optional)pipeline-id(OPTIONAL) : Allow the new pipeline to reuse build artifacts and skip successful test stages from a specified pipeline or the last pipeline if no pipeline-id is indicated. If the Git commit ID has changed, this option will be always ignored. The DEFAULT behavior of the bot is to reuse build artifacts and successful test results from the last pipeline.--disable-reuse-test(OPTIONAL) : Explicitly prevent the pipeline from reusing build artifacts and skipping successful test stages from a previous pipeline. Ensure that all builds and tests are run regardless of previous successes.--disable-fail-fast(OPTIONAL) : Disable fail fast on build/tests/infra failures.--skip-test(OPTIONAL) : Skip all test stages, but still run build stages, package stages and sanity check stages. Note: Does NOT update GitHub check status.--stage-list "A10-PyTorch-1, xxx"(OPTIONAL) : Only run the specified test stages. Examples: "A10-PyTorch-1, xxx". Note: Does NOT update GitHub check status.--gpu-type "A30, H100_PCIe"(OPTIONAL) : Only run the test stages on the specified GPU types. Examples: "A30, H100_PCIe". Note: Does NOT update GitHub check status.--test-backend "pytorch, cpp"(OPTIONAL) : Skip test stages which don't match the specified backends. Only support [pytorch, cpp, tensorrt, triton]. Examples: "pytorch, cpp" (does not run test stages with tensorrt or triton backend). Note: Does NOT update GitHub pipeline status.--only-multi-gpu-test(OPTIONAL) : Only run the multi-GPU tests. Note: Does NOT update GitHub check status.--disable-multi-gpu-test(OPTIONAL) : Disable the multi-GPU tests. Note: Does NOT update GitHub check status.--add-multi-gpu-test(OPTIONAL) : Force run the multi-GPU tests in addition to running L0 pre-merge pipeline.--post-merge(OPTIONAL) : Run the L0 post-merge pipeline instead of the ordinary L0 pre-merge pipeline.--extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx"(OPTIONAL) : Run the ordinary L0 pre-merge pipeline and specified test stages. Examples: --extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx".--detailed-log(OPTIONAL) : Enable flushing out all logs to the Jenkins console. This will significantly increase the log volume and may slow down the job.--debug(OPTIONAL) : Experimental feature. Enable access to the CI container for debugging purpose. Note: Specify exactly one stage in thestage-listparameter to access the appropriate container environment. Note: Does NOT update GitHub check status.For guidance on mapping tests to stage names, see
docs/source/reference/ci-overview.mdand the
scripts/test_to_stage_mapping.pyhelper.kill
killKill all running builds associated with pull request.
skip
skip --comment COMMENTSkip testing for latest commit on pull request.
--comment "Reason for skipping build/test"is required. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break.reuse-pipeline
reuse-pipelineReuse a previous pipeline to validate current commit. This action will also kill all currently running builds associated with the pull request. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break.