# irom-princeton/c-cubed architecture

> Architecture diagram of the GitHub repository irom-princeton/c-cubed, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-05-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/irom-princeton/c-cubed
- Repository: https://github.com/irom-princeton/c-cubed

## Overview

1. **Repository purpose**
   - This is a Python package, `dynuq`, for **calibrated controllable video generation**.
   - The core idea is to produce videos plus **dense uncertainty / confidence predictions** in latent space, then project those uncertainties into interpretable RGB-space heatmaps.

2. **Top-level execution modes**
   - The repo has three main runtime paths:
     - **Training** a video model with calibration-aware losses.
     - **Inference** to generate videos and dense confidence maps.
     - **Metric computation** to evaluate calibration quality after generation.
   - These are exposed through scripts under `dynuq/scripts` and wrapped by shell scripts for local or Slurm execution.

3. **Data ingestion boundary**
   - `dynuq/datasets/openxmp4videodataset.py` is the dataset entry point.
   - It likely handles video-file loading and prepares the conditioning inputs needed by the model, such as control signals or actions, as implied by the repo’s controllable video-generation focus.
   - This is the main boundary between raw dataset storage and model-ready tensors.

4. **Representation / tokenization layer**
   - `dynuq/tokenizers/vae.py` and `dynuq/tokenizers/cosmos_tokenizer.py` define the latent-space interface.
   - The architecture is centered on operating in **latent space rather than pixel space**, which the README calls out as important for stability and cost.
   - This layer converts video frames into compact representations and back, and is also the bridge for turning latent uncertainty into visualizations.

5. **Generative model layer**
   - `dynuq/models/model.py` and `dynuq/models/diffusion.py` contain the main generative model implementation.
   - The project uses a **diffusion-style video generator** as the core predictor.
   - This is the subsystem that consumes latent tokens and conditioning inputs and produces future video latents, plus uncertainty-related outputs.

6. **Calibration-aware training logic**
   - `dynuq/loss_wrappers/` contains the training objective abstractions:
     - `default_loss_wrapper.py`
     - `calibration_loss_wrapper.py`
     - `base_loss_wrapper.py`
   - This layer sits between the model and the optimization loop.
   - Its role is to combine prediction loss with calibration/correctness objectives, reflecting the README’s emphasis on strictly proper scoring rules.

7. **Training orchestration**
   - `dynuq/scripts/train.py` is the main training entry point.
   - `dynuq/scripts/utils/train_utils.py` contains support code for setup, loading, and training-time utilities.
   - The training flow is: config → dataset → tokenizer/model → loss wrapper → optimizer loop → checkpoints/artifacts.
   - A sample config is provided in `dynuq/configs/train_bridge_256_example.yaml`.

8. **Inference / generation path**
   - `dynuq/scripts/example_dataset_inference.py` runs example inference over a dataset.
   - The corresponding configs in `dynuq/configs/bridge_inference_example.yaml` drive this mode.
   - This path produces generated videos together with **dense confidence predictions**, which are likely used both for visualization and downstream evaluation.

9. **Evaluation and metrics path**
   - `dynuq/scripts/compute_metrics.py` computes uncertainty and calibration metrics after inference.
   - `dynuq/metrics/base_metrics.py` and `dynuq/metrics/calibration_metrics.py` define reusable metric logic.
   - `dynuq/evaluators/base_evaluator.py` and `dynuq/evaluators/bridge_evaluator.py` provide dataset/task-specific evaluation orchestration.
   - The metrics config tree under `dynuq/configs/metrics/` and `dynuq/configs/evaluators/` separates generic metric definitions from task-specific evaluation wiring.

10. **Calibration-specific subsystem**
    - The repo has a distinct calibration-aware branch of logic, not just generic generation.
    - `dynuq/loss_wrappers/calibration_loss_wrapper.py` handles training objectives for calibration.
    - `dynuq/metrics/calibration_metrics.py` handles posthoc measurement of calibration quality.
    - The README’s described output is a dense uncertainty estimate, so this subsystem is central rather than auxiliary.

11. **Configuration architecture**
    - YAML configs are a major integration boundary:
      - training configs in `dynuq/configs/`
      - evaluator configs in `dynuq/configs/evaluators/`
      - metric configs in `dynuq/configs/metrics/`
    - The repo appears designed so experiments can be swapped by changing config files rather than code.
    - This makes the architecture highly experiment-driven and reproducible.

12. **Operational wrappers**
    - `bash_scripts/` contains local test wrappers for inference and metric computation.
    - `slurm_scripts/` contains batch-job equivalents for cluster execution, including `bridge_train_8gpu.sh`.
    - The README indicates the default operational environment is a **Slurm cluster**, with the option to run the same scripts locally by replacing `sbatch` with `bash`.

13. **External/runtime dependencies that matter architecturally**
    - The project is packaged as an installable Python distribution via `pyproject.toml`.
    - The README specifies Python 3.13 and `uv` for environment management.
    - The runtime assumes access to substantial compute, especially for training and evaluation on Bridge-style robot video datasets.

14. **End-to-end data flow**
    - Raw video dataset → dataset loader → latent tokenizer/VAE → diffusion video model → calibration-aware loss during training.
    - At inference, the same model produces video outputs plus dense uncertainty estimates.
    - A separate evaluation path consumes those outputs and computes calibration metrics, closing the loop between generation quality and uncertainty quality.

Main entry points: [`dynuq/scripts/train.py`](https://github.com/irom-princeton/c-cubed/blob/main/dynuq/scripts/train.py) (Train entry), [`dynuq/scripts/compute_metrics.py`](https://github.com/irom-princeton/c-cubed/blob/main/dynuq/scripts/compute_metrics.py) (Metrics entry), [`dynuq/models/model.py`](https://github.com/irom-princeton/c-cubed/blob/main/dynuq/models/model.py) (Video model), [`dynuq/scripts/example_dataset_inference.py`](https://github.com/irom-princeton/c-cubed/blob/main/dynuq/scripts/example_dataset_inference.py) (Inference entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Runtime paths"]
  node_dynuq_scripts_train["Train entry<br/>runtime script<br/>[train.py]"]
  node_dynuq_scripts_example_dataset_inference["Inference entry<br/>runtime script"]
  node_dynuq_scripts_utils_train_utils["Train utils<br/>training support<br/>[train_utils.py]"]
end

subgraph group_core["Core model stack"]
  node_dynuq_datasets_openxmp4videodataset["Video data<br/>dataset loader"]
  node_dynuq_tokenizers_vae["VAE tokenizer<br/>latent tokenizer<br/>[vae.py]"]
  node_dynuq_tokenizers_cosmos_tokenizer["Cosmos tokenizer<br/>latent tokenizer"]
  node_dynuq_models_model["Video model<br/>gen model<br/>[model.py]"]
  node_dynuq_models_diffusion["Diffusion core<br/>diffusion model<br/>[diffusion.py]"]
  node_dynuq_loss_wrappers_base_loss_wrapper["Base loss<br/>loss abstraction"]
  node_dynuq_loss_wrappers_default_loss_wrapper["Default loss<br/>training loss"]
  node_dynuq_loss_wrappers_calibration_loss_wrapper["Calib loss<br/>calibration loss"]
end

subgraph group_analysis["Evaluation stack"]
  node_dynuq_scripts_compute_metrics["Metrics entry<br/>runtime script<br/>[compute_metrics.py]"]
  node_dynuq_metrics_base_metrics["Base metrics<br/>metric abstraction<br/>[base_metrics.py]"]
  node_dynuq_metrics_calibration_metrics["Calib metrics<br/>metric suite"]
  node_dynuq_evaluators_base_evaluator["Base eval<br/>evaluator abstraction<br/>[base_evaluator.py]"]
  node_dynuq_evaluators_bridge_evaluator["Bridge eval<br/>task evaluator"]
end

subgraph group_ops["Operational wrappers"]
  node_bash_scripts_test_bridge_inference_example_sh["Local infer<br/>shell wrapper"]
  node_bash_scripts_test_bridge_compute_metrics_example_sh["Local metrics<br/>shell wrapper"]
  node_slurm_scripts_train_bridge_train_8gpu_sh["Slurm train<br/>batch script"]
  node_slurm_scripts_test_bridge_inference_sh["Slurm infer<br/>batch script"]
  node_slurm_scripts_test_bridge_compute_metrics_sh["Slurm metrics<br/>batch script"]
end

subgraph group_config["Config files"]
  node_dynuq_configs_train_bridge_256_example["Train config<br/>yaml config"]
  node_dynuq_configs_bridge_inference_example["Infer config<br/>yaml config"]
  node_dynuq_configs_bridge_compute_metrics_example["Metrics config<br/>yaml config"]
  node_dynuq_configs_evaluators_bridge_evaluator["Eval config<br/>yaml config"]
  node_dynuq_configs_metrics_calibration_metrics_calibration_metrics["Calib cfg<br/>yaml config"]
end

node_dynuq_datasets_openxmp4videodataset -->|"video tensors"| node_dynuq_tokenizers_vae
node_dynuq_datasets_openxmp4videodataset -.->|"alt latent path"| node_dynuq_tokenizers_cosmos_tokenizer
node_dynuq_tokenizers_vae -->|"latents"| node_dynuq_models_model
node_dynuq_tokenizers_cosmos_tokenizer -.->|"tokens"| node_dynuq_models_model
node_dynuq_models_diffusion -->|"backbone"| node_dynuq_models_model
node_dynuq_models_model -->|"predictions"| node_dynuq_loss_wrappers_base_loss_wrapper
node_dynuq_loss_wrappers_base_loss_wrapper -->|"default"| node_dynuq_loss_wrappers_default_loss_wrapper
node_dynuq_loss_wrappers_base_loss_wrapper -->|"calibration"| node_dynuq_loss_wrappers_calibration_loss_wrapper
node_dynuq_configs_train_bridge_256_example -->|"train config"| node_dynuq_scripts_train
node_dynuq_scripts_train -->|"setup"| node_dynuq_scripts_utils_train_utils
node_dynuq_scripts_train -->|"load data"| node_dynuq_datasets_openxmp4videodataset
node_dynuq_scripts_train -->|"fit model"| node_dynuq_models_model
node_dynuq_scripts_train -->|"train loss"| node_dynuq_loss_wrappers_calibration_loss_wrapper
node_dynuq_configs_bridge_inference_example -->|"infer config"| node_dynuq_scripts_example_dataset_inference
node_dynuq_scripts_example_dataset_inference -->|"generate"| node_dynuq_models_model
node_dynuq_scripts_example_dataset_inference -->|"decode"| node_dynuq_tokenizers_vae
node_dynuq_configs_bridge_compute_metrics_example -->|"metrics config"| node_dynuq_scripts_compute_metrics
node_dynuq_scripts_compute_metrics -->|"metric API"| node_dynuq_metrics_base_metrics
node_dynuq_scripts_compute_metrics -->|"calib metrics"| node_dynuq_metrics_calibration_metrics
node_dynuq_scripts_compute_metrics -->|"task eval"| node_dynuq_evaluators_bridge_evaluator
node_dynuq_evaluators_bridge_evaluator -->|"implements"| node_dynuq_evaluators_base_evaluator
node_dynuq_configs_evaluators_bridge_evaluator -->|"eval wiring"| node_dynuq_evaluators_bridge_evaluator
node_dynuq_configs_metrics_calibration_metrics_calibration_metrics -->|"metric wiring"| node_dynuq_metrics_calibration_metrics
node_bash_scripts_test_bridge_inference_example_sh -->|"local run"| node_dynuq_scripts_example_dataset_inference
node_bash_scripts_test_bridge_compute_metrics_example_sh -->|"local run"| node_dynuq_scripts_compute_metrics
node_slurm_scripts_train_bridge_train_8gpu_sh -->|"sbatch"| node_dynuq_scripts_train
node_slurm_scripts_test_bridge_inference_sh -->|"sbatch"| node_dynuq_scripts_example_dataset_inference
node_slurm_scripts_test_bridge_compute_metrics_sh -->|"sbatch"| node_dynuq_scripts_compute_metrics
node_dynuq_loss_wrappers_calibration_loss_wrapper -.->|"aligned with"| node_dynuq_metrics_calibration_metrics

click node_dynuq_datasets_openxmp4videodataset "https://github.com/irom-princeton/c-cubed/blob/main/dynuq/datasets/openxmp4videodataset.py"
click node_dynuq_tokenizers_vae "https://github.com/irom-princeton/c-cubed/blob/main/dynuq/tokenizers/vae.py"
click node_dynuq_tokenizers_cosmos_tokenizer "https://github.com/irom-princeton/c-cubed/blob/main/dynuq/tokenizers/cosmos_tokenizer.py"
click node_dynuq_models_model "https://github.com/irom-princeton/c-cubed/blob/main/dynuq/models/model.py"
click node_dynuq_models_diffusion "https://github.com/irom-princeton/c-cubed/blob/main/dynuq/models/diffusion.py"
click node_dynuq_loss_wrappers_base_loss_wrapper "https://github.com/irom-princeton/c-cubed/blob/main/dynuq/loss_wrappers/base_loss_wrapper.py"
click node_dynuq_loss_wrappers_default_loss_wrapper "https://github.com/irom-princeton/c-cubed/blob/main/dynuq/loss_wrappers/default_loss_wrapper.py"
click node_dynuq_loss_wrappers_calibration_loss_wrapper "https://github.com/irom-princeton/c-cubed/blob/main/dynuq/loss_wrappers/calibration_loss_wrapper.py"
click node_dynuq_scripts_train "https://github.com/irom-princeton/c-cubed/blob/main/dynuq/scripts/train.py"
click node_dynuq_scripts_example_dataset_inference "https://github.com/irom-princeton/c-cubed/blob/main/dynuq/scripts/example_dataset_inference.py"
click node_dynuq_scripts_compute_metrics "https://github.com/irom-princeton/c-cubed/blob/main/dynuq/scripts/compute_metrics.py"
click node_dynuq_scripts_utils_train_utils "https://github.com/irom-princeton/c-cubed/blob/main/dynuq/scripts/utils/train_utils.py"
click node_dynuq_metrics_base_metrics "https://github.com/irom-princeton/c-cubed/blob/main/dynuq/metrics/base_metrics.py"
click node_dynuq_metrics_calibration_metrics "https://github.com/irom-princeton/c-cubed/blob/main/dynuq/metrics/calibration_metrics.py"
click node_dynuq_evaluators_base_evaluator "https://github.com/irom-princeton/c-cubed/blob/main/dynuq/evaluators/base_evaluator.py"
click node_dynuq_evaluators_bridge_evaluator "https://github.com/irom-princeton/c-cubed/blob/main/dynuq/evaluators/bridge_evaluator.py"
click node_dynuq_configs_train_bridge_256_example "https://github.com/irom-princeton/c-cubed/blob/main/dynuq/configs/train_bridge_256_example.yaml"
click node_dynuq_configs_bridge_inference_example "https://github.com/irom-princeton/c-cubed/blob/main/dynuq/configs/bridge_inference_example.yaml"
click node_dynuq_configs_bridge_compute_metrics_example "https://github.com/irom-princeton/c-cubed/blob/main/dynuq/configs/bridge_compute_metrics_example.yaml"
click node_dynuq_configs_evaluators_bridge_evaluator "https://github.com/irom-princeton/c-cubed/blob/main/dynuq/configs/evaluators/bridge_evaluator.yaml"
click node_dynuq_configs_metrics_calibration_metrics_calibration_metrics "https://github.com/irom-princeton/c-cubed/blob/main/dynuq/configs/metrics/calibration_metrics/calibration_metrics.yaml"
click node_bash_scripts_test_bridge_inference_example_sh "https://github.com/irom-princeton/c-cubed/blob/main/bash_scripts/test/bridge_inference_example.sh"
click node_bash_scripts_test_bridge_compute_metrics_example_sh "https://github.com/irom-princeton/c-cubed/blob/main/bash_scripts/test/bridge_compute_metrics_example.sh"
click node_slurm_scripts_train_bridge_train_8gpu_sh "https://github.com/irom-princeton/c-cubed/blob/main/slurm_scripts/train/bridge_train_8gpu.sh"
click node_slurm_scripts_test_bridge_inference_sh "https://github.com/irom-princeton/c-cubed/blob/main/slurm_scripts/test/bridge_inference.sh"
click node_slurm_scripts_test_bridge_compute_metrics_sh "https://github.com/irom-princeton/c-cubed/blob/main/slurm_scripts/test/bridge_compute_metrics.sh"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_dynuq_scripts_train,node_dynuq_scripts_example_dataset_inference,node_dynuq_scripts_utils_train_utils toneBlue
class node_dynuq_datasets_openxmp4videodataset,node_dynuq_tokenizers_vae,node_dynuq_tokenizers_cosmos_tokenizer,node_dynuq_models_model,node_dynuq_models_diffusion,node_dynuq_loss_wrappers_base_loss_wrapper,node_dynuq_loss_wrappers_default_loss_wrapper,node_dynuq_loss_wrappers_calibration_loss_wrapper toneAmber
class node_dynuq_scripts_compute_metrics,node_dynuq_metrics_base_metrics,node_dynuq_metrics_calibration_metrics,node_dynuq_evaluators_base_evaluator,node_dynuq_evaluators_bridge_evaluator toneMint
class node_bash_scripts_test_bridge_inference_example_sh,node_bash_scripts_test_bridge_compute_metrics_example_sh,node_slurm_scripts_train_bridge_train_8gpu_sh,node_slurm_scripts_test_bridge_inference_sh,node_slurm_scripts_test_bridge_compute_metrics_sh toneRose
class node_dynuq_configs_train_bridge_256_example,node_dynuq_configs_bridge_inference_example,node_dynuq_configs_bridge_compute_metrics_example,node_dynuq_configs_evaluators_bridge_evaluator,node_dynuq_configs_metrics_calibration_metrics_calibration_metrics toneIndigo
```

## Components

### Runtime paths

Main execution entry points for training, inference, and evaluation.

- [Train entry](https://github.com/irom-princeton/c-cubed/blob/main/dynuq/scripts/train.py): runtime script · Main training entry point for the calibrated video model. · `dynuq/scripts/train.py`
- [Inference entry](https://github.com/irom-princeton/c-cubed/blob/main/dynuq/scripts/example_dataset_inference.py): runtime script · Runs example dataset inference and emits generated videos plus confidence maps. · `dynuq/scripts/example_dataset_inference.py`
- [Train utils](https://github.com/irom-princeton/c-cubed/blob/main/dynuq/scripts/utils/train_utils.py): training support · Utilities for training setup, loading, and orchestration. · `dynuq/scripts/utils/train_utils.py`

### Core model stack

Data loading, tokenization, model, and training objectives.

- [Video data](https://github.com/irom-princeton/c-cubed/blob/main/dynuq/datasets/openxmp4videodataset.py): dataset loader · Loads video data and prepares model inputs from the dataset boundary. · `dynuq/datasets/openxmp4videodataset.py`
- [VAE tokenizer](https://github.com/irom-princeton/c-cubed/blob/main/dynuq/tokenizers/vae.py): latent tokenizer · Encodes and decodes video frames in latent space. · `dynuq/tokenizers/vae.py`
- [Cosmos tokenizer](https://github.com/irom-princeton/c-cubed/blob/main/dynuq/tokenizers/cosmos_tokenizer.py): latent tokenizer · Alternative latent tokenization interface for video representations. · `dynuq/tokenizers/cosmos_tokenizer.py`
- [Video model](https://github.com/irom-princeton/c-cubed/blob/main/dynuq/models/model.py): gen model · Main controllable video generation model and prediction interface. · `dynuq/models/model.py`
- [Diffusion core](https://github.com/irom-princeton/c-cubed/blob/main/dynuq/models/diffusion.py): diffusion model · Diffusion-style generative backbone used by the video model. · `dynuq/models/diffusion.py`
- [Base loss](https://github.com/irom-princeton/c-cubed/blob/main/dynuq/loss_wrappers/base_loss_wrapper.py): loss abstraction · Shared loss-wrapper interface for training objectives. · `dynuq/loss_wrappers/base_loss_wrapper.py`
- [Default loss](https://github.com/irom-princeton/c-cubed/blob/main/dynuq/loss_wrappers/default_loss_wrapper.py): training loss · Standard prediction loss wrapper used in training. · `dynuq/loss_wrappers/default_loss_wrapper.py`
- [Calib loss](https://github.com/irom-princeton/c-cubed/blob/main/dynuq/loss_wrappers/calibration_loss_wrapper.py): calibration loss · Calibration-aware objective combining prediction and uncertainty quality. · `dynuq/loss_wrappers/calibration_loss_wrapper.py`

### Evaluation stack

Metric computation and evaluator orchestration.

- [Metrics entry](https://github.com/irom-princeton/c-cubed/blob/main/dynuq/scripts/compute_metrics.py): runtime script · Computes calibration and uncertainty metrics after inference. · `dynuq/scripts/compute_metrics.py`
- [Base metrics](https://github.com/irom-princeton/c-cubed/blob/main/dynuq/metrics/base_metrics.py): metric abstraction · Shared metric utilities and interfaces. · `dynuq/metrics/base_metrics.py`
- [Calib metrics](https://github.com/irom-princeton/c-cubed/blob/main/dynuq/metrics/calibration_metrics.py): metric suite · Posthoc calibration and uncertainty metric computations. · `dynuq/metrics/calibration_metrics.py`
- [Base eval](https://github.com/irom-princeton/c-cubed/blob/main/dynuq/evaluators/base_evaluator.py): evaluator abstraction · Shared evaluator interface for task-specific evaluation. · `dynuq/evaluators/base_evaluator.py`
- [Bridge eval](https://github.com/irom-princeton/c-cubed/blob/main/dynuq/evaluators/bridge_evaluator.py): task evaluator · Bridge-specific evaluation wiring for the dataset/task. · `dynuq/evaluators/bridge_evaluator.py`

### Operational wrappers

Shell wrappers for local and Slurm execution.

- [Local infer](https://github.com/irom-princeton/c-cubed/blob/main/bash_scripts/test/bridge_inference_example.sh): shell wrapper · Local wrapper for running example inference. · `bash_scripts/test/bridge_inference_example.sh`
- [Local metrics](https://github.com/irom-princeton/c-cubed/blob/main/bash_scripts/test/bridge_compute_metrics_example.sh): shell wrapper · Local wrapper for running metric computation. · `bash_scripts/test/bridge_compute_metrics_example.sh`
- [Slurm train](https://github.com/irom-princeton/c-cubed/blob/main/slurm_scripts/train/bridge_train_8gpu.sh): batch script · Cluster training wrapper for multi-GPU execution. · `slurm_scripts/train/bridge_train_8gpu.sh`
- [Slurm infer](https://github.com/irom-princeton/c-cubed/blob/main/slurm_scripts/test/bridge_inference.sh): batch script · Cluster wrapper for inference runs. · `slurm_scripts/test/bridge_inference.sh`
- [Slurm metrics](https://github.com/irom-princeton/c-cubed/blob/main/slurm_scripts/test/bridge_compute_metrics.sh): batch script · Cluster wrapper for metric computation runs. · `slurm_scripts/test/bridge_compute_metrics.sh`

### Config files

Experiment and evaluation configuration boundaries.

- [Train config](https://github.com/irom-princeton/c-cubed/blob/main/dynuq/configs/train_bridge_256_example.yaml): yaml config · Example training configuration for Bridge 256 setup. · `dynuq/configs/train_bridge_256_example.yaml`
- [Infer config](https://github.com/irom-princeton/c-cubed/blob/main/dynuq/configs/bridge_inference_example.yaml): yaml config · Example inference configuration for dataset generation. · `dynuq/configs/bridge_inference_example.yaml`
- [Metrics config](https://github.com/irom-princeton/c-cubed/blob/main/dynuq/configs/bridge_compute_metrics_example.yaml): yaml config · Example configuration for metric computation. · `dynuq/configs/bridge_compute_metrics_example.yaml`
- [Eval config](https://github.com/irom-princeton/c-cubed/blob/main/dynuq/configs/evaluators/bridge_evaluator.yaml): yaml config · Task-specific evaluator configuration. · `dynuq/configs/evaluators/bridge_evaluator.yaml`
- [Calib cfg](https://github.com/irom-princeton/c-cubed/blob/main/dynuq/configs/metrics/calibration_metrics/calibration_metrics.yaml): yaml config · Calibration metric configuration definition. · `dynuq/configs/metrics/calibration_metrics/calibration_metrics.yaml`

## Connections

- Video data → VAE tokenizer: video tensors · Raw video data is converted into latent representations.
- Video data → Cosmos tokenizer: alt latent path · Dataset inputs can also feed the alternative tokenizer interface.
- VAE tokenizer → Video model: latents · Latent tokens are consumed by the generative model.
- Cosmos tokenizer → Video model: tokens · Alternative latent tokens feed the main model.
- Diffusion core → Video model: backbone · Diffusion implementation underpins the main model.
- Video model → Base loss: predictions · Model outputs are scored through the shared loss abstraction.
- Base loss → Default loss: default · Default training objective specialization.
- Base loss → Calib loss: calibration · Calibration-aware objective specialization.
- Train config → Train entry: train config · Training execution is driven by the example config.
- Train entry → Train utils: setup · Training entry point uses shared training utilities.
- Train entry → Video data: load data · Training pulls data from the dataset boundary.
- Train entry → Video model: fit model · Training optimizes the generative model.
- Train entry → Calib loss: train loss · Training can use calibration-aware objectives.
- Infer config → Inference entry: infer config · Inference execution is driven by the example config.
- Inference entry → Video model: generate · Inference runs the model to produce video and uncertainty outputs.
- Inference entry → VAE tokenizer: decode · Generated latents are projected back for visualization.
- Metrics config → Metrics entry: metrics config · Metric computation is driven by the example config.
- Metrics entry → Base metrics: metric API · Metric entry point uses the shared metric abstraction.
- Metrics entry → Calib metrics: calib metrics · Calibration-specific metrics are computed here.
- Metrics entry → Bridge eval: task eval · Metric computation is coordinated with the Bridge evaluator.
- Bridge eval → Base eval: implements · Bridge evaluator specializes the base evaluator interface.
- Eval config → Bridge eval: eval wiring · Evaluator configuration selects task-specific evaluation behavior.
- Calib cfg → Calib metrics: metric wiring · Calibration metric configuration selects the metric suite.
- Local infer → Inference entry: local run · Local shell wrapper launches inference.
- Local metrics → Metrics entry: local run · Local shell wrapper launches metric computation.
- Slurm train → Train entry: sbatch · Slurm job wrapper launches training.
- Slurm infer → Inference entry: sbatch · Slurm job wrapper launches inference.
- Slurm metrics → Metrics entry: sbatch · Slurm job wrapper launches metric computation.
- Calib loss → Calib metrics: aligned with · Training objectives and posthoc metrics reflect the same calibration focus.
