Преглед на файлове

Update of train model script

Jérôme BUISINE преди 4 години
родител
ревизия
018d8e801f
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 3 0
      train_model.py

+ 3 - 0
train_model.py

@@ -63,6 +63,9 @@ def train(_data_file, _model_name):
 
     dump(clf, model_file_path)
 
+    if not os.path.exists(cfg.results_information_folder):
+        os.makedirs(cfg.results_information_folder)
+        
     # save score into global_result.csv file
     with open(cfg.global_result_filepath, "a") as f:
        f.write(model_filename.replace('.joblib', '') + ';' + str(len(y)) + ';' + str(coeff) + ';\n')