cleanlab
Routes cleanlab data-centric AI workflows for finding label errors, dataset issues, outliers, annotator quality, and task-specific label-quality problems.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- cleanlab
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Routes cleanlab data-centric AI workflows for finding label errors, dataset issues, outliers, annotator quality, and task-specific label-quality problems.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/repo-provenance.md2.2 KB
- 参考文档references/repo-routing-metadata.json452 B
- 参考文档references/troubleshooting.md3.9 KB
- 脚本scripts/check_install.py4.9 KB
03 SKILL.md 正文
cleanlab
Use this repo skill when a task involves the cleanlab Python package or the broader cleanlab workflow vocabulary: data-centric AI, label errors, noisy labels, label quality, dataset health, Datalab audits, CleanLearning, outliers, near duplicates, non-IID checks, annotator quality, or task-specific label issue detection.
cleanlab is API-first. It does not expose a package-specific command-line interface in this checkout; route future agents to Python APIs and the bundled smoke scripts.
Install and quick verification
For normal use:
python -m pip install cleanlab
For Datalab or image issue workflows:
python -m pip install "cleanlab[datalab]"
python -m pip install "cleanlab[image]"
# or all stable optional extras:
python -m pip install "cleanlab[all]"
For a local checkout when developing or validating this exact repo version:
python -m pip install -e ".[all]"
Then run the bundled root check when you need a safe import smoke test:
python scripts/check_install.py --include-optional
Read references/troubleshooting.md if installation, optional dependencies, imports, model probabilities, or shape validation fail. Read references/repo-provenance.md before deciding whether this skill is stale for another checkout.
Route map
| Task signal | Read this sub-skill | Why |
|---|---|---|
Broad audit of one dataset; Datalab, find_issues, report, get_issues, issue summaries, custom issue managers, image issue checks |
sub-skills/datalab/SKILL.md |
Datalab orchestrates multiple issue families and report tables. |
Standard single-label binary/multiclass noisy-label cleanup; CleanLearning; cleanlab.filter, count, rank, dataset; data valuation; synthetic noise |
sub-skills/classification/SKILL.md |
Main direct API route for multiclass label quality and robust learning. |
| Multiple annotators, consensus labels, annotator quality, active learning / relabeling priorities | sub-skills/multiannotator/SKILL.md |
Multiannotator APIs combine raw annotations with model probabilities. |
Outlier or OOD scoring from feature embeddings or pred_probs alone |
sub-skills/outlier/SKILL.md |
OutOfDistribution returns score vectors for atypical examples. |
| Multi-label classification labels as list-of-lists; regression target label issues | sub-skills/tabular-label-issues/SKILL.md |
Stable nonstandard tabular label workflows with distinct formats. |
| Token classification, object detection, semantic segmentation label issues, structured outputs, bounding boxes, masks | sub-skills/structured-label-issues/SKILL.md |
Nested token lists, object boxes, and pixel masks need task-specific APIs. |
Explicit cleanlab.experimental use, low-memory batched helper, span classification wrapper, PyTorch/CIFAR/MNIST/co-teaching examples |
sub-skills/experimental/SKILL.md |
Experimental helpers are unstable or optional; prefer stable routes first. |
Operating rules
- Prefer out-of-sample model probabilities. For label-error workflows,
pred_probsshould be aligned to the same rows aslabelsand should come from held-out data, cross-validation, or a model trained elsewhere. - Validate shapes before running expensive workflows: classification
(N, K)probabilities, multilabel(N, K)independent probabilities, token lists per sentence, object-detection box arrays, and segmentation(N, K, H, W)probabilities. - Use Datalab for a broad issue audit and direct module APIs for focused label-quality or scoring tasks.
- Treat experimental helpers as opt-in. Do not install
torch,torchvision, orskorchunless the user explicitly chooses those optional deep-learning examples. - If a workflow needs image-specific Datalab checks, install the image extra or all extras and verify
cleanvisionimports. - The generated references and scripts are self-contained. Do not instruct future agents to open this repo's original docs, tests, notebooks, or source scripts for normal operation.
Shared runtime files
- Read
references/troubleshooting.mdfor cross-cutting package install/import, optional dependency, API input, and stale-version recovery guidance. - Read
references/repo-provenance.mdto compare a future checkout against the commit and evidence used to generate this skill. references/repo-routing-metadata.jsonis structured metadata consumed by DisCo's repo-skills router import transaction.- Run
scripts/check_install.pyto verify the installed package, stable submodules, and optional extras before using deeper sub-skills.
Good first branch decisions
- If the prompt says "find all issues in my dataset" or mentions
lab.report(), start with Datalab. - If it says "mislabeled examples" for a normal classifier and already has
pred_probs, start with classification. - If it says "bad annotators", "consensus", or "which examples should be relabeled", start with multiannotator.
- If it says "OOD", "outlier score", or "feature embeddings look atypical", start with outlier unless the user also wants a broad Datalab audit.
- If it says "multilabel", "regression target issue", or "numeric labels look wrong", start with tabular label issues.
- If it says "token classification", "NER", "bounding boxes", "object detection", "semantic segmentation", or "pixel masks", start with structured label issues.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).