What is the recommended way to use the name value in wandb.init?

I usually track runs based on the job id of the HPC. So I was thinking I wanted to tack that value to the end to the nice 2 word name that wandb gives. How do I do that?

Also, I am interested in knowing the recommended way to name runs or the common way wandb users, developers etc use this.

note: I am already using the config to track the hyperparams and the group name to group similar experiments. I don’t usually use jobtype actually.


current script:

    if hasattr(args, 'log_to_wandb'):
        if args.log_to_wandb:
            # os.environ['WANDB_MODE'] = 'offline'
            import wandb

            # - experiment name
            experiment_name = args.wandb_group
            # - set run name
            run_name = None
            if hasattr(args, 'jobid'):
                if args.jobid is not None:
                    run_name: str = f'jobid={str(args.jobid)}'
            # - initialize wandb
            wandb.init(project=args.wandb_project,
                       entity=args.wandb_entity,
                       # job_type="job_type",
                       name=run_name,
                       group=experiment_name
                       )
            wandb.config.update(args)
1 Like

There’s not a good way to adjust the randomly-generated name.

The main workflows I have seen around names, besides just keeping the random name, are

  1. to rename runs with semantically-meaningful names later (best-human-acc, that-one-weird-experiment), or
  2. to name the runs with git hashes plus short random strings.

If you want adjective-verb random names that you have control over (e.g. prepend/postpend), you might try the approach I’ve used (code) to generate nice names for runs using our YOLOv5 integration.

My instinct with the jobid info is to put it in the config, so that you can, e.g., find runs with it later, use it to filter run sets in reports.

FYI, the jobtype is also useful for organizing your runs so that they can be grouped/filtered in the Project Workspace. This kind of grouping is separate from group info, and usually more ad hoc.

2 Likes

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.