From aaae109447e0c01e52c59f856d19a1f8db1cd1e6 Mon Sep 17 00:00:00 2001 From: Pepijn Date: Tue, 16 Sep 2025 15:11:14 +0200 Subject: [PATCH] minor docs fixes and dependencies --- pyproject.toml | 2 ++ src/lerobot/policies/pi05_openpi/README.md | 7 +------ .../policies/pi05_openpi/configuration_pi05openpi.py | 1 + src/lerobot/policies/pi0_openpi/README.md | 7 +------ src/lerobot/policies/pi0_openpi/configuration_pi0openpi.py | 1 + tests/policies/test_pi0_original_vs_lerobot.py | 5 +++++ 6 files changed, 11 insertions(+), 12 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 4d1f25d65..ad628800f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -119,6 +119,7 @@ intelrealsense = [ # Policies pi0 = ["lerobot[transformers-dep]"] +pi05 = ["lerobot[transformers-dep]"] smolvla = ["lerobot[transformers-dep]", "num2words>=0.5.14", "accelerate>=1.7.0", "safetensors>=0.4.3"] hilserl = ["lerobot[transformers-dep]", "gym-hil>=0.1.9", "lerobot[grpcio-dep]", "lerobot[placo-dep]"] @@ -145,6 +146,7 @@ all = [ "lerobot[kinematics]", "lerobot[intelrealsense]", "lerobot[pi0]", + "lerobot[pi05]", "lerobot[smolvla]", "lerobot[hilserl]", "lerobot[async]", diff --git a/src/lerobot/policies/pi05_openpi/README.md b/src/lerobot/policies/pi05_openpi/README.md index 0fb8752eb..e4b2f5460 100644 --- a/src/lerobot/policies/pi05_openpi/README.md +++ b/src/lerobot/policies/pi05_openpi/README.md @@ -47,11 +47,10 @@ pip install transformers==4.53.2 | Feature | π₀ | π₀.₅ | | -------------------- | ------------------------------------------------------ | ----------------------------------------- | -| State Embedding | Uses `state_proj` layer | No state embedding | | Time Conditioning | Concatenates time with actions via `action_time_mlp_*` | Uses `time_mlp_*` for AdaRMS conditioning | | AdaRMS | Not used | Used in action expert | | Tokenizer Length | 48 tokens | 200 tokens | -| Discrete State Input | False | True | +| Discrete State Input | False (Uses `state_proj` layer) | True | | Parameter Count | Higher (includes state embedding) | Lower (no state embedding) | --- @@ -86,7 +85,3 @@ If you use this work, please cite both **OpenPI** and the π₀.₅ paper: ## License This port follows the **Apache 2.0 License**, consistent with the original [OpenPI repository](https://github.com/Physical-Intelligence/openpi). - -``` - -``` diff --git a/src/lerobot/policies/pi05_openpi/configuration_pi05openpi.py b/src/lerobot/policies/pi05_openpi/configuration_pi05openpi.py index acf2b7b6e..87eea97cd 100644 --- a/src/lerobot/policies/pi05_openpi/configuration_pi05openpi.py +++ b/src/lerobot/policies/pi05_openpi/configuration_pi05openpi.py @@ -13,6 +13,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + from dataclasses import dataclass, field from lerobot.configs.policies import PreTrainedConfig diff --git a/src/lerobot/policies/pi0_openpi/README.md b/src/lerobot/policies/pi0_openpi/README.md index 06bbdbdaa..791a7e5bd 100644 --- a/src/lerobot/policies/pi0_openpi/README.md +++ b/src/lerobot/policies/pi0_openpi/README.md @@ -47,11 +47,10 @@ pip install transformers==4.53.2 | Feature | π₀ | π₀.₅ | | -------------------- | ------------------------------------------------------ | ----------------------------------------- | -| State Embedding | Uses `state_proj` layer | No state embedding | | Time Conditioning | Concatenates time with actions via `action_time_mlp_*` | Uses `time_mlp_*` for AdaRMS conditioning | | AdaRMS | Not used | Used in action expert | | Tokenizer Length | 48 tokens | 200 tokens | -| Discrete State Input | False | True | +| Discrete State Input | False (Uses `state_proj` layer) | True | | Parameter Count | Higher (includes state embedding) | Lower (no state embedding) | --- @@ -86,7 +85,3 @@ If you use this work, please cite both **OpenPI** and the π₀ paper: ## License This port follows the **Apache 2.0 License**, consistent with the original [OpenPI repository](https://github.com/Physical-Intelligence/openpi). - -``` - -``` diff --git a/src/lerobot/policies/pi0_openpi/configuration_pi0openpi.py b/src/lerobot/policies/pi0_openpi/configuration_pi0openpi.py index 973638fae..4c6a19909 100644 --- a/src/lerobot/policies/pi0_openpi/configuration_pi0openpi.py +++ b/src/lerobot/policies/pi0_openpi/configuration_pi0openpi.py @@ -13,6 +13,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + from dataclasses import dataclass, field from lerobot.configs.policies import PreTrainedConfig diff --git a/tests/policies/test_pi0_original_vs_lerobot.py b/tests/policies/test_pi0_original_vs_lerobot.py index a7aa82ef9..e4e7c129d 100644 --- a/tests/policies/test_pi0_original_vs_lerobot.py +++ b/tests/policies/test_pi0_original_vs_lerobot.py @@ -2,7 +2,12 @@ import os +import pytest import torch + +# Skip entire module if openpi is not available +pytest.importorskip("openpi") + from openpi.models_pytorch import preprocessing_pytorch as openpi_preprocessing # NOTE: Assumes PYTHONPATH is set to include OpenPI src as per instructions.