Skip to content

chore(models): delete the dead Pi0Tactile path - #20

Merged
Vertax42 merged 1 commit into
mainfrom
chore/drop-dead-pi0-tactile-path
Sep 16, 2026
Merged

Vertax42 merged 1 commit into
mainfrom
chore/drop-dead-pi0-tactile-path

Conversation

@Vertax42

Copy link
Copy Markdown
Collaborator

Follow-up to #17, which removed the only transform that fed this path. #17's description assumed Pi0Tactile was a working model left without a data path. It is not working, so there is nothing to feed.

Unreachable

  • No YAML anywhere sets type: Pi0TactileConfig. registry.MODELS made the name loadable; nothing loaded it.
  • ModelType.PI0_TACTILE and PI05_TACTILE were produced by Pi0TactileConfig.model_type and consumed by nothing in the repo.
  • ModelTransformFactory.__call__ (training/config.py:117) matches PI0, PI05, PI0_FAST with no case _. A config that did name Pi0TactileConfig would have fallen off the end and received model_transforms = None.
  • preprocess_observation_tactile (models/model.py:165) had zero callers — including from pi0_tactile.py itself.
  • No test file existed for it (pi0_test.py covers Pi0).

Non-functional even if reached

pi0_tactile.py:26 declared class Pi0Tactile(nnx.Module) — not Pi0, not BaseModel (compare pi0.py:81, class Pi0(_model.BaseModel)) — while its body was written throughout for a Pi0 parent:

  • :37 super().__init__(config, rngs), commented "this creates the visual encoder and LLM". nnx.Module creates neither.
  • :77 and :106 read self.PaliGemma, never assigned anywhere in the class.
  • Only embed_prefix was implemented. compute_loss and sample_actions are @abc.abstractmethod on BaseModel; neither existed, nor did embed_suffix.

Pi0TactileConfig.get_freeze_filter added two more:

  • :115 super().get_freeze_filter() — BaseModelConfig does not define it; only Pi0Config does (pi0_config.py:92).
  • :120 self.freeze_visual_encoder — no such field exists anywhere in the repo.

Both were reachable through yaml_loader._maybe_inject_lora_freeze_filter, which calls model.get_freeze_filter() whenever the YAML omits freeze_filter and a variant string contains lora. That function's comment, "Only Pi0Config defines get_freeze_filter today", was already out of date — Pi0TactileConfig defined it too, so the hasattr guard admitted it instead of skipping it. Removing the class makes the comment true again.

The last substantive change to either file was 7c51dc5, which renamed its camera keys along with the rest of the tactile rename. That a rename touched this code without surfacing any of the above is itself evidence it was never exercised.

Deleted

Path
src/openpi/models/pi0_tactile.py the model
src/openpi/models/pi0_tactile_config.py the config
training/registry.py import + MODELS["Pi0TactileConfig"]
models/model.py ModelType.PI0_TACTILE, PI05_TACTILE, IMAGE_KEYS_TACTILE, preprocess_observation_tactile

Kept deliberately

  • The tactile: data-loading flag. It skips decoding tactile video streams and is independent of any model. Its comments named Pi0Tactile/Pi05Tactile as the reason to set it true; those were reworded, not removed.
  • enable_tactile in examples/bi_arx5_real. It publishes left_tactile_left / right_tactile_left into the observation and is exercised by runs/tactile.yaml and the README example. That is recording, not inference — no model consumed those keys before this PR either. Its comment pointed at the deleted IMAGE_KEYS_TACTILE; reworded.

Verification

  • grep for Pi0Tactile|pi0_tactile|PI0_TACTILE|PI05_TACTILE|Pi05Tactile|IMAGE_KEYS_TACTILE|preprocess_observation_tactile across the tree: zero hits
  • ruff check src/ examples/ configs/ → All checks passed; ruff format --check → 107 files already formatted
  • python -m py_compile on all three edited Python files
  • every configs/**/*.yaml parses under yaml.safe_load
  • Sequence and augmax in model.py are still used by the surviving preprocess_observation, so no import was orphaned

I could not run the pytest suite locally — this machine has no jax/flax. The YAML config loader tests run in CI and exercise registry.MODELS and _maybe_inject_lora_freeze_filter directly.

🤖 Generated with Claude Code

Pi0Tactile has never been reachable and could not have run if it were.

Unreachable: no YAML sets `type: Pi0TactileConfig`; `ModelType.PI0_TACTILE`
and `PI05_TACTILE` were produced by the config and consumed by nothing;
`ModelTransformFactory.__call__` matches PI0/PI05/PI0_FAST with no `case _`,
so a config naming it would have received `model_transforms = None`; and
`preprocess_observation_tactile` had zero callers, including from
`pi0_tactile.py` itself.

Non-functional: `Pi0Tactile` subclassed `nnx.Module` rather than `Pi0` or
`BaseModel`, while its body was written for a `Pi0` parent — it called
`super().__init__(config, rngs)` expecting the visual encoder and LLM to be
built, read a `self.PaliGemma` that was never assigned, and implemented only
`embed_prefix`, leaving the abstract `compute_loss` and `sample_actions`
undefined. `Pi0TactileConfig.get_freeze_filter` called a
`super().get_freeze_filter()` that `BaseModelConfig` does not define and read
a `self.freeze_visual_encoder` field that exists nowhere in the repo.

The last substantive change to either file, 7c51dc5, renamed its camera keys
along with the rest of the tactile rename; that the rename never surfaced any
of the above is itself evidence the path was never exercised.

Kept: the `tactile:` data-loading flag, which skips decoding tactile video
streams and is independent of any model, and the `enable_tactile` option in
`examples/bi_arx5_real`, which publishes the streams for recording. Comments
that pointed at the deleted names were reworded rather than dropped.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Vertax42
Vertax42 merged commit a4e7a30 into main Sep 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant