Skip to content

Using Neptune in different modes#

Depending on how you want the data to be stored and synchronized, you can use Neptune in five different connection modes.

For example, if you're debugging your code, you can use Neptune in such a way that no data is uploaded or stored at all.

Mode Parameter value Description
Asynchronous (default) async Tracked data is stored locally and synchronized separately in the background.
Debug debug No data is stored locally or sent to Neptune.
Offline offline Data is not sent to Neptune, but stored locally. Can later be synced manually.
Read-only read-only Used to only fetch data from existing objects. Ensures that no new data is logged.
Synchronous sync Neptune waits for other calls to reach the server before executing a tracking call.

To set the connection mode for the tracking, provide it to the mode argument of the initialization method:

import neptune.new as neptune

run = neptune.init_run(
    name="My new synchronous run",
    mode="sync,
)

model_version = neptune.init_model_version(
    model="NER-PRETRAINED-8",
    mode="read-only",
)