From 1e49cc4d607ffbda46297e066b600789e95801e8 Mon Sep 17 00:00:00 2001 From: Simon Alibert <75076266+aliberts@users.noreply.github.com> Date: Thu, 13 Feb 2025 17:15:55 +0100 Subject: [PATCH] Prevent resuming from hub (#726) --- lerobot/configs/train.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lerobot/configs/train.py b/lerobot/configs/train.py index 9d63339d3..93f6e2a45 100644 --- a/lerobot/configs/train.py +++ b/lerobot/configs/train.py @@ -85,6 +85,11 @@ def validate(self): config_path = parser.parse_arg("config_path") if not config_path: raise ValueError("A config_path is expected when resuming a run.") + if not Path(config_path).resolve().exists(): + raise NotADirectoryError( + f"{config_path=} is expected to be a local path. " + "Resuming from the hub is not supported for now." + ) policy_path = Path(config_path).parent self.policy.pretrained_path = policy_path self.checkpoint_path = policy_path.parent