training-evaluation
Build safe dataset-aware training and evaluation commands for the verified Gluon and PyTorch classification workflows.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- training-evaluation
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Build safe dataset-aware training and evaluation commands for the verified Gluon and PyTorch classification workflows.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/cli-reference.md12.0 KB
- 参考文档references/datasets-and-layouts.md5.7 KB
- 参考文档references/troubleshooting.md10.3 KB
- 脚本scripts/build_command.py4.1 KB
- 脚本scripts/check_dataset_layout.py11.5 KB
03 SKILL.md 正文
Training and evaluation
Use this sub-skill when the request concerns ImageNet1K, CIFAR10, CIFAR100,
SVHN, or CUB200_2011 data layout, train_gl.py/eval_gl.py,
train_pt.py/eval_pt.py, metrics, batch/device sizing, or checkpoint
resume behavior. This sub-skill documents classification workflows only; do
not turn it into a full training run.
Route first
- Use model-inference to choose and construct a
model, select
resnet18-style names, or diagnose model/checkpoint shape and device loading. - Use framework-compatibility for TensorFlow, Keras, Chainer, legacy Tensorpack, or other optional backend claims. CPU Gluon and CPU PyTorch/pytorchcv are the verified core; do not infer CUDA or optional-backend support from this sub-skill.
Safe operating procedure
-
Select the exact dataset name and layout.
ImageNet1Kmeans folder layout;ImageNet1K_recis the Gluon-only MXNet record layout. Read datasets and layouts. -
Run the no-network preflight before a real command:
python scripts/check_dataset_layout.py --dataset ImageNet1K --data-dir /data/imagenet --backend pytorchReplace
/data/imagenetwith the user's local data root. The checker only inspects filesystem structure; it never downloads data or imports a framework. A nonzero result means stop and fix the root/layout rather than launching a CLI. -
Construct the command from the CLI reference. Start with
--num-gpus=0,--num-data-workers 0, and a conservative--batch-sizeon CPU. Omit--use-pretrained,--all, and any other network-dependent option for offline work. For CIFAR10, CIFAR100, and SVHN, anindeterminate_native_cacheresult means only that a local cache exists; the selected framework must still verify its cache with downloads disabled. -
Run
--helpfirst. Help parsing does not construct a model, open a data loader, download weights, or start training. Do not use help output as proof that a dataset or checkpoint is valid. -
For evaluation, prefer
--data-subset valfor these classification metainfo objects. The scripts use the held-out split forval; several listed metainfo objects do not define separatetest_metric_names. -
Record the selected dataset, root, framework, checkpoint type, device, effective batch size, metric names, and validation result. Do not claim an accuracy value without running the evaluation against a real local dataset.
Checkpoint and command boundaries
- Gluon training separates model parameters (
--resume, normally a.paramsfile) from optimizer state (--resume-state, normally a.statesfile). PyTorch evaluation loads a model checkpoint through--resume, normally.pth; PyTorch training uses--resume-statefor a state object containingepoch,state_dict, andoptimizer. --start-epochis an explicit 1-based control in both training CLIs. Passing a state file does not remove the need to choose the intended start epoch.- A local
--resumeis distinct from--use-pretrained: the latter can ask a model provider to obtain weights. For no-network operation, use a local checkpoint and omit--use-pretrained. - Use troubleshooting when the layout, metric, checkpoint, or CPU/device assumptions fail.
Output contract
Return a command plan, not a long-running experiment: dataset/layout decision, preflight result, exact CLI flags, expected metric/checkpoint behavior, and the next bounded check. Link model construction and optional backend questions as specified above.
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).