Pārlūkot izejas kodu

remove sklearn warnings

Jérôme BUISINE 3 gadi atpakaļ
vecāks
revīzija
af8b558485
1 mainītis faili ar 6 papildinājumiem un 0 dzēšanām
  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
 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
 def validator(solution):