added wandb.run_id to allow resuming without wandb log; updated log m… (#841)

Co-authored-by: Simon Alibert <75076266+aliberts@users.noreply.github.com>
This commit is contained in:
Huan Liu
2025-03-15 16:40:39 +08:00
committed by GitHub
parent 7dc9ffe4c9
commit a3cd18eda9
3 changed files with 11 additions and 2 deletions

View File

@@ -69,7 +69,13 @@ class WandBLogger:
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,