optimization-workflows
Run, control, and debug pymoo optimization workflows with algorithms, termination, callbacks, ask-and-tell loops, and result interpretation.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- optimization-workflows
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Run, control, and debug pymoo optimization workflows with algorithms, termination, callbacks, ask-and-tell loops, and result interpretation.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/algorithm-selection.md5.8 KB
- 参考文档references/api-reference.md6.9 KB
- 参考文档references/troubleshooting.md4.1 KB
- 参考文档references/workflows.md5.5 KB
- 脚本scripts/run_minimize_smoke.py1.9 KB
03 SKILL.md 正文
optimization-workflows
Use this sub-skill when a task asks how to run pymoo optimizers: choosing an
algorithm, calling minimize, setting termination, controlling stochastic
reproducibility, using callbacks or display/output hooks, stepping an algorithm
manually, adapting an ask-and-tell loop, interpreting Result, or diagnosing an
empty/infeasible optimization outcome.
Route first
- Define objective/constraint functions,
Problemoutput shapes, bounds, or built-in test problems withproblem-modeling. - Customize variables, sampling, crossover, mutation, repair, duplicate
elimination, or initialization with
operators-and-variables. - Speed up expensive evaluation, use starmap/joblib/dask/ray, or inspect compiled
extensions with
performance-and-parallelization. - Compute hypervolume, IGD/GD, MCDM decisions, convergence curves, reference
directions, or plots with
analysis-and-visualization. - Stay here for optimization execution control, algorithm portfolio routing,
termination decisions, callbacks/display/history, and
Resultfields.
Fast operating checklist
- Normalize the optimization contract: pymoo minimizes every objective.
Confirm the problem exposes
n_obj,n_ieq_constr/n_eq_constr, bounds, and finiteF/G/Hvalues before tuning algorithms. - Choose an algorithm by objective count and variable type: use single-
objective algorithms such as
GA,DE,PSO,CMAES, or local searches for one objective; useNSGA2,SPEA2,SMSEMOA,GDE3, or reference-direction algorithms such asNSGA3,UNSGA3,RVEA,MOEADfor multi/many-objective runs. - Start with functional
minimize: pass(problem, algorithm, termination)plusseedandverbose=False. Rememberminimizedeep-copies the algorithm by default; inspect the executed copy throughres.algorithm. - Select an explicit termination: use a tuple such as
("n_gen", 50),("n_evals", 5000),("time", "00:05:00"), or a termination object when defaults are too vague for verification. - Control stochasticity: pass
seed=...and avoid hidden random draws in objective code. Compare algorithms with the same problem, seed policy, and evaluation budget. - Use callbacks/history intentionally: callbacks are lightweight for
logging;
save_history=Truestores algorithm snapshots and can use substantial memory. - Interpret
Resultdefensively: checkres.X,res.F,res.G,res.CV,res.opt,res.algorithm.evaluator.n_eval,res.exec_time, and whether the best solution is feasible before reporting success.
Open the bundled references
- API reference: signatures and field contracts for
minimize, algorithms, termination, callbacks, display/output, andResult. - Algorithm selection: representative SOO, MOO, many-objective, dynamic, and preference-guided algorithm routes with import paths and fit signals.
- Workflows: functional
minimize, direct algorithm stepping, ask-and-tell, external evaluation, checkpoint/debug, and comparison patterns. - Troubleshooting: termination lookup failures, infeasible/empty results, stochastic drift, callback/history mistakes, and common API misuse.
Bundled script
- scripts/run_minimize_smoke.py: safe CPU-only quickstart smoke that runs a tiny NSGA-II/ZDT1 optimization and asserts the result shape and evaluation count.
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).