#4711·lerobot

Silent degradation in groot and wall_x from_pretrained (siblings of #4577)

Author: DanMo661Created Sep 22, 2026Updated Sep 27, 2026
Labelsbugpoliciestests

While addressing review on #4661 (pi0-family silent fallback), I audited every policy family that overrides from_pretrained against the same failure class — a load problem rerouted to a model that looks successfully loaded. Most families are clean (evo1, molmoact2, xvla, fastwam, vla_jepa either load strict or report tolerance explicitly; the base class logs missing/unexpected keys and raises FileNotFoundError on a missing file). Two spots remain:

1) GrootPolicy.from_pretrained: transient hub error during the checkpoint probe is reinterpreted as "not a fine-tuned checkpoint"

src/lerobot/policies/groot/modeling_groot.py probes for a fine-tuned checkpoint like this:

python
try:
    if os.path.isdir(model_id):
        is_finetuned_checkpoint = os.path.exists(...)
    else:
        try:
            hf_hub_download(repo_id=model_id, filename=SAFETENSORS_SINGLE_FILE,
                            force_download=False, ...)
            is_finetuned_checkpoint = True
        except HfHubHTTPError:
            is_finetuned_checkpoint = False
except Exception:
    is_finetuned_checkpoint = False   # swallows ConnectionError / timeouts / offline-mode...

A transient ConnectionError during the probe is indistinguishable from "the file is not there": the loader silently proceeds down the base-GR00T path with the user's fine-tuned checkpoint repo id as base_model_path — i.e. it goes on to interpret an unrelated checkpoint layout as a raw GR00T repo, failing far from the cause (or looking like a success with the wrong model — the same class as #4577).

Side note: the probe uses a full hf_hub_download (multi-GB for GR00T-size checkpoints) just to test existence; a HEAD-style check (HfApi().repo_file_exists) would be cheap.

Suggested fix: narrow the outer handler (except (HfHubHTTPError, HFValidationError, OSError)), and/or log a warning when falling back to the base-GR00T path.

2) Wall-X: load_state_dict(strict=False) with no missing/unexpected-keys reporting

src/lerobot/policies/wall_x/modeling_wall_x.py (from_pretrained, after filtering normalizer keys):

python
model.load_state_dict(state_dict, strict=False)
return model

Every other family either loads strict or reports the tolerance explicitly (the base class logs missing/unexpected keys; fastwam logs exactly which tensors are re-initialized). Wall-X currently returns a half-randomly-initialized model with zero output when fed a topology-mismatched checkpoint.

Suggested fix: capture the return values and route them through log_model_loading_keys(missing, unexpected) like the base class.

Happy to send PRs for either/both.