AGENT SKILL

swarming

Author, lint, run, and debug NuPIC legacy swarming search definitions and turn swarm outputs into OPF model parameters.

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

01 前言 Front Matter

name
swarming
license
MIT
metadata
{ "disco-role": "operating" }
description
Author, lint, run, and debug NuPIC legacy swarming search definitions and turn swarm outputs into OPF model parameters.
disable-model-invocation
true

02 资源文件 4

03 SKILL.md 正文

NuPIC Legacy Swarming

Use this sub-skill when the task is to create or repair a NuPIC legacy swarm/search definition, explain run_swarm.py or permutations_runner behavior, run a small dry swarm, diagnose MySQL or worker failures, or use the generated best model from model_0/ in OPF.

NuPIC legacy swarming is a Python 2.7-era workflow. A full swarm expects a working NuPIC installation with nupic.bindings, legacy NumPy compatibility, pycapnp/Cap'n Proto support where required by the install, and a MySQL-compatible ClientJobs database for full hypersearch coordination. The bundled linter below is stdlib-only and can be run before those services are available.

Route requests

  • CSV headers, field metadata, streamDef data-source conventions, aggregation field names, and model-param schema details: read ../data-and-configuration/.
  • Running the generated best model, importing MODEL_PARAMS from model_0/model_params.py, or debugging OPF inference outputs: read ../opf-prediction/.
  • Package install/import failures, Python 2.7/bindings/capnp issues, and cross-cutting NuPIC database configuration context: read the root troubleshooting reference at ../../references/troubleshooting.md.
  • Direct encoder/SP/TM/classifier behavior that swarming selected automatically belongs to the relevant algorithm or OPF sub-skill, not here.

Use the bundled materials

  • references/swarming-workflows.md: read when authoring search_def.json, choosing run_swarm.py/permutations_runner options, interpreting generated files, or converting best swarm output into OPF parameters.
  • references/swarm-search-def-template.json: copy as a minimal JSON starting point for a one-step numeric prediction swarm; edit field names, file source, aggregation, and predicted field before running.
  • scripts/swarm_config_lint.py: run before any dry or full swarm to catch malformed JSON, missing keys, bad file:// sources, invalid swarmSize, and prediction field mismatches without importing NuPIC.
  • references/troubleshooting.md: read for MySQL credentials, NTA_CONF_PROP_* overrides, dryRun/run/report/pickup recovery, timeout/worker tuning, overwrite/report behavior, generated-output lookup, and customErrorMetric escaping.

Minimal operating loop

  1. Start from the bundled template or an existing search_def.json.

  2. Make the CSV and field metadata consistent first; route to ../data-and-configuration/ for NuPIC's three-row CSV headers and aggregation semantics.

  3. Lint safely:

    python scripts/swarm_config_lint.py path/to/search_def.json --check-files
    
  4. For syntax/debugging, prefer a tiny swarmSize: "small", bounded iterationCount, and --action=dryRun --maxPermutations=1 --maxWorkers=1. Treat a full --action=run as service-dependent because it coordinates workers through MySQL.

  5. After a successful run, use model_0/model_params.py or model_0/description.py as the best model artifact; route OPF execution to ../opf-prediction/.

Evidence provenance

This sub-skill distills NuPIC legacy swarming behavior from the public docs and source paths docs/source/guides/swarming/running.md, docs/source/guides/swarming/algorithm.md, examples/swarm/simple/search_def.json, src/nupic/swarming/, src/nupic/swarming/exp_generator/experimentDescriptionSchema.json, scripts/run_swarm.py, and tests/swarming/. These paths are provenance only; this runtime skill is self-contained and does not require future agents to reopen them.

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