How to send metrics to Neptune?

Problem

How to track multiple metrics (loss, scores) in the experiment?

Solution

Step 1

In order to send metrics, logs, images or parameters to Neptune, you need to instantiate Neptune Context first:

1
2
import neptune
ctx = neptune.Context()

Step 2

Once you have that, you can either send your metric to the Neptune channel using ctx.channel_send():

1
2
ctx.channel_send('metric_name', 0.851)
# 'metric_name' is User defined and can be float or string.

or add a key: value pair using ctx.properties:

1
ctx.properties['model_score'] = 0.871

Step 3

Browse and analyse your metrics on the dashboard (example dashboard) or in the particular experiment (example).

Did you know…

You can create as many metrics as you wish :)

See also