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:
32
32
logger .info ("Ray already initialized" )
33
33
date_column = self .spec .datetime_column .name
34
34
anomaly_output = AnomalyOutput (date_column = date_column )
35
+ time_budget = self .spec .model_kwargs .pop ("time_budget" , - 1 )
35
36
36
37
# Iterate over the full_data_dict items
37
38
for target , df in self .datasets .full_data_dict .items ():
@@ -47,6 +48,7 @@ def _build_model(self) -> pd.DataFrame:
47
48
contamination = self .spec .contamination
48
49
if self .y_valid_dict is not None
49
50
else None ,
51
+ time_budget = time_budget ,
50
52
)
51
53
y_pred = est .predict (df )
52
54
scores = est .predict_proba (df )
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ def set_kwargs(self):
45
45
model_kwargs_cleaned .get ("score_metric" , AUTOMLX_DEFAULT_SCORE_METRIC ),
46
46
)
47
47
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 )
49
49
model_kwargs_cleaned [
50
50
"preprocessing"
51
51
] = self .spec .preprocessing or model_kwargs_cleaned .get ("preprocessing" , True )
@@ -116,7 +116,8 @@ def _build_model(self) -> pd.DataFrame:
116
116
)
117
117
model .fit (
118
118
X = data_i .drop (target , axis = 1 ),
119
- y = data_i [[target ]]
119
+ y = data_i [[target ]],
120
+ time_budget = time_budget ,
120
121
)
121
122
logger .debug (f"Selected model: { model .selected_model_ } " )
122
123
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(
210
210
if model == "autots" :
211
211
yaml_i ["spec" ]["model_kwargs" ] = {"model_list" : "superfast" }
212
212
if model == "automlx" :
213
- yaml_i ["spec" ]["model_kwargs" ] = {"time_budget" : 1 }
213
+ yaml_i ["spec" ]["model_kwargs" ] = {"time_budget" : 50 }
214
214
215
215
return yaml_i , output_data_path
216
216
You can’t perform that action at this time.
0 commit comments