Skip to main content

leCop: a robot cop with sunglasses

leCop

The police of your robot dataset.

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

uvx lecop path/to/dataset      # run once, nothing installed

or install it:

uv tool install lecop          # or: pip install lecop / pipx install lecop / cargo install lecop
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.

cargo install lecop compiles the video decoders, which needs nasm on x86_64 Linux and Intel Macs (apt install nasm, brew install nasm). The wheels and release binaries need nothing.

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.1

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.1
File Size Uploaded Provenance Actions
lecop-0.1.1.tar.gz 379.0 kB Without provenance Details for lecop-0.1.1.tar.gz

Built distributions (wheels)

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

Total release size: 26.3 MB

Release files / lecop-0.1.1.tar.gz

Download URL lecop-0.1.1.tar.gz
Size 379.0 kB
Tags Source
SHA-256 checksum
How to use checksums
43e0ff06931c262fe7ead80a11aa7471d140131e4ae19c83c46529eeb9d61ee1
BLAKE2b-256 checksum
How to use checksums
79e94dff2998c87880e9764fda2e5e3d1508a0540296f9477b447629ad34e81c
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.1-py3-none-win_amd64.whl

Download URL lecop-0.1.1-py3-none-win_amd64.whl
Size 5.2 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
3c2fed14b67deadb557e1f54ff384eb824aed3b0bc6a3b0afd45687b32ee23e2
BLAKE2b-256 checksum
How to use checksums
6215db35315e44f863f805d3810aa12122b92ef9ccb884a4b4e5b8433686d0ac
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.1-py3-none-manylinux_2_28_x86_64.whl

Download URL lecop-0.1.1-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
3899254295a2a9f839f0b7614dda6af13795f0f1f69eb1337bb291c6a369a390
BLAKE2b-256 checksum
How to use checksums
45ce94144e13bb51be56646430254f797d3753ad750b55ad4d58fdf6ce8f763b
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.1-py3-none-manylinux_2_28_aarch64.whl

Download URL lecop-0.1.1-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
45ef85bb5b36ec7e4e1e54b4bef58c2c642ef3faa878dad185dd68860c1f2450
BLAKE2b-256 checksum
How to use checksums
27a0a163b0c2412efbf3311b5c075d51495ce3572854f67c6568d579e3a21d95
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.1-py3-none-macosx_11_0_arm64.whl

Download URL lecop-0.1.1-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
2e1003d87d7d921aea2e08c9b4a769c5ee4c3929d05afcedb638e3cb515d7ce8
BLAKE2b-256 checksum
How to use checksums
4a89b52a6e42f6a25f05420bc6eb261c062e375eb145e078cb4851b54995e945
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.1-py3-none-macosx_10_12_x86_64.whl

Download URL lecop-0.1.1-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
8e810510fec56f1056602385237dff450f3e844945bd41769484cfbbb7561f39
BLAKE2b-256 checksum
How to use checksums
ba84a58d4daba39c0f6df28f92fe8e73590dad8b2f77b037cc1c8f8289eaa854
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.1

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