Graph Machine Learning
AnemoI
English
anaprietonem commited on
Commit
da8a0ff
1 Parent(s): 97b03b6

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +26 -4
README.md CHANGED
@@ -27,6 +27,10 @@ are available to the public under ECMWF’s open data policy. (https://www.ecmwf
27
  AIFS is based on a graph neural network (GNN) encoder and decoder, and a sliding window transformer processor,
28
  and is trained on ECMWF’s ERA5 re-analysis and ECMWF’s operational numerical weather prediction (NWP) analyses.
29
 
 
 
 
 
30
  <div style="display: flex;">
31
  <img src="encoder_graph.jpeg" alt="Encoder graph" style="width: 50%;"/>
32
  <img src="decoder_graph.jpeg" alt="Decoder graph" style="width: 50%;"/>
@@ -70,14 +74,32 @@ pip install anemoi-inference[plugin] anemoi-models==0.2
70
  pip install ninja
71
  pip install flash-attn --no-build-isolation
72
 
73
- # Run ai-models
74
 
75
  ai-models anemoi --checkpoint aifs_single_v0.2.1.ckpt --file example_20241107_12_n320.grib
76
  ```
77
- ! ISSUE WITH PYTORCH 2.5 and flash_attention, and cuda 12.4. For now keep it to torch 2.4
78
 
79
- The above command will write the forecast results to anemoi.grib
80
- #missing - example how to plot/open the anemoi.grib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
 
82
  ## Training Details
83
 
 
27
  AIFS is based on a graph neural network (GNN) encoder and decoder, and a sliding window transformer processor,
28
  and is trained on ECMWF’s ERA5 re-analysis and ECMWF’s operational numerical weather prediction (NWP) analyses.
29
 
30
+ <div style="display: flex; justify-content: center;">
31
+ <img src="aifs_diagram.png" alt="High-level AIFS diagram" style="width: 50%;"/>
32
+ </div>
33
+
34
  <div style="display: flex;">
35
  <img src="encoder_graph.jpeg" alt="Encoder graph" style="width: 50%;"/>
36
  <img src="decoder_graph.jpeg" alt="Decoder graph" style="width: 50%;"/>
 
74
  pip install ninja
75
  pip install flash-attn --no-build-isolation
76
 
77
+ # 2nd Run ai-models to generate weather forecast
78
 
79
  ai-models anemoi --checkpoint aifs_single_v0.2.1.ckpt --file example_20241107_12_n320.grib
80
  ```
 
81
 
82
+ **Note** we train AIFS using `flash_attention` (https://github.com/Dao-AILab/flash-attention)
83
+ There are currently some issues when trying to install flash attention with the latest PyTorch version 2.5 and CUDA 12.4 (https://github.com/Dao-AILab/flash-attention/issues/1330)
84
+ For that reason we recommen you install PyTorch 2.4
85
+
86
+ After running the `ai-models` command the output of the forecast should be written into `anemoi.grib`
87
+ Below you can find an example to read that file and load it as numpy array or xarray.
88
+
89
+ ```
90
+
91
+ import earthkit.data as ekd
92
+
93
+ source_filename='anemoi.grib'
94
+ aifs_forecast = ekd.from_source('file',source_filename)
95
+
96
+ # to load it as a numpy array
97
+ aifs_forecast.to_numpy()
98
+
99
+ # to load it as a xarray array
100
+ aifs_forecast.to_xarray()
101
+
102
+ ```
103
 
104
  ## Training Details
105