AGENT SKILL

hpo-and-mutation

Use AgileRL evolutionary HPO, tournament selection, mutation probabilities, mutable hyperparameters, and population evolution safely.

License 许可
Apache-2.0
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
hpo-and-mutation
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
Use AgileRL evolutionary HPO, tournament selection, mutation probabilities, mutable hyperparameters, and population evolution safely.
disable-model-invocation
true

02 资源文件 4

03 SKILL.md 正文

AgileRL HPO And Mutation

Use this sub-skill when the task is about AgileRL evolutionary hyperparameter optimization (HPO), TournamentSelection, Mutations, HyperparameterConfig, RLParameter, mutation probabilities, architecture mutation behavior, or diagnosing why a population did or did not mutate.

Read First

  • references/hpo-workflows.md for the standard tournament + mutation loop.
  • references/api-reference.md for key HPO classes and parameters.
  • references/troubleshooting.md for invalid mutable attributes, probability, and architecture mutation failures.
  • scripts/inspect_hpo_setup.py --help for a safe config-only HPO probe.

Boundaries

  • Training-loop placement belongs in ../training-workflows/SKILL.md, ../multi-agent-and-wrappers/SKILL.md, ../offline-bandits-data/SKILL.md, or ../llm-fine-tuning/SKILL.md depending on the workflow.
  • Architecture object construction belongs in ../evolvable-modules/SKILL.md.
  • This sub-skill owns which hyperparameters are mutable, how mutation probabilities are selected, how tournament selection preserves elites, and why mutation may be a no-op.

Standard HPO Flow

  1. Create a population of AgileRL agents.
  2. Evaluate population fitness.
  3. Select elites and the next generation with TournamentSelection.
  4. Mutate offspring with Mutations.
  5. Continue training with the evolved population.
from agilerl.hpo.tournament import TournamentSelection
from agilerl.hpo.mutation import Mutations
from agilerl.algorithms.core.registry import HyperparameterConfig, RLParameter

hp_config = HyperparameterConfig(
    lr=RLParameter(min=1e-4, max=1e-2),
    batch_size=RLParameter(min=32, max=256),
    learn_step=RLParameter(min=1, max=10, grow_factor=1.5, shrink_factor=0.75),
)

tournament = TournamentSelection(tournament_size=2, elitism=True, population_size=6, eval_loop=1)
mutations = Mutations(
    no_mutation=0.4,
    architecture=0.2,
    new_layer_prob=0.2,
    parameters=0.2,
    activation=0.0,
    rl_hp=0.2,
    mutation_sd=0.1,
    rand_seed=1,
    device="cpu",
)

Decision Points

  • Set activation=0 when activation mutations are unsupported or not desired.
  • Use HyperparameterConfig fields that exactly match algorithm attributes.
  • Keep population_size, POP_SIZE, and tournament population size aligned.
  • Use deterministic seeds when comparing HPO behavior.
  • For LLM algorithms, do not assume architecture mutations are supported.

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