sklearn-compat
Ease support for compatible scikit-learn estimators across versions
Decision gist · record as of 2026-08-14
Yes, if you maintain a scikit-learn-compatible library. It eliminates duplicate compatibility code across projects and is actively maintained to track scikit-learn changes. For end users of scikit-learn itself, there is no direct benefit—install only if a dependency requires it.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires scikit-learn >= 1.2 to be installed; designed for library developers writing estimators, not end users.
- Low install friction with a single runtime dependency on scikit-learn.
- Active maintenance with a release 68 days ago and ongoing development.
License · maintenance · safety
permissive license (permissive) — Permissive license allows use in both open-source and commercial projects without significant restrictions.
last release 2026-06-07 (68 days) · last repo commit 2026-08-10 · 13 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,353,710 downloads/mo, #3,112 on PyPI
Alternatives
Verify before relying
pip install sklearn-compat
from sklearn_compat.utils._dataframe import is_pandas_df
from sklearn_compat.utils.validation import validate_data
is_pandas_df(X)
X_validated = validate_data(estimator, X=X, ensure_all_finite=True)- Whether the package will continue tracking all future scikit-learn breaking changes beyond current releases
- Whether vendoring the package is recommended over the PyPI dependency for production use
What it is and what it does
sklearn-compat is a small utility package that centralizes backward-compatible wrappers for scikit-learn's private developer APIs. It solves a specific problem for maintainers of scikit-learn-compatible third-party libraries: each time scikit-learn makes breaking changes to its internal utilities, those libraries have historically duplicated the same compatibility code. This package factors out those utilities into a single maintained source.
The package tracks scikit-learn's breaking changes across versions (currently supporting 1.2 and later) and provides stable import paths for functions that have moved, changed signatures, or been renamed. Developers can import from sklearn-compat instead of directly from scikit-learn's private modules, and the package handles version detection and fallbacks automatically.
Use it for
- Maintain a scikit-learn-compatible estimator library that needs to support multiple scikit-learn versions without duplicating compatibility shims.
- Migrate code from scikit-learn 1.6+ where validate_data moved and force_all_finite was deprecated while keeping backward compatibility.
- Use DataFrame type-checking utilities consistently across scikit-learn versions where they were added at different times.
- Adapt test helpers like _convert_container that changed parameter names between scikit-learn versions without forking test code.
- Support multiple scikit-learn versions in a library without vendoring or maintaining your own compatibility layer.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you maintain a scikit-learn-compatible library.
It eliminates duplicate compatibility code across projects and is actively maintained to track scikit-learn changes. For end users of scikit-learn itself, there is no direct benefit—install only if a dependency requires it.
Install
sklearn-compat on PyPI
Before you install
Low install friction with a single runtime dependency on scikit-learn. Active maintenance with a release 68 days ago and ongoing development.
Requires scikit-learn >= 1.2 to be installed; designed for library developers writing estimators, not end users.
License in practice
Permissive license allows use in both open-source and commercial projects without significant restrictions.
Quickstart
pip install sklearn-compat
from sklearn_compat.utils._dataframe import is_pandas_df
from sklearn_compat.utils.validation import validate_data
is_pandas_df(X)
X_validated = validate_data(estimator, X=X, ensure_all_finite=True)
Verify before relying
- Whether the package will continue tracking all future scikit-learn breaking changes beyond current releases
- Whether vendoring the package is recommended over the PyPI dependency for production use
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagescikit-learn |
| Maintenance | Actively maintained 68 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,353,710 / month, #3,112 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaLicense :: OSI Approved :: BSD LicenseProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Scientific/Engineering :: Physics |
Evidence: sklearn_compat-0.1.6-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “scikit-learn version compatibility”
- sklearn-compatProvides backward-compatible wrappers for scikit-learn private…
- skl2onnxConverts trained scikit-learn models to ONNX format for deployment…
- scikerasSciKeras wraps Keras models to work with scikit-learn's API, letting…
Give your agent the search over MCP, or paste the wish link into any chat.
More Physics packages
NetworkX provides data structures and algorithms for creating, analyzing, and manipulating graphs and networks, supporting everything from simple undirected graphs to complex directed and weighted networks.
SymPy is a Python library for symbolic mathematics, performing algebraic manipulation, calculus, equation solving, and mathematical expression simplification without numerical approximation.
Pydicom reads, modifies, and writes DICOM medical imaging files in pure Python, with optional NumPy support for pixel data as arrays.
Install it if you work with medical imaging data, DICOM files, or healthcare IT systems.
Albumentations applies image transformations to training data, supporting classification, segmentation, object detection, and pose estimation with a unified API for images, masks, bounding boxes, and keypoints.
Install it if you need a unified, production-grade augmentation API for computer vision tasks.
CoolProp provides thermodynamic and transport property calculations for fluids and fluid mixtures, offering open-source functionality similar to REFPROP.
Provides quaternion representation, manipulation, and rotation operations for 3D geometry and animation, with support for smooth interpolation between orientations.
See also sklearn · scikeras · sklearndf · sklearn-crfsuite · imbalanced-learn · sklearn2pmml · scikit-learn-stubs · scikit-learn-extra · scikit-learn