Run states
The following table describes the possible states a run can be in:Run states in sweeps
When runs are part of a sweep, their states behave independently from the sweep’s status. The following points describe how run states interact with sweeps:- Individual run states reflect each run’s execution status, such as
Running,Finished, orFailed. - 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 canceling a sweep forcibly stops running runs (changes their state to
Killed).
View the state of a run
You can view a run’s state programmatically with the Python SDK or interactively in the W&B App. Choose the Python SDK to inspect or filter states across many runs at once. Choose the W&B App to check a single run interactively.- Python SDK
- W&B App
Use the You can apply different filters to retrieve runs from your projects based on different criteria. See Filter runs to learn more about filtering runs programmatically.
state property of the wandb.Api.Run object to access the current state of a run.The following code snippet retrieves and prints the state of all runs in a specified project. Copy the following code snippet into your Python environment. Replace [ENTITY] with your W&B entity name and [PROJECT] with your W&B project name: