Skip to main content
App version: 3.20250901

fetch_experiments_table()

Python package: neptune-query

Fetches a table of experiment metadata, with runs as rows and attributes as columns.

To narrow the results, define filters for experiments to search or attributes to include.

Parameters

project
str
optional
default: None

Path of the Neptune project, as WorkspaceName/ProjectName.

If not provided, the NEPTUNE_PROJECT environment variable is used.

experiments
str | list[str] | Filter
optional
default: None

Filter specifying which experiments to include.

  • 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.

If no filter is specified, all experiments are returned.

attributes
str | list[str] | AttributeFilter
optional
default: None

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.
sort_by
str | Attribute
optional
default: "sys/creation_time"

Name of the attribute to sort the table by.

Alternatively, an Attribute object that specifies the attribute type.

sort_direction
"asc" | "desc"
optional
default: "desc"

Sorting direction of the column specified by the sort_by parameter.

limit
int
optional
default: None

Maximum number of experiments to return. By default all experiments are returned.

type_suffix_in_column_names
bool
optional
default: False

If True, columns of the returned DataFrame are suffixed with :<type>. For example, "attribute1:float_series", "attribute1:string".

If set to False, the method throws an exception if there are multiple types under one path.

Returns

pandas.DataFrame – A DataFrame similar to the runs table in the web app.

The DataFrame has:

  • a single-level index "experiment" with experiment names
  • a single-level column index with attribute names

For series attributes, the last logged value is returned.

Raises

  • AttributeTypeInferenceError – If the attribute type wasn't specified in a filter passed to the experiments argument, and the attribute has multiple types across the project's experiments.
  • ConflictingAttributeTypes – If there are conflicting attribute types under the same path and the type_suffix_in_column_names argument is set to False.

Example

Fetch attributes matching loss or batch_size from four specific experiments:

import neptune_query as nq


nq.fetch_experiments_table(
experiments=["seabird-1", "seabird-2", "seabird-3", "seabird-4"],
attributes=r"loss | batch_size",
type_suffix_in_column_names=True,
)
Sample output
            config/batch_size:float  config/batch_size:int  loss:float_series
experiment
seabird-4 64.0 NaN 0.181736
seabird-3 NaN 64.0 0.123372
seabird-2 NaN 32.0 0.224408
seabird-1 NaN 32.0 0.205908