@@ -37,13 +37,6 @@ def mock_sampling_params():
3737 yield mock
3838
3939
40- @pytest .fixture
41- def mock_pytorch_config ():
42- with patch ("nemo_deploy.nlp.trtllm_api_deployable.PyTorchConfig" ) as mock :
43- mock .__annotations__ = {}
44- yield mock
45-
46-
4740try :
4841 import tensorrt_llm # noqa: F401
4942
@@ -55,7 +48,7 @@ def mock_pytorch_config():
5548@pytest .mark .skipif (not HAVE_TENSORRT_LLM , reason = "TensorRT-LLM is not installed" )
5649@pytest .mark .run_only_on ("GPU" )
5750class TestTensorRTLLMAPIDeployable :
58- def test_initialization_with_defaults (self , mock_pytorch_config ):
51+ def test_initialization_with_defaults (self ):
5952 from nemo_deploy .nlp .trtllm_api_deployable import TensorRTLLMAPIDeployable
6053
6154 with patch ("nemo_deploy.nlp.trtllm_api_deployable.LLM" ) as mock_llm_class :
@@ -67,7 +60,7 @@ def test_initialization_with_defaults(self, mock_pytorch_config):
6760 assert deployer .model == mock_llm_instance
6861 mock_llm_class .assert_called_once ()
6962
70- def test_initialization_with_custom_params (self , mock_pytorch_config ):
63+ def test_initialization_with_custom_params (self ):
7164 from nemo_deploy .nlp .trtllm_api_deployable import TensorRTLLMAPIDeployable
7265
7366 with patch ("nemo_deploy.nlp.trtllm_api_deployable.LLM" ) as mock_llm_class :
@@ -109,7 +102,7 @@ def test_generate_without_model(self):
109102 with pytest .raises (RuntimeError , match = "Model is not initialized" ):
110103 deployer .generate (prompts = ["test prompt" ])
111104
112- def test_generate_with_model (self , mock_llm , mock_sampling_params , mock_pytorch_config ):
105+ def test_generate_with_model (self , mock_llm , mock_sampling_params ):
113106 from nemo_deploy .nlp .trtllm_api_deployable import TensorRTLLMAPIDeployable
114107
115108 with patch ("nemo_deploy.nlp.trtllm_api_deployable.LLM" ) as mock_llm_class :
@@ -122,7 +115,7 @@ def test_generate_with_model(self, mock_llm, mock_sampling_params, mock_pytorch_
122115 mock_llm .generate .assert_called_once ()
123116 mock_sampling_params .assert_called_once ()
124117
125- def test_generate_with_parameters (self , mock_llm , mock_sampling_params , mock_pytorch_config ):
118+ def test_generate_with_parameters (self , mock_llm , mock_sampling_params ):
126119 from nemo_deploy .nlp .trtllm_api_deployable import TensorRTLLMAPIDeployable
127120
128121 with patch ("nemo_deploy.nlp.trtllm_api_deployable.LLM" ) as mock_llm_class :
@@ -135,7 +128,7 @@ def test_generate_with_parameters(self, mock_llm, mock_sampling_params, mock_pyt
135128 mock_llm .generate .assert_called_once ()
136129 mock_sampling_params .assert_called_once_with (max_tokens = 100 , temperature = 0.8 , top_k = 50 , top_p = 0.95 )
137130
138- def test_triton_input_output_config (self , mock_pytorch_config ):
131+ def test_triton_input_output_config (self ):
139132 from nemo_deploy .nlp .trtllm_api_deployable import TensorRTLLMAPIDeployable
140133
141134 with patch ("nemo_deploy.nlp.trtllm_api_deployable.LLM" ):
0 commit comments