A class for running communication with Neptune.
In order to query Neptune experiments you need to instantiate this object first.
Create session and pass ‘api_token’
from neptune.sessions import Session session = Session(api_token='YOUR_NEPTUNE_API_TOKEN')
Create session, assuming you have created an environment variable ‘NEPTUNE_API_TOKEN’
from neptune.sessions import Session session = Session()
Get a project with given
In order to access experiments data one needs to get a
Projectobject first. This method gives you the ability to do that.
str) – Qualified name of a project in a form of
ProjectNotFound: When a project with given name does not exist.
# Create a Session instance from neptune.sessions import Session session = Session() # Get a project by it's ``project_qualified_name``: my_project = session.get_project('namespace/project_name')
Get all projects that you have permissions to see in given organizationThis method gets you all available projects names and their corresponding
Projectobjects.Both private and public projects may be returned for the organization. If you have role in private project, it is included.You can retrieve all the public projects that belong to any user or organization, as long as you know their username or organization name.
str) – It can either be name of the organization or username.
- keys are
project_qualified_namethat is: ‘organization/project_name’values are corresponding
NamespaceNotFound – When the given namespace does not exist.
# create Session from neptune.sessions import Session session = Session() # Now, you can list all the projects available for a selected namespace. # You can use `YOUR_NAMESPACE` which is your organization or user name. # You can also list public projects created by other organizations. # For example you can use the `neptune-ml` namespace. session.get_projects('neptune-ml') # Example output: # OrderedDict([('neptune-ml/credit-default-prediction', # Project(neptune-ml/credit-default-prediction)), # ('neptune-ml/GStore-Customer-Revenue-Prediction', # Project(neptune-ml/GStore-Customer-Revenue-Prediction)), # ('neptune-ml/human-protein-atlas', # Project(neptune-ml/human-protein-atlas)), # ('neptune-ml/Ships', # Project(neptune-ml/Ships)), # ('neptune-ml/Mapping-Challenge', # Project(neptune-ml/Mapping-Challenge)) # ])