Skip to main content
App version: 3.20251215

close()

Python package: neptune-scale

The regular way to end a run. Waits for all locally queued data to be processed by Neptune and closes the run. See also wait_for_processing().

This is a blocking operation. Call the function at the end of your script, after your model training is completed.

Parameters​

timeout
float
optional

In seconds, how long to wait for the closing operation to complete before terminating it.

Example​

from neptune_scale import Run

run = Run(...)

# [your logging and training code]

run.close()

If using a context manager, Neptune automatically closes the run upon exiting the context:

with Run(...) as run:
...

# run is closed at the end of the context