AGENT SKILL

automl-deployment-export

Use optional GluonCV AutoGluon wrappers and MXNet/Torch deployment export utilities safely.

License 许可
Apache-2.0
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
automl-deployment-export
license
Apache 2.0
metadata
{ "package": "gluoncv", "disco-role": "operating", "parent-skill": "gluon-cv" }
description
Use optional GluonCV AutoGluon wrappers and MXNet/Torch deployment export utilities safely.
disable-model-invocation
true

02 资源文件 3

03 SKILL.md 正文

GluonCV AutoML and deployment export

Use this sub-skill when a task mentions gluoncv.auto, AutoGluon, ImageClassification, ImagePrediction, ObjectDetection, LiteConfig, DefaultConfig, fit, fit_summary, fit_history, load, exporting a pretrained model, MXNet symbol.json/.params deployment files, ONNX, TVM, DirectPose export, quantized/int8 inference, or errors about missing autogluon, timm, onnx, tvm, pycocotools, pretrained weights, or model cache.

This sub-skill is for optional surfaces. A base gluoncv import does not prove that gluoncv.auto, AutoGluon training, ONNX export, TVM export, or quantized deployment stacks are installed.

Natural triggers

Load this sub-skill for requests involving:

  • from gluoncv.auto.tasks import ImageClassification, ImagePrediction, ObjectDetection.
  • AutoGluon HPO/search spaces, autogluon.core, ag.Categorical, ag.Int, ag.Real, old AutoGluon dependency pins, or AutoGluon deprecation warnings.
  • Image-classification or object-detection AutoML task methods: fit, fit_summary, fit_history, save, and task-class load.
  • Auto task datasets through Task.Dataset, including classification folders/CSV and object-detection VOC/COCO records.
  • Exporting MXNet model-zoo networks with gluoncv.utils.export_block, the export-pretrained helper pattern, or C++ deployment JSON/params files.
  • ONNX Runtime inference, MXNet-to-ONNX conversion, TVM export, DirectPose TVM mode, or TorchScript-to-TVM conversion.
  • --quantized, --deploy, --model-prefix, int8, calibration, MXNet-MKL, VNNI, or CPU deployment acceleration.

Route away

  • General training/evaluation/demo script command construction: use ../training-evaluation-scripts/.
  • MXNet model-name families, get_model kwargs, dry model instantiation, custom heads, and model cache basics: use ../mxnet-model-zoo/.
  • Dataset layout and annotation validation before AutoML training: use ../data-transforms-datasets/.
  • PyTorch action-recognition, DirectPose model/config usage outside export packaging: use ../torch-video-workflows/.

First workflow choice

  1. Classify the request as AutoML or deployment. AutoML tasks train or load AutoGluon-backed estimators; deployment workflows export or consume pretrained/static artifacts.

  2. Check optional dependencies before code changes. gluoncv.auto needs the legacy AutoGluon stack. Torch-backed image classification also needs torch plus timm. ONNX, TVM, pycocotools, MXNet-MKL, and GPU packages are optional workflow-specific stacks.

  3. For AutoML, choose the task wrapper and config. Use ImageClassification/ImagePrediction for image folders or CSVs and ObjectDetection for VOC/COCO-like data. Start with conservative config values; CPU/no-GPU runs fall back to LiteConfig and are often too slow for non-tiny datasets.

  4. For export, validate model names without exporting first. Run the bundled helper; it checks the MXNet model registry and prints export prerequisites without downloading weights or writing model files:

    python scripts/export_name_check.py --model resnet18_v1
    
  5. Only perform real export when side effects are allowed. Exporting a pretrained model usually downloads weights if absent and writes *-symbol.json plus *-0000.params. ONNX/TVM exports add their own heavy dependencies and generated artifacts.

  6. Keep deployment format and input preprocessing explicit. The default MXNet export preprocess expects raw RGB HWC input and embeds mean/std normalization. Disabling preprocess changes layout expectations to CHW/CTHW and may require an explicit data_shape.

Core facts to preserve

  • gluoncv.auto.tasks is a legacy optional AutoGluon surface and warns that auto was planned for deprecation in favor of AutoGluon Vision.
  • The package's auto extra pins autogluon.core==0.3.1; modern Python environments may not resolve this old stack.
  • ImageClassification dispatches model names to timm/Torch first when torch and timm are installed, then falls back to MXNet GluonCV model names when MXNet is installed.
  • If no GPU is detected or allowed, the AutoML task constructors use conservative LiteConfig defaults with zero GPUs. They cap requested GPUs to the detected count and warn when a config asks for more GPUs than available.
  • fit(...) returns an estimator object; use task.fit_summary() and task.fit_history() for HPO summaries, then estimator.save(...) and TaskClass.load(...) or estimator-class load(...) for persistence.
  • MXNet deployment export uses gluoncv.utils.export_block(path, block, ...). The simple pretrained export pattern is get_model(name, pretrained=True) followed by export_block(name, net, preprocess=True, layout='HWC').
  • ONNX export is a second stage after MXNet symbol/params export and depends on MXNet ONNX support plus ONNX Runtime for inference checks.
  • TVM export is optional. MXNet TVM export uses gluoncv.utils.export_tvm; Torch DirectPose TVM export uses TorchScript tracing, TVM Relay, and a custom NMS converter.
  • Quantized/int8 inference is an MXNet deployment variant, not a universal model flag. It requires compatible MXNet/MKL or quantization support and suitable model candidates.

References and helper

  • AutoML and export reference — task APIs, config/resource behavior, dependency gates, export recipes, ONNX/TVM/int8 notes.
  • AutoML/export troubleshooting — missing optional dependencies, legacy Python conflicts, GPU fallback, export/cache, ONNX/TVM, and quantization failures.
  • MXNet export name checker — safe argparse helper for model-name validation and export-prerequisite reporting; performs no download/export by default.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-triton-opt

Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-solve

END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-skill

PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-pattern-fusion

Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-orchestrate

Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-feedback

Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).

★ 351