AGENT SKILL

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

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, Problem output shapes, bounds, or built-in test problems with problem-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 Result fields.

Fast operating checklist

  1. Normalize the optimization contract: pymoo minimizes every objective. Confirm the problem exposes n_obj, n_ieq_constr/n_eq_constr, bounds, and finite F/G/H values before tuning algorithms.
  2. 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; use NSGA2, SPEA2, SMSEMOA, GDE3, or reference-direction algorithms such as NSGA3, UNSGA3, RVEA, MOEAD for multi/many-objective runs.
  3. Start with functional minimize: pass (problem, algorithm, termination) plus seed and verbose=False. Remember minimize deep-copies the algorithm by default; inspect the executed copy through res.algorithm.
  4. 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.
  5. Control stochasticity: pass seed=... and avoid hidden random draws in objective code. Compare algorithms with the same problem, seed policy, and evaluation budget.
  6. Use callbacks/history intentionally: callbacks are lightweight for logging; save_history=True stores algorithm snapshots and can use substantial memory.
  7. Interpret Result defensively: check res.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, and Result.
  • 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

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