AGENT SKILL

training-and-inference

Route legacy SECOND and PointPillars model construction, training, evaluation, checkpoint restoration, and inference with explicit configuration, device, and backend guards.

License 许可
MIT
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
training-and-inference
license
MIT
metadata
{ "disco-role": "operating" }
description
Route legacy SECOND and PointPillars model construction, training, evaluation, checkpoint restoration, and inference with explicit configuration, device, and backend guards.
disable-model-invocation
true

02 资源文件 6

03 SKILL.md 正文

Training and inference

Use this sub-skill when a task asks to train or evaluate SECOND/PointPillars, build a VoxelNet, restore a .tckpt, run inference, select a model config, or reason about multi-GPU, fp16, NMS, or spconv errors.

Safety and compatibility boundary

  • This repository is deprecated. Its public README recommends OpenPCDet or MMDetection3D for new work; prefer a maintained implementation unless the historical checkpoint or experiment specifically requires this code.
  • The detector route is legacy-backend guarded and unverified. Source code depends on old spconv APIs (VoxelGeneratorV2 and NMS symbols), legacy Numba CUDA behavior, and an old PyTorch integration. A modern spconv 2.x import is not proof of compatibility.
  • Run the bundled non-invasive probe before any detector import: python <training-skill-root>/scripts/check_legacy_backend.py. Add --require-detector only when deciding whether to attempt a detector route. Without it, the probe is diagnostic and returns success even when the legacy symbols are absent.
  • CUDA availability, a successful CUDA tensor smoke test, or a CPU import does not prove that sparse model construction, NMS, training, or inference works. Do not claim detector execution was verified from those observations.
  • This package has no setup metadata. Use an explicit, isolated environment only when a separately supplied compatible checkout is intentionally in scope. Do not assume a package install or silently mutate an existing environment. This skill does not bundle the historical detector entry point.

Route the request

  1. Config/data contract: choose a config and validate dataset paths, generated info/database files, class order, voxel range, and point feature count. Route dataset generation and layout preparation to data-preparation.
  2. Model/training: map network_class_name, VFE, middle extractor, and RPN names through the registries; use the Fire commands and output semantics in workflows.
  3. Evaluation/geometry: keep box encoding, NMS, score thresholds, and evaluator implementation questions with geometry-and-evaluation.
  4. Viewer/service: route web API, browser, and server operations to visualization-and-serving; do not start the legacy viewer as a training smoke test.

Reference map

  • workflows: Fire commands, guarded train/resume, multi-GPU scaling, evaluation outputs, inference, pretrained loading, and NuScenes tuning notes.
  • configuration: config families, protobuf fields, model registries, class order, optimizers, and schedules.
  • API reference: public signatures, model methods, builder contracts, freeze filters, and torchplus checkpoints.
  • compatibility: exact backend gate, known modern-spconv gaps, and evidence needed to widen executable scope.
  • troubleshooting: install/import, optional dependencies, data/config, CLI/API, checkpoint, multi-GPU, fp16, and workflow-specific failures.

Guarded command patterns

First run the bundled non-invasive probe:

python <training-skill-root>/scripts/check_legacy_backend.py
python <training-skill-root>/scripts/check_legacy_backend.py --require-detector

The second command is the detector gate. This skill does not bundle or invoke that historical writer/runner, so no source-checkout command is presented as a runnable recipe. If the probe reports missing legacy symbols, stop before any historical train, evaluate, or TorchInferenceContext attempt; capture the exact missing names and use compatibility for recovery. If a user separately supplies a compatible checkout, the historical argument shapes are documented in workflows.

These are guarded historical routes, not verified recipes. train refuses an existing model_dir unless --resume=True; --create_folder=True creates a new timestamped folder when the requested prefix already exists. Keep model outputs outside the source tree and back up checkpoints before experiments.

Core decisions

  • batch_size and num_workers in the training input config are per GPU. The implementation multiplies both by the visible GPU count for --multi_gpu=True; do not multiply the config values yourself.
  • The README says to divide train_config.steps and steps_per_eval by the number of GPUs when scaling a single-GPU schedule to multi-GPU. Verify this arithmetic before launching; an undivided schedule changes total optimizer updates and evaluation cadence.
  • fp16 requires the historical Apex path and a compatible sparse backend; enable_mixed_precision: true is not equivalent to modern PyTorch AMP. Honor the source assertion that max_number_of_voxels * batch_size < 65535.
  • measure_time=True enables CUDA synchronization/timers in model paths and can distort throughput. Use it only for a deliberate timing run.
  • evaluate writes result.pkl below <result-path>/step_<global_step> and invokes the dataset evaluator. The historical signature does not accept the README-era --pickle_result keyword; do not pass it to a separately supplied runner unless its help output proves otherwise. Route official label conversion to geometry/evaluation after checking the exact dataset API.
  • Checkpoints are named by model/optimizer plus step and indexed in checkpoints.json. Restore the latest compatible state, or pass an explicit .tckpt; never mix a checkpoint with an incompatible config.

For exact signatures, config fields, model registry names, checkpoint utilities, and failure recovery, read the linked references before giving a detailed command or API answer.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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).

★ 351