feat: simple filter for removing metadata from fields#238
feat: simple filter for removing metadata from fields#238aaron-hopkinson wants to merge 3 commits intomainfrom
Conversation
| required_inputs = ("keys",) | ||
| optional_inputs = {"param": None} |
There was a problem hiding this comment.
I'm starting to think this class could have just been a dataclass?
There was a problem hiding this comment.
It does way too much stuff to be a dataclass in my opinion. It only has two class level variables – I don't think that's too many
There was a problem hiding this comment.
(There's an argument for some of the class configuration itself being a dataclass, which is exactly what I've done for a WIP refactor of the MatchingFieldsFilter base class, but I'm reluctant to make further changes to SingleFieldFilter until that refactor goes in... Eventually these will all align, but we need to let the design settle a bit first - otherwise we risk having the wrong abstractions)
| required_inputs = ("keys",) | ||
| optional_inputs = {"param": None} |
There was a problem hiding this comment.
Update the docstring to make it clearer
There was a problem hiding this comment.
(NB: Not 100% sure if we need this filter yet...)
Description
Adds a filter for removing metadata from fields. The primary use-case here is to use this to "force" a matching between fields when using a
MatchingFieldFilterwhere the metadata is known to differ due to coming from different sources. Use this filter with caution.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.