Neptune.ai

Open In Colab

Integration with neptune.ai.

  1. /usr/local/lib/python3.8/dist-packages/torch/cuda/__init__.py:52: UserWarning: CUDA initialization: Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx (Triggered internally at /pytorch/c10/cuda/CUDAFunctions.cpp:100.)
  2. return torch._C._cuda_getDeviceCount() > 0

Registration

  1. Create account: neptune.ai/register.
  2. Export API token to the environment variable (more help here). In your terminal run:
  1. 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:
  1. pip install neptune-client

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

  1. conda install neptune-client -c conda-forge
  1. Install psutil to see hardware monitoring charts:
  1. 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:

  1. from fastai.callback.neptune import NeptuneCallback
  2. neptune.init('USERNAME/PROJECT_NAME') # specify project
  3. learn = Learner(dls, model,
  4. cbs=NeptuneCallback()
  5. )
  6. neptune.create_experiment() # start experiment
  7. learn.fit_one_cycle(1)

class NeptuneCallback[source]

NeptuneCallback(log_model_weights=True, keep_experiment_running=False) :: Callback

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


Company logo

©2021 fast.ai. All rights reserved.
Site last generated: Mar 31, 2021