physicalai-runtime-loading-exported-policies

Loads and validates policies exported from Physical AI Studio for Runtime deployment. Use when working on InferenceModel, InferenceModel.from_pretrained, manifest.json, adapter auto-detection (onnx, openvino), backend/device kwargs, Hugging Face Hub policy packages, or the Runtime side of the export/load contract that Studio produces with physicalai export.

openvinotoolkit/physicalai80 installsApache-2.0Synced Aug 26

Works with

Claude CodeCursorCodex CLIGitHub CopilotGemini CLI
---
name: physicalai-runtime-loading-exported-policies
description: Loads and validates policies exported from Physical AI Studio for Runtime deployment. Use when working on InferenceModel, InferenceModel.from_pretrained, manifest.json, adapter auto-detection (onnx, openvino), backend/device kwargs, Hugging Face Hub policy packages, or the Runtime side of the export/load contract that Studio produces with physicalai export.
license: Apache-2.0
---

# Loading 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

1. **Identify the artifact**: local export directory or Hub `repo_id`, expected backend, and whether the user needs `select_action` vs `predict_action_chunk`.
   - Done when: load path and API entry point are chosen before editing code.
2. **Load with auto-detection first** (local):

   ```python
   from physicalai.inference import InferenceModel
   model = InferenceModel("./exports/act_policy")
   ```

   - Done when: `model` constructs without explicit `backend=` when artifacts match a registered extension.

3. **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.

4. **Explicit backend** only when auto-detection is ambiguous:

   ```python
   model = InferenceModel("./exports/act_policy", backend="openvino", device="CPU")
   ```

5. **Validate structure** against `references/export-load-contract.md` and backend notes (`references/onnx.md`, `references/openvino.md`).
   - Done when: manifest, model file, and processor artifacts resolve under the export directory.
6. **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 `physicalai-runtime-running-policy-on-robot`.

## Validation loop

```bash
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.json` consistent with `docs/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.

More Deployment & CI/CD skills

azure-enterprise-infra-planner

microsoft/azure-skills

Architect and provision enterprise Azure infrastructure from workload descriptions. For cloud architects and platform engineers planning networking, identity, security, compliance, and multi-resource topologies with WAF alignment. Generates Bicep or Terraform directly (no azd). WHEN: 'plan Azure infrastructure', 'architect Azure landing zone', 'design hub-spoke network', 'plan multi-region DR topology', 'set up VNets firewalls and private endpoints', 'subscription-scope Bicep deployment', 'Azure Backup for VM workloads'. PREFER azure-prepare FOR app-centric workflows.

387.5k

azure-kubernetes-app-deploy

microsoft/azure-skills

Use when deploying an existing web application or API to an already-running Azure Kubernetes Service cluster. Detects the framework, generates a Dockerfile and Kubernetes manifests, validates against AKS Deployment Safeguards, and deploys with verification. WHEN: deploy app to AKS, deploy to existing AKS cluster, containerize app for Kubernetes, generate K8s manifests for Azure, set up CI/CD for AKS, my AKS deployment is failing safeguard checks, I have a Django/Express/Spring Boot app to run on AKS. DO NOT USE FOR: creating or provisioning an AKS cluster (use azure-kubernetes), assessing migration to AKS Automatic (use azure-kubernetes-automatic-readiness), or deploying to non-AKS targets like Web Apps, Container Apps, or Functions.

380.4k

finetuning

microsoft/azure-skills

Fine-tune models on Microsoft Foundry using SFT (supervised), DPO (preference), or RFT (reinforcement with graders). Covers dataset preparation, training job submission, deployment, and evaluation. USE FOR: fine-tune, SFT, DPO, RFT, training data, grader, distillation, fine-tuned model, training job, large file upload, calibrate grader, deploy fine-tuned model, evaluate fine-tuned model. DO NOT USE FOR: general model deployment without fine-tuning (use deploy-model), agent creation (use agents), prompt optimization without training (use prompt-optimizer).

323.2k

← All Deployment & CI/CD skills

Check your AI visibility

One URL in, a 0–100 score and the exact fixes out.

RUN THE CHECK

Browse all the tools

15 tools across six categories
13 of them never send your data anywhere

Free · No signup · No trial clock

SEE THE DIRECTORY