File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed
ads/opctl/operator/lowcode Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ def _build_model(self) -> pd.DataFrame:
3232 logger .info ("Ray already initialized" )
3333 date_column = self .spec .datetime_column .name
3434 anomaly_output = AnomalyOutput (date_column = date_column )
35+ time_budget = self .spec .model_kwargs .pop ("time_budget" , - 1 )
3536
3637 # Iterate over the full_data_dict items
3738 for target , df in self .datasets .full_data_dict .items ():
@@ -47,6 +48,7 @@ def _build_model(self) -> pd.DataFrame:
4748 contamination = self .spec .contamination
4849 if self .y_valid_dict is not None
4950 else None ,
51+ time_budget = time_budget ,
5052 )
5153 y_pred = est .predict (df )
5254 scores = est .predict_proba (df )
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ def set_kwargs(self):
4545 model_kwargs_cleaned .get ("score_metric" , AUTOMLX_DEFAULT_SCORE_METRIC ),
4646 )
4747 model_kwargs_cleaned .pop ("task" , None )
48- time_budget = model_kwargs_cleaned .pop ("time_budget" , None )
48+ time_budget = model_kwargs_cleaned .pop ("time_budget" , - 1 )
4949 model_kwargs_cleaned [
5050 "preprocessing"
5151 ] = self .spec .preprocessing or model_kwargs_cleaned .get ("preprocessing" , True )
@@ -116,7 +116,8 @@ def _build_model(self) -> pd.DataFrame:
116116 )
117117 model .fit (
118118 X = data_i .drop (target , axis = 1 ),
119- y = data_i [[target ]]
119+ y = data_i [[target ]],
120+ time_budget = time_budget ,
120121 )
121122 logger .debug (f"Selected model: { model .selected_model_ } " )
122123 logger .debug (f"Selected model params: { model .selected_model_params_ } " )
Original file line number Diff line number Diff line change @@ -210,7 +210,7 @@ def populate_yaml(
210210 if model == "autots" :
211211 yaml_i ["spec" ]["model_kwargs" ] = {"model_list" : "superfast" }
212212 if model == "automlx" :
213- yaml_i ["spec" ]["model_kwargs" ] = {"time_budget" : 1 }
213+ yaml_i ["spec" ]["model_kwargs" ] = {"time_budget" : 50 }
214214
215215 return yaml_i , output_data_path
216216
You can’t perform that action at this time.
0 commit comments