Skip to content

Conversation

@OpheliaMiralles
Copy link
Contributor

@OpheliaMiralles OpheliaMiralles commented Jan 16, 2026

Description

#803

What problem does this change solve?

FilteringLossWrapper's method set_data_indices was never called during training.

What issue or task does this change relate to?

This PR wraps all the losses in FilteringLossWrapper (default to output.full), allowing any loss to be called with predicted_variables and target_variables without explicitely mentionning the FilteringLossWrapper. In #803 the example would become

training_loss:
  # loss class to initialise

  _target_: anemoi.training.losses.combined.CombinedLoss
  losses:
    - _target_: anemoi.training.losses.MSELoss
      predicted_variables: ["tp"]
      target_variables: ["imerg"]
      scalers: ['pressure_level', 'general_variable', 'nan_mask_weights', 'node_weights']

Additional notes

To be tested by @gabrieloks

As a contributor to the Anemoi framework, please ensure that your changes include unit tests, updates to any affected dependencies and documentation, and have been tested in a parallel setting (i.e., with multiple GPUs). As a reviewer, you are also responsible for verifying these aspects and requesting changes if they are not adequately addressed. For guidelines about those please refer to https://anemoi.readthedocs.io/en/latest/

By opening this pull request, I affirm that all authors agree to the Contributor License Agreement.


📚 Documentation preview 📚: https://anemoi-training--806.org.readthedocs.build/en/806/


📚 Documentation preview 📚: https://anemoi-graphs--806.org.readthedocs.build/en/806/


📚 Documentation preview 📚: https://anemoi-models--806.org.readthedocs.build/en/806/

@OpheliaMiralles OpheliaMiralles self-assigned this Jan 16, 2026
@github-project-automation github-project-automation bot moved this to To be triaged in Anemoi-dev Jan 16, 2026
@OpheliaMiralles OpheliaMiralles marked this pull request as draft January 16, 2026 15:00
@OpheliaMiralles OpheliaMiralles added bug Something isn't working ATS Approval Needed Approval needed by ATS labels Jan 16, 2026
@OpheliaMiralles OpheliaMiralles changed the title Fix/filteringlosswrapper fix: filteringlosswrapper Jan 16, 2026
In preparation for zarr3 adoption in anemoi-datasets, we need to
deprecate python 3.10.
ecmwf/anemoi-datasets#487

***As a contributor to the Anemoi framework, please ensure that your
changes include unit tests, updates to any affected dependencies and
documentation, and have been tested in a parallel setting (i.e., with
multiple GPUs). As a reviewer, you are also responsible for verifying
these aspects and requesting changes if they are not adequately
addressed. For guidelines about those please refer to
https://anemoi.readthedocs.io/en/latest/***

By opening this pull request, I affirm that all authors agree to the
[Contributor License
Agreement.](https://github.com/ecmwf/codex/blob/main/Legal/contributor_license_agreement.md)


<!-- readthedocs-preview anemoi-training start -->
----
📚 Documentation preview 📚:
https://anemoi-training--795.org.readthedocs.build/en/795/

<!-- readthedocs-preview anemoi-training end -->

<!-- readthedocs-preview anemoi-graphs start -->
----
📚 Documentation preview 📚:
https://anemoi-graphs--795.org.readthedocs.build/en/795/

<!-- readthedocs-preview anemoi-graphs end -->

<!-- readthedocs-preview anemoi-models start -->
----
📚 Documentation preview 📚:
https://anemoi-models--795.org.readthedocs.build/en/795/

<!-- readthedocs-preview anemoi-models end -->

---------

Co-authored-by: Ana Prieto Nemesio <[email protected]>
Co-authored-by: anaprietonem <[email protected]>
OpheliaMiralles and others added 10 commits January 23, 2026 14:12
## Description
Restrict the filtering of the scalers to scalers. 
## What problem does this change solve?
<!-- Describe if it's a bugfix, new feature, doc update, or breaking
change -->

## What issue or task does this change relate to?
<!-- link to Issue Number -->

##  Additional notes ##
<!-- Include any additional information, caveats, or considerations that
the reviewer should be aware of. -->

***As a contributor to the Anemoi framework, please ensure that your
changes include unit tests, updates to any affected dependencies and
documentation, and have been tested in a parallel setting (i.e., with
multiple GPUs). As a reviewer, you are also responsible for verifying
these aspects and requesting changes if they are not adequately
addressed. For guidelines about those please refer to
https://anemoi.readthedocs.io/en/latest/***

By opening this pull request, I affirm that all authors agree to the
[Contributor License
Agreement.](https://github.com/ecmwf/codex/blob/main/Legal/contributor_license_agreement.md)

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ATS Approval Needed Approval needed by ATS bug Something isn't working CI/CD graphs models training

Projects

Status: To be triaged

Development

Successfully merging this pull request may close these issues.

4 participants