How rafapablos/dropstogrid works
DropsToGrid is a rainfall-densification model and training/evaluation pipeline: it combines temporal station observations with radar context to produce stochastic, dense rainfall estimates and uncertainty. The main workflow starts at the CLI, loads synthetic sample data and applies transforms, then trains or evaluates the model and reports metrics. Documented capabilities include multi-scale spatio-temporal fusion, uncertainty, callbacks, checkpointing, and ClearML logging. Several relationships are supported by the SOURCE INDEX rather than full excerpts; unsampled subsystems are represented only where the tree or README supports them.
Main entry points: dtg.py DtG task module · cli.py CLI orchestration · callbacks Training callbacks · model.py Fusion network
Components 25
Run workflow
- CLI orchestration
dtg/cli.py - Trainer
dtg/trainer.py - Training callbacks
dtg/callbacks - EMA callback
dtg/callbacks/ema.py - Weight averaging
dtg/callbacks/weight_averaging.py - Model checkpointing
dtg/callbacks/model_checkpoint.py
Data preparation
- Data module
dtg/data/datamodule.py - Synthetic dataset
dtg/data/fake_dataset.py - Sample schema
dtg/data/sample.py - Source definitions
dtg/data/source.py - Sample transforms
dtg/transforms/transforms.py - Transform setup
dtg/transforms/factory.py
Densification model
- DtG task module
dtg/modules/dtg/dtg.py - Context handling
dtg/modules/dtg/context.py - Fusion network
dtg/networks/dtg/model.py - Temporal fusion
dtg/networks/dtg/bottleneck.py - Network interface
dtg/networks/network.py - Rainfall distribution
dtg/loss/distributions.py
Evaluation and reporting
- Training loss
dtg/loss/loss.py - Evaluation metrics
dtg/metrics - Evaluation outputs
dtg/modules/output.py - Animation logging
dtg/callbacks/log_animations.py - ClearML logger
dtg/logger/clearml.py
Other components
- Run operator
- ClearML service
Connections 29
- Run operator → CLI orchestration: starts run
README.md - CLI orchestration → Data module: configures
dtg/cli.py - CLI orchestration → DtG task module: instantiates
dtg/cli.py - CLI orchestration → Trainer: configures
dtg/cli.py - Trainer → Training callbacks: builds
dtg/trainer.py - Trainer → ClearML logger: builds
dtg/trainer.py - Data module → Synthetic dataset: loads
dtg/data/datamodule.py - Data module → Transform setup: requests transforms
dtg/data/datamodule.py - Transform setup → Sample transforms: assembles
dtg/transforms/factory.py - Sample transforms → Sample schema: transforms
dtg/transforms/transforms.py - Synthetic dataset → Sample schema: produces
dtg/data/fake_dataset.py - Synthetic dataset → Source definitions: uses
dtg/data/fake_dataset.py - DtG task module → Context handling: uses
dtg/modules/dtg/dtg.py - DtG task module → Fusion network: calls
dtg/modules/dtg/dtg.py - DtG task module → Transform setup: creates transforms
dtg/modules/dtg/dtg.py - Fusion network → Temporal fusion: uses
dtg/networks/dtg/model.py - Fusion network → Network interface: implements config
dtg/networks/dtg/model.py - Fusion network → Rainfall distribution: constructs
dtg/networks/dtg/model.py - DtG task module → Rainfall distribution: computes likelihood
dtg/modules/dtg/dtg.py - DtG task module → Training loss: computes loss
dtg/modules/dtg/dtg.py - DtG task module → Evaluation metrics: updates metrics
dtg/modules/dtg/dtg.py - DtG task module → Evaluation outputs: emits
dtg/modules/dtg/dtg.py - Training callbacks → EMA callback: includes
dtg/callbacks/factory.py - Training callbacks → Weight averaging: includes
dtg/callbacks/ema.py - Training callbacks → Model checkpointing: includes
dtg/callbacks/factory.py - Animation logging → Sample schema: reads
dtg/callbacks/log_animations.py - Animation logging → Evaluation outputs: reads
dtg/callbacks/log_animations.py - Animation logging → ClearML logger: logs through
dtg/callbacks/log_animations.py - ClearML logger → ClearML service: reports metrics
dtg/logger/clearml.py