Hooks registry#
Training lifecycle hooks. See Add a hook.
Build any of these from a config with hooks=[dict(type=...)], using the type string in the first column. Generated from the live registry - 26 classes (26 names including aliases), grouped by role.
Checkpointing#
Save and load checkpoints / resume state (delegate to CheckpointManager).
Name |
Summary |
|---|---|
Load model weights and, when requested, resume optimizer/train state. |
|
Save epoch/metric-oriented checkpoints during and after training. |
|
Save iteration-oriented checkpoints on a pure global-step cadence. |
Load model weights and, when requested, resume optimizer/train state. |
|
Save epoch/metric-oriented checkpoints during and after training. |
|
Save iteration-oriented checkpoints on a pure global-step cadence. |
Logging#
Per-step / per-epoch scalar logging and run naming.
Name |
Summary |
|---|---|
Assemble per-step console logs and write scalar train metrics. |
|
Measure data/batch latency and append timing and ETA to iteration logs. |
|
Auto-generate |
Assemble per-step console logs and write scalar train metrics. |
|
Measure data/batch latency and append timing and ETA to iteration logs. |
|
Auto-generate |
Evaluation#
In-loop validators, final testers, and SSL probes; they set the checkpoint-selection metric.
Name |
Summary |
|---|---|
Run the configured tester once after training, usually on model_best. |
|
Instance-level segmentation metrics including ARI and detection/class stats. |
|
Validation hook for masked-autoencoder (MAE) pretraining. |
|
Evaluate frozen pretraining features with downstream linear probes. |
|
Evaluate point-wise semantic segmentation on the validation loader. |
Run the configured tester once after training, usually on model_best. |
|
|
Instance-level segmentation metrics including ARI and detection/class stats. |
Validation hook for masked-autoencoder (MAE) pretraining. |
|
|
Evaluate frozen pretraining features with downstream linear probes. |
|
Evaluate point-wise semantic segmentation on the validation loader. |
Diagnostics#
Gradient/feature/prototype/parameter monitors and dtype/anneal controls.
Name |
Summary |
|---|---|
Drive and log attention-mask annealing for the Panda detector decoder. |
|
Force matched layers to compute (and optionally store params) in a dtype. |
|
Monitor feature standard deviation to detect representation collapse. |
|
Log model gradient norms to the writer after each training step. |
|
Log the entropy of teacher logits using Sonata’s temperature schedule. |
|
Log a parameter-count breakdown of the model at the start of training. |
|
Monitor prototype utilization in Sonata-style clustering heads. |
|
Hard-exit the process after a fixed number of steps to simulate a crash. |
Drive and log attention-mask annealing for the Panda detector decoder. |
|
Force matched layers to compute (and optionally store params) in a dtype. |
|
Monitor feature standard deviation to detect representation collapse. |
|
Log model gradient norms to the writer after each training step. |
|
Log the entropy of teacher logits using Sonata's temperature schedule. |
|
Log a parameter-count breakdown of the model at the start of training. |
|
Monitor prototype utilization in Sonata-style clustering heads. |
|
Hard-exit the process after a fixed number of steps to simulate a crash. |
Optimizer schedules#
Hooks that mutate optimizer parameter groups (weight-decay exclusion / scheduling).
Name |
Summary |
|---|---|
Rewrite optimizer param groups to exclude selected params from weight decay. |
|
Apply a cosine schedule to optimizer parameter-group weight decay. |
Rewrite optimizer param groups to exclude selected params from weight decay. |
|
Apply a cosine schedule to optimizer parameter-group weight decay. |
Hugging Face export#
Push checkpoints to the Hub during or after training.
Name |
Summary |
|---|---|
Push model checkpoints to the Hugging Face Hub during and/or after training. |
Push model checkpoints to the Hugging Face Hub during and/or after training. |
Resources & profiling#
Memory/GC management, resource-utilization logging, and the runtime profiler.
Name |
Summary |
|---|---|
Control Python garbage collection (and CUDA cache) on a step cadence. |
|
Log GPU and CPU/RAM utilization to the writer over the course of training. |
|
Run a short |
Control Python garbage collection (and CUDA cache) on a step cadence. |
|
Log GPU and CPU/RAM utilization to the writer over the course of training. |
|
Run a short |
Core#
Lifecycle plumbing shared by other hooks.
Name |
Summary |
|---|---|
Bridge that forwards lifecycle calls to a model implementing |
Bridge that forwards lifecycle calls to a model implementing |