Skip to content

Offline logging#

In offline mode, no connection to Neptune servers is established. Instead, all the tracked metadata is stored on the local disk, in the .neptune folder of the current working directory.

Good to know

  • It's not possible to use a custom run ID in offline mode.
  • You can later upload the data to the Neptune servers with the neptune sync command.

You can set the mode in the following ways:

export NEPTUNE_MODE='offline'
export NEPTUNE_MODE='offline'
setx NEPTUNE_MODE 'offline'
import neptune

run = neptune.init_run(
    mode="offline",
)

The environment variable is used if the mode parameter is omitted from the init function.

Debugging tip

To "switch off" Neptune without modifying your code, use debug mode instead.

For help, see Debugging options.

Syncing offline data after connectivity issues#

If your metadata was stored locally but not synchronized with Neptune servers, you can upload the offline data manually with the neptune sync.

You may need to do this if the tracked metadata could not be uploaded to Neptune for some reason – for example, due to connectivity issues.

  1. Navigate to the directory from which you executed the script.

    The directory should contain a .neptune folder.

  2. In a terminal, enter the following command:

    neptune sync