Find the broken episodes in your LeRobot dataset in milliseconds, before they cost you a training run.
Quick start
Install it with the tool you already use:
Or run it once without installing: uvx lecop path/to/dataset.
Or cargo install lecop to compile it yourself. That build needs no extra tools, but decodes AV1 (--decode) about
3 times slower; for the fast build install nasm (x86_64 only: apt install nasm,
brew install nasm) and run cargo install lecop --features asm.
Then run it on a dataset:
No config, no dataset download, and the wheel is a single Rust binary: no Python dependencies. Exit code 0 means
clean, 1 means errors, so it also works as a CI step. The PyPI wheels, cargo binstall and the
release binaries are built with the AV1 assembly; everything except
--decode runs at the same speed in every build.
From Python
leCop is a command-line tool, not an importable module. Call it and read the JSON:
=
=
What it catches
- A video with 591 frames for an episode of 588.
- Timestamps that drift, or frames that went missing.
- Totals in
info.jsonthat disagree with the data (and--fixrepairs them). - A robot that sat idle for most of an episode, or whose action froze for seconds.
- Statistics that do not match the data, constant or clipped signals, NaNs.
- Missing, truncated or unreadable files.
- With
--decode: a camera that froze or went black.
58 checks in all, listed in docs/checks.md.
Why leCop
- Fast. 8 to 28 ms per dataset without video decoding, 15x to 54x faster than lerobot-doctor on the same checks.
Video is checked from the container, not by decoding frames, unless you ask for
--decode. - Nothing to set up. One binary. LeRobot v2.x and v3.x.
- Made for CI. Stable issue codes,
--format jsonand GitHub annotations, a config file to ignore or re-grade findings.
Compared with lerobot-doctor and physlint, check by check, in docs/comparison.md.
More
- Usage: every flag, output formats,
--fix,--decode,lecop.toml. - Checks: every issue code and what is not supported yet.
- Comparison and speed tables.
- Open work is tracked in the issues, by priority.
Unofficial. Not affiliated with Hugging Face or the LeRobot project. Early stage: tested on synthetic fixtures and on 16 real Hub datasets (v2.1 and v3.0), one of them with real faults; no real v2.0 dataset yet.
Contributing
cargo test also checks the error and warning counts on every downloaded dataset listed in
scripts/datasets.tsv and skips the ones you do not have.
See CONTRIBUTING.md and STYLE_GUIDE.md.
License
Licensed under either of Apache License 2.0 or MIT license at your option.