JupyterLab MLflow Extension
A JupyterLab extension for browsing MLflow experiments, runs, models, and artifacts directly from the JupyterLab sidebar.
Features
- Browse MLflow experiments, runs, models, and artifacts
- Tree view for hierarchical navigation
- Details/Object view for exploring metadata and child objects
- View artifacts in new JupyterLab tabs
- Copy experiment/run/model IDs to clipboard
- Generate and insert MLflow Python API code snippets
- Connect to remote MLflow tracking servers
- Launch local MLflow server with SQLite backend
- Settings UI with environment variable fallback
- MLflow shortcuts panel for common operations
Requirements
- JupyterLab >= 4.0.0
- Python >= 3.8
- MLflow >= 2.0.0
Installation
pip install jupyterlab-mlflow
Or install from source:
git clone https://github.com/BioLM/jupyterlab-mlflow.git
cd jupyterlab-mlflow
pip install -e .
jlpm install
jlpm build
Configuration
The extension can be configured via:
- Settings UI: Open JupyterLab Settings → Advanced Settings Editor → MLflow
- Environment Variable: Set
MLFLOW_TRACKING_URIenvironment variable
Custom Request Headers (Authentication)
For MLflow servers that require authentication or custom headers, you can provide a custom RequestHeaderProvider via the MLFLOW_TRACKING_REQUEST_HEADER_PROVIDER environment variable.
Example: Custom Authentication Provider
- Create a Python module with your custom provider:
# my_auth_provider.py
from mlflow.tracking.request_header.abstract_request_header_provider import RequestHeaderProvider
class MyAuthRequestHeaderProvider(RequestHeaderProvider):
def in_context(self):
"""Return True to always provide headers"""
return True
def request_headers(self):
"""Return custom headers for MLflow API requests"""
import os
token = os.environ.get("MY_AUTH_TOKEN", "")
return {
"Authorization": f"Bearer {token}",
"X-Custom-Header": "value"
}
- Set the environment variable with the full class path:
export MLFLOW_TRACKING_REQUEST_HEADER_PROVIDER="my_auth_provider.MyAuthRequestHeaderProvider"
export MY_AUTH_TOKEN="your-secret-token"
The provider will be automatically imported and registered when the extension creates MLflow clients. Make sure the module containing your provider is in your Python path.
Note: If the provider cannot be loaded or registered, the extension will log a warning but continue to function without custom headers.
Server Extension
The extension includes a server-side component that must be enabled. After installation, enable it with:
jupyter server extension enable jupyterlab_mlflow.serverextension
Or enable it system-wide:
jupyter server extension enable jupyterlab_mlflow.serverextension --sys-prefix
Verify it's enabled:
jupyter server extension list
You should see jupyterlab_mlflow.serverextension in the enabled extensions list.
Note: In some JupyterLab deployments (especially managed environments), the server extension may need to be enabled by an administrator or configured in the deployment settings.
Troubleshooting
If you're experiencing 404 errors when using the extension:
-
Run the diagnostic script:
python scripts/diagnose_extension.pyThis will check:
- Package installation
- Entry point discovery
- Configuration files
- Extension status
- Handler registration
-
Check if the extension is enabled:
jupyter server extension list | grep mlflow
If it's not listed or not enabled, enable it:
jupyter server extension enable jupyterlab_mlflow.serverextension
-
Verify the health endpoint: After starting JupyterLab, try accessing:
http://your-jupyterlab-url/mlflow/api/healthIf this returns
{"status": "ok", ...}, the extension is loaded correctly. -
Check server logs: Look for messages like:
✅ Registered jupyterlab-mlflow server extension ✅ Registered 11 API handlers with base_url: /jupyter/ -
For managed deployments:
- Ensure the package is installed in the correct Python environment
- Check that config files are present in
/etc/jupyter/or the deployment's config directory - Verify that entry points are discoverable (the diagnostic script checks this)
- Some managed environments require explicit enablement even with config files
Usage
- Configure your MLflow tracking URI in the settings or via environment variable
- The MLflow sidebar will appear in the left sidebar
- Browse experiments, runs, models, and artifacts
- Click on artifacts to view them in new tabs
- Right-click on items to copy IDs to clipboard
Development
Quick Local Testing
To test the extension locally without publishing to PyPI:
# Option 1: Use the test script (recommended)
./test_server_extension.sh
# Option 2: Manual steps
pip install -e .
npm run build:lib
python -m jupyter labextension build . --dev
jupyter server extension enable jupyterlab_mlflow.serverextension
jupyter lab
Testing API Endpoints
After starting JupyterLab, test the server extension API endpoints:
# In another terminal, test the endpoints
./test_api_endpoints.sh http://localhost:8888 http://localhost:5000
Or manually test with curl:
# Test connection endpoint
curl "http://localhost:8888/mlflow/api/connection/test?tracking_uri=http://localhost:5000"
# Test local server status
curl "http://localhost:8888/mlflow/api/local-server"
Development Workflow
# Install dependencies
jlpm install
# Build the extension
jlpm build
# Watch for changes
jlpm watch
# Run tests
pytest
Publishing
This package uses automatic version bumping and is published to PyPI when a new release is created on GitHub.
Automatic Version Bumping
Version bumping is handled automatically by semantic-release based on commit messages:
feat: something→ minor version bump (0.1.0 → 0.2.0)fix: something→ patch version bump (0.1.0 → 0.1.1)BREAKING: something→ major version bump (0.1.0 → 1.0.0)
When you push to main, semantic-release will:
- Analyze commits since last release
- Bump version in
package.json(if needed) - Create a git tag
- Push the tag to GitHub
Publishing to PyPI
-
Create a GitHub Release:
- Go to: https://github.com/BioLM/jupyterlab-mlflow/releases/new
- Select the tag created by semantic-release (e.g.,
v0.2.0) - Add release notes
- Click "Publish release"
-
Automatic Publishing:
- The publish workflow automatically builds and publishes to PyPI
- No manual steps required after creating the release
See PUBLISHING.md for detailed instructions.
License
BSD-3-Clause
Metadata
Release files for jupyterlab-mlflow 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jupyterlab_mlflow-0.5.0.tar.gz | 204.2 kB | With provenance | Details for jupyterlab_mlflow-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jupyterlab_mlflow-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for jupyterlab_mlflow-0.5.0-py3-none-any.whl |
Total release size: 247.1 kB
Release files / jupyterlab_mlflow-0.5.0.tar.gz
| Download URL | jupyterlab_mlflow-0.5.0.tar.gz |
|---|---|
| Size | 204.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
39bd5f58c08cc2890cae1da429ed2177b16eb003b15d0e1dcf4c2397678c5430
|
|
BLAKE2b-256 checksum How to use checksums |
9f90a7141b831c306b7f094251d118b124f43e947f3c74735d816115fc6660c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 11, 2025.
Transparency logRelease files / jupyterlab_mlflow-0.5.0-py3-none-any.whl
| Download URL | jupyterlab_mlflow-0.5.0-py3-none-any.whl |
|---|---|
| Size | 42.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
77791de60ec6b3e815eed31b75f1c0434dcb0b494143f85353b273ae90ecc8f9
|
|
BLAKE2b-256 checksum How to use checksums |
be6dea482435b817d2801bd1ce3db43e508e802915878797ac23c564206733e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 11, 2025.
Transparency logSecurity for jupyterlab-mlflow 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for jupyterlab_mlflow-0.5.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 11, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.