Registry / ai-ml / neptune-client

neptune-client

JSON →
library1.14.0.post2pypypiunverified

Neptune Client is the Python library for interacting with Neptune.ai, an MLOps platform for experiment tracking and model management. It allows users to log, organize, and visualize machine learning metadata, including hyperparameters, metrics, and artifacts. The current version is 1.14.0.post2, and the library is actively maintained with frequent releases.

pip install neptune-client
INSTALL
IMPORT
SIG · NEPTUNE-CLIENT
N
neptune-client
ai-mlpythonv1.14.0.post2
Install
15.1s avg
Import
10599ms
Disk
252MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.14.0.post2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 10.949s · 246MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 15.1s · import 10.248s · 240MB
252MB installed
● package 252MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

init_run
import neptune run = neptune.init_run(...)
import neptune.new as neptune
For `neptune-client` versions 1.0+ (or the `neptune` package), the main import is `import neptune`. `neptune.new` was for transitioning from 0.x to 1.x and is now deprecated.
Run
from neptune import Run run = Run(...)
from neptune.new import Run
Similar to `init_run`, direct import from `neptune` is the standard for 1.0+.

This quickstart demonstrates how to initialize a Neptune run, log hyperparameters, track metrics over time, and upload an artifact. It assumes `NEPTUNE_API_TOKEN` and `NEPTUNE_PROJECT` are set as environment variables for authentication and project selection. If not, replace the placeholders with your actual token and project name. The code creates a local 'sample_output.txt' file and uploads it as an artifact.

import neptune import os # Replace with your actual API token and project name # It is recommended to set NEPTUNE_API_TOKEN and NEPTUNE_PROJECT as environment variables # os.environ["NEPTUNE_API_TOKEN"] = "YOUR_NEPTUNE_API_TOKEN" # os.environ["NEPTUNE_PROJECT"] = "YOUR_WORKSPACE/YOUR_PROJECT" # Initialize a Neptune run run = neptune.init_run( project=os.environ.get('NEPTUNE_PROJECT', 'common/quickstarts'), # Replace with your workspace and project name api_token=os.environ.get('NEPTUNE_API_TOKEN', ''), # Replace with your API token or set env variable name='my-first-run', tags=['quickstart', 'example'] ) # Log hyperparameters hparams = { 'learning_rate': 0.001, 'epochs': 10, 'batch_size': 32 } run['hyperparameters'] = hparams # Log metrics for i in range(10): run['metrics/accuracy'].append(0.85 + i * 0.01) run['metrics/loss'].append(0.3 - i * 0.02) # Log a file with open('sample_output.txt', 'w') as f: f.write('This is a sample output file.') run['artifacts/output_file'].upload('sample_output.txt') # Stop the run run.stop()
neptune --version
Debug
Known issues
breakingFor Neptune client versions 1.x and later, the recommended package name is `neptune`, not `neptune-client`. Installing both or installing `neptune` over `neptune-client` can lead to issues. It's strongly advised to `pip uninstall neptune-client` and then `pip install neptune`.
fix
Run `pip uninstall neptune-client neptune` then `pip install neptune`.
affects: >=1.0.0
breakingThe `neptune.new` package and imports (e.g., `import neptune.new as neptune`) were removed in version 1.0. The main API is now directly under `neptune` (e.g., `import neptune`). The `neptune.legacy` package, containing the 0.x API, is also removed/deprecated.
fix
Update import statements from `neptune.new` to `neptune`. If using the old API, consult migration guides.
affects: >=1.0.0
breakingStarting with version 1.0, Neptune no longer implicitly casts unsupported Python types to `String` when logging. Attempting to log an unsupported type will result in the value being skipped and a warning printed.
fix
Explicitly convert unsupported types to strings using `str(value)` or use `neptune.types.stringify_unsupported(value)` if you intend to log them as strings.
affects: >=1.0.0
breakingMany package-level functions in `neptune` and `neptune.management` now require keyword arguments (named arguments) instead of positional arguments. This change does not affect logging methods like `upload()` or `append()`.
fix
Ensure all arguments to package-level functions are passed as keyword arguments (e.g., `neptune.init_run(project='...', api_token='...')` instead of `neptune.init_run('...', '...')`).
affects: >=1.0.0
deprecatedSupport for Python 3.7 was dropped in `neptune-client` version 1.12.0.
fix
Upgrade your Python environment to version 3.8 or higher.
affects: >=1.12.0
deprecatedThe `model` and `model_version` endpoints were deprecated starting from version 1.12.0.
fix
Consult Neptune's official documentation for alternative ways to manage models and model versions, or continue using older versions if these endpoints are critical to your workflow.
affects: >=1.12.0
gotchaWhen using `upload()` or `File.as_html()` to log Plotly figures, the `include_plotlyjs` argument defaults to `True`, which embeds the Plotly.js source code in the HTML, increasing file size by ~3MB. For Neptune SaaS users, using CDN is recommended.
fix
Pass `include_plotlyjs='cdn'` to the `upload()` or `File.as_html()` methods to link to Plotly.js from a CDN instead of embedding it directly.
affects: >=1.13.0
Upgrade
Version history
1.14.0.post2latest on PyPI · released Mar 17, 2026
Audit
Dependencies
PythonrequiredRequires Python 3.8 or newer for neptune-client versions >= 1.12.0.
Agent activity
22 hits · last 30 days
node
20
OpenAI (training)
2
Resources