Skip to content

Add fine_coordinates to model with validation against StaticInputs#999

Draft
frodre wants to merge 4 commits intorefactor/static-input-coordinatesfrom
refactor/add-fine-coords-to-model
Draft

Add fine_coordinates to model with validation against StaticInputs#999
frodre wants to merge 4 commits intorefactor/static-input-coordinatesfrom
refactor/add-fine-coords-to-model

Conversation

@frodre
Copy link
Collaborator

@frodre frodre commented Mar 21, 2026

PR 3/3 for #971 split

Changes:

  • Tests added

frodre added 4 commits March 20, 2026 22:07
  Here's a summary of the fixes made in this session:

  test_models.py:
  - test_checkpoint_model_build_raises_when_checkpoint_has_static_inputs: added full_fine_coords=static_inputs.coords to _get_diffusion_model
   call
  - Added test_checkpoint_model_build_with_fine_coordinates_path: tests loading an old-format checkpoint (no full_fine_coords in state) using
   fine_coordinates_path
  - Removed unused batch_size variable in test_model_error_cases

  data/config.py:
  - Captured fine_latlon_coords = dataset_fine_subset.subset_latlon_coordinates before the variable gets reassigned to
  BatchItemDatasetAdapter

  predict.py:
  - Fixed EventDownscaler.run() to pass batch (the full BatchData) instead of batch[0] (a BatchItem) to get_fine_coords_for_batch

  test_predict.py:
  - Both test_predictor_runs and test_predictor_renaming: load static_inputs first, then pass full_fine_coords=static_inputs.coords to
  model_config.build()

  inference/test_inference.py:
  - checkpointed_model_config fixture: added full_fine_coords=static_inputs.coords to model_config.build()# Please enter the commit message for your changes. Lines starting
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