AGENT SKILL

hpo-experiments

Use NNI HPO experiments, nnictl, ExperimentConfig, trial metric APIs, search spaces, tuners, assessors, and training-service config triage.

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

01 前言 Front Matter

name
hpo-experiments
license
MIT
metadata
{ "disco-role": "operating" }
description
Use NNI HPO experiments, nnictl, ExperimentConfig, trial metric APIs, search spaces, tuners, assessors, and training-service config triage.
disable-model-invocation
true

02 资源文件 5

03 SKILL.md 正文

HPO Experiments

Use this sub-skill when the user is creating, running, debugging, or migrating an NNI hyperparameter-optimization experiment.

Route Here For

  • Creating an NNI local experiment from a YAML config, search-space JSON, and trial script.
  • Converting between nnictl create --config ... workflows and the Python Experiment / ExperimentConfig API.
  • Writing trial code that calls nni.get_next_parameter(), nni.report_intermediate_result(), and nni.report_final_result() correctly.
  • Fixing search-space JSON, tuner/assessor classArgs, custom tuner class paths, and local/remote/cloud training-service config problems.
  • Inspecting experiments, trials, logs, exported/imported trial data, and registered algorithms with nnictl.

Route Elsewhere

  • NAS model spaces, evaluators, strategies, and neural architecture search prompts belong in ../nas/.
  • Compression config_list, pruners, quantizers, speedup, and compression evaluators belong in ../model-compression/.
  • Feature-selection utilities and non-HPO helper APIs belong in ../feature-engineering-and-utilities/.

Start With These

  • references/workflows.md: end-to-end local config, Python launch, custom tuner/assessor, and training-service triage recipes.
  • references/api-reference.md: trial APIs, ExperimentConfig, tuner/assessor base APIs, built-in algorithm names, and search-space type rules.
  • references/cli-reference.md: nnictl command families, safe help/config/log commands, and operational cautions.
  • references/troubleshooting.md: common failures for YAML/JSON, search spaces, metrics, pkg_resources, optional extras, ports, credentials, and remote/cloud services.
  • scripts/validate_search_space.py: standalone JSON search-space validator for common built-in NNI HPO search-space types.

Default Playbook

  1. Identify the route: CLI YAML config (nnictl) or Python API (Experiment). Prefer CLI YAML for reproducible user projects; use Python API when the user wants programmatic construction.
  2. Validate the search space before diagnosing tuners: run python scripts/validate_search_space.py search_space.json from this skill directory or copy the script command into the user project with the correct path.
  3. Check the config contract: exactly one of searchSpaceFile or searchSpace, a valid trialCommand, a reachable trialCodeDirectory, tuner.name or custom tuner class fields, and a trainingService.platform.
  4. Check trial code: call nni.get_next_parameter() once, merge parameters into defaults, report intermediate metrics only after parameters are received, and report one final numeric metric or a dict with numeric default.
  5. For remote/cloud services, verify credentials, network reachability, Python/NNI version consistency, file-size limits, and secret handling before suggesting a launch.

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