Skill v1.0.0
currentLLM-judged scan90/100version: "1.0.0" name: pai-load-policy description: Loads and validates policies exported from Physical AI Studio for Runtime deployment. Use when calling InferenceModel or from_pretrained on a local export or Hub snapshot, checking manifest.json, selecting an ONNX/OpenVINO backend or device, or smoke-testing an action. DO NOT USE FOR implementing an inference adapter in Runtime source. license: Apache-2.0
Loading Exported Policies
Runtime loads Studio export directories (or Hub snapshots that mirror them) through InferenceModel. It reads manifest.json, auto-detects registered ONNX/OpenVINO adapters from model files, and supports Hub revisions. See the inference API and manifest schema.
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):
``python from physicalai.inference import InferenceModel model = InferenceModel("./exports/act_policy") ``
- Done when:
modelconstructs without explicitbackend=when artifacts match a registered extension.
- Hub load when the package is published:
``python 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:
``python model = InferenceModel("./exports/act_policy", backend="openvino", device="CPU") ``
- Validate structure against the manifest schema and 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:
``python model.reset() action = model.select_action(observation) ``
- Done when: one forward pass succeeds on representative observation keys/shapes. For hardware loops, hand off to
pai-run-policy.
Validation loop
Construct InferenceModel from the export and run one representative fake observation without hardware. If a backend cannot be loaded, check its installed optional dependency and the documented adapter support.
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 claim support for an adapter absent from the installed Runtime package.
- Hub loads must not log tokens; prefer pinned
revision=for production docs.
References
- Manifest schema — canonical export/load contract.
references/onnx.md,references/openvino.md— adapter constraints.