sklearn-pipelines-and-operators
Decide supported sklearn operator, pipeline, data-layout, and tree-strategy conversion tasks.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- sklearn-pipelines-and-operators
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Decide supported sklearn operator, pipeline, data-layout, and tree-strategy conversion tasks.
- disable-model-invocation
- true
02 资源文件 3
- 参考文档references/operator-coverage.md8.9 KB
- 参考文档references/pipeline-data-formats.md7.3 KB
- 参考文档references/troubleshooting.md8.5 KB
03 SKILL.md 正文
Sklearn pipelines and operators
Use this sub-skill when the task is to decide whether a scikit-learn estimator, transformer, or composite pipeline can be converted by Hummingbird, how to keep its input layout valid, or how to choose a tree conversion strategy.
Natural triggers include: supported sklearn operators, MissingConverter for a sklearn model, Pipeline, ColumnTransformer, FeatureUnion, pandas DataFrames, multiple inputs, OneHotEncoder strings, tree_implementation, tree_op_precision_dtype, and pipeline conversion parity.
Route first
- Basic
hummingbird.ml.convert(...)/convert_batch(...)call construction and ordinary CPU parity checks:../core-conversion/SKILL.md. - LightGBM, XGBoost, SparkML, Prophet, or optional source-package dependency questions:
../optional-source-models/SKILL.md. - TorchScript/ONNX/TVM/CUDA backend choice, threading, batching performance, and benchmark work:
../advanced-backends-and-performance/SKILL.md.
Use this sub-skill for
- Checking whether every sklearn operator in a model or pipeline is in a supported family.
- Understanding parser-level composite wrappers such as
Pipeline,ColumnTransformer,FeatureUnion, model-selection wrappers, multi-output wrappers, bagging, and stacking. - Choosing the output method family to validate after conversion:
transform,predict,predict_proba,decision_function, orscore_samples. - Keeping pandas, tuple/multiple-input, column-name, and string-feature layouts aligned between conversion and inference.
- Selecting and validating tree strategies:
"gemm","perf_tree_trav", or"tree_trav", plus"float32"/"float64"tree precision.
Operating path
- Identify the concrete fitted sklearn classes and any wrappers around them.
- Check operator coverage. If a wrapper is supported but a child operator is not, the whole pipeline is not convertible without changing that child.
- For
Pipeline,ColumnTransformer,FeatureUnion, pandas, tuple inputs, or strings, use pipeline and data formats before writing conversion code. - For tree models, decide whether to rely on Hummingbird's depth heuristic or set
extra_configexplicitly, then validate the selected inference method on representative data. - If conversion or parity fails, use troubleshooting and route backend-only issues to the sibling backend sub-skills.
Bundled references
- Operator coverage lists supported sklearn families, parser-level wrappers, output method families, and tree strategy knobs.
- Pipeline and data formats covers ColumnTransformer/FeatureUnion behavior, pandas and tuple inputs, names, and string handling.
- Troubleshooting maps common sklearn operator, pipeline, string, and tree-strategy failures to corrective actions.
No sub-skill-specific scripts are bundled for this area; use the references above and route generic conversion smokes to the core conversion sub-skill.
04 同仓库更多 Skills
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.
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.
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.
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.
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.
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).