Skip to main content
App version: 3.4.5

Attribute types reference

An attribute is the location of a piece of metadata in a Neptune run object.

note

In Neptune 2.x, attributes are called fields.

The metadata type and logging method together determine the resulting attribute type. The type determines the operations available for the attribute.

Metadata typeExampleLogging methodResulting attribute type
Single valueParameters, final scores, text, timelog_configs()Float, Integer, Boolean, String, or Datetime
SeriesMetrics, loss, accuracylog_metrics()FloatSeries
TagsText tags to annotate runs or assign them to groupsadd_tags()StringSet

Simple types

Simple attribute types can represent model configurations, scores, or other single values. The following types are available:

To assign single values to a Neptune run, use the log_configs() method. To learn more, see Log parameters and model configuration.

You can display simple attribute:

  • as columns in the runs table
  • in Single value widgets

Series

A series attribute collects a sequence of values into a single attribute. You create a series with the log_metrics() function. Values are added to a series attribute iteratively: each call adds a new value to the sequence.

The following Series types are supported:

Attribute typeHow to display
FloatSeriesAll runs tab, Charts tab, or Chart widget

To learn more, see Log metrics.


Boolean

Attribute type representing a Boolean value.

Example

with Run(...) as run:
run.log_configs(
{"params/use_preprocessing": True}
)

Datetime

Attribute type representing a datetime value.

Example

Logging custom training end time
from datetime import datetime

with Run(...) as run:
run.log_configs(
{"train/end": datetime.now()}
)
Logging other time-related metadata
from datetime import datetime

with Run(...) as run:
run.log_configs(
{"dataset/creation_date": datetime.fromisoformat("1998-11-01")}
)

Float

Attribute type representing a floating point value.

Neptune supports 64-bit floating-point numbers, which have a precision of 16 digits.

Example

run = Run()
run.log_configs(
{"params/learning_rate": 0.001}
)

FloatSeries

Attribute containing a series of float values, for example:

  • Training metrics
  • Change of performance of the model in production

You can index the series by step or by time.

Example

run = Run()
for step in epoch:
# your training loop
run.log_metrics(
data={"loss": 0.14},
step=step,
)

To learn more, see Log metrics.


Integer

Attribute type representing an integer.

Example

with Run(...) as run:
run.log_configs(
{"params/max_epochs": 100}
)

String

Attribute type representing a string.

The maximum size of the string value is 1 MiB.

Example

with Run(...) as run:
run.log_configs(
{"params/optimizer": "Adam"}
)

To add a text note that's easy to display and edit, use the dedicated description attribute.


StringSet

An attribute containing an unorganized set of strings.

The supported StringSet attributes are sys/tags and sys/group_tags. You can't create custom StringSet attribute paths.

The maximum total size of the string set is 1 MiB.

Examples

Adding tags creates a StringSet at the path sys/tags:

with Run(...) as run:
run.add_tags(["spaces are ok", "v1.2.3"])

Adding group tags creates a StringSet at the path sys/group_tags:

with Run(...) as run:
run.add_tags(tags=["albino", "parent"], group_tags=True)