From 5f5efe7cb901163b1b8d1bd0d8d9b57185feecaf Mon Sep 17 00:00:00 2001 From: Alexander Soare Date: Tue, 16 Jul 2024 16:50:31 +0100 Subject: [PATCH] Improve error message when attempting to overwrite a training output folder (#322) --- lerobot/scripts/train.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lerobot/scripts/train.py b/lerobot/scripts/train.py index 4e636db8..f707fe12 100644 --- a/lerobot/scripts/train.py +++ b/lerobot/scripts/train.py @@ -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