|
388 | 388 | help='use the multi-epochs-loader to save time at the beginning of every epoch')
|
389 | 389 | group.add_argument('--log-wandb', action='store_true', default=False,
|
390 | 390 | help='log training and validation metrics to wandb')
|
| 391 | +group.add_argument('--wandb-project', default=None, type=str, |
| 392 | + help='wandb project name') |
391 | 393 | group.add_argument('--wandb-tags', default=[], type=str, nargs='+',
|
392 | 394 | help='wandb tags')
|
393 | 395 | group.add_argument('--wandb-resume-id', default='', type=str, metavar='ID',
|
@@ -823,9 +825,14 @@ def main():
|
823 | 825 | if utils.is_primary(args) and args.log_wandb:
|
824 | 826 | if has_wandb:
|
825 | 827 | assert not args.wandb_resume_id or args.resume
|
826 |
| - wandb.init(project=args.experiment, config=args, tags=args.wandb_tags, |
827 |
| - resume='must' if args.wandb_resume_id else None, |
828 |
| - id=args.wandb_resume_id if args.wandb_resume_id else None) |
| 828 | + wandb.init( |
| 829 | + project=args.wandb_project, |
| 830 | + name=args.experiment, |
| 831 | + config=args, |
| 832 | + tags=args.wandb_tags, |
| 833 | + resume="must" if args.wandb_resume_id else None, |
| 834 | + id=args.wandb_resume_id if args.wandb_resume_id else None, |
| 835 | + ) |
829 | 836 | else:
|
830 | 837 | _logger.warning(
|
831 | 838 | "You've requested to log metrics to wandb but package not found. "
|
|
0 commit comments