Skip to main content

Environment variables

To improve the security and operationalization of your workflow, you can use the following Neptune environment variables:

Environment variable nameDescriptionDefault (if not set)Example value
NEPTUNE_API_TOKENNeptune API token-h0dHBzOi8aHR06E0Z...jMifQ==
NEPTUNE_PROJECTNeptune project name-team-alpha/project-x
NEPTUNE_DEBUG_MODESets Neptune to debug mode for troubleshooting purposesFalseTrue
NEPTUNE_ALLOW_SELF_SIGNED_CERTIFICATEWhether to allow self-signed certificatesFalseTrue
NEPTUNE_VERIFY_SSLWhether to allow self-signed certificatesFalseTrue
NEPTUNE_SKIP_NON_FINITE_METRICSSkip non-finite metric values instead of raising an errorTrueFalse
NEPTUNE_DISABLE_COLORSDisables coloring of console outputFalseTrue
NEPTUNE_FETCHER_MAX_WORKERSControls the number of workers in the thread pool3210
NEPTUNE_WARN_AT_DATAFRAME_SIZEControls how Neptune warns of large fetching results1_000_0000
Note on SSL (Self-Signed Certificate) configuration

The Neptune API currently consists of two Python packages:

The NEPTUNE_ALLOW_SELF_SIGNED_CERTIFICATE of neptune-scale corresponds to the NEPTUNE_VERIFY_SSL environment variable of neptune-fetcher. We plan to unify these, but for now, you must set each of them separately.

NEPTUNE_API_TOKEN

Python packages: neptune-scale, neptune-fetcher

The API token is used for authentication. It's like a password to the application, so you should always keep it secret. For details, see API tokens.

If you don't provide the api_token argument to a Neptune function, the value of this environment variable is used.

To find and set your API token:

  1. In the bottom-left corner of the app, expand your user menu.

  2. Select Get Your API token.

    How to find your Neptune API token

  3. Depending on your system:

    From the API token dialog in Neptune, copy the export command and append the line to your .profile or other shell initialization file.

    Example line
    export NEPTUNE_API_TOKEN="uyVrZXkiOiIzNTd..."

NEPTUNE_PROJECT

Python packages: neptune-scale, neptune-fetcher

The Neptune project where new runs are created and metadata is fetched from.

If you don't provide the project argument to a Neptune function, the value of this environment variable is used.

The project path is given in the form workspace-name/project-name. To find and set your project name:

  1. In the Neptune app, open the project menu ().

  2. From the dropdown, select Settings.

Project menu in the Neptune app.

NEPTUNE_DEBUG_MODE

Python package: neptune-scale

When this environment variable is set to True, Neptune logs debug information into neptune.NUMBER.log files.

Use for debugging and troubleshooting purposes.

NEPTUNE_VERIFY_SSL

Python package: neptune-fetcher

In some infrastructure setups, you may encounter problems connecting to Neptune because of the SSL certificate configuration. This can happen if, for example:

  • You are in a corporate network, behind a proxy that inspects traffic between your runs and Neptune SaaS.
  • The SSL/TLS certificate of your self-hosted installation is not recognized by Python by default.
  • The software on your machine is not up to date.

The above problems may result in a NeptuneConnectionLostError. To solve it, open a terminal and set the NEPTUNE_ALLOW_SELF_SIGNED_CERTIFICATE and NEPTUNE_VERIFY_SSL environment variables to True.

NEPTUNE_ALLOW_SELF_SIGNED_CERTIFICATE

Python package: neptune-scale

See NEPTUNE_VERIFY_SSL.

NEPTUNE_SKIP_NON_FINITE_METRICS

Python package: neptune-scale

If you attempt to log non-finite metric values, such as NaN or Inf, Neptune skips such values without erroring by default. To make Neptune raise an exception instead, set this environment variable to False.

NEPTUNE_DISABLE_COLORS

Python package: neptune-scale

To remove the coloring of Neptune console output, such as warnings and other messages printed in the terminal, set this environment variable to True.

NEPTUNE_FETCHER_MAX_WORKERS

Python package: neptune-fetcher

Controls the number of workers in the thread pool, when using the use_threads parameter of the prefetch_series_values() method.

The default number is 32.

NEPTUNE_WARN_AT_DATAFRAME_SIZE

Python package: neptune-fetcher

Requesting a very large dataset might result in long data fetching. Neptune shows a warning if the number of entries exceeds 1 000 000 (one million).

Use this environment variable to set the warning threshold.

To disable the warning, set the environment variable to 0.