Add --wandb-notes flag for run purpose description
Exposes wandb.init's notes field through the CLI so each run can carry a short description of its purpose, visible on the W&B run page alongside tags and config. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -106,6 +106,7 @@ def train_command(args: argparse.Namespace) -> None:
|
|||||||
config=config.to_dict(),
|
config=config.to_dict(),
|
||||||
run_dir=str(run_dir),
|
run_dir=str(run_dir),
|
||||||
tags=list(args.wandb_tag) if args.wandb_tag else None,
|
tags=list(args.wandb_tag) if args.wandb_tag else None,
|
||||||
|
notes=args.wandb_notes,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
trainer = DeepCFRTrainer(
|
trainer = DeepCFRTrainer(
|
||||||
@@ -251,6 +252,10 @@ def main(argv: list[str] | None = None) -> None:
|
|||||||
default=[],
|
default=[],
|
||||||
help="Tag to attach to the W&B run (repeatable).",
|
help="Tag to attach to the W&B run (repeatable).",
|
||||||
)
|
)
|
||||||
|
train.add_argument(
|
||||||
|
"--wandb-notes",
|
||||||
|
help="Free-form note describing this run's purpose (shown on the W&B run page).",
|
||||||
|
)
|
||||||
train.set_defaults(func=train_command)
|
train.set_defaults(func=train_command)
|
||||||
|
|
||||||
evaluate = subparsers.add_parser("eval")
|
evaluate = subparsers.add_parser("eval")
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ class WandbRunTracker:
|
|||||||
mode: str | None = None,
|
mode: str | None = None,
|
||||||
config: dict[str, Any] | None = None,
|
config: dict[str, Any] | None = None,
|
||||||
tags: list[str] | None = None,
|
tags: list[str] | None = None,
|
||||||
|
notes: str | None = None,
|
||||||
):
|
):
|
||||||
try:
|
try:
|
||||||
import wandb
|
import wandb
|
||||||
@@ -88,6 +89,7 @@ class WandbRunTracker:
|
|||||||
config=config or {},
|
config=config or {},
|
||||||
dir=str(run_dir_path),
|
dir=str(run_dir_path),
|
||||||
tags=tags,
|
tags=tags,
|
||||||
|
notes=notes,
|
||||||
reinit=True,
|
reinit=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user