Orchestra-Research/AI-Research-SKILLs / 18-multimodal/openpi
fine-tuning-serving-openpi
VerifiedFine-tune and serve Physical Intelligence OpenPI models (pi0, pi0-fast, pi0.5) using JAX or PyTorch backends for robot policy inference across ALOHA, DROID, and LIBERO environments. Use when adapting pi0 models to custom datasets, converting JAX checkpoints to PyTorch, running policy inference servers, or debugging norm stats and GPU memory issues.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 13.9 KB |
| references/checkpoints-and-env-map.md | markdown | 2.5 KB |
| references/config-recipes.md | markdown | 1.7 KB |
| references/pytorch-gotchas.md | markdown | 1.4 KB |
| references/remote-client-pattern.md | markdown | 1.2 KB |
| references/training-debugging.md | markdown | 1.2 KB |
references/remote-client-pattern.md
View on GitHub# Remote Client Pattern
Use this pattern when the policy server runs on a GPU machine and control code runs elsewhere.
## Server side
```bash
uv run scripts/serve_policy.py --env DROID
# or
uv run scripts/serve_policy.py policy:checkpoint \
--policy.config=pi05_droid \
--policy.dir=gs://openpi-assets/checkpoints/pi05_droid
```
Default port is `8000`.
## Robot or eval client side
Install client package:
```bash
uv pip install -e packages/openpi-client
```
Call server from Python:
```python
from openpi_client import websocket_client_policy
client = websocket_client_policy.WebsocketClientPolicy(host="server-ip", port=8000)
result = client.infer(observation)
actions = result["actions"]
```
## Observation contract checks
- Pass observation keys expected by your policy transforms.
- Pass prompt as `observation["prompt"]` or use server `--default_prompt`.
- Resize image tensors to the expected model input shape before call (typically `224`).
- Keep state values in the policy's expected coordinate and ordering conventions.
## Read before integration
- `docs/remote_inference.md`
- `examples/simple_client/README.md`
- `examples/droid/README.md`
- `examples/aloha_real/README.md`
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |