fix(g05): pass dataset count stat through embodiment projection

LeRobot dataset stats include a scalar per-feature sample count that is
not a per-dimension statistic, so projecting it to the embodiment index
map raised a width-mismatch ValueError for every real dataset.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
pepijn
2026-07-30 08:04:37 +00:00
parent b515558dcf
commit 143855cfe4
@@ -679,6 +679,11 @@ def _project_stats(
projected_stats: dict[str, torch.Tensor] = {}
for stat_name, raw_value in stats.items():
value = torch.as_tensor(raw_value)
if stat_name == "count":
# LeRobot dataset stats carry a scalar sample count that is not
# a per-dimension statistic; pass it through unprojected.
projected_stats[stat_name] = value
continue
if value.shape[-1] != len(index_maps[feature_name]):
raise ValueError(
f"{feature_name}.{stat_name} has width {value.shape[-1]}, "