Spaces:
Sleeping
Sleeping
Commit ·
7f618bf
1
Parent(s): df613f6
docs: explain selectable UR policy config
Browse files- README.md +13 -3
- tests/test_gpu_smoke.py +2 -2
- tests/test_space_config.py +2 -0
README.md
CHANGED
|
@@ -12,9 +12,19 @@ pinned: false
|
|
| 12 |
|
| 13 |
# π₀.₅ UR Action Predictor
|
| 14 |
|
| 15 |
-
This Hugging Face Space deploys the
|
| 16 |
-
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
## Model repository
|
| 20 |
|
|
|
|
| 12 |
|
| 13 |
# π₀.₅ UR Action Predictor
|
| 14 |
|
| 15 |
+
This Hugging Face Space deploys a π₀.₅ policy trained on the local UR LeRobot
|
| 16 |
+
dataset. It predicts an action chunk for inspection or download; it never
|
| 17 |
+
connects to or commands a robot.
|
| 18 |
+
|
| 19 |
+
The `Policy config` selector supports:
|
| 20 |
+
|
| 21 |
+
- `pi05_ur_demo_no_state` (default): no discrete robot-state conditioning;
|
| 22 |
+
- `pi05_ur_demo_state`: uses the seven current-state values as discrete state
|
| 23 |
+
conditioning.
|
| 24 |
+
|
| 25 |
+
The seven state controls remain visible in both modes so configurations can be
|
| 26 |
+
switched without rebuilding the page. The repository name does not select the
|
| 27 |
+
configuration automatically, and changing the selection reloads the policy.
|
| 28 |
|
| 29 |
## Model repository
|
| 30 |
|
tests/test_gpu_smoke.py
CHANGED
|
@@ -13,11 +13,11 @@ class GPUCheckpointSmokeTest(unittest.TestCase):
|
|
| 13 |
|
| 14 |
from artifacts import resolve_checkpoint_path, resolve_model_id
|
| 15 |
from inference import run_prediction
|
| 16 |
-
from model_loader import MODEL_MANAGER
|
| 17 |
|
| 18 |
model_id = resolve_model_id()
|
| 19 |
checkpoint = resolve_checkpoint_path()
|
| 20 |
-
policy = MODEL_MANAGER.get(model_id, checkpoint)
|
| 21 |
image = Image.fromarray(np.zeros((224, 224, 3), dtype=np.uint8))
|
| 22 |
result = run_prediction(
|
| 23 |
policy,
|
|
|
|
| 13 |
|
| 14 |
from artifacts import resolve_checkpoint_path, resolve_model_id
|
| 15 |
from inference import run_prediction
|
| 16 |
+
from model_loader import DEFAULT_POLICY_CONFIG, MODEL_MANAGER
|
| 17 |
|
| 18 |
model_id = resolve_model_id()
|
| 19 |
checkpoint = resolve_checkpoint_path()
|
| 20 |
+
policy = MODEL_MANAGER.get(model_id, checkpoint, DEFAULT_POLICY_CONFIG)
|
| 21 |
image = Image.fromarray(np.zeros((224, 224, 3), dtype=np.uint8))
|
| 22 |
result = run_prediction(
|
| 23 |
policy,
|
tests/test_space_config.py
CHANGED
|
@@ -18,6 +18,8 @@ def test_space_metadata_and_runtime_files():
|
|
| 18 |
assert "tqdm-loggable>=0.2" in requirements
|
| 19 |
assert (ROOT / "openpi_runtime/openpi/policies/ur_policy.py").is_file()
|
| 20 |
assert (ROOT / "openpi_runtime/openpi_client/base_policy.py").is_file()
|
|
|
|
|
|
|
| 21 |
|
| 22 |
|
| 23 |
def test_vendored_config_contains_state_conditioned_ur_policy():
|
|
|
|
| 18 |
assert "tqdm-loggable>=0.2" in requirements
|
| 19 |
assert (ROOT / "openpi_runtime/openpi/policies/ur_policy.py").is_file()
|
| 20 |
assert (ROOT / "openpi_runtime/openpi_client/base_policy.py").is_file()
|
| 21 |
+
assert "`pi05_ur_demo_no_state` (default)" in readme
|
| 22 |
+
assert "`pi05_ur_demo_state`" in readme
|
| 23 |
|
| 24 |
|
| 25 |
def test_vendored_config_contains_state_conditioned_ur_policy():
|