AGENT SKILL

nni

Use NNI for AutoML experiments, hyperparameter tuning, neural architecture search, model compression, feature engineering, nnictl, and optional dependency troubleshooting.

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

01 前言 Front Matter

name
nni
license
MIT
metadata
{ "disco-role": "operating" }
description
Use NNI for AutoML experiments, hyperparameter tuning, neural architecture search, model compression, feature engineering, nnictl, and optional dependency troubleshooting.
disable-model-invocation
true

02 资源文件 4

03 SKILL.md 正文

NNI

Use this repo skill when the user asks about Microsoft NNI / Neural Network Intelligence: AutoML experiments, hyperparameter optimization, neural architecture search, model compression, feature engineering, nnictl, trial APIs, search spaces, training services, or NNI optional dependency failures.

Start Here

  1. Identify the user-facing workflow from the request: HPO experiment, NAS, compression, feature engineering/utilities, or install/runtime troubleshooting.
  2. Run scripts/check_nni_environment.py --format text when the user reports import, nnictl, package metadata, or optional dependency problems.
  3. Route to the focused sub-skill before writing detailed code or configs.
  4. Use bundled validators for static checks instead of running training, cloud services, notebooks, benchmarks, or downloads by default.
  5. Read references/repo-provenance.md before deciding whether this skill is current for a different NNI checkout.

Route By Task

User task or signal Use
nnictl, experiment YAML, ExperimentConfig, Experiment, trial code, search-space JSON, tuners, assessors, training services sub-skills/hpo-experiments/
ModelSpace, LayerChoice, InputChoice, NAS evaluator, NAS strategy, NasExperiment, fixed architecture export sub-skills/nas/
pruning, quantization, distillation, compression config_list, pruners, quantizers, evaluators, speedup/export sub-skills/model-compression/
GBDTSelector, FeatureGradientSelector, nni.trace, nni.dump, concrete tracing, graph/profiler/flop utilities sub-skills/feature-engineering-and-utilities/
import/install failures, package version, missing optional stacks, pkg_resources, broad NNI task classification this root skill plus references/troubleshooting.md

Quick Install And Import Checks

For normal users, start from a released package:

python -m pip install nni
python -c "import nni; print(nni.__version__)"
nnictl --help

For source-development workflows, NNI packaging can involve generated frontend assets in addition to Python modules. If editable installation from a checkout fails on missing node/frontend package material, either build the frontend according to the source-build docs or use the Python source tree for read-only API inspection while treating Web UI assets as unavailable.

Sub-skills

HPO Experiments

Read sub-skills/hpo-experiments/SKILL.md when the request mentions HPO, experiment configs, search spaces, nnictl, trial metric reporting, tuners, assessors, or training services.

Useful bundled entry points:

  • sub-skills/hpo-experiments/references/workflows.md for CLI and Python experiment recipes.
  • sub-skills/hpo-experiments/references/api-reference.md for trial, tuner, assessor, and search-space API facts.
  • sub-skills/hpo-experiments/references/cli-reference.md for nnictl command families.
  • sub-skills/hpo-experiments/scripts/validate_search_space.py for dependency-free JSON search-space validation.

NAS

Read sub-skills/nas/SKILL.md when the request mentions NAS model spaces, mutables, evaluators, strategies, model export/freeze, or torch / pytorch_lightning import failures while doing NAS.

Useful bundled entry points:

  • sub-skills/nas/references/workflows.md for model-space, evaluator, strategy, and fixed-architecture workflows.
  • sub-skills/nas/references/api-reference.md for key object names and optional dependency boundaries.
  • sub-skills/nas/scripts/check_nas_optional_deps.py for safe optional-stack diagnostics.

Model Compression

Read sub-skills/model-compression/SKILL.md when the request mentions NNI pruning, quantization, distillation, config_list, evaluator wrappers, speedup, or export.

Useful bundled entry points:

  • sub-skills/model-compression/references/workflows.md for pruning, quantization, distillation, evaluator, and speedup flows.
  • sub-skills/model-compression/references/api-reference.md for config-list and compression API contracts.
  • sub-skills/model-compression/scripts/validate_config_list.py for dependency-free JSON config-list validation.

Feature Engineering And Utilities

Read sub-skills/feature-engineering-and-utilities/SKILL.md when the request mentions feature selectors, trace serialization, concrete tracing, graph inspection, FLOP/profiler helpers, or utility import problems.

Useful bundled entry points:

  • sub-skills/feature-engineering-and-utilities/references/workflows.md for selector and utility recipes.
  • sub-skills/feature-engineering-and-utilities/references/api-reference.md for selected import paths and data expectations.
  • sub-skills/feature-engineering-and-utilities/scripts/check_optional_utilities.py for safe utility-stack diagnostics.

Cross-cutting Troubleshooting

Read references/troubleshooting.md when the request is about installation, package metadata, nnictl entry points, pkg_resources, missing optional dependencies, source-build frontend assets, version mismatch, or deciding which optional stack is required.

Use these defaults:

  • Do not install broad optional extras unless the user explicitly needs many optional algorithms; prefer the specific extra or package named by the failing workflow.
  • Do not run remote/cloud training services, notebooks, benchmarks, full NAS searches, compression training, or dataset downloads without explicit user approval.
  • Treat torch, pytorch_lightning, LightGBM, Transformers, DeepSpeed, TensorRT, ONNX, and cloud credentials as optional workflow dependencies, not base NNI requirements.
  • Prefer static validators and import diagnostics before suggesting expensive runtime execution.

Provenance And Refresh

Read references/repo-provenance.md if a user asks whether this skill matches a current NNI checkout. If the commit, package version, source roots, public entry points, documentation, examples, or tests have changed, refresh the repo skill before relying on detailed guidance.

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