Skip to content

Commit

Permalink
add comments to run_model
Browse files Browse the repository at this point in the history
  • Loading branch information
helenqu authored Apr 2, 2021
1 parent a9c92c6 commit c5b7919
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions run_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]))
Expand Down

0 comments on commit c5b7919

Please sign in to comment.