界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
数据与研究 · SKILL.md

sklearn-pipelines-and-operators

sklearn-pipelines-and-operators

【数据与研究】Decide supported sklearn operator, pipeline, data-layout, and tree-strategy conversion tasks.

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: sklearn-pipelines-and-operators description: "Decide supported sklearn operator, pipeline, data-layout, and tree-strategy conversion tasks." disable-model-invocation: true metadata: disco-role: operating license: MIT

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

Use this sub-skill for

  1. Checking whether every sklearn operator in a model or pipeline is in a supported family.
  2. Understanding parser-level composite wrappers such as Pipeline, ColumnTransformer, FeatureUnion, model-selection wrappers, multi-output wrappers, bagging, and stacking.
  3. Choosing the output method family to validate after conversion: transform, predict, predict_proba, decision_function, or score_samples.
  4. Keeping pandas, tuple/multiple-input, column-name, and string-feature layouts aligned between conversion and inference.
  5. Selecting and validating tree strategies: "gemm", "perf_tree_trav", or "tree_trav", plus "float32"/"float64" tree precision.

Operating path

  1. Identify the concrete fitted sklearn classes and any wrappers around them.
  2. Check operator coverage. If a wrapper is supported but a child operator is not, the whole pipeline is not convertible without changing that child.
  3. For Pipeline, ColumnTransformer, FeatureUnion, pandas, tuple inputs, or strings, use pipeline and data formats before writing conversion code.
  4. For tree models, decide whether to rely on Hummingbird's depth heuristic or set extra_config explicitly, then validate the selected inference method on representative data.
  5. 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.

我的收藏