1010
1111from autointent import Context , Dataset
1212from autointent .configs import CrossEncoderConfig , EmbedderConfig , InferenceNodeConfig , LoggingConfig , VectorIndexConfig
13- from autointent .custom_types import ListOfGenericLabels , NodeType , TuningType , ValidationScheme
13+ from autointent .custom_types import ListOfGenericLabels , NodeType , SamplerType , ValidationScheme
1414from autointent .metrics import PREDICTION_METRICS_MULTILABEL
1515from autointent .nodes import InferenceNode , NodeOptimizer
1616from autointent .utils import load_default_search_space , load_search_space
@@ -92,7 +92,7 @@ def default_optimizer(cls, multilabel: bool, seed: int = 42) -> "Pipeline":
9292 """
9393 return cls .from_search_space (search_space = load_default_search_space (multilabel ), seed = seed )
9494
95- def _fit (self , context : Context , tuning : TuningType = "brute" ) -> None :
95+ def _fit (self , context : Context , sampler : SamplerType = "brute" ) -> None :
9696 """
9797 Optimize the pipeline.
9898
@@ -107,7 +107,7 @@ def _fit(self, context: Context, tuning: TuningType = "brute") -> None:
107107 for node_type in NodeType :
108108 node_optimizer = self .nodes .get (node_type , None )
109109 if node_optimizer is not None :
110- node_optimizer .fit (context , tuning ) # type: ignore[union-attr]
110+ node_optimizer .fit (context , sampler ) # type: ignore[union-attr]
111111 if not context .vector_index_config .save_db :
112112 self ._logger .info ("removing vector database from file system..." )
113113 # TODO clear cache from appdirs
@@ -127,7 +127,7 @@ def fit(
127127 scheme : ValidationScheme = "ho" ,
128128 n_folds : int = 3 ,
129129 refit_after : bool = False ,
130- tuning : TuningType = "brute" ,
130+ sampler : SamplerType = "brute" ,
131131 ) -> Context :
132132 """
133133 Optimize the pipeline from dataset.
@@ -145,7 +145,7 @@ def fit(
145145 context .configure_vector_index (self .vector_index_config , self .embedder_config )
146146 context .configure_cross_encoder (self .cross_encoder_config )
147147 self .validate_modules (dataset )
148- self ._fit (context , tuning )
148+ self ._fit (context , sampler )
149149
150150 if context .is_ram_to_clear ():
151151 nodes_configs = context .optimization_info .get_inference_nodes_config ()
0 commit comments