huawei-cloud-cloudrobo-inference-adapter
БесплатноЗапускает вложенные скриптыНе проверенGuides adapting a VLA model's inference server interface to the CloudRobo standard interface/protocol. Use this skill when the user wants to create a…
от huaweicloudskill120 установок в других каталогахОб этом скилле
Inference Interface Adapter
Overview
This skill guides converting a VLA model's inference interface into an inference server that uses a flattened linear format, adapting to the CloudRobo client library.
Core idea: the model's own inference interface format differs from the CloudRobo standard communication format. Instead of modifying the model's inference logic, add a thin adapter layer that converts between the flattened linear format and the model's internal format.
Fixed Protocol Contract
| Item | Convention |
|---|---|
| Transport | WSS (WebSocket over TLS) |
| Certificate | Self-signed certificate generated at runtime (cryptography lib, RSA 3072) |
| Serialization | msgpack (+ numpy extension) |
| Observation format | Flat dot-notation dict |
| Observation keys | observation.images.{key} (key derived from the model config, not hardcoded), observation.state (fixed field), task (fixed field) |
| Action response | {"action": (T, D) float32}, fixed field |
| Handshake | First frame after connect sends the metadata contract |
| Error | Send traceback.format_exc() string, close with INTERNAL_ERROR |
Observation request example:
{
"observation.state": np.ndarray, # (D,) float32
"observation.images.front": np.ndarray, # (H, W, 3) uint8
"observation.images.wrist_left": np.ndarray, # (H, W, 3) uint8
"task": str,
}
Action response example:
{
"action": np.ndarray, # (T, D) float32
"server_timing": {"infer_ms": ..., "prev_total_ms": ...},
}
Prerequisites
- The model's existing inference interface — a predict/infer method, model metadata (action_dim, state_dim, image_keys, action_chunk_size), and normalization access (how to get/set denormalization parameters).
- Training outputs (for the entry point) — the final weights from the
standard layout plus
dataset_statistics.json(required for action denormalization). - Python packages —
numpy,msgpack(serialization with the__ndarray__/__npgeneric__numpy extension),websockets(server + client), andcryptography(self-signed certificates).Pillowis optional (loading images from disk in the test client).
Built-in Scripts
This skill ships two reusable scripts in scripts/:
test_client.py— a generic WSS test client that auto-discovers the server's I/O contract from the handshake metadata. Supports random images or loading from disk, single/multiple inferences, and performance benchmarking. Used to end-to-end verify any adapter server. Runpython scripts/test_client.pyafter starting the server.verify_adapter.py— a unit-testing tool for the adapter layer. Tests only throughadapter.infer(obs)(no model API assumptions), covering observation conversion, image-key validation, state-dimension validation, and the metadata property — all without running a server or loading a model. Runpython scripts/verify_adapter.py --adapter /path/to/adapter.py --class-name MyAdapter.- If the adapter depends on a specific model API (e.g. GR00T's
get_action(observation)with nested observations), pass a model stub file (defining amake_model_stub()factory function) via--stub-module:python scripts/verify_adapter.py --adapter gr00t_adapter.py --class-name Gr00tProtocolAdapter --stub-module stub_gr00t.py
- If the adapter depends on a specific model API (e.g. GR00T's
4-Component Pattern
Every inference interface adaptation follows the same architecture. The model's inference logic stays untouched — all protocol-related logic lives in separate files you create.
┌───────────────────────────────────────────────────┐
│ 1. Entry point (CLI) │
│ - parse args, assemble components │
├───────────────────────────────────────────────────┤
│ 2. Transport server │
│ - WSS + msgpack, handshake, request loop, │
│ error handling │
├───────────────────────────────────────────────────┤
│ 3. Protocol adapter │
│ - convert observations: flat format -> model │
│ format │
│ - convert actions: model format -> flat format │
├───────────────────────────────────────────────────┤
│ 4. Model inference interface (existing, reused) │
│ - predict / get_action -> actions │
│ - metadata, normalization │
├───────────────────────────────────────────────────┤
│ 5. Model + weights (existing, untouched) │
└───────────────────────────────────────────────────┘
Layers 4-5 already exist in the codebase. You create layers 1-3.
Generality Layering (Reuse vs Customize)
The components differ greatly in generality — do not blindly copy templates:
| Component | Generality | Handling |
|---|---|---|
Transport server (server_template.py) |
* |
Установить huawei-cloud-cloudrobo-inference-adapter в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл huawei-cloud-cloudrobo-inference-adapter?
Guides adapting a VLA model's inference server interface to the CloudRobo standard interface/protocol. Use this skill when the user wants to create a compatible inference interface protocol for a model, or make a model compatible with the CloudRobo client library. Trigger conditions: "adapt inference interface", "inference service compatibility", "flattened interface", or any request to make a model server compatible with an external inference client library.
Как установить скилл huawei-cloud-cloudrobo-inference-adapter?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл huawei-cloud-cloudrobo-inference-adapter запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic