py123d_detection.torch.train¶
Train a camera-based 3D detector.
py123det-train experiment=nuscenes py123det-train experiment=nuscenes_av2 model=bevformer taxonomy=mixed2_3cls py123det-train experiment=nuscenes trainer=smoke paths.data_root=/data/123d
Every option comes from conf/; see conf/config.yaml for what the groups are.
Functions
|
|
|
Training data concatenated and shuffled, validation data kept one loader per dataset. |
|
|
|
|
|
The newest checkpoint Lightning wrote when SLURM pre-empted this run, if any. |
|
The checkpoint to continue from, or None to start fresh. |
- py123d_detection.torch.train.build_data(cfg)[source]¶
Training data concatenated and shuffled, validation data kept one loader per dataset.
Keeping validation apart is what makes a mixed run diagnosable: one averaged number over three datasets cannot tell you which of them regressed.
- Return type:
- py123d_detection.torch.train.preemption_checkpoint(run_dir)[source]¶
The newest checkpoint Lightning wrote when SLURM pre-empted this run, if any.
On
SIGUSR1Lightning saveshpc_ckpt_<n>.ckptinto the trainer’sdefault_root_dirand asksscontrolto requeue the job. That file is written at the moment of pre-emption, which is usually mid-epoch, so it holds strictly more progress than thelast.ckptthatModelCheckpointwrote at the end of the previous epoch.
- py123d_detection.torch.train.resume_from(cfg)[source]¶
The checkpoint to continue from, or None to start fresh.
run.resume="last"resolves to this run’s own newest checkpoint if it exists: a requeued job reruns the same command, and the first attempt has no checkpoint to find.A pre-emption save outranks
last.ckptbecause it is newer. Lightning would pick it up by itself, but only whenfitis given nockpt_pathat all, so naminglast.ckpthere would quietly throw away however much of the current epoch had been trained.