model-training
Guides TransFuser imitation-model training, dataset and configuration validation, backbone and PointPillars selection, single-GPU or torchrun DDP launch, loss interpretation, and checkpoint recovery.
- License 许可
- MIT
- 最近更新
- 2026-10-08
- Stars
- ★ 11
- Forks
- 3
01 前言 Front Matter
- name
- model-training
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Guides TransFuser imitation-model training, dataset and configuration validation, backbone and PointPillars selection, single-GPU or torchrun DDP launch, loss interpretation, and checkpoint recovery.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/api-reference.md10.7 KB
- 参考文档references/data-format.md9.2 KB
- 参考文档references/training-workflow.md15.2 KB
- 参考文档references/troubleshooting.md12.9 KB
03 SKILL.md 正文
TransFuser Model Training
Use this sub-skill when a task involves training or resuming a TransFuser-family model, choosing a fusion backbone, validating training data, preparing a single-GPU or DDP command, interpreting losses and logs, or diagnosing a checkpoint.
Non-negotiable runtime boundary
- Training requires an NVIDIA CUDA runtime. The repository training path unconditionally selects a CUDA device; there is no CPU training substitute.
- Preserve the legacy package family unless deliberately porting and revalidating it: Python 3.7, PyTorch 1.12.1+cu113,
mmcv-full1.6.0,mmdet2.25.0,mmsegmentation0.25.0,mmcls0.25.0,torch-scatter2.1.0, andtimm0.6.7. This combination passed imports andpip checkwith CUDA visible on an NVIDIA A100 during skill construction. - Do not treat a successful CPU import,
pip check, or CLI parser run as proof that training works. Requiretorch.cuda.is_available(), a CUDA allocation, and matching compiled extensions. - Model construction can ask
timmfor pretrained image weights. Prepare an approved local cache or explicitly authorize network access before constructing a fresh model in a network-restricted environment.
Route the task
- Prepare a new or resumed run: read training-workflow.md. It contains every
train.pyflag/default, single-GPU andtorchrunrecipes, logging, losses, caching, debug behavior, and resume semantics. - Validate data or diagnose a shape/key failure: read data-format.md, then run validate_training_setup.py. The helper only inspects paths, metadata, environment variables, and optional imports; it never trains or downloads.
- Choose a backbone, architecture, config override, or PointPillars: read api-reference.md. It covers
GlobalConfig,CARLA_Data,LidarCenterNet, all four fusion backbones, tensor contracts, and the PointPillars path. - Resume, compare, or diagnose weights: first read the checkpoint section in training-workflow.md, then run inspect_checkpoint.py. Its default mode does not unpickle the checkpoint; only use
--unsafe-loadfor a trusted file. - Recover from a failure: read troubleshooting.md for missing paths, DDP rank variables, invalid backbones, checkpoint incompatibility, cache/debug failures, and missing OpenMMLab or
torch-scattercomponents.
Safe first pass
From any directory, validate the intended run before launching it:
python <this-sub-skill>/scripts/validate_training_setup.py \
--repo-root <transfuser-checkout> \
--dataset-root <dataset-root> \
--setting 02_05_withheld \
--backbone transFuser \
--parallel-training 0
Add --check-runtime only in the environment intended for training. It imports the compatibility stack and repository training modules and requires working CUDA, but it does not instantiate a model or start training.
Boundaries and handoffs
- Dataset acquisition, CARLA route/scenario generation, and 210-GB collection are owned by data-and-routes.
- Loading a trained model into
HybridAgent, handlingargs.txtat inference time, and CARLA control are owned by sensor-agent. - Longest6 execution and result parsing are owned by carla-evaluation.
- Full training, model-weight downloads, CARLA simulation, Docker builds, and cloud submission are intentionally not performed by bundled helpers.
Completion criteria
Before launching training, require all of the following:
- the dataset split selects at least one train route and, for
02_05_withheld, at least one withheld validation route; - required modality files and future labels exist for eligible samples;
- the exact backbone string and architecture choices are compatible;
- CUDA and compiled dependency probes pass;
- single-GPU runs set
--parallel_training 0, while DDP runs are launched bytorchrunwithRANK,LOCAL_RANK, andWORLD_SIZEpopulated; - resume runs have both
model_<epoch>.pthand the derivedoptimizer_<epoch>.pth, a deliberate--start_epoch, and matching architecture/config provenance; - the output resolves to
<logdir>/<id>and has sufficient storage for checkpoints, TensorBoard events, optional visualizations, and any disk cache.
04 同仓库更多 Skills
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
python-api
Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP/mAP semantics, and source-style import diagnostics.
file-evaluation
Folder-based PASCAL VOC AP/mAP evaluation from ground-truth and detection text files.
object-detection-metrics
Guides legacy Object-Detection-Metrics PASCAL VOC AP/mAP evaluation from detection text folders and direct Python API classes.
nx-workspace-patterns
Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.