@@ -143,13 +143,13 @@ class FixedPipelineParams(NamedTuple):
143
143
information on what to save. Must be a member of `DisableFileOutputParameters`.
144
144
Allowed elements in the list are:
145
145
146
- + `y_optimization `:
146
+ + `y_opt `:
147
147
do not save the predictions for the optimization set,
148
148
which would later on be used to build an ensemble. Note that SMAC
149
149
optimizes a metric evaluated on the optimization set.
150
- + `pipeline `:
150
+ + `model `:
151
151
do not save any individual pipeline files
152
- + `pipelines `:
152
+ + `cv_model `:
153
153
In case of cross validation, disables saving the joint model of the
154
154
pipelines fit on each fold.
155
155
+ `y_test`:
@@ -279,8 +279,9 @@ def _init_miscellaneous(self) -> None:
279
279
self .disable_file_output = disable_file_output
280
280
else :
281
281
self .disable_file_output = []
282
+
282
283
if self .num_folds == 1 : # not save cv model when we perform holdout
283
- self .disable_file_output .append ('pipelines ' )
284
+ self .disable_file_output .append ('cv_model ' )
284
285
285
286
def _init_dataset_properties (self ) -> None :
286
287
datamanager : BaseDataset = self .fixed_pipeline_params .backend .load_datamanager ()
@@ -570,7 +571,7 @@ def _save_to_backend(
570
571
571
572
backend = self .fixed_pipeline_params .backend
572
573
# This file can be written independently of the others down bellow
573
- if 'y_optimization ' not in self .disable_file_output and self .fixed_pipeline_params .save_y_opt :
574
+ if 'y_opt ' not in self .disable_file_output and self .fixed_pipeline_params .save_y_opt :
574
575
backend .save_targets_ensemble (self .y_opt )
575
576
576
577
seed , budget = self .fixed_pipeline_params .seed , self .evaluator_params .budget
@@ -579,9 +580,9 @@ def _save_to_backend(
579
580
seed = int (seed ),
580
581
idx = int (self .num_run ),
581
582
budget = float (budget ),
582
- model = self .pipelines [0 ] if 'pipeline ' not in self .disable_file_output else None ,
583
- cv_model = self ._fetch_voting_pipeline () if 'pipelines ' not in self .disable_file_output else None ,
584
- ensemble_predictions = self ._get_prediction (opt_pred , 'y_optimization ' ),
583
+ model = self .pipelines [0 ] if 'model ' not in self .disable_file_output else None ,
584
+ cv_model = self ._fetch_voting_pipeline () if 'cv_model ' not in self .disable_file_output else None ,
585
+ ensemble_predictions = self ._get_prediction (opt_pred , 'y_opt ' ),
585
586
valid_predictions = self ._get_prediction (valid_pred , 'y_valid' ),
586
587
test_predictions = self ._get_prediction (test_pred , 'y_test' )
587
588
)
@@ -601,7 +602,7 @@ def _is_output_possible(
601
602
return False
602
603
603
604
y_dict = {'optimization' : opt_pred , 'validation' : valid_pred , 'test' : test_pred }
604
- for inference_name , y in y_dict .items ():
605
+ for y in y_dict .values ():
605
606
if y is not None and not np .all (np .isfinite (y )):
606
607
return False # Model predictions contains NaNs
607
608
0 commit comments