data-training
Validate datasets, understand augmentation, and plan SSD.PyTorch training commands.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- data-training
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Validate datasets, understand augmentation, and plan SSD.PyTorch training commands.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/datasets-and-augmentation.md7.3 KB
- 参考文档references/training-workflow.md5.2 KB
- 参考文档references/troubleshooting.md4.7 KB
- 脚本scripts/plan_training_command.py4.0 KB
- 脚本scripts/validate_dataset_layout.py3.5 KB
03 SKILL.md 正文
data-training
Use this operating sub-skill when a Researcher needs to prepare or sanity-check SSD.PyTorch training inputs before launching a long training run. It covers VOC/COCO dataset layout, annotation transforms, SSD data augmentation, collation, training command planning, checkpoints, base VGG weights, Visdom, and CPU/CUDA handling.
Fast routing
- For dataset directory checks, first read references/datasets-and-augmentation.md, then run the bundled validator:
python scripts/validate_dataset_layout.py --dataset voc --root VOCDEVKIT_ROOT --require-trainpython scripts/validate_dataset_layout.py --dataset coco --root COCO_ROOT --require-train
- For training command construction, read references/training-workflow.md, then generate templates with:
python scripts/plan_training_command.py --dataset VOC --dataset-root VOCDEVKIT_ROOT --cuda truepython scripts/plan_training_command.py --dataset COCO --dataset-root COCO_ROOT --cuda true
- For startup failures, missing files, import errors, empty targets, or CUDA surprises, read references/troubleshooting.md.
Operating boundaries
This sub-skill owns:
- VOC and COCO training dataset skeletons and split-file expectations.
- VOC/COCO annotation transform outputs and class-count implications.
BaseTransform,SSDAugmentation, anddetection_collatebehavior.train.pyoption planning, required files, checkpoints, learning-rate schedule, optional Visdom, and CUDA/CPU flags.- Safe preflight commands and JSON-producing helper scripts.
Route out of this sub-skill when the request is not about data or training setup:
- Model construction, SSD priors, detection heads, loss internals, and inference model behavior:
../model-inference/SKILL.md. - Evaluation, test-time detection, demo notebook/webcam usage, and mAP reporting:
../evaluation-demos/SKILL.md.
Non-negotiable safety
- Do not execute dataset download scripts or bundle network download logic. The original dataset scripts are reference-only because they perform large downloads, extraction, copies, and deletes.
- Treat full training as external, data-heavy, and long-running. Only plan commands unless the user explicitly asks to run training in an appropriate Researcher session.
- Keep commands explicit about
--dataset_root,--save_folder,--basenet,--resume,--cuda,--batch_size, and--num_workersrather than relying on hidden local defaults. - Remember the COCO label-map import caveat: importing the package-level
datamodule can fail before argument parsing if the default COCO label map is absent at the home-derived default COCO location.
Minimal workflow
- Identify target dataset: VOC or COCO.
- Validate the layout with
scripts/validate_dataset_layout.py; fix missing split files, annotation files, images, COCO JSON files, or label-map placement before training. - Confirm required training files:
- Fresh training needs
vgg16_reducedfc.pthunder the configured save folder. - Resume training needs a checkpoint compatible with the selected dataset/model configuration.
- Fresh training needs
- Generate a command plan with
scripts/plan_training_command.pyand review the emitted notes. - If the user asks to execute training, warn about runtime/data cost, CUDA preference, and dependency/version constraints before running anything.
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).