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.
Due to technical limitation only first 10,000 runs matching the criteria are fetched.
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

1
import neptune.new as neptune
2
3
# Fetch project 'jackie/sandbox'
4
project = neptune.get_project(name='jackie/sandbox')
5
6
# Fetch all Runs metadata as Pandas DataFrame
7
runs_table_df = project.fetch_runs_table().to_pandas()
8
9
# Sort runs by creation time
10
runs_table_df = runs_table_df.sort_values(by='sys/creation_time', ascending=False)
11
12
# Extract the last runs id
13
last_run_id = runs_table_df['sys/id'].values[0]
14
15
16
# You can also filter the runs table by state, owner or tag or a combination
17
18
# Fetch only inactive runs
19
runs_table_df = project.fetch_runs_table(state='idle').to_pandas()
20
21
# Fetch only runs created by CI service
22
runs_table_df = project.fetch_runs_table(owner='my_company_ci_service').to_pandas()
23
24
# Fetch only runs that have both 'Exploration' and 'Optuna' tag
25
runs_table_df = project.fetch_runs_table(tag=['Exploration', 'Optuna']).to_pandas()
26
27
# You can combine conditions. Runs satisfying all conditions will be fetched
28
runs_table_df = project.fetch_runs_table(state='idle', tag='Exploration').to_pandas()
Copied!

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

1
import neptune.new as neptune
2
3
# Fetch project 'jackie/sandbox'
4
project = neptune.get_project(name='jackie/sandbox')
5
6
# Fetch all Runs metadata as Pandas DataFrame
7
runs_table_df = project.fetch_runs_table().to_pandas()
8
9
# Sort runs by creation time
10
runs_table_df = runs_table_df.sort_values(by='sys/creation_time', ascending=False)
11
12
# Extract the last runs id
13
last_run_id = runs_table_df['sys/id'].values[0]
14
15
16
# You can also filter the runs table by state, owner or tag or a combination
17
18
# Fetch only inactive runs
19
runs_table_df = project.fetch_runs_table(state='inactive').to_pandas()
20
21
# Fetch only runs created by CI service
22
runs_table_df = project.fetch_runs_table(owner='my_company_ci_service').to_pandas()
23
24
# Fetch only runs that have both 'Exploration' and 'Optuna' tag
25
runs_table_df = project.fetch_runs_table(tag=['Exploration', 'Optuna']).to_pandas()
26
27
# You can combine conditions. Runs satisfying all conditions will be fetched
28
runs_table_df = project.fetch_runs_table(state='inactive', tag='Exploration').to_pandas()
Copied!
Last modified 19d ago