Download code-patches/openpi_behavior.patch from jermo1120/b1k-pi05-eval: direct link, hf CLI and curl.
- Browser
- Download file 5.41 kB
-
https://huggingface.co/datasets/jermo1120/b1k-pi05-eval/resolve/main/code-patches/openpi_behavior.patch
- Command line
-
hf download hf://datasets/jermo1120/b1k-pi05-eval/code-patches/openpi_behavior.patch
-
curl -L -o openpi_behavior.patch https://huggingface.co/datasets/jermo1120/b1k-pi05-eval/resolve/main/code-patches/openpi_behavior.patch
5.41 kB
| diff --git a/src/openpi/configs/robots/b1k.py b/src/openpi/configs/robots/b1k.py | |
| index 0fa8121..f6c9006 100644 | |
| --- a/src/openpi/configs/robots/b1k.py | |
| +++ b/src/openpi/configs/robots/b1k.py | |
| from .base_config import ObservationConfig, StateActionConfig, RobotConfig, regi | |
| # R1Pro Robot Configuration | |
| # Dual-arm mobile manipulator with base, torso, and multiple camera views | |
| R1Pro = RobotConfig( | |
| - name="robot", | |
| + # BEHAVIOR-1K v3.9.2 eval names the robot "robot_r1" (see OmniGibson/omnigibson/eval/r1pro.yaml), | |
| + # so the flattened observation keys the eval client streams are prefixed "robot_r1::". | |
| + name="robot_r1", | |
| robot_type="R1Pro", | |
| observations={ | |
| "image_0": ObservationConfig( | |
| name="head", | |
| - obs_key="robot::robot:zed_link:Camera:0::rgb", | |
| + obs_key="robot_r1::robot_r1:zed_link:Camera:0::rgb", | |
| dataset_key="observation.rgb.zed_link_camera_0", | |
| resolution=[240, 240] | |
| ), | |
| "image_1": ObservationConfig( | |
| name="left_wrist", | |
| - obs_key="robot::robot:left_realsense_link:Camera:0::rgb", | |
| + obs_key="robot_r1::robot_r1:left_realsense_link:Camera:0::rgb", | |
| dataset_key="observation.rgb.left_realsense_link_camera_0", | |
| resolution=[240, 240] | |
| ), | |
| "image_2": ObservationConfig( | |
| name="right_wrist", | |
| - obs_key="robot::robot:right_realsense_link:Camera:0::rgb", | |
| + obs_key="robot_r1::robot_r1:right_realsense_link:Camera:0::rgb", | |
| dataset_key="observation.rgb.right_realsense_link_camera_0", | |
| resolution=[240, 240] | |
| ), | |
| diff --git a/src/openpi/configs/tasks/b1k.py b/src/openpi/configs/tasks/b1k.py | |
| index 193c4e7..e492b58 100644 | |
| --- a/src/openpi/configs/tasks/b1k.py | |
| +++ b/src/openpi/configs/tasks/b1k.py | |
| from . import TASK_REGISTRY | |
| # i3l task prompts | |
| TASKS = { | |
| "turning_on_radio": "Turn on the radio receiver that's on the table in the living room.", | |
| + # Task 22 in the 2026 BEHAVIOR Challenge task list. The policy was fine-tuned with | |
| + # prompt_from_task=True, so the training prompt was the raw LeRobot task string | |
| + # "putting_shoes_on_rack" (the PaliGemma tokenizer lowercases it and turns "_" into " "). | |
| + "putting_shoes_on_rack": "putting shoes on rack", | |
| + # Task 38 in the 2026 BEHAVIOR Challenge. Same convention: prompt_from_task=True during | |
| + # fine-tuning, so the training prompt is the raw LeRobot task string. | |
| + "spraying_for_bugs": "spraying for bugs", | |
| } | |
| # Register in global registry | |
| diff --git a/src/openpi/training/config.py b/src/openpi/training/config.py | |
| index ec6cd0f..7200a0b 100644 | |
| --- a/src/openpi/training/config.py | |
| +++ b/src/openpi/training/config.py | |
| _CONFIGS = [ | |
| assets_base_dir="./outputs/assets", | |
| checkpoint_base_dir="./outputs/checkpoints", | |
| ), | |
| + # Task 38 (spraying_for_bugs) -- full fine-tune, mirror of pi05_b1k. Needs multi-GPU (FSDP) | |
| + # or a large single GPU; use the _lora variant below to fit on one ~46 GB card. | |
| + TrainConfig( | |
| + name="pi05_b1k_spraying_for_bugs", | |
| + model=pi0_config.Pi0Config(action_horizon=32, pi05=True), | |
| + data=LeRobotB1KDataConfig( | |
| + repo_id="spraying_for_bugs", | |
| + base_config=DataConfig( | |
| + data_cls=_lerobot_compat.LeRobotDataset, | |
| + dataset_root="/opt/b1k/datasets/spraying_for_bugs", | |
| + prompt_from_task=True, | |
| + dataset_kwargs={"tolerance_s": 5e-4}, | |
| + ), | |
| + robot_config_name="b1k/R1Pro", | |
| + ), | |
| + weight_loader=weight_loaders.CheckpointWeightLoader("gs://openpi-assets/checkpoints/pi05_base/params"), | |
| + save_interval=10_000, | |
| + num_train_steps=50_000, | |
| + assets_base_dir="./outputs/assets", | |
| + checkpoint_base_dir="./outputs/checkpoints", | |
| + ), | |
| + # Task 38 (spraying_for_bugs) -- LoRA fine-tune. Fits on a single L40S (~46 GB), even alongside | |
| + # the eval policy server. Lower ceiling than the full fine-tune above. | |
| + TrainConfig( | |
| + name="pi05_b1k_spraying_for_bugs_lora", | |
| + model=pi0_config.Pi0Config( | |
| + action_horizon=32, | |
| + pi05=True, | |
| + paligemma_variant="gemma_2b_lora", | |
| + action_expert_variant="gemma_300m_lora", | |
| + ), | |
| + data=LeRobotB1KDataConfig( | |
| + repo_id="spraying_for_bugs", | |
| + base_config=DataConfig( | |
| + data_cls=_lerobot_compat.LeRobotDataset, | |
| + dataset_root="/opt/b1k/datasets/spraying_for_bugs", | |
| + prompt_from_task=True, | |
| + dataset_kwargs={"tolerance_s": 5e-4}, | |
| + ), | |
| + robot_config_name="b1k/R1Pro", | |
| + ), | |
| + weight_loader=weight_loaders.CheckpointWeightLoader("gs://openpi-assets/checkpoints/pi05_base/params"), | |
| + freeze_filter=pi0_config.Pi0Config( | |
| + action_horizon=32, | |
| + pi05=True, | |
| + paligemma_variant="gemma_2b_lora", | |
| + action_expert_variant="gemma_300m_lora", | |
| + ).get_freeze_filter(), | |
| + ema_decay=None, | |
| + save_interval=10_000, | |
| + num_train_steps=50_000, | |
| + batch_size=16, | |
| + assets_base_dir="./outputs/assets", | |
| + checkpoint_base_dir="./outputs/checkpoints", | |
| + ), | |
| # | |
| # Fine-tuning Libero configs. | |
| # | |