training
Training, fine-tuning, evaluation, distillation, custom COCO dataset setup, and distributed launch workflows for DAMO-YOLO.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- training
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Training, fine-tuning, evaluation, distillation, custom COCO dataset setup, and distributed launch workflows for DAMO-YOLO.
- disable-model-invocation
- true
02 资源文件 9
- 参考文档references/config-editing.md5.9 KB
- 参考文档references/custom-coco-datasets.md5.3 KB
- 参考文档references/training-workflows.md6.4 KB
- 参考文档references/troubleshooting.md7.4 KB
- 脚本scripts/eval_entrypoint.py5.5 KB
- 脚本scripts/launch_eval.sh3.9 KB
- 脚本scripts/launch_train.sh3.5 KB
- 脚本scripts/train_entrypoint.py2.8 KB
- 脚本scripts/validate_coco_config.py7.8 KB
03 SKILL.md 正文
DAMO-YOLO training
Use this sub-skill when the task involves DAMO-YOLO training, fine-tuning, evaluation, distillation, dataset setup, config editing, checkpoints, or distributed CUDA launch commands.
Do not use this sub-skill for image/video/camera demos, ONNX/TensorRT export, partial quantization, or deployment-only backend diagnostics; route those to the inference or deployment sub-skill.
First actions
- Identify the workflow: train from scratch, fine-tune from detector weights, resume an interrupted run, evaluate a checkpoint, or run teacher-student distillation.
- Read the relevant bundled references before writing commands:
- Confirm the runtime has an installed
damopackage, CUDA-enabled PyTorch, NCCL support, a user-owned config file, and any dataset/checkpoint files needed by that config. - Prefer a copied/edited config file for durable changes. In this repo version, nested command-line config overrides are not reliable because
Config.merge()only replaces existing top-level attributes. - Use
--workdirwith bundled scripts when the config reads relative TinyNAS structure files or relative dataset paths.
Bundled helper scripts
These scripts adapt the repository train/eval behavior into generated-skill-owned launchers. They import the installed damo package and do not call repo-local tools/train.py or tools/eval.py.
scripts/launch_train.sh: validates config/dataset/CUDA/NCCL state, then launches bundledtrain_entrypoint.pythroughtorch.distributed.run; supports single/multi-GPU runs and optional teacher args for distillation.scripts/launch_eval.sh: validates config/dataset/checkpoint/CUDA/NCCL state, then launches bundledeval_entrypoint.pythroughtorch.distributed.run; supports--fuseand source-compatible parser flags.scripts/validate_coco_config.py: checks that a config, path catalog entries, annotation JSON, class names, and head class count agree before a long run.
Operating rules
- Dataset entries are COCO-only by default. Dataset names must contain
cocobecause the base config routes by substring and raisesOnly support coco format dataset now!otherwise. cfg.dataset.class_namesis required. Annotation category names must match these names exactly; category ids may be non-contiguous, but they are remapped by category name into contiguous class indices.- Training currently supports only one dataset name in
cfg.dataset.train_ann; validation may list multiple dataset names. cfg.model.head['num_classes']must equallen(cfg.dataset.class_names)and match the checkpoint head whenever strict loading is used.cfg.train.finetune_pathstarts a new run from pretrained detector weights.cfg.train.resume_pathrestores model, optimizer, and epoch. If both are set, finetune wins inTrainer.__init__, so never set both for an intended resume.- For training/eval, choose
--gpusequal to the number of visible GPUs and makecfg.train.batch_sizeorcfg.test.batch_sizedivisible by that count.
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).