Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

Fix/stretched grid check #204

Merged
merged 3 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Keep it human-readable, your future self will thank you!
- Dont crash when using the profiler if certain env vars arent set [#180](https://github.com/ecmwf/anemoi-training/pull/180)
- Remove saving of metadata to training checkpoint [#57](https://github.com/ecmwf/anemoi-training/pull/190)
- Fixes to callback plots [#182] (power spectrum large numpy array error + precip cmap for cases where precip is prognostic).
- Identify stretched grid models based on graph rather than configuration file [#204](https://github.com/ecmwf/anemoi-training/pull/204)

### Added
- Introduce variable to configure: transfer_learning -> bool, True if loading checkpoint in a transfer learning setting.
Expand Down
2 changes: 1 addition & 1 deletion src/anemoi/training/train/forecaster.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def __init__(
_, self.val_metric_ranges = self.get_val_metric_ranges(config, data_indices)

# Check if the model is a stretched grid
if "lam_resolution" in getattr(config.graph.nodes.hidden, "node_builder", []):
if graph_data["hidden"].node_type == "StretchedTriNodes":
mask_name = config.graph.nodes.hidden.node_builder.mask_attr_name
limited_area_mask = graph_data[config.graph.data][mask_name].squeeze().bool()
else:
Expand Down
Loading