Installation and setup

Install Neptune client for Python

Neptune comes with a client library neptune-client.

Before you start

Make sure you meet the following prerequisites before starting:

  • Have Python 3.6+ installed

  • Have pip or conda installed

Install the neptune-client

Depending on your operating system open a terminal or CMD and run this command:

pip
conda
pip
pip install neptune-client
conda
conda install -c conda-forge neptune-client

This is tested with neptune-client==0.9.16

Install psutil

If you want to have your hardware consumption logged you should additionally install psutil.

pip
conda
pip
pip install psutil
conda
conda install -c anaconda psutil

This is tested with psutil==5.8.0

Install Neptune client for R

The Neptune integration with R is available as a CRAN package and a Github project.

Before you start

Make sure you meet the following prerequisites before starting:

  • Have Python 3.x installed

Warning Even if you are using R you still need to have Python installed on your system. The easiest way to install a Python environment is with Conda. Go here to read installation instructions.

Install neptune package

Install the package by running:

install.packages('neptune')

Authentication (Neptune API token)

Get API token

  • Click on the User menu button (where your user Avatar is)

  • Click Get Your API token. This will open a modal window.

  • Copy your API token

Set to the environment variable

Assign it to the bash environment variable NEPTUNE_API_TOKEN:

Linux
Windows
macOS
Notebook
Linux
export NEPTUNE_API_TOKEN='YOUR_LONG_API_TOKEN'
Windows
set NEPTUNE_API_TOKEN="YOUR_LONG_API_TOKEN"
macOS
export NEPTUNE_API_TOKEN='YOUR_LONG_API_TOKEN'
Notebook
from getpass import getpass
api_token = getpass('Enter your private Neptune API token: ')

or append this line to your ~/.bashrc or ~/.bash_profile files (recommended).

Note You can also pass your Neptune API token to the api_token argument of neptune.init()

# Create run in project
run = neptune.init(api_token='<YOUR_API_TOKEN>')

Important Always keep your API token secret - it is like a password to the application. Appending the “export NEPTUNE_API_TOKEN=’YOUR_LONG_API_TOKEN’” line to your ~/.bashrc or ~/.bash_profile file is the recommended method to ensure it remains secret.

Setting the project name

To log Runs into a Project you need to know the full name of your Project. It has a format of:workspace_name/project_name.

To find your Project name:

  • go to your project in the Neptune UI

  • go to Settings > Properties

  • copy the full project name from there

Set to the environment variable

Assign it to the bash environment variable NEPTUNE_PROJECT:

Linux
Windows
macOS
Linux
export NEPTUNE_PROJECT='<YOUR_WORKSPACE/YOUR_PROJECT>'
Windows
set NEPTUNE_PROJECT='<YOUR_WORKSPACE/YOUR_PROJECT>'
macOS
export NEPTUNE_PROJECT='<YOUR_WORKSPACE/YOUR_PROJECT>'

or append this line to your ~/.bashrc or ~/.bash_profile files (recommended).

Note You can also pass your project name to the project argument of neptune.init()

# Create run in project
run = neptune.init(project='my_workspace/my_project')

Deploy Neptune on your own server (on-premises)

You can also deploy Neptune on your own infrastructure. If you are interested in that read: How to deploy Neptune on-prem

What is next?