Raftel Assay v0.1 reference

Checks and finding codes

Every rule Assay applies, with its default threshold and the reason for that value. If an episode is flagged, its finding code points to the row below that explains why.

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

CheckPrefixNeeds videoLevel
structureSTnoepisode
timestampsTSnoepisode
syncSYyesepisode
actionsACnoepisode
idleIDnoepisode, cross episode
video_qualityVQyesepisode, cross episode
duplicatesDUno (frames optional)cross episode
metadataMDnodataset (MD008 episode)
licenseLInodataset

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.

CodeRuleDefaultSeverity
ST001frame_index is not exactly 0, 1, ..., T-1exactFAIL
ST002episode_index column not constant and equal to the episode idexactFAIL
ST003rows in the data file T != LexactFAIL
ST004dataset_to_index - dataset_from_index != L (v3 only)exactFAIL
ST005global index column not contiguous or not starting at dataset_from_indexexactFAIL

timestamps

Does time move forward, at the declared rate, without holes? diff = ts[t+1] - ts[t].

CodeRuleDefaultSeverity
TS001any diff <= 0 (time goes backwards or repeats)exactFAIL
TS002gap: diff > gap_factor * dtgap_factor 1.5WARN 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)
TS003fps drift: abs(median(diff) - dt) / dtfps_drift_warn 1%, fps_drift_fail 5%WARN / FAIL
TS004jitter: abs(diff - dt) > max(1e-4 s, 4 float32 steps at max ts)anyINFO

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.

CodeRuleDefaultSeverity
SY001mp4 missing or cannot be openedFAIL
SY002declared 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) FAILWARN / FAIL
SY003video stream fps differs from info.json fps> 1%FAIL
SY004video file ends before this episode's to_timestamp (minus one frame)FAIL
SY005gap or overlap between neighboring episodes in the same mp4gap > dt, or any overlapWARN
SY006encoded frames (packets) inside the episode window vs T> 1 WARN; > max(2, 1% of T) FAILWARN / FAIL

actions

Are state and commanded actions physically plausible? All thresholds are fractions of s_d.

CodeRuleDefaultSeverity
AC001NaN or Inf anywhere in state or actionanyFAIL
AC002action never changes over the whole episode (every dim range < 1e-6 s_d)exactFAIL
AC003state jump: abs(state[t+1,d] - state[t,d]) > jump_frac * s_d in one framejump_frac 0.5; 1 to 2 hits WARN, jump_fail_count (3)+ FAILWARN / FAIL
AC004value beyond [q01 - range_margin * s_d, q99 + range_margin * s_d]. Off by default (range_check)range_margin 1.5WARN
AC005state and action both frozen mid episode for a long run> max(frozen_min_s 3 s, frozen_min_frac 30% of T)WARN
AC006dataset 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 5INFO

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.

CodeRuleDefaultSeverity
ID001never moves: no frame with m_t > motion_eps0.002FAIL
ID002idle at start longer than max(idle_start_s, idle_start_frac x T)max(3 s, 25% T)WARN
ID003idle at end longer than max(idle_end_s, idle_end_frac x T)max(5 s, 35% T)WARN
ID004unusually short for its task: robust z < -length_z and T < 0.5 x medianz 3.5; needs min_episodes_for_outliers (20) per taskWARN
ID005unusually long for its task: robust z > length_z and T > 2 x medianz 3.5; needs 20 per taskWARN
ID006too short to be a real demonstration: T < max(min_length_frames, 1 s of frames)10 framesFAIL

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.

CodeRuleDefaultSeverity
VQ001black frame: mean < black_mean and std < black_std10 / 5 (0 to 255)FAIL if all sampled frames, WARN if some
VQ002overexposed: more than overexposed_frac of pixels >= overexposed_level and std < overexposed_std50% at >= 250, std 5FAIL if all, WARN if some
VQ003frozen: mean abs pixel difference between consecutive samples < frozen_pixel_diff while the state moved0.5FAIL if every such pair, WARN if >= 50%
VQ004blurry: episode median Laplacian variance < blur_rel x the same camera's dataset median0.25WARN

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

CodeRuleSeverity
DU001trajectory fingerprint equals an earlier episode'sWARN
DU002fingerprint 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.

CodeLevelRuleSeverity
MD001datasetinfo.json has no usable fpsFAIL
MD002dataseta data parquet or mp4 referenced by the metadata is missingFAIL
MD003dataseta feature declared in info.json is missing from a data parquetFAIL
MD004dataseta parquet column's width disagrees with features[k].shapeFAIL
MD005datasettotal_episodes != episodes listedWARN
MD006datasettotal_frames != sum of episode lengthsWARN
MD007datasetno stats for the state or action featureWARN
MD008episodetask text empty or a placeholder ("task", "default", "none", ...)WARN
MD009datasetstale stats: data values outside the stats min/maxWARN
MD010datasetan episode index is listed more than once in the episode metadata (one finding for all of them); only the last entry of each is checkedFAIL

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.

CodeRuleSeverity
LI001no dataset card, or no license key in its front matterWARN
LI002license is other or unknown (shows license_name if any)WARN
LI003license is non commercial (any -nc, e.g. cc-by-nc-4.0)WARN
LI004license forbids derivatives (any -nd)WARN
LI005declared license, for the recordINFO

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.