Neptune.ai

Integration with neptune.ai.

Registration

  1. Create account: neptune.ai/register.
  2. Export API token to the environment variable (more help here). In your terminal run:
export NEPTUNE_API_TOKEN='YOUR_LONG_API_TOKEN'

or append the command above to your ~/.bashrc or ~/.bash_profile files (recommended). More help is here.

Installation

  1. You need to install neptune-client. In your terminal run:
pip install neptune-client

or (alternative installation using conda). In your terminal run:

conda install neptune-client -c conda-forge
  1. Install psutil to see hardware monitoring charts:
pip install psutil

How to use?

Key is to call neptune.init() before you create Learner() and call neptune_create_experiment(), before you fit the model.

Use NeptuneCallback in your Learner, like this:

from fastai.callback.neptune import NeptuneCallback

neptune.init('USERNAME/PROJECT_NAME')  # specify project

learn = Learner(dls, model,
                cbs=NeptuneCallback()
                )

neptune.create_experiment()  # start experiment
learn.fit_one_cycle(1)

source

NeptuneCallback

 NeptuneCallback (log_model_weights=True, keep_experiment_running=False)

Log losses, metrics, model weights, model architecture summary to neptune