Make `names` checkable: three structural lints and a warning that leaves a trace
Proposal: make names checkable — three structural lints, and a warning that leaves a trace
The measurement
189 lerobot/* datasets scanned (180 carry usable metadata). The names field — the only in-format way
for a program to know what a channel is — is in one of three states:
| state | datasets | share | example |
|---|---|---|---|
| semantic | 45 | 25.0 % | left_gripper, r_joint.pos |
| placeholder | 72 | 40.0 % | motor_0, motor_1, … |
| absent | 55 | 30.6 % | no names key at all |
| other | 8 | 4.4 % |
⇒ In 70.6 % of the corpus, "what is this channel?" cannot be answered by a program.
Why a placeholder is worse than an absence — the core of this proposal
Both are useless to a consumer, but they are not the same kind of useless:
- absent is a boolean. A consumer can detect it, degrade to a positional assumption, and know it is guessing. It is a declared unknown.
motor_0looks exactly like a name. Nothing downstream can distinguish it from a real one. It is not a missing value — it is a false attestation: the metadata affirmatively claims a channel identity that carries no information.
That is the shape behind several threads already open here: #3283 (action_names arrives nested and gets
string-matched wrongly), #3557 (nested action names in relative masks), #4587 (grouped action names
need flattening) — each one ends in code taking a structural shortcut because the names could not be
trusted.
Proposal — three lints and one warning. No API change, nothing blocked.
1. Two pure-structural lints (no vocabulary needed ⇒ shippable today)
| lint | what it detects | which open threads it covers |
|---|---|---|
| duplicate semantic name inside one dataset | two features claiming the same channel identity | #3283 |
len(names) != prod(feature.shape) |
the name list and the shape disagree | #3557 · #4587 |
Neither requires anyone to agree on a vocabulary, so neither is blocked on the vocabulary question.
2. One placeholder lint
motor_<int> and its family — a regex, also vocabulary-free. A file that fails it is not invalid; it is
declared unattested.
3. The warning must be machine-readable, and it must leave a trace
This is the part that decides whether the other two matter. A warning printed to stderr is a log nobody
reads — that is a false green light, the same family as the silent failures this ecosystem keeps producing
(next.success constant-False, unnormalized features after migration, names mangled by a replace).
So the check must write to a program-readable location: a field in meta/info.json, or a JSON artifact
emitted by CI next to the dataset — not only to the console.
Never an error, never a blocked upload. The ecosystem already tolerates robot_type: unknown in 41.1 %
of datasets; a hard gate here would block far more than it fixes, and the fix has to be adoptable before it is
enforceable.
What this is
- Not a vocabulary proposal. What the names should say is a separate question — see the follow-up to #4111.
- Not a repair of #3283 / #3557 / #4587. Those are the incidents; this is the linter that would have named the class.
- No change to how a dataset loads. Existing datasets stay valid; the lints describe, they do not reject.
Reproducing the numbers
- readings:
data/names-audit.csv(per dataset:names_quality_tier,action_names,state_names),data/feature-keys.csv - scan:
scripts/09_dialect_scan.py - report: https://huggingface.co/datasets/laa1991/lerobot-dataset-field-audit
Calibre, so the numbers mean something: the three tiers are assigned by a rule in that script — this is
my definition, not the format's, and a different rule moves the boundary. Denominator is 180 repos with
metadata out of 189 scanned (9 companion repos have no meta/info.json; computing on 189 gives 47.6 % / 39.2 %
for two other fields, which is exactly the trap I want to flag rather than hide).
If this is the wrong shape for a LeRobot change, or if a linter like this already exists somewhere I did not find, say so and I will drop it — the measurement stands either way.
Source: huggingface/lerobot