3131class BaseModelConfigGenerator (ConfigGeneratorInterface ):
3232 """ Base class for generating model configs """
3333
34- def __init__ (self ,
35- config : ConfigCommandProfile ,
36- gpus : List [GPUDevice ],
37- model : ModelProfileSpec ,
38- client : TritonClient ,
39- model_variant_name_manager : ModelVariantNameManager ,
40- default_only : bool ,
41- early_exit_enable : bool ) -> None :
34+ def __init__ (self , config : ConfigCommandProfile , gpus : List [GPUDevice ],
35+ model : ModelProfileSpec , client : TritonClient ,
36+ model_variant_name_manager : ModelVariantNameManager ,
37+ default_only : bool , early_exit_enable : bool ) -> None :
4238 """
4339 Parameters
4440 ----------
@@ -93,7 +89,8 @@ def get_configs(self) -> Generator[ModelConfig, None, None]:
9389 yield (config )
9490 self ._step ()
9591
96- def set_last_results (self , measurements : List [Optional [RunConfigMeasurement ]]) -> None :
92+ def set_last_results (
93+ self , measurements : List [Optional [RunConfigMeasurement ]]) -> None :
9794 """
9895 Given the results from the last ModelConfig, make decisions
9996 about future configurations to generate
@@ -144,7 +141,8 @@ def _make_remote_model_config(self) -> ModelConfig:
144141 if not self ._config .reload_model_disable :
145142 self ._client .load_model (self ._base_model_name )
146143 model_config = ModelConfig .create_from_triton_api (
147- self ._client , self ._base_model_name , self ._config .client_max_retries )
144+ self ._client , self ._base_model_name ,
145+ self ._config .client_max_retries )
148146 model_config .set_cpu_only (self ._cpu_only )
149147 if not self ._config .reload_model_disable :
150148 self ._client .unload_model (self ._base_model_name )
@@ -158,8 +156,9 @@ def _make_direct_mode_model_config(self, param_combo: Dict) -> ModelConfig:
158156 model_variant_name_manager = self ._model_variant_name_manager )
159157
160158 @staticmethod
161- def make_model_config (param_combo : dict , model : ModelProfileSpec ,
162- model_variant_name_manager : ModelVariantNameManager ) -> ModelConfig :
159+ def make_model_config (
160+ param_combo : dict , model : ModelProfileSpec ,
161+ model_variant_name_manager : ModelVariantNameManager ) -> ModelConfig :
163162 """
164163 Loads the base model config from the model repository, and then applies the
165164 parameters in the param_combo on top to create and return a new model config
0 commit comments