Installation and setup

Install Neptune client for Python

Before you start, make sure that:

  • You have Python 3.6+ on your system,

  • You have pip or conda installed.

Install 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

Install psutil (optional)

If you want to monitor hardware metrics (recommended) you should install psutil.

pip
conda
pip
pip install psutil
conda
conda install 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

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 the installation instructions.

Install the 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

You can also get your API token directly from here.

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).

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>')

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_profilefile 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).

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?