Skip to content

Logging metrics#

A metric can be accuracy, MSE, or any numerical value. You can log scores and metrics as

  • single values, with = assignment.
  • series of values, with the log() method. Each log() call adds a value to the field.

Neptune displays all value series as charts.

Example
# Log scores (single value)
run["score"] = 0.97
run["test/acc"] = 0.97

# Log metrics (series of values)
for epoch in range(100):
    # your training loop
    acc = ...
    loss = ...
    metric = ...

    run["train/accuracy"].log(acc)
    run["train/loss"].log(loss)
    run["metric"].log(metric)

See in Neptune 

Tip

In the runs table, you can group and sort runs by the value of any field.