Comet.ml

Integration with Comet.ml.

Registration

  1. Create account: comet.ml/signup.
  2. Export API key to the environment variable (more help here). In your terminal run:
export COMET_API_KEY='YOUR_LONG_API_TOKEN'

or include it in your ./comet.config file (recommended). More help is here.

Installation

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

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

conda install -c anaconda -c conda-forge -c comet_ml comet_ml

How to use?

Key is to create the callback CometMLCallback before you create Learner() like this:

from fastai.callback.comet import CometMLCallback

comet_ml_callback = CometCallback('PROJECT_NAME')  # specify project

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

learn.fit_one_cycle(1)

source

CometCallback

 CometCallback (project_name, log_model_weights=True)

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