瀏覽代碼

remove sklearn warnings

Jérôme BUISINE 3 年之前
父節點
當前提交
af8b558485
共有 1 個文件被更改,包括 6 次插入0 次删除
  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):