-
Notifications
You must be signed in to change notification settings - Fork 15
Feature/flexible remappers #88
Feature/flexible remappers #88
Conversation
Hi Ophelia, |
Dear Sarah, |
Hi Ophelia, I think the optimal solution would be to have one remapper-preprocessor, that can handle the many-to-many and the one-to-one case. So, I would propose naming the old remapper Would it be possible to merge the latest version of develop into this one, please? |
7a9d59e
to
6e6b0e5
Compare
tests pass, ensured backward compatibility, updated multimapper, added tests. Can this please be approved/reviewed before tuesday? I leave for holidays then... And I'd like it to be merged before the refactoring of anemoi graphs/models/training. |
Co-authored-by: Sara Hahner <[email protected]>
Co-authored-by: Sara Hahner <[email protected]>
Co-authored-by: Sara Hahner <[email protected]>
Co-authored-by: Sara Hahner <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thank you very much for incorporating all my comments.
* Add one-to-one mapper -> Monomapper * Remapper (one-to-many mapper) is now called Multimapper --------- Co-authored-by: Sara Hahner <[email protected]>
* fix: move PR #88 to unreleased section * fix: add link to PR
Related to #82. Rename
remapper.py
inmultimapper.py
because it was created to handle the angle (1 variables) to cos/sin (2 variables) case, which is a bit more involved than the 1-to-1 remapping. Mappings are in a modulemappings.py
, which is aimed at being easy to modify so that everyone can add 1-to-1 mappings. Finally, 1-to-1 remapping in place is done inremapper.py
. Feel free to comment/edit/commit on top if something is unclear/does not work. Names need to change in the config from__target__: anemoi.models.preprocessing.remapper.Remapper
to__target__: anemoi.models.preprocessing.multimapper.Multimapper
for users of the angle to cos_sin mapping.