pipeline
HyperTools stage pipelines, model-spec grammar, and return-model reuse.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- pipeline
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- HyperTools stage pipelines, model-spec grammar, and return-model reuse.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/pipeline-reference.md7.8 KB
- 参考文档references/troubleshooting.md4.8 KB
- 参考文档references/workflows.md4.1 KB
- 脚本scripts/smoke_pipeline.py2.6 KB
03 SKILL.md 正文
HyperTools Pipeline
Use this sub-skill when the task is about the HyperTools analysis pipeline:
manip, normalize, reduce, align, cluster, apply_model, Pipeline,
or reusing a fitted result on held-out data.
Route here when the user wants
- A staged analysis chain with canonical ordering.
- A reusable fitted model returned by
return_model=True. - A
Pipelineobject or apipeline=reuse path. - Model-spec grammar help: strings, dicts, classes, instances, lists.
ndims/random_statebehavior for reduction or clustering.- Cluster labels, mixture proportions, or label recovery from a fitted chain.
Route elsewhere when the user wants
- Plot styling, rendering, backends, hues, trails, animation, or surfaces: use
../visualization/. - Text vectorizers, semantic models, or corpus choices: use
../text/. - Forecasting or dedicated imputation models: use
../forecasting/.- Only
impute=at format time is in scope here.
- Only
Read first
references/pipeline-reference.mdfor signatures, grammars, registries, canonical order, and reuse rules.references/workflows.mdfor fit-once / reuse recipes and common chains.references/troubleshooting.mdfor unknown-model,ndims, shape, and reuse failures.scripts/smoke_pipeline.pyfor a tiny CPU end-to-end smoke check.
Quick decision guide
- Need to apply one model family to stacked data?
- Use
apply_model.
- Use
- Need a stage-wise analysis chain in HyperTools order?
- Use
analyze,reduce,align,normalize,manip, orcluster.
- Use
- Need to reuse the exact fit on new data?
- Pass the fitted wrapper back as the model spec, or pass a fitted
Pipelinetoanalyze(..., pipeline=...).
- Pass the fitted wrapper back as the model spec, or pass a fitted
- Need to compose a named chain directly?
- Use
Pipeline(steps)or the dispatcher kwargs that return one.
- Use
Canonical order
HyperTools stages always follow the same order when dispatcher kwargs are used:
manip -> normalize -> reduce -> align -> cluster
A few important corollaries:
- Missing-data fill happens before these stages, during format time.
reducehappens beforealignin the canonical chain.clusterlabels the final geometry, soanalyze(..., cluster=...)returns transformed data, not labels.apply_modelis separate from the stage pipeline and does not includemanip,align, orimpute.
Return-model rule of thumb
- Single stage:
return_model=Trueyields that stage's fitted wrapper. - Multiple stages or cross-module kwargs:
return_model=Trueyields a fittedPipeline. - Reuse the fitted wrapper or
Pipelineon new data instead of refitting.
What to remember
- Model specs can be strings, dicts, classes, instances, or lists.
Pipelinestores already-resolved steps and replays them in order.Pipeline.transformreuses fitted steps; some non-transformable reducers or hard clusterers still have limits on held-out data.analyze(..., pipeline=...)is the replay path for a fitted chain.- When labels are needed, recover them from the fitted cluster step.
If the task starts drifting into visualization or text/forecasting details, hand it off to the sibling sub-skill and keep this one focused on stage dispatch, model grammar, and reuse.
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).