Fork an experiment
Forking refers to creating a run based on an existing run. This way, you can restart a run at a particular step.
To fork an experiment, create a run and specify the parent run and step to fork from:
run = Run(
run_id="adventurous-barracuda",
experiment_name="swim-further",
fork_run_id="likable-barracuda",
fork_step=102,
)
Forking and inheritance
The new run inherits all metrics up to and including the fork point specified by the fork_step
argument.
A forked run inherits the following metadata:
Metadata | Attribute type or path | How you log it |
---|---|---|
Metrics | FloatSeries attributes | run.log_metrics=(...) |
Tags | StringSet | run.add_tags(tags=...) or via tags management in the app |
Description | sys/description | run.log_configs(data={"sys/description": "..."}) or in the app |
Setting step for metrics
When specifying a step for the metrics of the fork run, the value must be higher than the fork step.
run = Run(
...,
fork_step: 100,
)
for step in epoch:
# your training loop
run.log_metrics(
data={"loss": 0.11, "acc": 0.81},
step=101, # or 100.1, for example
)