MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT-LLM / __init__

Method __init__

tests/unittest/executor/test_base_worker.py:52–67  ·  view source on GitHub ↗
(self, engine: str, tp_size: int = 1)

Source from the content-addressed store, hash-verified

50class FakeWorker(BaseWorker):
51
52 def __init__(self, engine: str, tp_size: int = 1):
53 llm_args = TorchLlmArgs(
54 model=model_path,
55 tensor_parallel_size=tp_size,
56 backend='pytorch',
57 enable_iter_perf_stats=True,
58 )
59 super().__init__(
60 engine=engine,
61 llm_args=llm_args,
62 hf_model_dir=engine,
63 )
64 # Note: BaseWorker doesn't call setup_engine() automatically,
65 # unlike GenerationExecutorWorker, so we need to call it manually
66 self.setup_engine()
67 self._started = False
68
69 def start(self):
70 """Override start to mark as started - no background threads needed for test."""

Callers

nothing calls this directly

Calls 2

TorchLlmArgsClass · 0.90
setup_engineMethod · 0.45

Tested by

no test coverage detected