cleanlab
The standard package for data-centric AI, machine learning with label errors, and automatically finding and fixing dataset issues in Python.
What it is and what it does
Cleanlab is a data-centric machine learning library that uses your existing trained model to diagnose and fix dataset problems. Rather than focusing on model architecture improvements, it helps you identify label errors, outliers, duplicates, and other data quality issues by analyzing model predictions and feature embeddings. The core approach, called confident learning, estimates which labels are likely incorrect even when the model itself is imperfect.
You provide cleanlab with your dataset, model predictions, and optionally feature embeddings. It then reports which examples are problematic and why—whether due to annotation errors, data duplicates, or being out-of-distribution. The library works with any model (PyTorch, TensorFlow, scikit-learn, XGBoost, etc.) and any data type (text, images, audio, tabular). Common workflows involve iterating between cleaning data and retraining to progressively improve model performance without changing your modeling code.
Use it for:
- Identify and correct mislabeled examples in a classification dataset before retraining to improve model accuracy.
- Detect duplicate or near-duplicate records in a dataset to reduce redundancy and improve training efficiency.
- Find outliers and out-of-distribution examples that may degrade model robustness on production data.
- Assess annotation quality in multi-annotator labeling tasks and identify which annotators are unreliable.
- Prioritize which unlabeled examples to annotate next to maximize model improvement with minimal labeling effort.
- Diagnose data issues in specialized tasks like token classification, image segmentation, or object detection.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Cleanlab automatically detects and helps fix data quality issues—mislabeled examples, outliers, duplicates, and annotation errors—in datasets for machine learning, working with any model and any data modality.
Yes. Cleanlab is well-maintained, permissively licensed, has low installation friction, and addresses a real problem—most ML projects spend effort optimizing models when data quality is the actual bottleneck. The library is backed by peer-reviewed research, works with any model, and offers concrete value even in a single iteration. Start with it if you suspect label errors or data quality issues are limiting your model's performance.
Install
cleanlab on PyPI
pip
pip install cleanlabuv
uv add cleanlabpoetry
poetry add cleanlabInstalling cleanlab
Before you install
Low friction installation with standard dependencies (numpy, scikit-learn, pandas, tqdm, termcolor). Maintenance status is aging—last release was 213 days ago—but the repository remains active with 11627 stars and no archived status.
License in practice
Apache License 2.0 is permissive, allowing commercial and derivative use with minimal restrictions. You must include a copy of the license and note any modifications to the code.
Quickstart
pip install cleanlab
import cleanlab
lab = cleanlab.Datalab(data=dataset, label="column_name_for_labels")
lab.find_issues(features=feature_embeddings, pred_probs=pred_probs)
lab.report()
Requires Python 3.10 or later. You must have already trained a model and obtained its prediction probabilities and optionally feature embeddings for your dataset.
Verify before relying
- Whether the package's performance scales well with very large datasets or whether memory/compute requirements become prohibitive at scale.
- How the confident learning algorithms perform when model predictions are severely miscalibrated or when the model class is very different from the training distribution.
Package facts
| License | Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — numpy, scikit-learn, tqdm, pandas, termcolor |
| Maintenance | aging — 213 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 95,735/month — #13,251 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: cleanlab-2.9.0-py3-none-any.whl
Keywords: machine_learning, data_cleaning, confident_learning, classification, weak_supervision, learning_with_noisy_labels, unsupervised_learning, datacentric_ai, datacentric
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
cleanlab-tlmCleanlab TLM scores the trustworthiness of LLM…
permissive · top 15,000 on PyPI
featuretoolsFeaturetools automates feature engineering for…
permissive · top 15,000 on PyPI
missingnoVisualizes missing data patterns in DataFrames…
permissive · top 15,000 on PyPI
fiftyone-brainFiftyOne Brain provides AI/ML capabilities for…
permissive · top 15,000 on PyPI
gibberish-detectorDetects whether strings are gibberish or valid…
permissive · top 15,000 on PyPI
autogluon.featuresAutomates feature engineering and preprocessing…
permissive · top 15,000 on PyPI
argillaArgilla is a Python SDK client for a…
permissive · top 15,000 on PyPI
interpretInterpretML provides interpretable machine…
unclear · top 15,000 on PyPI
autogluonAutoGluon automates machine learning model…
permissive · top 15,000 on PyPI
dtlpymetricsCalculates and generates quality scores for…
unclear · top 15,000 on PyPI