Spaces:
Sleeping
Sleeping
Commit ·
1be271c
1
Parent(s): f2f1146
docs: plan selectable UR policy config
Browse files
docs/superpowers/plans/2026-07-23-selectable-ur-policy-config.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Selectable UR Policy Configuration Implementation Plan
|
| 2 |
+
|
| 3 |
+
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
|
| 4 |
+
|
| 5 |
+
**Goal:** Add a Gradio-selectable state/no-state UR configuration and isolate cached policies by that selection.
|
| 6 |
+
|
| 7 |
+
**Architecture:** Define one allowlist in the model lifecycle module, validate configuration before loading, and include it in the cache key. Pass the selected value through the Gradio boundary while leaving inference observation and output contracts unchanged.
|
| 8 |
+
|
| 9 |
+
**Tech Stack:** Python 3.10, Gradio 5.49.1, OpenPI, unittest.
|
| 10 |
+
|
| 11 |
+
## Global Constraints
|
| 12 |
+
|
| 13 |
+
- Allowed names are exactly `pi05_ur_demo_no_state` and `pi05_ur_demo_state`.
|
| 14 |
+
- Default to `pi05_ur_demo_no_state`.
|
| 15 |
+
- Never infer configuration from repository names.
|
| 16 |
+
- Cache by `(model_id, checkpoint_path, config_name)`.
|
| 17 |
+
|
| 18 |
+
---
|
| 19 |
+
|
| 20 |
+
### Task 1: Configuration-aware model lifecycle
|
| 21 |
+
|
| 22 |
+
**Files:**
|
| 23 |
+
- Modify: `model_loader.py`
|
| 24 |
+
- Modify: `tests/test_model_loader.py`
|
| 25 |
+
|
| 26 |
+
**Interfaces:**
|
| 27 |
+
- Produces: `POLICY_CONFIGS`, `DEFAULT_POLICY_CONFIG`, `normalize_policy_config(value)`, and `ModelManager.get(model_id, checkpoint_path, config_name)`.
|
| 28 |
+
|
| 29 |
+
- [ ] Write failing tests for allowlist rejection, separate cache entries, and selected loader argument.
|
| 30 |
+
- [ ] Run `conda run -n starVLA python -m unittest tests/test_model_loader.py -v`; expect failures from the missing third argument behavior.
|
| 31 |
+
- [ ] Add exact allowlist validation, extend keys and loader signatures to three strings, and call `openpi_config.get_config(config_name)`.
|
| 32 |
+
- [ ] Run the focused tests; expect PASS.
|
| 33 |
+
- [ ] Commit with `git commit -m "feat: select UR policy configuration"`.
|
| 34 |
+
|
| 35 |
+
### Task 2: Gradio configuration selector
|
| 36 |
+
|
| 37 |
+
**Files:**
|
| 38 |
+
- Modify: `app.py`
|
| 39 |
+
- Modify: `tests/test_app.py`
|
| 40 |
+
|
| 41 |
+
**Interfaces:**
|
| 42 |
+
- Consumes: `POLICY_CONFIGS`, `DEFAULT_POLICY_CONFIG`, and three-argument `MODEL_MANAGER.get`.
|
| 43 |
+
- Produces: a `Policy config` dropdown passed as the third model-loading argument.
|
| 44 |
+
|
| 45 |
+
- [ ] Write failing tests that assert config propagation and dropdown source/default.
|
| 46 |
+
- [ ] Run `conda run -n starVLA python -m unittest tests/test_app.py -v`; expect signature/source failures.
|
| 47 |
+
- [ ] Add the dropdown, add `config_name` to `predict_ui`, and include it in status text.
|
| 48 |
+
- [ ] Run focused tests; expect PASS.
|
| 49 |
+
- [ ] Commit with `git commit -m "feat: expose UR policy config in Gradio"`.
|
| 50 |
+
|
| 51 |
+
### Task 3: Full verification and documentation
|
| 52 |
+
|
| 53 |
+
**Files:**
|
| 54 |
+
- Modify: `README.md`
|
| 55 |
+
- Modify: `tests/test_space_config.py`
|
| 56 |
+
|
| 57 |
+
**Interfaces:**
|
| 58 |
+
- Documents the default and exact selectable values.
|
| 59 |
+
|
| 60 |
+
- [ ] Add a failing documentation assertion for both configuration names and default behavior.
|
| 61 |
+
- [ ] Document selection semantics and no-state state-control behavior.
|
| 62 |
+
- [ ] Run all CPU tests, Python 3.10 compilation, and `git diff --check`.
|
| 63 |
+
- [ ] Commit with `git commit -m "docs: explain selectable UR policy config"`.
|