training-recipes
Train and evaluate Asteroid recipes with System, datasets, losses, metrics, and schedulers.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- training-recipes
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Train and evaluate Asteroid recipes with System, datasets, losses, metrics, and schedulers.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/datasets-and-losses.md2.5 KB
- 参考文档references/recipes.md3.7 KB
- 参考文档references/troubleshooting.md2.0 KB
- 脚本scripts/smoke_system_training.py2.5 KB
03 SKILL.md 正文
Training recipes and evaluation
Use this sub-skill when the user wants to run, adapt, or debug an Asteroid recipe rather than apply a pretrained checkpoint.
Typical triggers
run.sh,train.py,eval.py,local/, stage numbers, orstorage_dirSystem,Trainer,make_optimizer,NoamScheduler,DPTNetScheduler,ReduceLROnPlateauPITLossWrapper,SinkPITLossWrapper,pairwise_neg_sisdr,SingleSrcPMSQE,SingleSrcNegSTOIMetricTracker,get_metrics, orcompute_metrics- dataset names such as
WhamDataset,LibriMix,Wsj0mixDataset,DNSDataset,MUSDB18Dataset,FUSSDataset,AVSpeechDataset,SmsWsjDataset,KinectWsjMixDataset, orLibriVADDataset
What to do first
- Identify the recipe family and the dataset/task.
- Decide whether the user needs:
- a dry-run of the config and stage logic
- a real data-backed recipe execution plan
- a tiny synthetic training smoke
- Check whether the recipe is CPU-friendly, GPU-friendly, or data-heavy.
Standard workflow
- Read
references/recipes.mdfor the stage-basedrun.shpattern and the most common recipe knobs. - Read
references/datasets-and-losses.mdfor the dataset and loss/metric surface that recipes build on. - Read
references/troubleshooting.mdwhen a recipe expects a missing dataset helper, a mismatched stage, or an unavailable optional dependency. - Use
scripts/smoke_training.py --device cpufrom the root skill for a self-contained runtime training smoke. - Use
scripts/smoke_system_training.py --device cpufor the focusedSystem+Trainerengine smoke inside this sub-skill; use--device cudaonly when CUDA is intentionally being checked.
Recipe pattern to remember
Most recipes follow this flow:
- Parse YAML config into grouped arguments.
- Prepare dataset-specific files or manifests.
- Build train and validation dataloaders.
- Instantiate a model, optimizer, scheduler, and loss.
- Wrap them in
System. - Train with PyTorch Lightning.
- Evaluate on the test split.
- Save a publishable checkpoint and metrics.
Common decision points
- Use
--stageto resume from a later recipe step. - Use
--tagwhen you want a stable experiment name. - Use
--id/CUDA_VISIBLE_DEVICESwhen you want to control GPU visibility. - Use CPU when the task is only a smoke or when data access is unavailable.
Troubleshooting reminders
- Missing dataset helper packages are common for SMS-WSJ, AVSpeech, and some music recipes.
librosais required for some dataset imports.- Some recipes need
espnet_model_zoo,jiwer, or other optional packages only for evaluation metrics such as WER. - Music or audio-visual recipes can be memory heavy; keep them reference-only unless the user explicitly wants full execution planning.
Inputs to inspect
- dataset family and task name
- sample rate, segment length, and number of sources
- whether the recipe depends on a special helper package
- whether the user wants a smoke, a plan, or a full execution path
Smoke sequence
- Build a tiny synthetic dataset or use a tiny fixture.
- Instantiate a small model and a compatible loss.
- Wrap them in
System. - Run a
fast_dev_runLightning fit. - Confirm the metric or scheduler path that the user cares about.
What to avoid
- Do not turn the skill into a dataset-download manual.
- Do not assume every recipe can be run without the recipe-specific helper packages.
- Do not claim a GPU requirement unless the selected recipe path truly needs it.
- Do not tell the user to run the original long experiment as a default check.
Recipe signals to remember
stageandtagalmost always mean arun.shrecipe.compute_weroften means an optional ASR metric branch.eval_use_gpuis a recipe-level toggle, not a package-wide requirement.storage_dirusually signals that the task may involve a large dataset download.
Good questions to ask when unclear
- Which dataset family is being used?
- Is the request about training, evaluation, or both?
- Do you need a dry run or the full recipe shape?
- Is the user expecting CPU planning or GPU planning?
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).