Skip to content

Commit dc75779

Browse files
authored
[nvbugs/5401156][fix] Avoid import all models when import trtllm._common (#6266)
1 parent f172fac commit dc75779

File tree

5 files changed

+7
-5
lines changed

5 files changed

+7
-5
lines changed

tensorrt_llm/_torch/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from .llm import LLM
22
from .model_config import MoeLoadBalancerConfig
3-
from .models.checkpoints.base_checkpoint_loader import BaseCheckpointLoader
43

5-
__all__ = ["LLM", "MoeLoadBalancerConfig", "BaseCheckpointLoader"]
4+
__all__ = ["LLM", "MoeLoadBalancerConfig"]

tensorrt_llm/llmapi/llm_args.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1894,7 +1894,8 @@ class TorchLlmArgs(BaseLlmArgs):
18941894
default=None,
18951895
description="The checkpoint loader to use for this LLM instance.",
18961896
json_schema_extra={
1897-
"type": "Optional[tensorrt_llm._torch.BaseCheckpointLoader]"
1897+
"type":
1898+
"Optional[tensorrt_llm._torch.models.checkpoints.BaseCheckpointLoader]"
18981899
},
18991900
)
19001901

tests/integration/test_lists/waives.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,6 @@ test_e2e.py::test_ptp_quickstart_multimodal[gemma-3-27b-it-gemma/gemma-3-27b-it-
423423
test_e2e.py::test_ptp_quickstart_multimodal[gemma-3-27b-it-gemma/gemma-3-27b-it-image-False] SKIP (https://nvbgus/5401114)
424424
examples/test_recurrentgemma.py::test_llm_recurrentgemma_1gpu[use_cpp_session-recurrentgemma-2b-use_paged_cache-int4_awq-float16-enable_attn_plugin-enable_gemm_plugin] SKIP (https://nvbugs/5401233)
425425
examples/test_recurrentgemma.py::test_llm_recurrentgemma_2gpu[recurrentgemma-2b] SKIP (https://nvbugs/5401233)
426-
examples/test_multimodal.py::test_llm_multimodal_general[VILA1.5-3b-pp:1-tp:1-float16-bs:1-cpp_e2e:False-nb:1] SKIP (https://nvbugs/5401156)
427426
test_e2e.py::test_ptp_quickstart_multimodal[mistral-small-3.1-24b-instruct-Mistral-Small-3.1-24B-Instruct-2503-image-True] SKIP (https://nvbugs/5404005)
428427
accuracy/test_llm_api_pytorch.py::TestLlama3_1_8BInstruct::test_eagle3 SKIP (https://nvbugs/5409414)
429428
accuracy/test_llm_api_pytorch.py::TestLlama3_1_8BInstruct::test_fp8_beam_search SKIP (https://nvbugs/5409415)

tests/unittest/api_stability/api_stability_core.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818

1919
import tensorrt_llm
2020
from tensorrt_llm import LLM
21+
# Import BaseCheckpointLoader for YAML processing
22+
from tensorrt_llm._torch.models.checkpoints.base_checkpoint_loader import \
23+
BaseCheckpointLoader
2124
from tensorrt_llm.executor import GenerationResult
2225
from tensorrt_llm.executor.result import TokenLogprobs
2326
from tensorrt_llm.llmapi import (CalibConfig, CompletionOutput,

tests/unittest/api_stability/references/llm.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ methods:
7171
annotation: Optional[tensorrt_llm.llmapi.llm_args.CudaGraphConfig]
7272
default: null
7373
checkpoint_loader:
74-
annotation: Optional[tensorrt_llm._torch.BaseCheckpointLoader]
74+
annotation: Optional[tensorrt_llm._torch.models.checkpoints.BaseCheckpointLoader]
7575
default: null
7676
checkpoint_format:
7777
annotation: Optional[str]

0 commit comments

Comments
 (0)