training-and-evaluation
Safely build and adapt pytorch-semseg training and validation workflows, including dry-run commands, checkpoints, logs, metrics, and costly prerequisite checks.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- training-and-evaluation
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Safely build and adapt pytorch-semseg training and validation workflows, including dry-run commands, checkpoints, logs, metrics, and costly prerequisite checks.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/checkpoints-and-metrics.md6.4 KB
- 参考文档references/troubleshooting.md6.5 KB
- 参考文档references/workflows.md8.6 KB
- 脚本scripts/build_train_command.py10.3 KB
- 脚本scripts/build_validate_command.py10.5 KB
03 SKILL.md 正文
pytorch-semseg Training and Evaluation
Use this sub-skill when the task is to run, adapt, or explain the repository's training and validation workflows without reopening the original source files. The bundled scripts are dry-run command builders: they print commands and warnings, but never launch training, validation, downloads, dataset scans, or writes.
Start here
- Build a training command with scripts/build_train_command.py, then review references/workflows.md before running it manually.
- Build a validation command with scripts/build_validate_command.py, then review references/checkpoints-and-metrics.md for checkpoint and metric interpretation.
- For failures, use references/troubleshooting.md.
Covered capabilities
- Training entry point:
python train.py --config CONFIG. - Validation entry point:
python validate.py --config CONFIG --model_path CHECKPOINTwith--eval_flip/--no-eval_flipand--measure_time/--no-measure_time. - Training loop wiring: seeds, augmentations,
get_loader,get_model,DataLoader,runningScore, optimizer, scheduler, loss, TensorBoardXSummaryWriter, checkpoint save/resume. - Validation loop wiring: checkpoint
model_state,convert_state_dict, flip averaging, fps reporting, metric keys, and per-class IoU output. - Safety decisions for dataset-bound or expensive runs.
Route elsewhere
- YAML schema design, dataset layouts, loader-specific split names, and config validation belong to the sibling
data-and-configssub-skill. - Model constructor parameters, loss/optimizer/scheduler registry tables, and API-level model selection belong to
model-zoo-and-apis. test.pysingle-image inference, output masks, palettes, and DenseCRF belong tosingle-image-inference.
Safe workflow pattern
- Use the relevant command builder in this directory.
- Treat every warning as a pre-run checklist item.
- Resolve dataset/checkpoint/config compatibility issues using the routed sibling sub-skills when needed.
- Only after explicit user approval for compute, dataset reads, and log/checkpoint writes should a future agent run the printed command manually from an appropriate repository checkout.
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).