Resume run
You can update runs even after they finished running. This lets you add new data or visualizations to the previously closed run and makes multi-stage training convenient.

Why you may want to update an existing run?

Updating existing run can come in handy in several situations:
    You want to add metrics or visualizations to the closed run.
    You finished model training and closed the run earlier, but now you want to continue training from that moment. Actually, you can even make multiple iterations of the procedure: resume run -> log more data. Have a look at the simple example below for details.

How to resume run?

Simply use neptune.init() with project and run parameter set to the existing project name and run's ID. Now you can continue working with the run's metadata as if you just started a brand new run.
Look at the following snippet of code, that illustrates the idea:
1
import neptune.new as neptune
2
3
# SUN-123 is the run you want to resume
4
run = neptune.init(project="my_workspace/my_project", run="SUN-123")
5
6
# download snapshot of model weights
7
model = run["train/model_weights"].download()
8
9
10
# 450 is the epoch from where you want to resume training process
11
checkpoint = 450
12
# continue training as usual
13
for epoch in range(checkpoint, 1000):
14
run["train/accuracy"].log(0.75)
15
# ...
Copied!
You can retrieve a run and log more data to it multiple times.
When you resume a run, the Python file from which the run was resumed is not uploaded by default, but you can upload it by providing the source_files parameter in the .init() function.
Last modified 1mo ago