Rewind a run to correct or modify the history of a run without losing the original data. In addition, when you rewind a run, you can log new data from that point in time. W&B recomputes the summary metrics for the run you rewind based on the newly logged history. This means the following behavior:Documentation Index
Fetch the complete documentation index at: https://translations.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
- History truncation: W&B truncates the history to the rewind point, allowing new data logging.
- Summary metrics: Recomputed based on the newly logged history.
- Configuration preservation: W&B preserves the original configurations and you can merge new configurations.
- Run archiving: W&B archives the original runs. Runs are accessible from the Run Overview tab.
- Artifact association: Associates artifacts with the run that produce them.
Rewind and forking compatibilityForking complements a rewind.When you fork from a run, W&B creates a new branch off a run at a specific point to try different parameters or models.When you rewind a run, W&B lets you correct or modify the run history itself.
Prerequisites
Before you rewind a run, ensure you meet the following prerequisites:- To rewind a run, you must have W&B Python SDK version >=
0.17.1. - You must use monotonically increasing steps. This does not work with non-monotonic steps defined with
define_metric()because it disrupts the required chronological order of run history and system metrics.
Rewind a run
Useresume_from with wandb.init() to “rewind” a run’s history to a specific step. Specify the name of the run and the step you want to rewind from:
View an archived run
After you rewind a run, you can explore the original archived run in the W&B App. Follow these steps to view an archived run:- Access the Overview Tab: Navigate to the Overview tab on the run’s page. This tab provides a comprehensive view of the run’s details and history.
- Locate the Forked From field: Within the Overview tab, find the
Forked Fromfield. This field captures the history of the resumptions. The Forked From field includes a link to the source run, allowing you to trace back to the original run and understand the entire rewind history.
Forked From field, you can effortlessly navigate the tree of archived resumptions and gain insights into the sequence and origin of each rewind.
Fork from a run that you rewind
To fork from a rewound run, use thefork_from argument in wandb.init() and specify the source run ID and the step from the source run to fork from: