Every finding has a stable code (two letter check prefix + three digits), a severity, the measured value, and the threshold it crossed. Thresholds are fields of AssayConfig (src/raftel_assay/config.py) and are echoed into assay.json under config.
Severity rules:
- FAIL: objectively broken data. One FAIL makes the episode FAIL.
- WARN: statistical or suspicious; needs a human look.
- INFO: for the record; never changes a verdict.
- Dataset level findings (metadata, license) never change episode verdicts. They do count toward the CLI exit code (
--fail-on).
Source of truth: the docstring table at the top of each module in src/raftel_assay/checks/. If this page and the code disagree, the code wins.
Notation: T = rows in the episode, L = declared length, dt = 1 / fps (from info.json), s_d = normal travel of joint d across the dataset (q99 - q01 from stats when present, else max - min, else computed from the data).
| Check | Prefix | Needs video | Level |
|---|---|---|---|
structure | ST | no | episode |
timestamps | TS | no | episode |
sync | SY | yes | episode |
actions | AC | no | episode |
idle | ID | no | episode, cross episode |
video_quality | VQ | yes | episode, cross episode |
duplicates | DU | no (frames optional) | cross episode |
metadata | MD | no | dataset (MD008 episode) |
license | LI | no | dataset |
Video checks are recorded as skipped (never a silent pass) when PyAV is not installed or --no-video is set. The report then says "video not checked".
structure
Is the episode's bookkeeping internally consistent? Exact rules: if any fails, the rows cannot be trusted to line up with the metadata.
| Code | Rule | Default | Severity |
|---|---|---|---|
| ST001 | frame_index is not exactly 0, 1, ..., T-1 | exact | FAIL |
| ST002 | episode_index column not constant and equal to the episode id | exact | FAIL |
| ST003 | rows in the data file T != L | exact | FAIL |
| ST004 | dataset_to_index - dataset_from_index != L (v3 only) | exact | FAIL |
| ST005 | global index column not contiguous or not starting at dataset_from_index | exact | FAIL |
timestamps
Does time move forward, at the declared rate, without holes? diff = ts[t+1] - ts[t].
| Code | Rule | Default | Severity |
|---|---|---|---|
| TS001 | any diff <= 0 (time goes backwards or repeats) | exact | FAIL |
| TS002 | gap: diff > gap_factor * dt | gap_factor 1.5 | WARN if gaps are at most gap_warn_frac (1%) of frames; FAIL if more, or any gap > max(gap_fail_s 0.5 s, 5 dt) |
| TS003 | fps drift: abs(median(diff) - dt) / dt | fps_drift_warn 1%, fps_drift_fail 5% | WARN / FAIL |
| TS004 | jitter: abs(diff - dt) > max(1e-4 s, 4 float32 steps at max ts) | any | INFO |
If TS001 fires, TS002 to TS004 are not evaluated (a swap would also look like a gap).
Honest caveat: recorded LeRobot data writes timestamps as frame_index / fps, so they are usually perfect even when the camera dropped frames. The real dropped frame signal is the packet count in sync (SY006). This check catches broken conversions, merges, and hand edited data.
sync
Do the camera videos line up with the data rows? Per camera, per episode. The episode's frames live in [from_timestamp, to_timestamp) of its mp4 (v3 packs many episodes per file; v2.1 has one file per episode). Reads headers and packets only, no decoding.
| Code | Rule | Default | Severity |
|---|---|---|---|
| SY001 | mp4 missing or cannot be opened | FAIL | |
| SY002 | declared video span vs rows: abs((to_ts - from_ts) * fps - T) (v3) | > sync_warn_frames (1) WARN; > max(sync_fail_frames 2, sync_fail_frac 1% of T) FAIL | WARN / FAIL |
| SY003 | video stream fps differs from info.json fps | > 1% | FAIL |
| SY004 | video file ends before this episode's to_timestamp (minus one frame) | FAIL | |
| SY005 | gap or overlap between neighboring episodes in the same mp4 | gap > dt, or any overlap | WARN |
| SY006 | encoded frames (packets) inside the episode window vs T | > 1 WARN; > max(2, 1% of T) FAIL | WARN / FAIL |
actions
Are state and commanded actions physically plausible? All thresholds are fractions of s_d.
| Code | Rule | Default | Severity |
|---|---|---|---|
| AC001 | NaN or Inf anywhere in state or action | any | FAIL |
| AC002 | action never changes over the whole episode (every dim range < 1e-6 s_d) | exact | FAIL |
| AC003 | state jump: abs(state[t+1,d] - state[t,d]) > jump_frac * s_d in one frame | jump_frac 0.5; 1 to 2 hits WARN, jump_fail_count (3)+ FAIL | WARN / FAIL |
| AC004 | value beyond [q01 - range_margin * s_d, q99 + range_margin * s_d]. Off by default (range_check) | range_margin 1.5 | WARN |
| AC005 | state and action both frozen mid episode for a long run | > max(frozen_min_s 3 s, frozen_min_frac 30% of T) | WARN |
| AC006 | dataset level: a joint left out of AC003 because it jumps in most episodes | > jump_common_frac 50% of episodes, at least jump_common_min_episodes 5 | INFO |
Jumps are checked on state, not action: actions legally jump (binary grippers, delta actions, teleop resets), a real joint cannot teleport. Jump detection skips discrete dims (at most discrete_max_unique = 5 unique values, or a name containing "gripper") and steps within 5% of 2 pi or 360 (angle wraps). AC005 "frozen" means every dim's step change is at most motion_eps * s_d; runs touching the start or end are left to idle.
Joints that jump in most episodes. AC003 is decided after every episode is read. If a joint jumps in more than half of the episodes, that is how that joint moves, not a glitch: a gripper snapping shut, often under a generic name the "gripper" rule cannot see. It is left out of AC003 and AC006 names it, so the skip is never silent. Jumps on joints that normally move smoothly are still flagged. Why: the 20 dataset release sweep (2026-11-22) found AC003 on 88% of lerobot/xarm_lift_medium (gripper named motor_3) and 100% of a ManiSkill rollout set (Panda fingers named joint_7.pos, joint_8.pos). With fewer than 5 episodes there is too little to tell what is normal, so every joint is checked.
Why AC004 is off by default. It needs the true 1st and 99th percentile of each joint over the whole dataset. LeRobot's stored q01/q99 are something else: the average of each episode's own percentiles (checked to 3 decimals on lerobot/libero and a ManiSkill set). When episodes cover different tasks, that band is far narrower than the data: on LIBERO one dim's stored q01 is 0.636 while 1% of all frames sit below 0.038, and AC004 flagged 48% of a clean dataset. Turn it on with range_check=True for datasets whose stats you computed yourself. The value is how many ranges the worst sample sits beyond the q01/q99 band, so it compares directly with range_margin.
idle
Did the robot actually do something, for long enough? Motion per frame m_t = max_d abs(state[t+1,d] - state[t,d]) / s_d; moving if m_t > motion_eps (0.002, 0.2% of normal range). Falls back to action when there is no state.
| Code | Rule | Default | Severity |
|---|---|---|---|
| ID001 | never moves: no frame with m_t > motion_eps | 0.002 | FAIL |
| ID002 | idle at start longer than max(idle_start_s, idle_start_frac x T) | max(3 s, 25% T) | WARN |
| ID003 | idle at end longer than max(idle_end_s, idle_end_frac x T) | max(5 s, 35% T) | WARN |
| ID004 | unusually short for its task: robust z < -length_z and T < 0.5 x median | z 3.5; needs min_episodes_for_outliers (20) per task | WARN |
| ID005 | unusually long for its task: robust z > length_z and T > 2 x median | z 3.5; needs 20 per task | WARN |
| ID006 | too short to be a real demonstration: T < max(min_length_frames, 1 s of frames) | 10 frames | FAIL |
Robust z = 0.6745 * (T - median) / MAD within the same task. If MAD = 0 (fixed horizon sims), only "T < 0.5 x median" is used for ID004 and ID005 is not evaluated.
video_quality
Are the camera frames usable for training? Per camera and episode, video_frames (8) frames evenly spread over the episode, grayscale, at most video_width (160) px wide. Depth cameras are skipped.
| Code | Rule | Default | Severity |
|---|---|---|---|
| VQ001 | black frame: mean < black_mean and std < black_std | 10 / 5 (0 to 255) | FAIL if all sampled frames, WARN if some |
| VQ002 | overexposed: more than overexposed_frac of pixels >= overexposed_level and std < overexposed_std | 50% at >= 250, std 5 | FAIL if all, WARN if some |
| VQ003 | frozen: mean abs pixel difference between consecutive samples < frozen_pixel_diff while the state moved | 0.5 | FAIL if every such pair, WARN if >= 50% |
| VQ004 | blurry: episode median Laplacian variance < blur_rel x the same camera's dataset median | 0.25 | WARN |
Black and overexposed are mirror images. A frame is only broken when it is dark (or blown out) and flat, with almost no detail left (std below 5 on a 0 to 255 scale). A white background with objects on it is bright but full of detail, so it passes. Why: lerobot/pusht renders a white simulator background, so 85 to 90% of its pixels are >= 250 while the image keeps a std of 18 to 21. A "bright only" rule failed all 206 of its clean episodes. The finding message shows the first flagged frame's numbers next to the limits, for example 8/8 sampled frames are overexposed (first: 100% of pixels >= 250, std 1.2; limits > 50%, std < 5).
Blur has no absolute threshold; an episode is only compared with the same camera in the same dataset. Black and overexposed frames are left out of the frozen and blur measurements so one problem is not reported three times.
duplicates
Was the same episode saved twice? Fingerprint per episode: sha1(round(state / (0.001 s_d)), round(action / (0.001 s_d)), T), the trajectory quantized to 0.1% of each joint's range. With video, also a 64 bit dHash of 3 frames (25%, 50%, 75%) from the first camera. Episodes that never move are skipped (idle reports them).
| Code | Rule | Severity |
|---|---|---|
| DU001 | trajectory fingerprint equals an earlier episode's | WARN |
| DU002 | fingerprint and the 3 frame dHashes equal an earlier episode's (within 3 of 64 bits) | FAIL |
The finding goes on the later episode and names the earlier one as the original.
metadata
Does the dataset describe itself correctly? MD002 to MD006 need file access, so the reader emits them while opening the dataset. A missing meta/info.json or unknown codebase_version is not a finding: the dataset cannot be opened and the CLI exits with code 2.
| Code | Level | Rule | Severity |
|---|---|---|---|
| MD001 | dataset | info.json has no usable fps | FAIL |
| MD002 | dataset | a data parquet or mp4 referenced by the metadata is missing | FAIL |
| MD003 | dataset | a feature declared in info.json is missing from a data parquet | FAIL |
| MD004 | dataset | a parquet column's width disagrees with features[k].shape | FAIL |
| MD005 | dataset | total_episodes != episodes listed | WARN |
| MD006 | dataset | total_frames != sum of episode lengths | WARN |
| MD007 | dataset | no stats for the state or action feature | WARN |
| MD008 | episode | task text empty or a placeholder ("task", "default", "none", ...) | WARN |
| MD009 | dataset | stale stats: data values outside the stats min/max | WARN |
| MD010 | dataset | an episode index is listed more than once in the episode metadata (one finding for all of them); only the last entry of each is checked | FAIL |
license
Can this dataset train a commercial model? Reads the license key of the README.md YAML front matter (the Hugging Face dataset card). Assay reports what is declared; it does not certify it. LeRobot's card template appears to fill apache-2.0 when the author leaves it: in the 20 dataset sweep, 11 of the 12 cards still showing template placeholders said apache-2.0, and every hand written card said something else.
| Code | Rule | Severity |
|---|---|---|
| LI001 | no dataset card, or no license key in its front matter | WARN |
| LI002 | license is other or unknown (shows license_name if any) | WARN |
| LI003 | license is non commercial (any -nc, e.g. cc-by-nc-4.0) | WARN |
| LI004 | license forbids derivatives (any -nd) | WARN |
| LI005 | declared license, for the record | INFO |
Reporting a wrong verdict
Open a "False positive or false negative" issue with the dataset id, episode index, finding code, and the episode's entry from assay.json.