From c5b79194fa6fd61fd78b58a733c01b7b498508ae Mon Sep 17 00:00:00 2001 From: Helen Qu Date: Fri, 2 Apr 2021 10:07:43 -0700 Subject: [PATCH] add comments to run_model --- run_model.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/run_model.py b/run_model.py index 824a183..434acea 100644 --- a/run_model.py +++ b/run_model.py @@ -14,18 +14,20 @@ with open(args.config_path, "r") as cfgfile: config = yaml.load(cfgfile) -# TRAIN + TEST +# MANUAL: TRAIN + TEST # model = SconeClassifier(args.config_path) # _, history = model.train() # pd.DataFrame(history.history).to_csv(os.path.join(OUTPUT_PATH, "training_history.csv")) # test_acc = model.test() -# TRAIN + PREDICT +# MANUAL: TRAIN + PREDICT # trained_model, history = model.train() # test_set, test_ids = model.get_test_set() # trained_model.predict(test_set, test_ids) +# AUTOMATIC: RUNS TRAIN/TEST/PREDICT AS SPECIFIED BY CONFIG preds_dict, history = SconeClassifier(config).run() + print("######## CLASSIFICATION REPORT ########") print("classification finished in {:.2f}min".format((time.time() - start) / 60)) print("last training accuracy value: {}".format(history.history["accuracy"][-1]))