Skip to main content
Restore the code, config, or Docker environement from a previous W&B run. Recreate the environment of a previous run so you can reproduce it. Requires authentication with W&B. Restore up to three pieces of state, depending on what the original run recorded:
1. Config (always): Write the run config to wandb/config.yaml.
2. Git (if available): Check out the original commit on a new
wandb/run_id branch. Fetch and apply any saved diff patch.
If the original commit cannot be found,
fall back to an upstream commit if the original cannot be found.
Run this command from the same git repository as the original run. Skip
this step with `--no-git`.
3. Docker (if available): If the run was executed inside a Docker
container, start the same image with the original command.
If the run has no git history and no Docker image, restore only the config. Accept the run identifier in any of the following formats: run_id, project:run_id, entity/project:run_id, or entity/project/run_id . For example, to restore a run with run ID in the default project (stored as the WANDB_PROJECT environment variable) and entity (set from WANDB_ENTITY or the authenticated user’s default entity):
$ wandb restore abcd1234
To restore a run from the “foobar” project and “team-awesome” entity with run ID abcd1234:
$ wandb restore team-awesome/foobar/abcd1234
To restore run abcd1234 without restoring git state. Only restore config and Docker state:
$ wandb restore --no-git abcd1234
To restore run abcd1234 in detached HEAD mode instead of creating a branch:
$ wandb restore --no-branch abcd1234
To restore run abcd1234 from another team’s project:
$ wandb restore other-team/their-project:abcd1234

Usage

wandb restore RUN [OPTIONS]

Arguments

ArgumentDescriptionRequired
RUNNo description availableYes

Options

OptionDescription
--no-gitSkip git restoration. Only restore config and Docker state. (default: False)
--branchCreate a wandb/run_id branch or check out the commit in detached HEAD mode. (default: True)
--project, -pSpecify the project to look up the run in.
--entity, -eSpecify the entity to scope the run lookup to.