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

[minor][wandb] Save task arguments as separate config values #4484

Merged
merged 3 commits into from Apr 5, 2022
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions parlai/core/logs.py
Expand Up @@ -189,6 +189,12 @@ def __init__(self, opt: Opt, model=None):
for key, value in opt.items():
if value is None or isinstance(value, (str, numbers.Number, tuple)):
setattr(self.run.config, key, value)
if key == "task": # For ags specified in the task argument
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: spelling

maybe_task_opts = value.split(":")
for task_opt in maybe_task_opts:
if len(task_opt.split("=")) == 2:
k, v = task_opt.split("=")
setattr(self.run.config, k, v, allow_val_change=True)
if model is not None:
self.run.watch(model)

Expand Down