Skip to content

Commit

Permalink
Prevent resuming from hub (#726)
Browse files Browse the repository at this point in the history
  • Loading branch information
aliberts authored Feb 13, 2025
1 parent e710959 commit 1e49cc4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lerobot/configs/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1e49cc4

Please sign in to comment.