Parcourir la source

remove sklearn warnings

Jérôme BUISINE il y a 3 ans
Parent
commit
af8b558485
1 fichiers modifiés avec 6 ajouts et 0 suppressions
  1. 6 0
      find_best_attributes_surrogate.py

+ 6 - 0
find_best_attributes_surrogate.py

@@ -47,6 +47,12 @@ from optimization.callbacks.SurrogateMonoCheckpoint import SurrogateMonoCheckpoi
 # variables and parameters
 # variables and parameters
 models_list         = cfg.models_names_list
 models_list         = cfg.models_names_list
 
 
+from warnings import simplefilter
+from sklearn.exceptions import ConvergenceWarning, DeprecationWarning, VisibleDeprecationWarning
+simplefilter("ignore", category=ConvergenceWarning)
+simplefilter("ignore", category=DeprecationWarning)
+simplefilter("ignore", category=VisibleDeprecationWarning)
+
 # default validator
 # default validator
 def validator(solution):
 def validator(solution):