physicalai-runtime-loading-exported-policies
About physicalai-runtime-loading-exported-policies
A development skill for loading exported policies in physicalai Runtime. It covers local export directories and Hub snapshots, backend selection, artifact validation, and smoke inference.
Key features
- 01Load local Studio exports
- 02Load Hub snapshots
- 03Detect or select inference backends
- 04Validate manifests and artifacts
- 05Run a smoke inference
Use cases
- 01Loading a locally exported policy
- 02Testing a policy downloaded from Hub
- 03Checking backend and manifest compatibility
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ openvinotoolkit/ physicalai --skill physicalai-runtime-loading-exported-policiesAfter installing, type/physicalai-runtime-loading-exported-policiesin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
references/export-load-contract.mdonnx.mdopenvino.mdDetails
From the project READMELoading Exported Policies
Runtime loads Studio export directories (or Hub snapshots that mirror them) through InferenceModel in src/physicalai/inference/model.py. Manifest parsing lives in src/physicalai/inference/manifest.py; backends register in src/physicalai/inference/adapters/registry.py (onnx → .onnx, openvino → .xml). Hub downloads use src/physicalai/inference/utils/_hub.py.
Workflow
-
Identify the artifact: local export directory or Hub
repo_id, expected backend, and whether the user needsselect_actionvspredict_action_chunk.- Done when: load path and API entry point are chosen before editing code.
-
Load with auto-detection first (local):
from physicalai.inference import InferenceModel model = InferenceModel("./exports/act_policy")- Done when:
modelconstructs without explicitbackend=when artifacts match a registered extension.
- Done when:
-
Hub load when the package is published:
model = InferenceModel.from_pretrained("OpenVINO/act-fp16-ov", revision="<commit-sha>")- Done when: revision is pinned for reproducibility when security or CI matters.
-
Explicit backend only when auto-detection is ambiguous:
model = InferenceModel("./exports/act_policy", backend="openvino", device="CPU") -
Validate structure against
references/export-load-contract.mdand backend notes (references/onnx.md,references/openvino.md).- Done when: manifest, model file, and processor artifacts resolve under the export directory.
-
Smoke inference without owning robot timing:
model.reset() action = model.select_action(observation)- Done when: one forward pass succeeds on representative observation keys/shapes. For hardware loops, hand off to
physicalai-runtime-running-policy-on-robot.
- Done when: one forward pass succeeds on representative observation keys/shapes. For hardware loops, hand off to
Validation loop
uv run pytest tests/unit/inference/test_model.py tests/unit/inference/test_manifest.py -q
For adapter changes, add or run targeted tests under tests/unit/inference/.
Required checks
- Export directory contains backend model file(s) and
manifest.jsonconsistent withdocs/reference/manifest-schema.md. - Metadata input/output/feature names align with preprocessors in the manifest.
- Optional backends fail with clear install guidance (
onnxruntime, OpenVINO). - Do not document a backend unless an adapter is registered in
src/physicalai/inference/adapters/. - Hub loads must not log tokens; prefer pinned
revision=for production docs.
References
references/export-load-contract.md— consumer-side contract (coordinate with Studio export skill).references/onnx.md,references/openvino.md— adapter constraints.