Fixes following #670 (#719)

This commit is contained in:
Simon Alibert
2025-02-12 12:53:55 +01:00
committed by GitHub
parent 90e099b39f
commit e71095960f
3 changed files with 8 additions and 7 deletions

View File

@@ -102,7 +102,7 @@ class WandBLogger:
self._wandb.log_artifact(artifact)
def log_dict(self, d: dict, step: int, mode: str = "train"):
if mode in {"train", "eval"}:
if mode not in {"train", "eval"}:
raise ValueError(mode)
for k, v in d.items():
@@ -114,7 +114,7 @@ class WandBLogger:
self._wandb.log({f"{mode}/{k}": v}, step=step)
def log_video(self, video_path: str, step: int, mode: str = "train"):
if mode in {"train", "eval"}:
if mode not in {"train", "eval"}:
raise ValueError(mode)
wandb_video = self._wandb.Video(video_path, fps=self.env_fps, format="mp4")