@@ -143,13 +143,13 @@ class FixedPipelineParams(NamedTuple):
143143 information on what to save. Must be a member of `DisableFileOutputParameters`.
144144 Allowed elements in the list are:
145145
146- + `y_optimization `:
146+ + `y_opt `:
147147 do not save the predictions for the optimization set,
148148 which would later on be used to build an ensemble. Note that SMAC
149149 optimizes a metric evaluated on the optimization set.
150- + `pipeline `:
150+ + `model `:
151151 do not save any individual pipeline files
152- + `pipelines `:
152+ + `cv_model `:
153153 In case of cross validation, disables saving the joint model of the
154154 pipelines fit on each fold.
155155 + `y_test`:
@@ -279,8 +279,9 @@ def _init_miscellaneous(self) -> None:
279279 self .disable_file_output = disable_file_output
280280 else :
281281 self .disable_file_output = []
282+
282283 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 ' )
284285
285286 def _init_dataset_properties (self ) -> None :
286287 datamanager : BaseDataset = self .fixed_pipeline_params .backend .load_datamanager ()
@@ -570,7 +571,7 @@ def _save_to_backend(
570571
571572 backend = self .fixed_pipeline_params .backend
572573 # 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 :
574575 backend .save_targets_ensemble (self .y_opt )
575576
576577 seed , budget = self .fixed_pipeline_params .seed , self .evaluator_params .budget
@@ -579,9 +580,9 @@ def _save_to_backend(
579580 seed = int (seed ),
580581 idx = int (self .num_run ),
581582 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 ' ),
585586 valid_predictions = self ._get_prediction (valid_pred , 'y_valid' ),
586587 test_predictions = self ._get_prediction (test_pred , 'y_test' )
587588 )
@@ -601,7 +602,7 @@ def _is_output_possible(
601602 return False
602603
603604 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 ():
605606 if y is not None and not np .all (np .isfinite (y )):
606607 return False # Model predictions contains NaNs
607608
0 commit comments