Download scripts/verify_release.sh from Dengliming/StreamPIReal6_3w: direct link, hf CLI and curl.
- Browser
- Download file 2.26 kB
-
https://huggingface.co/Dengliming/StreamPIReal6_3w/resolve/main/scripts/verify_release.sh
- Command line
-
hf download hf://Dengliming/StreamPIReal6_3w/scripts/verify_release.sh
-
curl -L -o verify_release.sh https://huggingface.co/Dengliming/StreamPIReal6_3w/resolve/main/scripts/verify_release.sh
2.26 kB
| set -Eeuo pipefail | |
| ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" | |
| if [ -n "${OPENPI_PYTHON:-}" ]; then | |
| PY="$OPENPI_PYTHON" | |
| elif [ -x "$ROOT/.venv/bin/python" ]; then | |
| PY="$ROOT/.venv/bin/python" | |
| else | |
| PY="$(command -v python3 || true)" | |
| fi | |
| if [ -z "$PY" ] || [ ! -x "$PY" ]; then | |
| echo "ERROR: no usable Python interpreter found" | |
| exit 1 | |
| fi | |
| export PYTHONDONTWRITEBYTECODE=1 | |
| export PYTHONPATH="$ROOT:$ROOT/src:$ROOT/packages/openpi-client/src" | |
| export OPENPI_REAL_PIPER_X_ASSETS="$ROOT/checkpoints/29999/assets" | |
| echo "Repository: $ROOT" | |
| echo "Python: $PY" | |
| "$PY" "$ROOT/deployment/verify_checkpoint.py" | |
| "$PY" - "$ROOT" <<'PY' | |
| from pathlib import Path | |
| import inspect | |
| import json | |
| import sys | |
| root = Path(sys.argv[1]) | |
| manifest = json.loads( | |
| (root / "metadata" / "release_manifest.json").read_text( | |
| encoding="utf-8" | |
| ) | |
| ) | |
| from openpi.training import config as train_config | |
| from deployment import piperx_client | |
| from deployment import serve_piperx | |
| config_name = "pi05_stream3_piper_x_real_6tasks" | |
| config = train_config.get_config(config_name) | |
| assert config.model.hist_horizon == 3 | |
| assert config.model.action_horizon == 10 | |
| assert config.data.repo_id == "real_piper_x_6tasks" | |
| assert config.data.use_delta_joint_actions is True | |
| assert config.data.base_config.hist_interval == 5 | |
| source = inspect.getsource(type(config.data).create) | |
| assert "DeltaActions" in source | |
| assert "AbsoluteActions" in source | |
| assert "make_bool_mask(6, -1, 6, -1)" in source | |
| model = manifest["model"] | |
| assert serve_piperx.CONFIG_NAME == config_name | |
| assert serve_piperx.HISTORY_HORIZON == model["history_horizon"] | |
| assert serve_piperx.ACTION_HORIZON == model["action_horizon"] | |
| assert serve_piperx.EXECUTE_STEPS == model["execute_steps"] | |
| assert serve_piperx.STATE_DIM == model["state_dim"] | |
| assert serve_piperx.ACTION_DIM == model["action_dim"] | |
| assert piperx_client.HISTORY_HORIZON == model["history_horizon"] | |
| assert piperx_client.ACTION_HORIZON == model["action_horizon"] | |
| assert piperx_client.EXECUTE_STEPS == model["execute_steps"] | |
| assert list(piperx_client.CAMERA_NAMES) == model["cameras"] | |
| print("CONFIG_REGISTRATION_OK") | |
| print("DELTA_TO_ABSOLUTE_TRANSFORM_OK") | |
| print("SERVER_CLIENT_PROTOCOL_OK") | |
| print("RELEASE_VERIFY_OK") | |
| PY | |