Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Fix WandB requeueing #4175

Merged
merged 4 commits into from
Nov 19, 2021
Merged
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
9 changes: 6 additions & 3 deletions parlai/core/logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,15 @@ def __init__(self, opt: Opt, model=None):
notes=f"{opt['model_file']}",
entity=opt.get('wandb_entity'),
reinit=True, # in case of preemption
resume=True, # requeued runs should be treated as single run
)
# suppress wandb's output
logging.getLogger("wandb").setLevel(logging.ERROR)
for key, value in opt.items():
if value is None or isinstance(value, (str, numbers.Number, tuple)):
setattr(self.run.config, key, value)

if not self.run.resumed:
for key, value in opt.items():
if value is None or isinstance(value, (str, numbers.Number, tuple)):
setattr(self.run.config, key, value)
if model is not None:
self.run.watch(model)

Expand Down