Skip to main content

leCop: a robot cop with sunglasses

leCop

CI codecov license: MIT OR Apache-2.0 Rust

Find the broken episodes in your LeRobot dataset in milliseconds, before they cost you a training run.

lecop validating a dataset: it lists a video with the wrong number of frames and an idle episode

Quick start

Install it with the tool you already use:

uv
uv tool install lecop

Or run it once without installing: uvx lecop path/to/dataset.

pip
pip install lecop      # or: pipx install lecop
cargo
cargo binstall lecop   # prebuilt binary, nothing to compile

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:

lecop path/to/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:

import json, subprocess

run = subprocess.run(["lecop", "validate", "--format", "json", "path/to/dataset"], capture_output=True, text=True)
report = json.loads(run.stdout)
print(report["errors"], report["warnings"])
for issue in report["issues"]:
    print(issue)

What it catches

  • A video with 591 frames for an episode of 588.
  • Timestamps that drift, or frames that went missing.
  • Totals in info.json that disagree with the data (and --fix repairs 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 json and 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

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
cargo bench   # criterion; see .claude/rules/performance.md

scripts/fetch-datasets.sh          # list real test datasets that are missing
scripts/fetch-datasets.sh --yes    # download them into datasets/ (git-ignored)

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.

Metadata

Release files for lecop 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lecop 0.1.2
File Size Uploaded Provenance Actions
lecop-0.1.2.tar.gz 379.6 kB Without provenance Details for lecop-0.1.2.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for lecop 0.1.2
File Actions
lecop-0.1.2-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for lecop-0.1.2-py3-none-win_amd64.whl
lecop-0.1.2-py3-none-manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64 Details for lecop-0.1.2-py3-none-manylinux_2_28_x86_64.whl
lecop-0.1.2-py3-none-manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.28+ ARM64 Details for lecop-0.1.2-py3-none-manylinux_2_28_aarch64.whl
lecop-0.1.2-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for lecop-0.1.2-py3-none-macosx_11_0_arm64.whl
lecop-0.1.2-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details for lecop-0.1.2-py3-none-macosx_10_12_x86_64.whl

Total release size: 26.3 MB

Release files / lecop-0.1.2.tar.gz

Download URL lecop-0.1.2.tar.gz
Size 379.6 kB
Tags Source
SHA-256 checksum
How to use checksums
f1d59c3f7390580959d9c128606285ae3b2349dd03757300fa3318a6c48ffbf1
BLAKE2b-256 checksum
How to use checksums
3f5d2ca0050b6401b70e25538c0f1a47e16dba1d2ec0a116fee7085fcd2652d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / lecop-0.1.2-py3-none-win_amd64.whl

Download URL lecop-0.1.2-py3-none-win_amd64.whl
Size 5.2 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
819d1e393bff7d0762dd575bb6a752341369cc6952acf371a6c6962207604d48
BLAKE2b-256 checksum
How to use checksums
428e45975019ddfb826d60e0509eebc8acc23cf062f09d35a311a786f5f3c437
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / lecop-0.1.2-py3-none-manylinux_2_28_x86_64.whl

Download URL lecop-0.1.2-py3-none-manylinux_2_28_x86_64.whl
Size 5.7 MB
Tags Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
f11997bd27af6dd049398bac4eea341fd1c0105ed15fbf744111a7471956d1e4
BLAKE2b-256 checksum
How to use checksums
700fda0ce2eae732e3449777d3901f5e5663adbfaf6e5119e6303c2a7e5fd309
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / lecop-0.1.2-py3-none-manylinux_2_28_aarch64.whl

Download URL lecop-0.1.2-py3-none-manylinux_2_28_aarch64.whl
Size 5.0 MB
Tags Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
cada382c5c5d40ffbbda59e72a0c06fa9df16204abaf47f90044f81062590ad4
BLAKE2b-256 checksum
How to use checksums
3bcd7a705d62357f92ab1d034e231495c64ca92cfadb6e187f89bacc9612d8fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / lecop-0.1.2-py3-none-macosx_11_0_arm64.whl

Download URL lecop-0.1.2-py3-none-macosx_11_0_arm64.whl
Size 4.7 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
06a526dfebd6f79d0623572b2c67ad2b9f065543ed328d27faa008d8cc59f0a5
BLAKE2b-256 checksum
How to use checksums
87b37964cf10f271cc05afe780d461f26cd8eaf33a512cfb4de797f2bfd91f04
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / lecop-0.1.2-py3-none-macosx_10_12_x86_64.whl

Download URL lecop-0.1.2-py3-none-macosx_10_12_x86_64.whl
Size 5.4 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
0e5ecbb75a99a28e8b316bbb3d8e985613d7997fe832cc55db9359f38f97a2ce
BLAKE2b-256 checksum
How to use checksums
ad3925430702a40f8bf62a11d19727e3bcd9878eff9df6229ef28fec9300a48c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for lecop 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page