Skip to content

Conversation

@AnnaKwa
Copy link
Contributor

@AnnaKwa AnnaKwa commented Feb 11, 2026

This refactors the downscaling code to use the full StaticInputs class in generate calls.

  • DiffusionModel._get_input_from_coarse concats all StaticInputs.fields.data as additional input channels
  • breaking change: TrainConfig has a new field static_inputs which should be a mapping of {var_name: path_to_dataset}. This should be used to provide the static inputs fields- they will no longer be loaded automatically from the fine dataset. In the future, use_fine_topography in the config should be deprecated since the static_inputs field is the source of this information.
  • GriddedData, PairedGriddedData are updated to have a StaticInputs attribute instead of the single Topography
  • references to variables named topography are updated to the more general static_input
  • train, predict, inference, evaluator entrypoint code and their tests are updated to pass the StaticInputs to generate calls

(Exact diff of v1 branch but used cursor to organize the commits to be more reviewable)

AnnaKwa and others added 6 commits February 11, 2026 12:17
This property was unused and had a type inconsistency (returning
torch.tensor([]) instead of list[torch.Tensor] for the empty case).

Co-authored-by: Cursor <cursoragent@cursor.com>
Add a `static_inputs: dict[str, str] | None` field to TrainerConfig
that maps variable names to file paths. The build method now constructs
StaticInputs from this config rather than inferring topography from
the fine training data path.

Co-authored-by: Cursor <cursoragent@cursor.com>
…nputs

- Rename `Topography` class to `StaticInput` and export it publicly
- Update `GriddedData` and `PairedGriddedData` to store `static_inputs: StaticInputs`
  instead of `topography: Topography`
- Update `_get_input_from_coarse` in DiffusionModel to accept StaticInputs
  and loop over all fields rather than a single topography
- Rename `build_topography` to `build_static_inputs` in DataLoaderConfig
- Update `PairedDataLoaderConfig.build` to pass StaticInputs
- Remove unused `get_topography` from CheckpointModelConfig

Co-authored-by: Cursor <cursoragent@cursor.com>
Rename topography -> static_inputs throughout the codebase:
- train.py: training and validation loop variables
- predict.py: downscaler and event downscaler
- evaluator.py: evaluator and event evaluator
- inference/: downscaler, output config, work items
- _deterministic_models.py: model methods
- predictors/cascade.py: cascade predictor and config
- predictors/composite.py: patch predictor

Co-authored-by: Cursor <cursoragent@cursor.com>
Update all test files to use StaticInput/StaticInputs instead of Topography:
- test_topography.py: rename Topography -> StaticInput in test cases
- test_config.py: pass StaticInputs to DataLoaderConfig.build
- test_patching.py: use StaticInputs wrapper for patching tests
- test_models.py: update model train/generate tests
- test_predict.py: update predictor integration tests
- test_train.py: add static_inputs config to test setup
- test_train_config.yaml: add static_inputs field
- test_inference.py: update inference/downscaler tests
- test_output.py: pass StaticInputs to output config build
- test_cascade.py: update cascade predictor tests
- test_composite.py: update composite predictor tests

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant