Improve error message when attempting to overwrite a training output folder (#322)

This commit is contained in:
Alexander Soare
2024-07-16 16:50:31 +01:00
committed by GitHub
parent c0101f0948
commit 5f5efe7cb9

View File

@@ -272,7 +272,8 @@ def train(cfg: DictConfig, out_dir: str | None = None, job_name: str | None = No
cfg.resume = True
elif Logger.get_last_checkpoint_dir(out_dir).exists():
raise RuntimeError(
f"The configured output directory {Logger.get_last_checkpoint_dir(out_dir)} already exists."
f"The configured output directory {Logger.get_last_checkpoint_dir(out_dir)} already exists. If "
"you meant to resume training, please use `resume=true` in your command or yaml configuration."
)
# log metrics to terminal and wandb