Skip to content
Closed
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
7 changes: 5 additions & 2 deletions train.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,8 @@
help='use the multi-epochs-loader to save time at the beginning of every epoch')
group.add_argument('--log-wandb', action='store_true', default=False,
help='log training and validation metrics to wandb')
group.add_argument('--wandb-project', default=None, type=str,
help='wandb project name')
group.add_argument('--wandb-tags', default=[], type=str, nargs='+',
help='wandb tags')
group.add_argument('--wandb-resume-id', default='', type=str, metavar='ID',
Expand Down Expand Up @@ -836,10 +838,11 @@ def main():
if has_wandb:
assert not args.wandb_resume_id or args.resume
wandb.init(
project=args.experiment,
project=args.wandb_project,
name=args.experiment,
config=args,
tags=args.wandb_tags,
resume='must' if args.wandb_resume_id else None,
resume="must" if args.wandb_resume_id else None,
id=args.wandb_resume_id if args.wandb_resume_id else None,
)
else:
Expand Down