- Training a model
- Changing a hyperparameter and conducting a new experiment
- Conducting a new machine learning experiment with a different model
- Logging data or a model as a W&B Artifact
- Downloading a W&B Artifact
wandb.Api.Run
object.
Anything you log with wandb.Run.log()
is recorded in that run.
Pass your W&B entity to the
entity
variable in the code snippets below if you want to follow along. Your entity is your W&B username or team name. You can find it in the URL of your W&B App workspace. For example, if your workspace URL is https://wandb.ai/nico/awesome-project
, then your entity is nico
.awesome-project
under the entity nico
. The third line logs the accuracy and loss of the model to that run.
Within the terminal, W&B returns:

wandb.Run.log()
10 times. Each time the script calls wandb.Run.log()
, W&B logs the accuracy and loss for that epoch. Selecting the URL that W&B prints from the preceding output, directs you to the run’s workspace in the W&B App UI.
W&B captures the simulated training loop within a single run called jolly-haze-4
. This is because the script calls wandb.init()
method only once.

Initialize a W&B Run
Initialize a W&B Run withwandb.init()
. The proceeding code snippet shows how to import the W&B Python SDK and initialize a run.
Ensure to replace values enclosed in angle brackets (< >
) with your own values:
wandb.init(project="<project>"
). W&B creates a new project if the project does not already exist. If the project already exists, W&B stores the run in that project.
If you do not specify a project name, W&B stores the run in a project called
Uncategorized
.basic.py
nico
is the entity that logged the run, awesome-project
is the name of the project the run is logged to, exalted-darkness-6
is the name of the run, and pgbn9y21
is the run ID.
Notebook usersSpecify
run.finish()
at the end of your run to mark the run finished. This helps ensure that the run is properly logged to your project and does not continue in the background.notebook.ipynb
Run states
The proceeding table describes the possible states a run can be in:State | Description |
---|---|
Crashed | Run stopped sending heartbeats in the internal process, which can happen if the machine crashes. |
Failed | Run ended with a non-zero exit status. |
Finished | Run ended and fully synced data, or called wandb.Run.finish() . |
Killed | Run was forcibly stopped before it could finish. |
Running | Run is still running and has recently sent a heartbeat. |
Pending | Run is scheduled but not yet started (common in sweeps and Launch jobs). |
Run states in sweeps
When runs are part of a sweep, their states behave independently from the sweep’s status:- Individual run states reflect each run’s execution status (Running, Finished, Failed, etc.)
- Sweep status controls whether new runs are created, not how existing runs execute
- Pausing or stopping a sweep doesn’t affect already-running runs
- Only cancelling a sweep forcibly kills running runs (changes their state to
Killed
)
Unique run identifiers
Run IDs are unique identifiers for runs. By default, W&B generates a random and unique run ID for you when you initialize a new run. You can also specify your own unique run ID when you initialize a run.Autogenerated run IDs
If you do not specify a run ID when you initialize a run, W&B generates a random run ID for you. You can find the unique ID of a run in the W&B App.- Navigate to the W&B App.
- Navigate to the W&B project you specified when you initialized the run.
- Within your project’s workspace, select the Runs tab.
- Select the Overview tab.
9mxi1arc
:

Custom run IDs
You can specify your own run ID by passing theid
parameter to the wandb.init()
method.
W&B App URL for a specific run
< >
) are placeholders for the actual values of the entity, project, and run ID.
Name your run
The name of a run is a human-readable, non-unique identifier. By default, W&B generates a random run name when you initialize a new run. The name of a run appears within your project’s workspace and at the top of the run’s overview page.Use run names as a way to quickly identify a run in your project workspace.
name
parameter to the wandb.init()
method.
Rename a run
After you initialize a run, you can rename it from your workspace or its Runs page.- Navigate to your W&B project.
- Select the Workspace or Runs tab from the project sidebar.
-
Search or scroll to the run you want to rename.
Hover over the run name, click the three vertical dots, then select the scope:
- Rename run for project: The run is renamed across the project.
- Rename run for workspace: The run is renamed only in this workspace.
- Type a new name for the run. To generate a new random name, leave the field blank.
- Submit the form. The run’s new name displays. An information icon appears next to a run that has a custom name in the workspace. Hover over it for more details.
- In the report, click the pencil icon to open the report editor.
- In the run set, find the run to rename. Hover over the report name, click the three vertical dots, then select either:
- Rename run for project: rename the run across the entire project. To generate a new random name, leave the field blank.
- Rename run for panel grid rename the run only in the report, preserving the existing name in other contexts. Generating a new random name is not supported.
- Click Publish report.
Add a note to a run
Notes that you add to a specific run appear on the run page in the Overview tab and in the table of runs on the project page.- Navigate to your W&B project
- Select the Workspace tab from the project sidebar
- Select the run you want to add a note to from the run selector
- Choose the Overview tab
- Select the pencil icon next to the Description field and add your notes
Stop a run
Stop a run from the W&B App or programmatically.- Programmatically
- W&B App
- Navigate to the terminal or code editor where you initialized the run.
- Press
Ctrl+D
to stop the run.
- Navigate to the project that your run was logging to.
- Select the name of the run.
You can find the name of the run that you stop from the output of your terminal or code editor. For example, in the preceding example, the name of the run is
legendary-meadow-2
.- Choose the Overview tab from the project sidebar.
running
to Killed
.
View logged runs
View a information about a specific run such as the state of the run, artifacts logged to the run, log files recorded during the run, and more.
- Navigate to the W&B App.
- Navigate to the W&B project you specified when you initialized the run.
- Within the project sidebar, select the Workspace tab.
- Within the run selector, click the run you want to view, or enter a partial run name to filter for matching runs.
< >
) are placeholders for the actual values of the team name, project name, and run ID.
Customize how runs are displayed
This section shows how to customize how runs are displayed in your project’s workspace and runs table.A workspace is limited to displaying a maximum of 1000 runs, regardless of its configuration.
Add or remove columns
To customize which columns are visible in the Runs table or Workspace:- In the project sidebar, select either the Runs tab or the Workspace tab.
- Above the list of runs, click Columns.
- Click the name of a hidden column to show it. Click the name of a visible column to hide it. You can optionally search by column name using fuzzy search, an exact match, or regular expressions. Drag columns to change their order.
- Click Done to close the column browser.
Sort runs by column
To sort the list of runs by any visible column:- Hover over the column name, then click its action
...
menu. - Click Sort ascending or Sort descending.
Pin columns
Pinned columns are shown on the left-hand side. Unpinned columns are shown on the right-hand side of the Runs tab and are not shown on the Workspace tab. To pin a column:- In the project sidebar, navigate to the Runs tab.
- Click Pin column.
- In the project sidebar, navigate to the Workspace or Runs tab.
- Hover over the column name, then click its action
...
menu. - Click Unpin column.
Customize run name truncation
By default, long run names are truncated in the middle for readability. To customize the truncation of run names:- Click the action
...
menu at the top of the list of runs. - Set Run name cropping to crop the end, middle, or beginning.
Overview tab
Use the Overview tab to learn about specific run information in a project, such as:- Author: The W&B entity that creates the run.
- Command: The command that initializes the run.
- Description: A description of the run that you provided. This field is empty if you do not specify a description when you create the run. You can add a description to a run with the W&B App UI or programmatically with the Python SDK.
- Tracked Hours: The amount of time the run is actively computing or logging data, excluding any pauses or waiting periods. This metric helps you understand the actual computational time spent on your run.
- Runtime: Measures the total time from the start to the end of the run. It’s the wall-clock time for the run, including any time where the run is paused or waiting for resources. This metric provides the complete elapsed time for your run.
- Git repository: The git repository associated with the run. You must enable git to view this field.
- Host name: Where W&B computes the run. W&B displays the name of your machine if you initialize the run locally on your machine.
- Name: The name of the run.
- OS: Operating system that initializes the run.
- Python executable: The command that starts the run.
- Python version: Specifies the Python version that creates the run.
- Run path: Identifies the unique run identifier in the form
entity/project/run-ID
. - Start time: The timestamp when you initialize the run.
- State: The state of the run.
- System hardware: The hardware W&B uses to compute the run.
- Tags: A list of strings. Tags are useful for organizing related runs together or applying temporary labels like
baseline
orproduction
. - W&B CLI version: The W&B CLI version installed on the machine that hosted the run command.
- Git state: The most recent git commit SHA of a repository or working directory where the run is initialized. This field is empty if you do not enable Git when you create the run or if the git information is not available.
- Artifact Outputs: Artifact outputs produced by the run.
- Config: List of config parameters saved with
wandb.Run.config
. - Summary: List of summary parameters saved with
wandb.Run.log()
. By default, W&B sets this value to the last value logged.

Workspace tab
Use the Workspace tab to view, search, group, and arrange visualizations such as autogenerated and custom plots, system metrics, and more.
Runs tab
Use the Runs tab to filter, group, and sort your runs.
- Customize columns
- Sort
- Filter
- Group
The Runs tab shows details about runs in the project. It shows a large number of columns by default.
- To view all visible columns, scroll the page horizontally.
- To change the order of the columns, drag a column to the left or right.
- To pin a column, hover over the column name, click the action menu
...
. that appears, then click Pin column. Pinned columns appear near the left of the page, after the Name column. To unpin a pinned column, choose Unpin column - To hide a column, hover over the column name, click the action menu
...
. that appears, then click Hide column. To view all columns that are currently hidden, click Columns. - To show, hide, pin, and unpin multiple columns at once, click Columns.
- Click the name of a hidden column to unhide it.
- Click the name of a visible column to hide it.
- Click the pin icon next to a visible column to pin it.
Logs tab
The Log tab shows output printed on the command line such as the standard output (stdout
) and standard error (stderr
).
Choose the Download button in the upper right hand corner to download the log file.

Files tab
Use the Files tab to view files associated with a specific run such as model checkpoints, validation set examples, and more
Artifacts tab
The Artifacts tab lists the input and output artifacts for the specified run.
Delete runs
Delete one or more runs from a project with the W&B App.- Navigate to the project that contains the runs you want to delete.
- Select the Runs tab from the project sidebar.
- Select the checkbox next to the runs you want to delete.
- Choose the Delete button (trash can icon) above the table.
- From the modal that appears, choose Delete.
Once a run with a specific ID is deleted, its ID may not be used again. Trying to initiate a run with a previously deleted ID will show an error and prevent initiation.
For projects that contain a large number of runs, you can use either the search bar to filter runs you want to delete using Regex or the filter button to filter runs based on their status, tags, or other properties.
Run deletion workflow
The following diagram illustrates the complete run deletion process, including the handling of associated artifacts and Model Registry links:ImportantWhen you delete a run and choose to delete associated artifacts, the artifacts are permanently removed and can’t be recovered, even if the run is restored later. This includes models linked to the Model Registry.
Organize runs
This section provides instructions on how to organize runs using groups and job types. By assigning runs to groups (for example, experiment names) and specifying job types (for example, preprocessing, training, evaluation, debugging), you can streamline your workflow and improve model comparison.Assign a group or job type to a run
Each run in W&B 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
, orevaluation
.
- Yellow to dark green indicate increasing amounts of data for the baseline model.
- Light blue to violet to magenta indicate amounts of data for a more complex “double” model with additional parameters.
- Training on the same dataset.
- Evaluating on the same test set.