Deployment and inference

From VectorSpaceLab/AREX-Skill · View interactive version

Deployment and inference is an AI agent skill from the GitHub repository VectorSpaceLab/AREX-Skill. Export trained anomalib models and run runtime inference with Engine.predict, export helpers, TorchInferencer, and OpenVINOInferencer.

How to use this skill

Skill file

Deployment and Inference

Use this skill when a trained anomalib model must be turned into a runtime artifact or run at inference time. It covers the path from checkpoint or trained model to export, runtime loading, and prediction.

What this skill covers

What this skill excludes

Quick chooser

| Need | Use | Notes |

| --- | --- | --- |

| Predict from a trained model inside Lightning | Engine.predict(...) | Best default when you already have an AnomalibModule. |

| Export to Torch / ONNX / OpenVINO | Engine.export(...) or ExportMixin | INT8_PTQ and INT8_ACQ need a datamodule. |

| Load a trusted Torch checkpoint directly | TorchInferencer | Legacy, pickle-based, and gated by TRUST_REMOTE_CODE. |

| Load an OpenVINO or ONNX deployment artifact | OpenVINOInferencer | Default device is AUTO; config is optional. |

Primary workflow

  1. Start from a trained AnomalibModule or a trusted exported checkpoint.
  2. Decide whether you need:
  1. Pick the export format:
  1. For ONNX dynamo export, onnxscript must be installed. For OpenVINO INT8 export, nncf must be installed.
  2. For OpenVINO quantization:
  1. Treat Torch checkpoints as trusted code only. If the source is not trusted, do not bypass the gate; prefer ONNX or OpenVINO instead.
  2. Use the bundled scripts for tiny deterministic smoke runs.

Bundled references

Bundled scripts

Notes for future agents

Minimal success checks

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.