Project

Project

A class for managing a Neptune project and retrieving information from it.

.fetch_runs_table()

Retrieve runs matching the specified criteria.

All parameters are optional, each of them specifies a single criterion. Only runs matching all of the criteria will be returned.

Parameters

id

(str or list of str, optional, default is None) - A run's id like "SAN-1" or list of ids like ["SAN-1", "SAN-2"]. Matching any element of the list is sufficient to pass the criterion.

state

(str or list of str, optional, default is None) - A run's state like "active" or list of states like ["inactive", "active"]. Possible values: "inactive", "active".

Matching any element of the list is sufficient to pass the criterion.

owner

(str or list of str, optional, default is None) - Username of the run's owner (the user who created the tracked run is an owner) like "josh" or a list of owners like ["frederic", "josh"].

Matching any element of the list is sufficient to pass the criterion.

tag

(str or list of str, optional, default is None) - An experiment tag like "lightGBM" or list of tags like ["pytorch", "cycleLR"]. Only experiments that have all specified tags will match this criterion.

Returns

A RunsTable object containing experiments matching the specified criteria. Use.to_pandas()to convert it to Pandas DataFrame.

Examples

import neptune.new as neptune
# Fetch project 'jackie/sandbox'
project = neptune.get_project(name='jackie/sandbox')
# Fetch all Runs metadata as Pandas DataFrame
runs_table_df = project.fetch_runs_table().to_pandas()
# Sort runs by creation time
runs_table_df = runs_table_df.sort_values(by='sys/creation_time', ascending=False)
# Extract the last runs id
last_run_id = runs_table_df['sys/id'].values[0]
# You can also filter the runs table by state, owner or tag or a combination
# Fetch only inactive runs
runs_table_df = project.fetch_runs_table(state='idle').to_pandas()
# Fetch only runs created by CI service
runs_table_df = project.fetch_runs_table(owner='my_company_ci_service').to_pandas()
# Fetch only runs that have both 'Exploration' and 'Optuna' tag
runs_table_df = project.fetch_runs_table(tag=['Exploration', 'Optuna']).to_pandas()
# You can combine conditions. Runs satisfying all conditions will be fetched
runs_table_df = project.fetch_runs_table(state='idle', tag='Exploration').to_pandas()

RunsTable

An interim object containing fetched runs metadata. To access the data you need to convert it to Pandas DataFrame by invoking .to_pandas().

.to_pandas()

Converts RunsTable data to a Pandas DataFrame object.

Returns

RunsTable data in the form of pandas.DataFrame.

Examples

import neptune.new as neptune
# Fetch project 'jackie/sandbox'
project = neptune.get_project(name='jackie/sandbox')
# Fetch all Runs metadata as Pandas DataFrame
runs_table_df = project.fetch_runs_table().to_pandas()
# Sort runs by creation time
runs_table_df = runs_table_df.sort_values(by='sys/creation_time', ascending=False)
# Extract the last runs id
last_run_id = runs_table_df['sys/id'].values[0]
# You can also filter the runs table by state, owner or tag or a combination
# Fetch only inactive runs
runs_table_df = project.fetch_runs_table(state='inactive').to_pandas()
# Fetch only runs created by CI service
runs_table_df = project.fetch_runs_table(owner='my_company_ci_service').to_pandas()
# Fetch only runs that have both 'Exploration' and 'Optuna' tag
runs_table_df = project.fetch_runs_table(tag=['Exploration', 'Optuna']).to_pandas()
# You can combine conditions. Runs satisfying all conditions will be fetched
runs_table_df = project.fetch_runs_table(state='inactive', tag='Exploration').to_pandas()