Repository navigation
chore(models): delete the dead Pi0Tactile path - #20
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
type: Pi0TactileConfig.registry.MODELSmade the name loadable; nothing loaded it.ModelType.PI0_TACTILEandPI05_TACTILEwere produced byPi0TactileConfig.model_typeand consumed by nothing in the repo.ModelTransformFactory.__call__(training/config.py:117) matchesPI0,PI05,PI0_FASTwith nocase _. A config that did namePi0TactileConfigwould have fallen off the end and receivedmodel_transforms = None.preprocess_observation_tactile(models/model.py:165) had zero callers — including frompi0_tactile.pyitself.pi0_test.pycovers Pi0).Non-functional even if reached
pi0_tactile.py:26declaredclass Pi0Tactile(nnx.Module)— notPi0, notBaseModel(comparepi0.py:81,class Pi0(_model.BaseModel)) — while its body was written throughout for aPi0parent::37super().__init__(config, rngs), commented "this creates the visual encoder and LLM".nnx.Modulecreates neither.:77and:106readself.PaliGemma, never assigned anywhere in the class.embed_prefixwas implemented.compute_lossandsample_actionsare@abc.abstractmethodonBaseModel; neither existed, nor didembed_suffix.Pi0TactileConfig.get_freeze_filteradded two more::115super().get_freeze_filter()—BaseModelConfigdoes not define it; onlyPi0Configdoes (pi0_config.py:92).:120self.freeze_visual_encoder— no such field exists anywhere in the repo.Both were reachable through
yaml_loader._maybe_inject_lora_freeze_filter, which callsmodel.get_freeze_filter()whenever the YAML omitsfreeze_filterand a variant string containslora. That function's comment, "Only Pi0Config defines get_freeze_filter today", was already out of date —Pi0TactileConfigdefined it too, so thehasattrguard 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
src/openpi/models/pi0_tactile.pysrc/openpi/models/pi0_tactile_config.pytraining/registry.pyMODELS["Pi0TactileConfig"]models/model.pyModelType.PI0_TACTILE,PI05_TACTILE,IMAGE_KEYS_TACTILE,preprocess_observation_tactileKept deliberately
tactile:data-loading flag. It skips decoding tactile video streams and is independent of any model. Its comments namedPi0Tactile/Pi05Tactileas the reason to set it true; those were reworded, not removed.enable_tactileinexamples/bi_arx5_real. It publishesleft_tactile_left/right_tactile_leftinto the observation and is exercised byruns/tactile.yamland the README example. That is recording, not inference — no model consumed those keys before this PR either. Its comment pointed at the deletedIMAGE_KEYS_TACTILE; reworded.Verification
grepforPi0Tactile|pi0_tactile|PI0_TACTILE|PI05_TACTILE|Pi05Tactile|IMAGE_KEYS_TACTILE|preprocess_observation_tactileacross the tree: zero hitsruff check src/ examples/ configs/→ All checks passed;ruff format --check→ 107 files already formattedpython -m py_compileon all three edited Python filesconfigs/**/*.yamlparses underyaml.safe_loadSequenceandaugmaxinmodel.pyare still used by the survivingpreprocess_observation, so no import was orphanedI could not run the pytest suite locally — this machine has no
jax/flax. The YAML config loader tests run in CI and exerciseregistry.MODELSand_maybe_inject_lora_freeze_filterdirectly.🤖 Generated with Claude Code