Update StaticInputs coordinate handling#998
Draft
frodre wants to merge 1 commit intorefactor/closed-interval-subsetfrom
Draft
Update StaticInputs coordinate handling#998frodre wants to merge 1 commit intorefactor/closed-interval-subsetfrom
frodre wants to merge 1 commit intorefactor/closed-interval-subsetfrom
Conversation
fme/downscaling/data/static.py — major refactor: - StaticInput: removed coords field; now just holds data; subset() takes slices (not intervals) - Added _load_coords_from_ds(), load_fine_coords_from_path() for loading coords from files - Added _has_legacy_coords_in_state(), _has_coords_in_state(), _sync_state_coordinates() for backwards-compat state migration - StaticInputs: added coords: LatLonCoordinates as first-class field; removed per-field coord validation; subset() now returns updated coords; to_device() moves coords too; get_state() includes top-level "coords"; from_state() raises if coords absent; added from_state_backwards_compatible() - _get_normalized_static_input(): returns (StaticInput, LatLonCoordinates) tuple - load_static_inputs(): no longer accepts None; validates coord consistency across fields fme/downscaling/data/test_static.py — full replacement with new test suite covering all new APIs fme/downscaling/data/__init__.py — added load_fine_coords_from_path export fme/downscaling/test_models.py — updated make_static_inputs() to new StaticInputs interface fme/downscaling/inference/test_inference.py — updated get_static_inputs() helper fme/downscaling/train.py — guarded load_static_inputs call against None config# Please enter the commit message for your changes. Lines starting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR 2/3 for #971 split
Changes: