You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+61-16Lines changed: 61 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,9 +35,9 @@ Docker installation instructions are [here](https://docs.docker.com/engine/insta
35
35
36
36
During the first run of any example, Docker will build the images. Go grab a coffee while this happens. Subsequent runs will be faster since the images are cached.
37
37
38
-
### Downloading checkpoints
38
+
### Downloading assets
39
39
40
-
By defaultcheckpoints are downloaded from `s3://openpi-assets` and are cached in `~/.cache/openpi` when needed. You can overwrite the download path by setting the `OPENPI_DATA_HOME` environment variable.
40
+
By default, assets like checkpoints and exported models are downloaded from `s3://openpi-assets` and are cached in `~/.cache/openpi` when needed. You can overwrite the download path by setting the `OPENPI_DATA_HOME` environment variable.
41
41
42
42
## Running Training
43
43
@@ -101,40 +101,85 @@ uv run scripts/serve_policy.py --env LIBERO --default_prompt "my task"
101
101
102
102
### Serve a trained policy from an openpi checkpoint
103
103
104
-
This option allows serving a model that was trained using the openpi training code.
104
+
This option allows serving a model that was trained using the openpi training code. Here's an example of how to serve a checkpoint that corresponds to the `pi0_aloha_sim` training config:
105
105
106
106
```bash
107
107
uv run scripts/serve_policy.py --default_prompt "my task" policy:checkpoint --policy.config=pi0_aloha_sim --policy.dir=checkpoints/pi0_aloha_sim/exp_name/10000
108
108
```
109
109
110
+
See the [list of available checkpoints](#available-checkpoints) below for more details.
111
+
110
112
The training config is used to determine which data transformations should be applied to the runtime data before feeding into the model. The norm stats, which are used to normalize the transformed data, are loaded from the checkpoint directory.
111
113
112
114
### Serve an exported model
113
115
114
-
There are also a number of checkpoints that are available as exported JAX graphs, which we trained ourselves using our internal training code. These can be served using the following command:
116
+
There are also a number of checkpoints that are available as exported JAX graphs, which we trained ourselves using our internal training code. Here's an example of how to serve the pre-trained $\pi_0$ model on an ALOHA robot:
115
117
116
118
```bash
117
-
uv run scripts/serve_policy.py --env ALOHA policy:exported --policy.dir=s3://openpi-assets/exported/pi0_base/model [--policy.processor=trossen_biarm_single_base_cam_24dim]
119
+
uv run scripts/serve_policy.py --env ALOHA policy:exported --policy.dir=s3://openpi-assets/exported/pi0_base/model --policy.processor=trossen_biarm_single_base_cam_24dim
118
120
```
119
121
122
+
See the [list of available exported models](#available-exported-models) below for more details.
123
+
120
124
For these exported models, norm stats are loaded from processors that are exported along with the model, while data transformations are defined by the --env argument (see `create_exported_policy` in [scripts/serve_policy.py](scripts/serve_policy.py)). The processor name is optional, and if not provided, we will do the following:
121
125
- Load a processor if there is only one available
122
126
- Raise an error if there are multiple processors available and ask to provide a processor name
123
127
128
+
### Available policies
129
+
130
+
#### Checkpoints
131
+
132
+
All available openpi checkpoints are located in `s3://openpi-assets/checkpoints/`. Similar to checkpionts that were trained using the openpi training code, they can be served using the following command:
133
+
134
+
```bash
135
+
uv run scripts/serve_policy.py --default_prompt=<prompt> policy:checkpoint --policy.config=<config> --policy.dir=<dir>
Although it may not perform well in zero-shot, it can be used as a baseline for comparing against fine-tuned models. We currently don't support serving pi0_base as a checkpoint and recommend using the exported model instead:
171
+
172
+
```bash
173
+
uv run scripts/serve_policy.py --env=<env> policy:exported --policy.dir=s3://openpi-assets/exported/pi0_base/model --policy.processor=<processor>
174
+
```
124
175
125
-
### Available exported models
176
+
Here's a list of supported environments and corresponding processors:
126
177
127
-
We currently have the following exported models available for use. See [scripts/serve_policy.py](scripts/serve_policy.py) for details.
|`pi0_base`|`s3://openpi-assets/exported/pi0_base/model/`|`ALOHA`, `DROID`|`"be a good robot"`| Standard pre-trained $\pi_0$, may not perform well in zero-shot |
132
-
|`pi0_aloha`|`s3://openpi-assets/exported/pi0_aloha/model`|`ALOHA`|`""`| $\pi_0$ model fine-tuned on public ALOHA data, supports pen cap/uncap task |
133
-
|`pi0_aloha_towel`|`s3://openpi-assets/exported/pi0_aloha_towel/model`|`ALOHA`|`"fold the towel"`| $\pi_0$ model fine-tuned to perform a towel folding task on ALOHA |
134
-
|`pi0_aloha_sim`|`s3://openpi-assets/exported/pi0_aloha_sim/model`|`ALOHA_SIM`|`"be a good robot"`| $\pi_0$ model fine-tuned on public simulated ALOHA cube transfer task |
135
-
|`pi0_droid`|`s3://openpi-assets/exported/pi0_droid/model`|`DROID`| any DROID command | $\pi_0$ model fine-tuned on public DROID dataset |
136
-
|`pi0_calvin`|`s3://openpi-assets/exported/pi0_calvin/model`|`CALVIN`| any CALVIN command | $\pi_0$ model fine-tuned on public CALVIN simulated dataset |
137
-
|`pi0_libero`|`s3://openpi-assets/exported/pi0_libero/model`|`LIBERO`| any LIBERO command | $\pi_0$ model fine-tuned on public LIBERO simulated dataset |
0 commit comments