diff options
author | aktersnurra <gustaf.rydholm@gmail.com> | 2021-01-24 22:14:17 +0100 |
---|---|---|
committer | aktersnurra <gustaf.rydholm@gmail.com> | 2021-01-24 22:14:17 +0100 |
commit | 4a54d7e690897dd6e6c719fb908fd371a44c2952 (patch) | |
tree | 04722ac94b9c3960baa5db7939d7ef01dbf535a6 /src/training/run_experiment.py | |
parent | d691b548cd0b6fc4ea184d64261f633789fee021 (diff) |
Many updates, cool stuff on the way.
Diffstat (limited to 'src/training/run_experiment.py')
-rw-r--r-- | src/training/run_experiment.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/training/run_experiment.py b/src/training/run_experiment.py index 2c9a196..faafea6 100644 --- a/src/training/run_experiment.py +++ b/src/training/run_experiment.py @@ -296,7 +296,12 @@ def run_experiment( # Run inference over test set. if test: logger.info("Loading checkpoint with the best weights.") - model.load_from_checkpoint(model_dir / "best.pt") + if "checkpoint" in experiment_config["train_args"]: + model.load_from_checkpoint( + model_dir / experiment_config["train_args"]["checkpoint"] + ) + else: + model.load_from_checkpoint(model_dir / "best.pt") logger.info("Running inference on test set.") if experiment_config["criterion"]["type"] == "EmbeddingLoss": |