-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Labels
bugSomething isn't workingSomething isn't working
Description
What happened?
When a anemoi-transform filter is not correctly registered a general error is then showed when trying to use the filter.
ValueError: Unknown step action r-2-q
2025-05-26 10:58:42 ERROR
💣 Unknown step action r-2-q
This error is hiding the failed import that occurs when trying to import the filter at registering time. If the import fails the code should crash with the real error.
As spotted by @flyIchtus 🙌
Each filter is loaded into the registry. The registry is created in the _init_ file of anemoi.transform.filters and used in anemoi.datasets.input.step ; when created, it scans the anemoi.transform.filters directory and attempts to import every file in it (cf [here](https://github.com/ecmwf/anemoi-utils/blob/main/src/anemoi/utils/registry.py#L237)). If the import fails for any reason, the filter is not registered, and the code reports "Error : xxx filter not found in anemoi.transform.filters" ; this does not hint at why the import failed
What are the steps to reproduce the bug?
Try to create a new filter where for example you're missing certain attributes or there is a misspelled variable name
Version
Current
Platform (OS and architecture)
ATOS
Relevant log output
Accompanying data
No response
Organisation
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working