AGENT SKILL

training-testing

Plan and validate MMDetection 3.3.0 training, resume, testing, evaluation, result dumping, and distributed or Slurm launch commands from configs without running them.

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

01 前言 Front Matter

name
training-testing
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
Plan and validate MMDetection 3.3.0 training, resume, testing, evaluation, result dumping, and distributed or Slurm launch commands from configs without running them.
disable-model-invocation
true

02 资源文件 4

03 SKILL.md 正文

training-testing

Use this sub-skill when the task involves launching or planning tools/train.py, tools/test.py, dist_train.sh, dist_test.sh, Slurm wrappers, resume behavior, work_dir outputs, command-line config overrides, --auto-scale-lr, CPU debugging, or result dumping.

Route first

  • Config inheritance, auto_scale_lr fields, model zoo checkpoint choice, and config edits: use configuration-model-zoo first, then return here for launch commands.
  • Dataset roots, COCO/VOC/Cityscapes annotation layout, evaluator metrics, and metric-specific output prefixes: use datasets-evaluation first.
  • New hooks, runners, loops, optimizers, schedulers, or custom registries: use customization-extension first.
  • Environment import failures such as ModuleNotFoundError: mmcv._ext: ensure full mmcv is installed instead of mmcv-lite; then return here.

Core workflow

  1. Identify the config, checkpoint if testing, intended device topology, output work_dir, and any --cfg-options overrides.
  2. For training, choose single-process, CPU debug, PyTorch distributed, or Slurm from training workflows.
  3. For evaluation, visualization, TTA, and prediction dumps, use testing and evaluation.
  4. Before giving a launch command, run the bundled dry-run planner to catch common flag mistakes:
python sub-skills/training-testing/scripts/build_train_test_command.py train CONFIG.py --work-dir work_dirs/EXP --auto-scale-lr
python sub-skills/training-testing/scripts/build_train_test_command.py test CONFIG.py CHECKPOINT.pth --gpus 8 --out results.pkl
  1. If the user reports a failure, triage with training/testing troubleshooting.

Command patterns

  • Single GPU train: python tools/train.py CONFIG.py --work-dir work_dirs/EXP [--resume [CKPT]] [--auto-scale-lr] [--cfg-options key=value ...].
  • CPU debug train: CUDA_VISIBLE_DEVICES=-1 python tools/train.py CONFIG.py --work-dir work_dirs/debug ...; expect very slow execution.
  • Distributed train: CUDA_VISIBLE_DEVICES=0,1,2,3 PORT=29500 bash tools/dist_train.sh CONFIG.py 4 ....
  • Slurm train: GPUS=8 GPUS_PER_NODE=8 bash tools/slurm_train.sh PARTITION JOB CONFIG.py WORK_DIR ....
  • Single GPU test: python tools/test.py CONFIG.py CHECKPOINT.pth [--work-dir WORK_DIR] [--out results.pkl] [--show-dir DIR] [--tta].
  • Distributed test: PORT=29500 bash tools/dist_test.sh CONFIG.py CHECKPOINT.pth GPUS [--out results.pkl] ....

Always explain that shell wrappers are patterns tied to the user's checkout and cluster, while this skill's script only prints commands and validates arguments.

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