AGENT SKILL

core-conversion

Convert already-trained scikit-learn-style models with Hummingbird convert and convert_batch, then validate CPU PyTorch prediction parity.

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

01 前言 Front Matter

name
core-conversion
license
MIT
metadata
{ "disco-role": "operating" }
description
Convert already-trained scikit-learn-style models with Hummingbird convert and convert_batch, then validate CPU PyTorch prediction parity.
disable-model-invocation
true

02 资源文件 4

03 SKILL.md 正文

Core conversion

Use this sub-skill when the task is to convert an already-trained scikit-learn-style estimator with hummingbird.ml.convert or hummingbird.ml.convert_batch, especially to the CPU PyTorch backend, and quickly verify that Hummingbird predictions match the source estimator.

Read when

  • The user asks to "convert sklearn model with Hummingbird", "use hummingbird.ml.convert", or "compile a trained sklearn estimator to PyTorch".
  • The user asks for fixed-batch or uneven-row inference with convert_batch.
  • The user needs quick prediction parity checks between the original estimator and the converted container.
  • The user sees conversion failures such as NotFittedError, MissingBackend, MissingConverter, or a backend requiring test_input.

Do not use as the only source for

  • Detailed scikit-learn operator and pipeline coverage; route to ../sklearn-pipelines-and-operators/SKILL.md.
  • ONNX output details, ONNX-ML source models, save/load, and container integrity workflows; route to ../onnx-and-model-io/SKILL.md.
  • LightGBM, XGBoost, SparkML, Prophet, and optional source-package dependency handling; route to ../optional-source-models/SKILL.md.
  • CUDA, TVM, TorchScript deployment tuning, threading, benchmarking, and deep performance work; route to ../advanced-backends-and-performance/SKILL.md.

Operating path

  1. Confirm the estimator is trained/fitted and belongs to a supported source family.
  2. Pick the smallest backend that satisfies the request: usually "torch"/"pytorch" for CPU parity work.
  3. Provide representative test_input when the backend needs tracing ("torch.jit", "torchscript", "onnx", TVM) or when using convert_batch.
  4. Convert with convert(...) for ordinary inference or convert_batch(...) for fixed batch-size/remainder workflows.
  5. Validate method-level parity (predict, predict_proba, transform, decision_function, or score_samples) on held-out or representative input before replacing the source estimator.

Bundled references and helper

  • Conversion workflows covers normal convert, fixed-batch convert_batch, parity checks, and representative examples.
  • API reference summarizes signatures, backend aliases, test_input, device, extra_config, and container behavior.
  • Troubleshooting maps common exceptions and parity failures to corrective actions and sibling sub-skills.
  • Synthetic conversion smoke runs a deterministic tiny scikit-learn conversion check with optional JSON output.

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