You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To start of the discussion here are some things I have been wondering about:
My view is that we will eventually want to use pyg.HeteroData objects to represent the graph internally in neural-lam. This is what I did in https://github.com/leifdenby/weatherduck which was a prototype implementation trying that approach out (and also trying out fiddle-based config, which is a different conversation). It is also what @matschreiner does in https://github.com/matschreiner/equicast/tree/main?tab=readme-ov-file#data-handler. I think it simplifies the code a lot (only a single object is passed around representing the entire graph) and enables us to eventually also put the model inputs (state/forcing etc) as node features on this graph object, rather than as separate tensors being passed around (which I think is a nice design for implementing new architectures in neural-lam)
Is there an interest in moving towards this?
Have some people already started this work?
@SimonKamuk you and I have discussed this, have you looked at refactoring neural-lam in this way?
If we agree this should be done, maybe we could plan a first step in this direction to be loading the tensor-based format into a pyg.HeteroDataobject that is then passed to the torch.nn.Module-derived classes that implement the forecasting model (currently ARModel). What do people think of that?
Does it make sense trying to export from weather-model-graphs to pyg.HeteroData objects and pickling these to disk?
If so, what would the drawbacks of these be? To me a clear drawback is that the format (pickled python objects) isn't a self-describing format, unlike what a xr.DataTreenetCDF/zarr dataset could be. And it relies on torch-geometric which seems a bit overkill for something that just describes a static graph with edge and node features.
If we instead opt for writing xr.DataTrees to disk to represent the graph what would the pros/cons there be? Is the xr.DataTree functionality I have already drafted (Feat/xr datatree output format weather-model-graphs#47) fit-for-purpose or is there something wrong/missing?
This issue is meant as a continuation that started on #339 on bridging the gap between weather-model-graphs and neural-lam.
The aim of this issue to continue the discussion on whether and how to support use of
pyg.HeteroDataobjects to represent the graph when working withneural-lam(rather than the dictionary of edge-indexes and node/edge features currently used)To start of the discussion here are some things I have been wondering about:
pyg.HeteroDataobjects to represent the graph internally inneural-lam. This is what I did in https://github.com/leifdenby/weatherduck which was a prototype implementation trying that approach out (and also trying out fiddle-based config, which is a different conversation). It is also what @matschreiner does in https://github.com/matschreiner/equicast/tree/main?tab=readme-ov-file#data-handler. I think it simplifies the code a lot (only a single object is passed around representing the entire graph) and enables us to eventually also put the model inputs (state/forcing etc) as node features on this graph object, rather than as separate tensors being passed around (which I think is a nice design for implementing new architectures inneural-lam)neural-lamin this way?pyg.HeteroDataobject that is then passed to thetorch.nn.Module-derived classes that implement the forecasting model (currently ARModel). What do people think of that?weather-model-graphstopyg.HeteroDataobjects and pickling these to disk?xr.DataTreenetCDF/zarrdataset could be. And it relies ontorch-geometricwhich seems a bit overkill for something that just describes a static graph with edge and node features.xr.DataTreesto disk to represent the graph what would the pros/cons there be? Is thexr.DataTreefunctionality I have already drafted (Feat/xr datatree output format weather-model-graphs#47) fit-for-purpose or is there something wrong/missing?This issue is meant as a continuation that started on #339 on bridging the gap between
weather-model-graphsandneural-lam.