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
- 参考文档references/api-reference.md8.4 KB
- 参考文档references/cli-reference.md5.3 KB
- 参考文档references/troubleshooting.md8.5 KB
- 参考文档references/workflows.md8.3 KB
- 脚本scripts/validate_search_space.py9.3 KB
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 PythonExperiment/ExperimentConfigAPI. - Writing trial code that calls
nni.get_next_parameter(),nni.report_intermediate_result(), andnni.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:nnictlcommand 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
- 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. - Validate the search space before diagnosing tuners: run
python scripts/validate_search_space.py search_space.jsonfrom this skill directory or copy the script command into the user project with the correct path. - Check the config contract: exactly one of
searchSpaceFileorsearchSpace, a validtrialCommand, a reachabletrialCodeDirectory,tuner.nameor custom tuner class fields, and atrainingService.platform. - 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 numericdefault. - For remote/cloud services, verify credentials, network reachability, Python/NNI version consistency, file-size limits, and secret handling before suggesting a launch.
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).