Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added config for bounding #10

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ Keep it human-readable, your future self will thank you!

- Introduction of remapper to anemoi-models leads to changes in the data indices. Some preprocessors cannot be applied in-place anymore.

- Variable Bounding as configurable model layers [#13](https://github.com/ecmwf/anemoi-models/issues/13)

#### Functionality

- Enable the callback for plotting a histogram for variables containing NaNs
Expand Down
5 changes: 5 additions & 0 deletions src/anemoi/training/config/data/zarr.yaml
HCookie marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ remapped:

normalizer:
default: "mean-std"
remap:
cp: tp
std:
- "tp"
- "cp"
min-max:
max:
- "sdor"
Expand Down
12 changes: 12 additions & 0 deletions src/anemoi/training/config/model/gnn.yaml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should all configurations be using these bounding configs?
As in:

  • Should we expect all basic models to be using tp & cp
  • Do these boundings generalise well?

Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,15 @@ attributes:
nodes: []

node_loss_weight: area_weight

# Bounding configuration
bounding: #These are applied in order
- _target_: anemoi.models.layers.bounding.ReluBounding #[0, infinity)
variables:
- tp
- _target_: anemoi.models.layers.bounding.FractionBounding # fraction of tp
variables:
- cp
min_val: 0
max_val: 1
total_var: tp
12 changes: 12 additions & 0 deletions src/anemoi/training/config/model/graphtransformer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,15 @@ attributes:
nodes: []

node_loss_weight: area_weight

# Bounding configuration
bounding: #These are applied in order
- _target_: anemoi.models.layers.bounding.ReluBounding #[0, infinity)
variables:
- tp
- _target_: anemoi.models.layers.bounding.FractionBounding # fraction of tp
variables:
- cp
min_val: 0
max_val: 1
total_var: tp
12 changes: 12 additions & 0 deletions src/anemoi/training/config/model/transformer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,15 @@ attributes:
nodes: []

node_loss_weight: area_weight

# Bounding configuration
bounding: #These are applied in order
- _target_: anemoi.models.layers.bounding.ReluBounding #[0, infinity)
variables:
- tp
- _target_: anemoi.models.layers.bounding.FractionBounding # fraction of tp
variables:
- cp
min_val: 0
max_val: 1
total_var: tp
Loading