@@ -852,9 +852,10 @@ def _search(
852
852
time_left_for_modelfit = int (max (0 , total_walltime_limit - elapsed_time ))
853
853
if func_eval_time_limit_secs is None or func_eval_time_limit_secs > time_left_for_modelfit :
854
854
self ._logger .warning (
855
- 'Time limit for a single run is higher than total time '
856
- 'limit. Capping the limit for a single run to the total '
857
- 'time given to SMAC (%f)' % time_left_for_modelfit
855
+ "Time limit for a single run exceeded total time limit. "
856
+ "Cap the limit for a single run to the total time given to SMAC ({})" .format (
857
+ time_left_for_modelfit
858
+ )
858
859
)
859
860
func_eval_time_limit_secs = time_left_for_modelfit
860
861
@@ -863,10 +864,8 @@ def _search(
863
864
if num_models < 2 :
864
865
func_eval_time_limit_secs = time_left_for_modelfit // 2
865
866
self ._logger .warning (
866
- "Capping the func_eval_time_limit_secs to {} to have "
867
- "time for a least 2 models to ensemble." .format (
868
- func_eval_time_limit_secs
869
- )
867
+ "Cap the func_eval_time_limit_secs to {} to guarantee at least"
868
+ "two model-trainings" .format (func_eval_time_limit_secs )
870
869
)
871
870
872
871
# ============> Run dummy predictions
@@ -879,7 +878,7 @@ def _search(
879
878
880
879
if enable_traditional_pipeline :
881
880
if STRING_TO_TASK_TYPES [self .task_type ] in REGRESSION_TASKS :
882
- self ._logger .warning ("Traditional Pipeline is not enabled for regression. Skipping ..." )
881
+ self ._logger .warning ("Regression tasks are not supported by traditional pipelines. Skip ..." )
883
882
else :
884
883
traditional_task_name = 'runTraditional'
885
884
self ._stopwatch .start_task (traditional_task_name )
@@ -906,9 +905,9 @@ def _search(
906
905
"is no time left. Try increasing the value "
907
906
"of time_left_for_this_task." )
908
907
elif self .ensemble_size <= 0 :
909
- self ._logger .info ("Not starting ensemble builder as ensemble size is 0" )
908
+ self ._logger .info ("Skip ensemble builder as the provided ensemble size is 0. " )
910
909
else :
911
- self ._logger .info ("Starting ensemble" )
910
+ self ._logger .info ("Start building ensemble. " )
912
911
ensemble_task_name = 'ensemble'
913
912
self ._stopwatch .start_task (ensemble_task_name )
914
913
proc_ensemble = EnsembleBuilderManager (
@@ -939,9 +938,9 @@ def _search(
939
938
elapsed_time = self ._stopwatch .wall_elapsed (experiment_task_name )
940
939
time_left_for_smac = max (0 , total_walltime_limit - elapsed_time )
941
940
942
- self ._logger .info ("Starting SMAC with %5 .2f sec time left" % time_left_for_smac )
941
+ self ._logger .info ("Start SMAC with {: .2f} [ sec] time left" . format ( time_left_for_smac ) )
943
942
if time_left_for_smac <= 0 :
944
- self ._logger .warning (" Not starting SMAC because there is no time left" )
943
+ self ._logger .warning ("Skip SMAC because there is no time left" )
945
944
else :
946
945
947
946
_proc_smac = AutoMLSMBO (
@@ -984,43 +983,43 @@ def _search(
984
983
with open (trajectory_filename , 'w' ) as fh :
985
984
json .dump (saveable_trajectory , fh )
986
985
except Exception as e :
987
- self ._logger .warning (f "Cannot save { trajectory_filename } due to { e } ..." )
986
+ self ._logger .warning ("Cannot save {} due to {}" . format ( trajectory_filename , e ) )
988
987
except Exception as e :
989
988
self ._logger .exception (str (e ))
990
989
raise
991
990
# Wait until the ensemble process is finished to avoid shutting down
992
991
# while the ensemble builder tries to access the data
993
- self ._logger .info ("Starting Shutdown " )
992
+ self ._logger .info ("Start shutdown " )
994
993
995
994
if proc_ensemble is not None :
996
995
self .ensemble_performance_history = list (proc_ensemble .history )
997
996
998
997
if len (proc_ensemble .futures ) > 0 :
999
998
# Also add ensemble runs that did not finish within smac time
1000
999
# and add them into the ensemble history
1001
- self ._logger .info ("Ensemble script still running, waiting for it to finish. " )
1000
+ self ._logger .info ("Wait until all the ensemble processes finish" )
1002
1001
result = proc_ensemble .futures .pop ().result ()
1003
1002
if result :
1004
1003
ensemble_history , _ , _ , _ = result
1005
1004
self .ensemble_performance_history .extend (ensemble_history )
1006
- self ._logger .info ("Ensemble script finished, continue shutdown. " )
1005
+ self ._logger .info ("Finish all the ensemble processes and start shutdown" )
1007
1006
1008
1007
# save the ensemble performance history file
1009
1008
if len (self .ensemble_performance_history ) > 0 :
1010
1009
pd .DataFrame (self .ensemble_performance_history ).to_json (
1011
1010
os .path .join (self ._backend .internals_directory , 'ensemble_history.json' ))
1012
1011
1013
- self ._logger .info ("Closing the dask infrastructure" )
1012
+ self ._logger .info ("Close the dask infrastructure" )
1014
1013
self ._close_dask_client ()
1015
- self ._logger .info ("Finished closing the dask infrastructure" )
1014
+ self ._logger .info ("Finish closing the dask infrastructure" )
1016
1015
1017
1016
if load_models :
1018
- self ._logger .info ("Loading models... " )
1017
+ self ._logger .info ("Load models" )
1019
1018
self ._load_models ()
1020
- self ._logger .info ("Finished loading models... " )
1019
+ self ._logger .info ("Finish loading models" )
1021
1020
1022
1021
# Clean up the logger
1023
- self ._logger .info ("Starting to clean up the logger" )
1022
+ self ._logger .info ("Clean up the logger" )
1024
1023
self ._clean_logger ()
1025
1024
1026
1025
return self
@@ -1294,10 +1293,11 @@ def _print_debug_info_to_log(self) -> None:
1294
1293
Prints to the log file debug information about the current estimator
1295
1294
"""
1296
1295
assert self ._logger is not None
1297
- self ._logger .debug ("Starting to print environment information" )
1298
- self ._logger .debug (' Python version: %s' , sys .version .split ('\n ' ))
1299
- self ._logger .debug (' System: %s' , platform .system ())
1300
- self ._logger .debug (' Machine: %s' , platform .machine ())
1301
- self ._logger .debug (' Platform: %s' , platform .platform ())
1296
+ self ._logger .debug ("Display environment information" )
1297
+ self ._logger .debug (" Python version: {}" .format (sys .version .split ('\n ' )))
1298
+ self ._logger .debug (" System: {}" .format (platform .system ()))
1299
+ self ._logger .debug (" Machine: {}" .format (platform .machine ()))
1300
+ self ._logger .debug (" Platform: {}" .format (platform .platform ()))
1301
+
1302
1302
for key , value in vars (self ).items ():
1303
- self ._logger .debug (f "\t { key } ->{ value } " )
1303
+ self ._logger .debug ("\t {}->{}" . format ( key , value ) )
0 commit comments