Skip to main content
App version: 3.20250811

AttributeFilter

Specifies criteria for attributes when using a fetching method.

Parameters

name
str | list[str]
optional
default: None

Criterion for attribute names.

If a string is provided, it's treated as a regex pattern that the attribute name must match. Supports Neptune's extended regex syntax.

If a list of strings is provided, it's treated as exact attribute names to match.

type
list[Literal["float", "int", "string", "bool", "datetime", "float_series", "string_set", "string_series"]]
optional
default: all available types

A list of allowed attribute types, or a single type as a str.

Examples

From a particular experiment, fetch values from all FloatSeries attributes with "loss" in the name:

import neptune_query as nq
from neptune_query.filters import AttributeFilter


losses = AttributeFilter(name=r"loss", type="float_series")
loss_values = nq.fetch_metrics(
experiments=["training-week-34"],
attributes=losses,
)