Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion lerobot/common/utils/wandb_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,13 @@ def __init__(self, cfg: TrainPipelineConfig):
os.environ["WANDB_SILENT"] = "True"
import wandb

wandb_run_id = get_wandb_run_id_from_filesystem(self.log_dir) if cfg.resume else None
wandb_run_id = (
cfg.wandb.run_id
if cfg.wandb.run_id
else get_wandb_run_id_from_filesystem(self.log_dir)
if cfg.resume
else None
)
wandb.init(
id=wandb_run_id,
project=self.cfg.project,
Expand Down
1 change: 1 addition & 0 deletions lerobot/configs/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class WandBConfig:
project: str = "lerobot"
entity: str | None = None
notes: str | None = None
run_id: str | None = None


@dataclass
Expand Down
4 changes: 3 additions & 1 deletion lerobot/configs/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ def validate(self):
# The entire train config is already loaded, we just need to get the checkpoint dir
config_path = parser.parse_arg("config_path")
if not config_path:
raise ValueError("A config_path is expected when resuming a run.")
raise ValueError(
f"A config_path is expected when resuming a run. Please specify path to {TRAIN_CONFIG_NAME}"
)
if not Path(config_path).resolve().exists():
raise NotADirectoryError(
f"{config_path=} is expected to be a local path. "
Expand Down
Loading