Neptune

neptune.append_tag(tag, *tags)[source]

Append tag(s) to the experiment on the top of experiments view.

Alias for: append_tag()

neptune.append_tags(tag, *tags)[source]

Append tag(s) to the experiment on the top of experiments view.

Alias for: append_tags()

neptune.create_experiment(name=None, description=None, params=None, properties=None, tags=None, upload_source_files=None, abort_callback=None, logger=None, upload_stdout=True, upload_stderr=True, send_hardware_metrics=True, run_monitoring_thread=True, handle_uncaught_exceptions=True, git_info=None, hostname=None, notebook_id=None)[source]

Create and start Neptune experiment.

Alias for: create_experiment()

neptune.init(project_qualified_name=None, api_token=None, proxies=None, backend=None)[source]

Initialize Neptune client library to work with specific project.

Authorize user, sets value of global variable project to Project object that can be used to create or list experiments, notebooks, etc.

Parameters
  • project_qualified_name (str, optional, default is None) – Qualified name of a project in a form of namespace/project_name. If None, the value of NEPTUNE_PROJECT environment variable will be taken.

  • api_token (str, optional, default is None) –

    User’s API token. If None, the value of NEPTUNE_API_TOKEN environment variable will be taken.

    Note

    It is strongly recommended to use NEPTUNE_API_TOKEN environment variable rather than placing your API token in plain text in your source code.

  • proxies (str, optional, default is None) –

    Argument passed to HTTP calls made via the Requests library. For more information see their proxies section.

    Deprecated since version 0.4.4.

    Instead, use:

    from neptune import HostedNeptuneBackend
    neptune.init(backend=HostedNeptuneBackend(proxies=...))
    

  • backend (Backend, optional, default is None) –

    By default, Neptune client library sends logs, metrics, images, etc to Neptune servers: either publicly available SaaS, or an on-premises installation.

    You can also pass the default backend instance explicitly to specify its parameters:

    from neptune import HostedNeptuneBackend
    neptune.init(backend=HostedNeptuneBackend(...))
    

    Passing an instance of OfflineBackend makes your code run without communicating with Neptune servers.

    from neptune import OfflineBackend
    neptune.init(backend=OfflineBackend())
    

    Note

    Instead of passing a neptune.OfflineBackend instance as backend, you can set an environment variable NEPTUNE_BACKEND=offline to override the default behaviour.

Returns

Project object that is used to create or list experiments, notebooks, etc.

Raises
  • MissingApiToken – When api_token is None and NEPTUNE_API_TOKEN environment variable was not set.

  • MissingProjectQualifiedName – When project_qualified_name is None and NEPTUNE_PROJECT environment variable was not set.

  • InvalidApiKey – When given api_token is malformed.

  • Unauthorized – When given api_token is invalid.

Examples

# minimal invoke
neptune.init()

# specifying project name
neptune.init('jack/sandbox')

# running offline
neptune.init(backend=neptune.OfflineBackend())
neptune.log_artifact(artifact, destination=None)[source]

Save an artifact (file) in experiment storage.

Alias for log_artifact()

neptune.log_image(log_name, x, y=None, image_name=None, description=None, timestamp=None)[source]

Log image data in Neptune.

Alias for log_image()

neptune.log_metric(log_name, x, y=None, timestamp=None)[source]

Log metrics (numeric values) in Neptune.

Alias for log_metric()

neptune.log_text(log_name, x, y=None, timestamp=None)[source]

Log text data in Neptune.

Alias for log_text()

neptune.remove_property(key)[source]

Removes a property with given key.

Alias for: remove_property()

neptune.remove_tag(tag)[source]

Removes single tag from experiment.

Alias for: remove_tag()

neptune.send_artifact(artifact, destination=None)[source]

Save an artifact (file) in experiment storage.

Alias for log_artifact()

neptune.send_image(channel_name, x, y=None, name=None, description=None, timestamp=None)[source]

Log image data in Neptune.

Alias for log_image()

neptune.send_metric(channel_name, x, y=None, timestamp=None)[source]

Log metrics (numeric values) in Neptune.

Alias for log_metric()

neptune.send_text(channel_name, x, y=None, timestamp=None)[source]

Log text data in Neptune.

Alias for log_text()

neptune.set_project(project_qualified_name)[source]

Setups Neptune client library to work with specific project.

Sets value of global variable project to Project object that can be used to create or list experiments, notebooks, etc.
If Neptune client library was not previously initialized via init() call it will be initialized with API token taken from NEPTUNE_API_TOKEN environment variable.
Parameters

project_qualified_name (str) – Qualified name of a project in a form of namespace/project_name.

Returns

Project object that is used to create or list experiments, notebooks, etc.

Raises

MissingApiToken – When library was not initialized previously by init call and NEPTUNE_API_TOKEN environment variable is not set.

Examples

# minimal invoke
neptune.set_project('jack/sandbox')
neptune.set_property(key, value)[source]

Set key-value pair as an experiment property.

If property with given key does not exist, it adds a new one.

Alias for: set_property()

neptune.stop(traceback=None)[source]

Marks experiment as finished (succeeded or failed).

Alias for stop()