Introduction

Neptune client is open source Python library that allows you to integrate your Python scripts with Neptune. Neptune client supports handful of use cases:

  • creating and tracking experiments

  • managing running experiment

  • querying experiments and projects (search/download)

Note

Make sure to register to Neptune, to use it.

Neptune implements client-server architecture. Because of that you can log and access your results from many different devices:

  • laptops

  • cluster of machines

  • cloud services

basic architecture

Installation

pip install neptune-client

Once installed, import neptune in your code to use it.

Example

import neptune

neptune.init('shared/onboarding',
             api_token='eyJhcGlfYWRkcmVzcyI6Imh0dHBzOi8vdWkubmVwdHVuZS5tbCIsImFwaV9rZXkiOiJiNzA2YmM4Zi03NmY5LTRjMmUtOTM5ZC00YmEwMzZmOTMyZTQifQ==')
with neptune.create_experiment(name='hello-neptune'):
    neptune.append_tag('introduction-minimal-example')
    n = 117
    for i in range(1, n):
        neptune.log_metric('iteration', i)
        neptune.log_metric('loss', 1/i**0.5)
        neptune.log_text('magic values', 'magic value {}'.format(0.95*i**2))
    neptune.set_property('n_iterations', n)

Note

Install neptune-client, save the code as main.py, and run like this: python main.py.

Example above creates Neptune experiment in the project: shared/onboarding and logs iteration and loss metrics to Neptune in real time. It also presents common use case for Neptune client, that is tracking progress of machine learning experiments.

Questions and feature requests

If you like to suggest feature or improvement simply drop an issue on GitHub issues, or ask us on the spectrum chat.