list_attributes()
Lists attributes in the experiments of a Neptune project.
To narrow the results, define filters for experiments to search or attributes to include.
List experiment attributes
Returns a list of unique attribute names in a project's experiments.
Parameters
Path of the Neptune project, as WorkspaceName/ProjectName
.
If not provided, the NEPTUNE_PROJECT
environment variable is used.
Filter specifying which experiments to search.
- If a string is provided, it's treated as a regex pattern that the experiment names must match.
- If a list of strings is provided, it's treated as exact experiment names to match.
- To provide a more complex condition on an arbitrary attribute value, pass a
Filter
object.
Filter specifying which attributes to include.
- If a string is provided, it's treated as a regex pattern that the attribute names must match.
- If a list of strings is provided, it's treated as exact attribute names to match.
- To provide a more complex condition, pass an
AttributeFilter
object.
Example
List all attributes that begin with "metrics":
import neptune_query as nq
nq.list_attributes(attributes=r"^metrics")
Search a specific project for experiments with a learning rate less than 0.01 and return the logged attributes:
from neptune_query.filters import Filter
nq.list_attributes(
project="team-alpha/sandbox",
experiments=Filter.lt("config/lr", 0.01),
)
List run attributes
To target individual runs by ID instead of experiment name, import the runs API:
import neptune_query.runs as nq_runs
Then call the corresponding querying method and replace the experiments
parameter with runs
:
nq_runs.list_attributes(
project="team-alpha/sandbox",
runs=["prompt-wolf-20250605132116671-2g2r1"], # run ID
)