Proposal: Unified Abstract Base Class 🧱 GraphModule 🧱 for all tasks in anemoi-training #270
Replies: 6 comments 7 replies
-
Hi Alberto, thanks for starting this discussion. I will add my 2 cents below. As I understand anemoi, there will be different dimensions that can be treated independently
thanks again for starting the discussion around this topic |
Beta Was this translation helpful? Give feedback.
-
Hi, |
Beta Was this translation helpful? Give feedback.
-
Great, good idea :) Just want to add: If we consider to create an abstract base class for the forecasters, we should probably think the same for the datamodule/class in my opinion. Should be another issue maybe. |
Beta Was this translation helpful? Give feedback.
-
I think we want to keep the class hierarchy flat and simple. We can provide a minimal base class for the different modules (forecaster etc.) and then provide functions that different modules can use to provide the required functionality. |
Beta Was this translation helpful? Give feedback.
-
In my opinion, the below is a bit too much granularity. An encoder with multiple input datasets is still an encoder, a hierarchical processor is a processor, so there is actually 1 architecture enc-proc-dec. I would combine task and objective (e.g. deterministic forecast, probabilistic downscaling...) and argue that we can simply implement the step / forward method for every specific task the way the interpolator used to be.
|
Beta Was this translation helpful? Give feedback.
-
@icedoom888. Multiple Datasets has made some headway, and we are considering incorporating this refactor into that working group. Can we have a meeting to propose this combination to you? When are you available in the coming weeks? |
Beta Was this translation helpful? Give feedback.
-
With the recent and upcoming additions to anemoi-core, including:
I'd like to propose introducing a new abstract base class to unify all GraphModule implementations.
Currently, most new tasks inherit from GraphForecaster, even when their objectives differ significantly—for example, the GraphInterpolator (see implementation) does not perform forecasting per se.
The goal is to define a clean and flexible base class that all graph-based modules can inherit from, each implementing their own init and forward methods as needed.
I'd like to open the discussion on the desired features and structure of this base class. The aim is to minimize required changes when extending it for new tasks, support shared configuration parameters, and reduce boilerplate code while allowing task-specific customizations.
Beta Was this translation helpful? Give feedback.
All reactions