Skip to content

Conversation

@anish-shanbhag
Copy link
Collaborator

@anish-shanbhag anish-shanbhag commented Nov 14, 2025

Description

Adds the initial version of the trtllm-configure CLI tool. Also defines the schemas for Profile / Scenario.


Summary by CodeRabbit

Release Notes

  • New Features
    • Added trtllm-configure command-line utility for generating LLM configuration files
    • Support for multiple optimization profiles: inference-focused and throughput/latency-based SLA scenarios
    • Validated configuration output to YAML format with GPU SKU, model, and performance target parameters

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.

run [--reuse-test (optional)pipeline-id --disable-fail-fast --skip-test --stage-list "A10-PyTorch-1, xxx" --gpu-type "A30, H100_PCIe" --test-backend "pytorch, cpp" --add-multi-gpu-test --only-multi-gpu-test --disable-multi-gpu-test --post-merge --extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx" --detailed-log --debug(experimental)]

Launch build/test pipelines. All previously running jobs will be killed.

--reuse-test (optional)pipeline-id (OPTIONAL) : Allow the new pipeline to reuse build artifacts and skip successful test stages from a specified pipeline or the last pipeline if no pipeline-id is indicated. If the Git commit ID has changed, this option will be always ignored. The DEFAULT behavior of the bot is to reuse build artifacts and successful test results from the last pipeline.

--disable-reuse-test (OPTIONAL) : Explicitly prevent the pipeline from reusing build artifacts and skipping successful test stages from a previous pipeline. Ensure that all builds and tests are run regardless of previous successes.

--disable-fail-fast (OPTIONAL) : Disable fail fast on build/tests/infra failures.

--skip-test (OPTIONAL) : Skip all test stages, but still run build stages, package stages and sanity check stages. Note: Does NOT update GitHub check status.

--stage-list "A10-PyTorch-1, xxx" (OPTIONAL) : Only run the specified test stages. Examples: "A10-PyTorch-1, xxx". Note: Does NOT update GitHub check status.

--gpu-type "A30, H100_PCIe" (OPTIONAL) : Only run the test stages on the specified GPU types. Examples: "A30, H100_PCIe". Note: Does NOT update GitHub check status.

--test-backend "pytorch, cpp" (OPTIONAL) : Skip test stages which don't match the specified backends. Only support [pytorch, cpp, tensorrt, triton]. Examples: "pytorch, cpp" (does not run test stages with tensorrt or triton backend). Note: Does NOT update GitHub pipeline status.

--only-multi-gpu-test (OPTIONAL) : Only run the multi-GPU tests. Note: Does NOT update GitHub check status.

--disable-multi-gpu-test (OPTIONAL) : Disable the multi-GPU tests. Note: Does NOT update GitHub check status.

--add-multi-gpu-test (OPTIONAL) : Force run the multi-GPU tests in addition to running L0 pre-merge pipeline.

--post-merge (OPTIONAL) : Run the L0 post-merge pipeline instead of the ordinary L0 pre-merge pipeline.

--extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx" (OPTIONAL) : Run the ordinary L0 pre-merge pipeline and specified test stages. Examples: --extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx".

--detailed-log (OPTIONAL) : Enable flushing out all logs to the Jenkins console. This will significantly increase the log volume and may slow down the job.

--debug (OPTIONAL) : Experimental feature. Enable access to the CI container for debugging purpose. Note: Specify exactly one stage in the stage-list parameter to access the appropriate container environment. Note: Does NOT update GitHub check status.

For guidance on mapping tests to stage names, see docs/source/reference/ci-overview.md
and the scripts/test_to_stage_mapping.py helper.

kill

kill

Kill all running builds associated with pull request.

skip

skip --comment COMMENT

Skip testing for latest commit on pull request. --comment "Reason for skipping build/test" is required. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break.

reuse-pipeline

reuse-pipeline

Reuse a previous pipeline to validate current commit. This action will also kill all currently running builds associated with the pull request. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break.

@anish-shanbhag anish-shanbhag requested a review from a team as a code owner November 14, 2025 01:12
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 14, 2025

📝 Walkthrough

Walkthrough

Introduces a new trtllm-configure CLI command that enables TensorRT LLM model configuration through a Pydantic-based interface. The implementation includes scenario and profile frameworks for config selection, with YAML output support and validation logic for conflicting configuration parameters.

Changes

Cohort / File(s) Summary
CLI Entry Point
setup.py
Adds trtllm-configure console script entry pointing to tensorrt_llm.commands.configure:main
Command Implementation
tensorrt_llm/commands/configure.py
New entry point script that imports TRTLLMConfigure and exposes main() function for CLI invocation
CLI Core
tensorrt_llm/configure/cli.py
Implements Pydantic-based CLI with CommonOptions, two subcommand classes (InferenceMaxSubCommand, ThroughputLatencySLASubCommand), and TRTLLMConfigure orchestrator that parses args, retrieves config via get_config(), and writes YAML output
Configuration Framework
tensorrt_llm/configure/scenario.py
Introduces scenario hierarchy: GPU enum, BaseScenario base class, BenchmarkScenario with workload parameters (isl, osl, concurrency, tensor_parallel_size), and ThroughputLatencySLAScenario with SLA fields and mutual exclusivity validation for latency targets
Profile Classes
tensorrt_llm/configure/profile.py
Defines abstract BaseProfile with get_config() method and two concrete implementations: InferenceMaxProfile and ThroughputLatencySLAProfile (currently returning placeholder empty LlmArgs)
CLI Tests
tests/unittest/configure/test_configure.py
Unit test validating subcommand execution, mocking get_config(), and asserting YAML output contains expected configuration values

Sequence Diagram

sequenceDiagram
    actor User
    User->>trtllm-configure: invoke CLI with subcommand args
    rect rgb(240, 248, 255)
    Note over TRTLLMConfigure: CLI Parsing Phase
    trtllm-configure->>TRTLLMConfigure: parse_args() via Pydantic CliSubCommand
    TRTLLMConfigure->>TRTLLMConfigure: determine active subcommand
    end
    rect rgb(240, 255, 240)
    Note over TRTLLMConfigure: Config Retrieval Phase
    TRTLLMConfigure->>Subcommand: get_config()
    Subcommand-->>TRTLLMConfigure: return LlmArgs
    end
    rect rgb(255, 250, 240)
    Note over TRTLLMConfigure: Output Generation Phase
    TRTLLMConfigure->>TRTLLMConfigure: convert LlmArgs to dict
    TRTLLMConfigure->>TRTLLMConfigure: dump to YAML
    TRTLLMConfigure->>File: write YAML to output path
    File-->>User: config.yaml created
    end
    TRTLLMConfigure-->>User: log success + suggested serve command
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • tensorrt_llm/configure/cli.py: Review the Pydantic CLI setup, CommonOptions validation logic, and the run() orchestration method for correctness in YAML writing and subcommand routing
  • tensorrt_llm/configure/scenario.py: Verify field definitions, alias mappings, and the mutual exclusivity validator for ThroughputLatencySLAScenario
  • tensorrt_llm/configure/profile.py: Examine the abstract pattern and multiple inheritance design; ensure get_config() signatures are consistent
  • tests/unittest/configure/test_configure.py: Validate that the test adequately covers the CLI flow and YAML output verification

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 22.22% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Description check ⚠️ Warning The PR description is minimal and incomplete, lacking details on the what, why, and how of the changes. The 'Test Coverage' section is empty, and only a checkbox is marked without substantive information. Provide a clear description of what was implemented (trtllm-configure CLI tool and schema definitions), explain the motivation and use cases, document the test coverage with specific test file names, and fill in relevant PR checklist items with details.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main changes: introducing a CLI tool (trtllm-configure) and defining schema classes (Profile/Scenario), which matches the raw_summary showing new modules and entry points added.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (3)
tests/unittest/configure/test_configure.py (1)

10-38: Solid CLI-flow test; consider guarding against exclude_default brittleness

This is a nice, focused test of the TRTLLMConfigure.run() path: it covers subcommand wiring, YAML emission, and verifies a specific field from an LlmArgs config written to disk. This aligns well with the pattern of having explicit CLI-flow tests alongside API-level tests in this repo. Based on learnings

One small robustness concern: run() uses config.model_dump(exclude_unset=True, exclude_default=True), so if kv_cache_free_gpu_memory_fraction ever has a default equal to 0.9, that key will be omitted from the YAML and this test will fail even though the behavior is technically correct.

You might want to:

  • Use a value that is very unlikely to ever become the default (e.g., 0.37), or
  • Explicitly confirm in a comment that the test intentionally relies on this field’s default being different from 0.9.

Either keeps the assertion meaningful while reducing accidental breakage if LlmArgs defaults are tuned later.

tensorrt_llm/configure/profile.py (1)

9-33: Profile base design is reasonable; clarify multi-inheritance intent and stub behavior

The profile abstraction looks sane: BaseProfile defines the contract, and the concrete profiles mix in both the profile base and their scenario types to get fields + behavior.

A couple of design points worth making explicit:

  • InferenceMaxProfile(BaseProfile, BenchmarkScenario) and ThroughputLatencySLAProfile(BaseProfile, ThroughputLatencySLAScenario) both inherit from Pydantic models (via BaseProfile and the scenario classes). Python’s MRO will collapse BaseModel to a single base, but it’s worth double-checking Pydantic’s multiple-inheritance semantics for combined field definitions and validators. If any surprises show up, an alternative would be to have BaseProfile be a pure ABC (no BaseModel) and rely on the scenario classes for the Pydantic modeling.
  • Both get_config() implementations currently ignore scenario fields and just return a fresh LlmArgs() with TODOs. If this CLI is meant to ship as a structural stub in this PR, that’s fine; otherwise, it may be worth documenting that current behavior is “default LlmArgs only” so users don’t over-interpret the “optimize” wording in the help.

If you’d like, I can sketch a pattern for plugging in DB-backed/heuristic logic into get_config() while keeping the signatures and tests stable.

tensorrt_llm/configure/cli.py (1)

25-28: Consider using custom exception classes for validation errors (optional).

Static analysis suggests avoiding long error messages directly in ValueError raises (TRY003). While this is acceptable in Pydantic validators, you could optionally define custom exception classes for better error handling patterns.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 34dc686 and e3fe37e.

📒 Files selected for processing (6)
  • setup.py (1 hunks)
  • tensorrt_llm/commands/configure.py (1 hunks)
  • tensorrt_llm/configure/cli.py (1 hunks)
  • tensorrt_llm/configure/profile.py (1 hunks)
  • tensorrt_llm/configure/scenario.py (1 hunks)
  • tests/unittest/configure/test_configure.py (1 hunks)
🧰 Additional context used
🧠 Learnings (7)
📓 Common learnings
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.
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.
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: 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.
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.
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.
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.
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.
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*").
Learnt from: ixlmar
Repo: NVIDIA/TensorRT-LLM PR: 8398
File: tensorrt_llm/_torch/pyexecutor/sampling_utils.py:237-272
Timestamp: 2025-10-17T13:21:31.724Z
Learning: The setup.py file in TensorRT-LLM explicitly requires Python 3.10+ via `python_requires=">=3.10, <4"`, making match/case statements and other Python 3.10+ features appropriate throughout the codebase.
Learnt from: nv-lschneider
Repo: NVIDIA/TensorRT-LLM PR: 7910
File: cpp/tensorrt_llm/thop/allreduceOp.cpp:352-446
Timestamp: 2025-09-23T15:12:38.312Z
Learning: In TensorRT-LLM NCCL device implementation, NCCL version 2.28+ requirements are handled at runtime in the nccl_device/config layer rather than with compile-time guards. This allows the allreduceOp to remain version-agnostic and delegates version compatibility validation to the appropriate lower-level components that can gracefully handle unsupported configurations.
📚 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/configure/test_configure.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/configure/test_configure.py
  • tensorrt_llm/commands/configure.py
  • tensorrt_llm/configure/cli.py
  • setup.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:

  • tests/unittest/configure/test_configure.py
  • tensorrt_llm/commands/configure.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/configure/test_configure.py
  • tensorrt_llm/commands/configure.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, 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:

  • tensorrt_llm/commands/configure.py
📚 Learning: 2025-10-17T13:21:31.724Z
Learnt from: ixlmar
Repo: NVIDIA/TensorRT-LLM PR: 8398
File: tensorrt_llm/_torch/pyexecutor/sampling_utils.py:237-272
Timestamp: 2025-10-17T13:21:31.724Z
Learning: The setup.py file in TensorRT-LLM explicitly requires Python 3.10+ via `python_requires=">=3.10, <4"`, making match/case statements and other Python 3.10+ features appropriate throughout the codebase.

Applied to files:

  • setup.py
🧬 Code graph analysis (5)
tests/unittest/configure/test_configure.py (2)
tensorrt_llm/configure/cli.py (3)
  • InferenceMaxSubCommand (32-33)
  • TRTLLMConfigure (43-84)
  • run (65-84)
tensorrt_llm/_torch/auto_deploy/llm_args.py (1)
  • LlmArgs (302-411)
tensorrt_llm/configure/profile.py (2)
tensorrt_llm/configure/scenario.py (2)
  • BenchmarkScenario (32-49)
  • ThroughputLatencySLAScenario (52-75)
tensorrt_llm/_torch/auto_deploy/llm_args.py (1)
  • LlmArgs (302-411)
tensorrt_llm/commands/configure.py (1)
tensorrt_llm/configure/cli.py (3)
  • TRTLLMConfigure (43-84)
  • main (87-88)
  • run (65-84)
tensorrt_llm/configure/cli.py (1)
tensorrt_llm/configure/profile.py (5)
  • InferenceMaxProfile (22-26)
  • ThroughputLatencySLAProfile (29-33)
  • get_config (19-19)
  • get_config (24-26)
  • get_config (31-33)
tensorrt_llm/configure/scenario.py (1)
tensorrt_llm/llmapi/llm_args.py (1)
  • Field (63-90)
🪛 Ruff (0.14.4)
tensorrt_llm/configure/cli.py

26-26: Avoid specifying long messages outside the exception class

(TRY003)


28-28: Avoid specifying long messages outside the exception class

(TRY003)


47-47: Unused noqa directive (non-enabled: D205)

Remove unused noqa directive

(RUF100)

tensorrt_llm/configure/scenario.py

72-74: Avoid specifying long messages outside the exception class

(TRY003)

🔇 Additional comments (6)
setup.py (1)

280-288: Console script wiring for trtllm-configure looks consistent

The new trtllm-configure=tensorrt_llm.commands.configure:main entry aligns with the existing trtllm-* console scripts and correctly targets the new command module.

tensorrt_llm/commands/configure.py (1)

1-9: Thin command shim for trtllm-configure is appropriate

This module cleanly delegates to TRTLLMConfigure().run() and provides a standard main() plus __main__ guard, matching the existing tensorrt_llm.commands.* pattern.

tensorrt_llm/configure/cli.py (4)

32-40: LGTM!

The subcommand class structure is well-designed. The multiple inheritance pattern (profile + common options) provides a clean separation between business logic and CLI configuration.


72-73: LGTM!

Good use of exclude_unset=True and exclude_default=True to produce a clean, minimal config file containing only explicitly set values. The use of yaml.safe_dump is the secure choice for YAML serialization.


87-92: LGTM!

The main() function and __main__ guard follow standard Python conventions. This enables both direct execution of the module and import/invocation from the console script entry point defined in setup.py.


84-84: The model field is correctly accessible and no issues exist.

The model field is defined in BaseScenario (scenario.py:27) and is properly inherited through the full class hierarchy:

  • InferenceMaxSubCommandInferenceMaxProfileBenchmarkScenarioBaseScenario ✓ has model
  • ThroughputLatencySLASubCommandThroughputLatencySLAProfileThroughputLatencySLAScenarioBaseScenario ✓ has model

Both subcommand types have full access to the model field through Pydantic's inheritance mechanism.

Signed-off-by: Anish Shanbhag <[email protected]>
@anish-shanbhag
Copy link
Collaborator Author

/bot run

@tensorrt-cicd
Copy link
Collaborator

PR_Github #24528 [ run ] triggered by Bot. Commit: 478ffb2

if self.output.suffix != ".yaml":
raise ValueError(f"Output file must be a YAML file. Got '{self.output}'.")
if self.output.exists():
raise ValueError(f"Output file '{self.output}' already exists.")
Copy link
Collaborator

@venkywonka venkywonka Nov 14, 2025

Choose a reason for hiding this comment

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

if there's an easy way to parametrize and expose a --force-overwrite or something, it would help in avoiding a potential user gripe of having to explicitly delete the file everytime - but P1 feel free to ignore

@tensorrt-cicd
Copy link
Collaborator

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

config = subcommand.get_config()

# exclude_unset and exclude_default are explicitly used to avoid including default values
config_dict = config.model_dump(exclude_unset=True, exclude_default=True)

Choose a reason for hiding this comment

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

nit: do we want to exclude unset and default? I can think of a scenario where the defaults change in newer versions and suddenly you get perf changes on the same config, compared to when you ran it on the version where it was originally generated. However, being overly explicit also has it's problems, so I'm not sure what's the best option here. What do you think?

Comment on lines +53 to +56
tps_per_gpu: PositiveFloat = Field(
description="Target throughput per GPU in tokens per second",
validation_alias=AliasChoices("tps_per_gpu", "target_tps_per_gpu", "min_tps_per_gpu"),
)

Choose a reason for hiding this comment

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

nit: shouldn't all be optional and at least one specified? for example, low concurrency workloads with a fixed amount of gpus where a user is only interested in TTFT and ITL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants