training-and-configs
Plan detrex LazyConfig training, evaluation, dataset, launcher, and runtime override workflows.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- training-and-configs
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Plan detrex LazyConfig training, evaluation, dataset, launcher, and runtime override workflows.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/configuration.md11.1 KB
- 参考文档references/training-workflows.md9.4 KB
- 参考文档references/troubleshooting.md9.9 KB
- 脚本scripts/build_train_command.py11.1 KB
03 SKILL.md 正文
detrex training and configs
Use this sub-skill when the task involves launching, adapting, or debugging detrex training/evaluation commands or Python LazyConfig files.
Route here when
- The task mentions
tools.train_net,hydra_train_net,LazyConfig,get_config,train.max_iter,train.init_checkpoint, command overrides, orDETECTRON2_DATASETS. - The user needs a train, eval-only, resume, fast debug, multi-GPU, multi-machine, Hydra, or submitit/Slurm command plan.
- The user is changing datasets, dataloaders, optimizers, schedulers, DDP fields, AMP, EMA, WandB, checkpoints, output directories, or custom backbones.
- The user is deciding whether a project-specific trainer such as DINO or CO-MOT is required instead of the generic detrex trainer.
Fast route
- Read references/configuration.md when the task is about config namespaces, common fragments, dataset names, optimizers/schedules, AMP, EMA, WandB, DDP, or custom backbone wiring.
- Read references/training-workflows.md when the task is about train/eval commands, resume, fast debug, distributed launch, Hydra/submitit, project trainers, datasets, or output directories.
- Run scripts/build_train_command.py with
--helpbefore constructing commands. The helper only prints commands; it never launches training or downloads assets. - Read references/troubleshooting.md when imports, datasets, CUDA, ports, checkpoints, config paths, logging, Hydra, or trainer selection fails.
Operating rules
- Prefer command construction and config inspection before expensive jobs. Do not start long training/evaluation without explicit user approval, available data, intended checkpoint paths, and suitable backend resources.
- Use
DETECTRON2_DATASETSor a user-defined dataset registration before claiming a COCO-style command is runnable. - Use
train.fast_dev_run.enabled=Truefor a short smoke/debug path; it changesmax_iter,eval_period, andlog_periodinside the trainer. - Treat DINO, CO-MOT, and similar project-specific trainer files as separate workflow contracts when they change optimizer grouping, data movement, or model-specific assumptions.
- Do not download datasets, checkpoints, or pretrained backbones by default. Use user-provided local paths unless the user explicitly authorizes downloads.
- Keep full native training/evaluation tests out of routine guidance; use dry-run command building, config loading, and explicit preflight checks first.
Quick command builder examples
python scripts/build_train_command.py \
--config-file user_configs/dab_detr_r50_50ep.py \
--num-gpus 8 --fast-dev-run
python scripts/build_train_command.py \
--eval-only --config-file user_configs/dino_r50_4scale_12ep.py \
--checkpoint weights/dino_r50_4scale_12ep.pth \
--override train.device=cuda
python scripts/build_train_command.py \
--launcher hydra --config-file user_configs/detr_r50_300ep.py \
--num-gpus 8 --auto-output-dir --override model.num_queries=50
The helper prints the command and non-fatal warnings; it does not execute the training loop.
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).