Python API#
Each component in a config is a dict whose type is a name registered here; pimm builds the class with the dict’s other keys. Summaries are the first paragraph of each class’s docstring. To add a name, see Add a component.
Registry |
Names |
Used for |
|---|---|---|
54 |
|
|
7 |
|
|
46 |
entries of |
|
14 |
entries of |
|
26 |
entries of |
|
5 |
|
|
2 |
|
|
3 |
|
|
6 |
|
Models#
Name |
Class |
Summary |
|---|---|---|
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
Shared-backbone Panda detector with one batched query decoder for all labels. |
|
|
Unified Panda detector: arbitrary per-query heads, optional pre-attention point removal, configurable queries, and per-label overlap. |
|
|
Backbone, shared query decoder, losses, and panoptic postprocessing. |
|
|
Backbone, shared query decoder, losses, and panoptic postprocessing. |
|
|
— |
|
|
— |
|
|
Freeze a built model and LoRA-tune its attention blocks. |
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
Self-contained PoLAr-MAE for pimm’s DefaultTrainer. |
|
|
PoLAr-MAE semantic segmentation for pimm’s DefaultTrainer. |
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
Point Transformer V3 with 3D RoPE and bottleneck CPE. |
|
|
Point Transformer V3 with 3D RoPE and bottleneck CPE. |
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
Flat Volt encoder for Sonata pretraining. |
|
|
Flat Volt encoder + transposed-conv decoder, returning per-input-point features. |
Datasets#
Name |
Class |
Summary |
|---|---|---|
|
|
Concatenate several configured datasets into a single index space. |
|
|
Generic point-cloud dataset over preprocessed per-event |
|
|
Multimodal LArTPC simulation dataset over co-indexed JAXTPC HDF5 files. |
|
|
Water Cherenkov detector dataset over co-indexed LUCiD HDF5 files. |
|
|
PILArNet-M LArTPC dataset read directly from clustered HDF5 shards. |
|
|
Map-style PILArNet reader backed by parquet (Arrow-mmap). |
|
|
Streaming PILArNet reader for large-scale pretraining. |
Transforms#
Name |
Class |
Summary |
|---|---|---|
|
|
Center |
|
|
Randomly auto-contrast the per-point RGB color. |
|
|
Add independent per-point Gaussian noise to RGB channels. |
|
|
Randomly shift all RGB channels by a shared offset. |
|
|
Add isotropic clipped multivariate-Gaussian noise to |
|
|
Final projection of a sample dict into the model-facing batch contract. |
|
|
Compute geometric anchors once per event and attach them to the sample. |
|
|
Wall-aware random translation that keeps points inside fixed bounds. |
|
|
Generate two independently-augmented views for contrastive SSL. |
|
|
Duplicate keys in the sample dict under new names. |
|
|
Drop points whose |
|
|
Apply smooth random elastic warping to |
|
|
Randomly shift per-point energy by a shared scalar offset. |
|
|
Apply multiplicative per-point jitter to energy. |
|
|
Voxel-downsample a point cloud onto a hash grid. |
|
|
Spherical crop biased toward rare (“hard”) segment labels. |
|
|
Randomly translate hue and scale saturation of point colors. |
|
|
Compact instance ids and derive per-instance bounding boxes and centroids. |
|
|
Per-point local-neighborhood covariance eigen-features. |
|
|
Compress scalar features (e.g. energy) onto |
|
|
Multi-view generator with coarse locals plus extra fine local crops. |
|
|
Log10-compress strictly-positive momentum values. |
|
|
Multiply one or more keys by clipped Gaussian noise around 1. |
|
|
Generate multiple global and local crops for DINO/iBOT-style SSL. |
|
|
Scale per-point colors from |
|
|
Recenter and rescale |
|
|
Fallback semantic labels derived from PDG codes. |
|
|
Clamp |
|
|
Translate |
|
|
Randomly drop (zero out or attenuate) per-point color. |
|
|
Randomly convert per-point RGB color to grayscale. |
|
|
Randomly jitter brightness, contrast, saturation, and hue of point colors. |
|
|
Randomly overwrite a fraction of one key’s rows with a constant. |
|
|
Randomly drop a fraction of points from the sample. |
|
|
Randomly mirror the cloud across one or more axes. |
|
|
Add clipped Gaussian noise to one or more point-aligned keys. |
|
|
Rotate the cloud by a random angle about one axis. |
|
|
Rotate the cloud by a random angle drawn from a discrete set. |
|
|
Scale |
|
|
Translate |
|
|
Per-event relative log normalization (e.g. for hit times). |
|
|
Overwrite one or more keys with clipped Gaussian noise. |
|
|
Randomly permute the point ordering of the sample. |
|
|
Crop to the nearest points around a center to cap the point count. |
|
|
Recursively convert numpy arrays and numeric leaves to torch tensors. |
|
|
Inject constant key-value pairs into the sample dict. |
Losses#
Name |
Class |
Summary |
|---|---|---|
|
|
Binary focal loss for class-imbalanced binary targets. |
|
|
Cross-entropy for an extra categorical per-query head. |
|
|
Standard multi-class cross-entropy over per-point class logits. |
|
|
Soft multi-class Dice loss over per-point class probabilities. |
|
|
Mask2Former-style instance segmentation loss (cached, vectorized). |
|
|
Instance segmentation loss plus configurable per-instance regressions. |
|
|
Combine instance mask/class losses with configured query-head losses. |
|
|
Multi-class focal loss over per-point class logits. |
|
|
DEPRECATED alias for :class: |
|
|
Mean-absolute-error (L1) regression loss for continuous targets. |
|
|
Lovasz loss: a direct surrogate for the IoU (Jaccard) metric. |
|
|
Mean-squared-error (L2) regression loss for continuous targets. |
|
|
Label-smoothed cross-entropy with NaN-robust averaging. |
|
|
Smooth-L1 (Huber) regression loss for continuous targets. |
Hooks#
Name |
Class |
Summary |
|---|---|---|
|
|
Drive and log attention-mask annealing for the Panda detector decoder. |
|
|
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. |
|
|
Force matched layers to compute (and optionally store params) in a dtype. |
|
|
Monitor feature standard deviation to detect representation collapse. |
|
|
Run the configured tester once after training, usually on model_best. |
|
|
Control Python garbage collection (and CUDA cache) on a step cadence. |
|
|
Log model gradient norms to the writer after each training step. |
|
|
Assemble per-step console logs and write scalar train metrics. |
|
|
Instance-level segmentation metrics including ARI and detection/class stats. |
|
|
Measure data/batch latency and append timing and ETA to iteration logs. |
|
|
Log the entropy of teacher logits using Sonata’s temperature schedule. |
|
|
Validation hook for masked-autoencoder (MAE) pretraining. |
|
|
Bridge that forwards lifecycle calls to a model implementing |
|
|
Log a parameter-count breakdown of the model at the start of training. |
|
|
Evaluate frozen pretraining features with downstream linear probes. |
|
|
Monitor prototype utilization in Sonata-style clustering heads. |
|
|
Push model checkpoints to the Hugging Face Hub during and/or after training. |
|
|
Log GPU and CPU/RAM utilization to the writer over the course of training. |
|
|
Run a short |
|
|
Evaluate point-wise semantic segmentation on the validation loader. |
|
|
Hard-exit the process after a fixed number of steps to simulate a crash. |
|
|
Auto-generate |
|
|
Rewrite optimizer param groups to exclude selected params from weight decay. |
|
|
Apply a cosine schedule to optimizer parameter-group weight decay. |
Trainers#
Name |
Class |
Summary |
|---|---|---|
|
|
Default single-dataset supervised/SSL trainer. |
|
|
Reinforcement-learning trainer implementing GRPO at the trainer level. |
|
|
Trainer for dense 2D image batches (e.g. rasterized ring images). |
|
|
Trainer for instance segmentation with instance-aware collation. |
|
|
Trainer that draws mixed batches from several datasets. |
Testers#
Name |
Class |
Summary |
|---|---|---|
|
|
Panoptic/Instance segmentation tester following InstanceSegmentationEvaluator pattern. |
|
|
Semantic segmentation tester following SemSegEvaluator pattern. |
Optimizers#
Name |
Class |
Summary |
|---|---|---|
|
|
Implements Adam algorithm. |
|
|
Implements AdamW algorithm, where weight decay does not accumulate in the momentum nor variance. |
|
|
Implements stochastic gradient descent (optionally with momentum). |
Schedulers#
Name |
Class |
Summary |
|---|---|---|
|
|
Cosine annealing scheduler using total training steps as |
|
|
Exponential decay scheduler normalized by total training steps. |
|
|
Multi-step scheduler that accepts milestone ratios of total steps. |
|
|
Multi-step decay with linear warmup expressed as total-step ratios. |
|
|
torch.optim.lr_scheduler.OneCycleLR, Block total_steps |
|
|
Polynomial decay scheduler over a fixed number of steps. |