Skip to content

What Neptune logs automatically#

By default, Neptune runs track some metadata and system information automatically.

Source code#

The following source files are logged in the source_code namespace:

  • entrypoint: filename of the script you executed, like main.py
  • files: the content of the script you executed
How to disable

To turn off logging of source code, pass an empty list to the source_files argument of the init_run() function:

run = neptune.init_run(
    source_files=[],
)

Note: Git information will still be logged, unless disabled separately.

For more, see Enable or disable source code logging.

Git information#

If you have Git initialized in the execution path of your project, Neptune extracts some information from the .git directory.

For details and how to disable the tracking, see Logging Git info.

System information#

The "sys" namespace contains system information and some basic metadata about initialized Neptune objects, such as their identifier (ID), running time, and size.

Some of the fields in this namespace can be edited manually – for example, name, description, tags, and stage.

For details, see API referenceSystem namespace overview

Hardware consumption#

The following system metrics are logged in the monitoring namespace:

  • cpu: total CPU consumption of your machine (percentage)
  • memory: total memory consumption of your machine (GB)
  • gpu: GPU consumption of your machine (NVIDIA GPUs only)
  • gpu_memory: GPU memory consumption of your machine
  • gpu_power: GPU power consumption of your machine

The metrics are organized into subfolders per process – monitoring/<hash>/ – where the hash is calculated based on environment information, to ensure that it's unique for each process.

You can also set your own custom monitoring namespace name with the monitoring_namespace argument when initializing a run.

How to disable

To turn off logging of hardware consumption, set capture_hardware_metrics to False when starting a run:

run = neptune.init_run(capture_hardware_metrics=False)

Enabling monitoring in interactive sessions#

By default, monitoring of hardware consumption is turned off for interactive Python kernels, such as Jupyter notebooks.

To turn it on, you need to explicitly set the capture_hardware_metrics parameter to True:

import neptune

run = neptune.init_run(
    capture_hardware_metrics=True,
)

Console logs#

Console logs (or standard streams) are also logged in the monitoring namespace:

  • stderr: standard error stream from your console
  • stdout: standard output stream from your console
How to disable

To turn off logging of standard streams, use one or both of the following parameters with init_run():

run = neptune.init_run(
    capture_stdout=False,
    capture_stderr=False,
)

Enabling monitoring in interactive sessions#

By default, monitoring of console logs is turned off for interactive Python kernels, such as Jupyter notebooks.

To turn it on, you need to explicitly set the related initialization parameters to True:

import neptune

run = neptune.init_run(
    capture_stderr=True,
    capture_stdout=True,
)

Dependencies#

(Not enabled by default) Neptune can also log your installed dependencies if you set the dependencies argument to "infer".

import neptune

run = neptune.init_run(dependencies="infer")

For more, see Log dependencies.