Skip to main content
Add a group name or job type to your runs to organize them into larger experiments. This is useful for organizing runs for distributed training, multiple processes, or k-fold cross-validation.

Group runs programmatically

Each run can be categorized by group and a job type:
  • Group: a broad category for the experiment, used to organize and filter runs.
  • Job type: the function of the run, such as preprocessing, training, or evaluation.

Group name

Add a group name to a run by passing the group parameter to wandb.init():
import wandb

entity = "<entity>"
project = "<project>"

for group in ["A", "B", "C"]:
    for i in range(3):
        with wandb.init(entity=entity, project=project, group=group, name=f"{group}_run_{i}") as run:
            # Simulate some training
            for step in range(100):
                run.log({
                    "acc": 0.5 + (step / 100) * 0.3 + (i * 0.05),
                    "loss": 1.0 - (step / 100) * 0.5
                })

Job type

Add a job type to a run by passing the job_type parameter to wandb.init(). For example, the following code snippet creates runs with job types of either training or evaluation:
for job_type in ["training", "evaluation"]:
    for i in range(2):
        with wandb.init(entity=entity, project=project, job_type=job_type, name=f"{job_type}_run_{i}") as run:
            # Simulate some process
            for step in range(50):
                run.log({
                    "metric1": 0.2 + (step / 50) * 0.4 + (i * 0.03),
                    "metric2": 0.8 - (step / 50) * 0.3
                })

Within the W&B App, you can view runs organized by group or job type. The following image shows runs organized by the job type:
Ungrouped runs table

View runs by group or job type

  1. In the project sidebar, select either the Runs tab or the Workspace tab.
  2. Above the list of runs, click the Group button (it looks like a lined sheet of paper).
  3. From the dropdown, select either Group or Job Type.

Remove run group

  1. In the project sidebar, select either the Runs tab or the Workspace tab.
  2. Above the list of runs, click the Group button (it looks like a lined sheet of paper).
  3. From the dropdown, click the X next to the name of the group you want to remove.

Delete a run group

To delete a group, remove all runs from it. This automatically deletes the group.

Move runs between groups

Move runs in one group to another group:
  1. Navigate to your W&B project.
  2. Select the Workspace or Runs tab from the project sidebar.
  3. Select one or more runs by clicking their checkboxes.
  4. Above the table, click Move to group.
  5. Within the modal, select the target group or create a new group.
  6. Click Move.