Registry / ai-ml / mlflow-skinny

mlflow-skinny

JSON →
library3.15.2pypypi✓ verified 25d ago

MLflow Skinny is a lightweight Python package that provides core MLflow functionalities for experiment tracking and model management, omitting heavier dependencies like SQL storage, the MLflow UI, server, and extensive data science libraries. It serves as a foundation for users who need only the tracking and logging capabilities. MLflow is an open-source platform designed to streamline the entire machine learning lifecycle, supporting experiment tracking, reproducible code packaging, and model deployment. The current version is 3.10.1 and it requires Python >=3.10. The library maintains an active development status with frequent patch and minor releases, often on a monthly cadence.

pip install mlflow-skinny
INSTALL
IMPORT
SIG · MLFLOW-SKINNY
M
mlflow-skinny
ai-mlpythonv3.15.2
Install
16.1s avg
Import
3444ms
Disk
386MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v3.15.2 · 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
glibc
py 3.10
2/3 runs
✓ 16.03s
py 3.11
2/3 runs
✓ 16.97s
py 3.12
2/3 runs
✓ 16.23s
py 3.13
2/3 runs
✓ 14.2s
py 3.9
2/3 runs
✓ 17.3s
386MB installed
● package 386MB
Code
Verified usage

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

mlflow
import mlflow
mlflow.sklearn
import mlflow.sklearn
MlflowClient
from mlflow import MlflowClient

This quickstart demonstrates how to use `mlflow-skinny` for experiment tracking with scikit-learn's autologging feature. It logs a `RandomForestRegressor` model, its parameters, and metrics automatically. Note that for this example to run, `scikit-learn`, `numpy`, and `pandas` must be installed alongside `mlflow-skinny`. It explicitly sets a file-based tracking URI to avoid issues with MLflow 3.x's default SQLite backend, which `mlflow-skinny` doesn't support out-of-the-box.

import os import mlflow from sklearn.model_selection import train_test_split from sklearn.datasets import load_diabetes from sklearn.ensemble import RandomForestRegressor # Ensure required dependencies are installed for this example (sklearn, numpy, pandas) # pip install mlflow-skinny scikit-learn numpy pandas # Set a tracking URI. With mlflow-skinny, a local file-based store (mlruns/) is often preferred # or ensure `sqlalchemy` is installed for 'sqlite:///mlflow.db' default in MLflow 3.x. # We use a local directory explicitly to avoid the default SQLite dependency issue. mlflow.set_tracking_uri("file:///tmp/mlruns_quickstart") # Enable MLflow's automatic experiment tracking for scikit-learn # This will log parameters, metrics, and the model automatically mlflow.sklearn.autolog() # Load the training dataset db = load_diabetes() X_train, X_test, y_train, y_test = train_test_split(db.data, db.target) # Train a RandomForestRegressor model # MLflow triggers logging automatically upon model fitting due to autologging with mlflow.start_run(): rf = RandomForestRegressor(n_estimators=100, max_depth=6, max_features=3, random_state=42) rf.fit(X_train, y_train) # You can also manually log additional metrics or parameters if needed # mlflow.log_metric("example_custom_metric", 0.95) print(f"MLflow Run completed. View runs at: {mlflow.get_tracking_uri()}")
mlflow --version
Debug
Known issues
breakingMLflow 3.x changed the default tracking URI from file-based (./mlruns) to SQLite (sqlite:///mlflow.db). `mlflow-skinny` does not include `sqlalchemy`, `alembic`, or `sqlparse` by default, leading to `UnsupportedModelRegistryStoreURIException` if a tracking URI is not explicitly set or these dependencies are not manually installed.
fix
Explicitly set `mlflow.set_tracking_uri('file:///path/to/mlruns')` to use a file-based store without extra dependencies, or `pip install mlflow-skinny sqlalchemy alembic sqlparse` to enable SQLite support.
affects: >=3.0.0
gotcha`mlflow-skinny` explicitly excludes the MLflow UI and server components. Running `mlflow ui` after installing only `mlflow-skinny` will result in an error like 'Unable to display MLflow UI - landing page (index.html) not found'.
fix
To use the MLflow UI and server, you must install the full `mlflow` package (`pip install mlflow`) or manually build the UI assets if running from source (not recommended for general users).
affects: All
gotchaMany MLflow features, particularly model flavors (e.g., `mlflow.sklearn`, `mlflow.tensorflow`), model serving (`mlflow models serve`), or advanced artifact storage, require additional dependencies not bundled with `mlflow-skinny`. Trying to use these features without the necessary extra packages will lead to `ImportError` or `ModuleNotFoundError`.
fix
Install `mlflow-skinny` along with the specific extra dependencies needed for your use case (e.g., `pip install mlflow-skinny scikit-learn pandas` for `mlflow.sklearn` functionality, or `pip install mlflow-skinny flask` for serving).
affects: All
breakingMLflow 3.x introduced several breaking changes. For example, the `run_uuid` attribute on `RunInfo` objects was removed and replaced by `run_id`. Some model flavors (e.g., `fastai`, `mleap`, `diviner`, `promptflow`) were deprecated or removed. The `log_model` API can now be called directly without `mlflow.start_run()` context.
fix
Consult the MLflow 3.x Migration Guide for a comprehensive list of changes. Update code to use `run_id` instead of `run_uuid` and adjust model logging patterns as necessary.
affects: >=3.0.0
gotchaMLflow's Git integration (`mlflow.utils.git_utils`) may fail to initialize if the Git executable is not found on the system's PATH, leading to warnings like 'Failed to import Git' and unavailability of Git SHA in runs.
fix
Ensure that Git is installed on the system and its executable is included in the system's PATH environment variable. Alternatively, set the `GIT_PYTHON_GIT_EXECUTABLE` environment variable to the full path of the Git executable.
affects: All
Errors
Common errors & fixes
'mlflow' is not recognized as an internal or external command, operable program or batch file
The `mlflow ui` command and related server functionalities are not included in the lightweight `mlflow-skinny` package.
fix
To use the MLflow UI, install the full `mlflow` package using `pip install mlflow`. If you intend to use `mlflow-skinny`, you must connect it to a separate, running MLflow tracking server that provides the UI.
mlflow.tracking.registry.UnsupportedModelRegistryStoreURIException: Model registry functionality is unavailable; got unsupported URI 'sqlite:///mlflow.db'
By default, MLflow 3.x attempts to use a SQLite database for tracking, but `mlflow-skinny` excludes the necessary SQL dependencies (like SQLAlchemy and SQLite) for this backend.
fix
Explicitly set a file-based tracking URI (e.g., `mlflow.set_tracking_uri('./mlruns')`) or configure a remote HTTP/HTTPS tracking server URI (e.g., `mlflow.set_tracking_uri('http://your-mlflow-server:5000')`) before performing tracking operations.
ModuleNotFoundError: No module named 'jinja2'
`mlflow-skinny` was missing `jinja2` as a direct dependency for certain model logging functionalities in some versions, even though it was required.
fix
Install the `jinja2` package explicitly: `pip install jinja2`.
ModuleNotFoundError: No module named 'mlflow'
The `mlflow` package, or specifically `mlflow-skinny`, is not installed in the active Python environment, or there are conflicting installations with other `mlflow`-related packages (`mlflow-tracing`, full `mlflow`).
fix
Ensure `mlflow-skinny` is correctly installed in your environment: `pip install mlflow-skinny`. If you intended the full `mlflow` package, use `pip install mlflow`. Consider using a clean virtual environment to avoid package conflicts.
Upgrade
Version history
3.15.2latest on PyPI · released Aug 26, 2026
Audit
Dependencies
scikit-learnoptionalRequired for mlflow.sklearn autologging and model flavors.
numpyoptionalOften a transitive dependency for ML frameworks, and for certain MLflow functionalities like model signatures.
pandasoptionalOften a transitive dependency for ML frameworks, and for certain MLflow functionalities like model signatures or pyfunc logging.
sqlalchemyoptionalRequired for using SQL-based tracking backends (e.g., SQLite, PostgreSQL), which became the default in MLflow 3.x.
flaskoptionalRequired for local model serving with `mlflow models serve`.
Agent activity
19 hits · last 30 days
node
18
Resources
mlflow-skinny — pip install mlflow-skinny · libregistry