From 2c22f7d76da3fcbd06ad8fbfd6baf1b13f5f0956 Mon Sep 17 00:00:00 2001 From: AlexC Date: Tue, 25 Mar 2025 13:44:49 +0100 Subject: [PATCH] Add offline mode in the configuration for wandb logging (#897) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Steven Palma --- lerobot/common/utils/wandb_utils.py | 1 + lerobot/configs/default.py | 1 + 2 files changed, 2 insertions(+) diff --git a/lerobot/common/utils/wandb_utils.py b/lerobot/common/utils/wandb_utils.py index 700ebea5..3fe241d4 100644 --- a/lerobot/common/utils/wandb_utils.py +++ b/lerobot/common/utils/wandb_utils.py @@ -90,6 +90,7 @@ class WandBLogger: # TODO(rcadene): split train and eval, and run async eval with job_type="eval" job_type="train_eval", resume="must" if cfg.resume else None, + mode=self.cfg.mode if self.cfg.mode in ["online", "offline", "disabled"] else "online", ) print(colored("Logs will be synced with wandb.", "blue", attrs=["bold"])) logging.info(f"Track this run --> {colored(wandb.run.get_url(), 'yellow', attrs=['bold'])}") diff --git a/lerobot/configs/default.py b/lerobot/configs/default.py index b23bbb6d..ce72466a 100644 --- a/lerobot/configs/default.py +++ b/lerobot/configs/default.py @@ -48,6 +48,7 @@ class WandBConfig: entity: str | None = None notes: str | None = None run_id: str | None = None + mode: str | None = None # Allowed values: 'online', 'offline' 'disabled'. Defaults to 'online' @dataclass