README.md 3.21 KB
Newer Older
dcuai's avatar
dcuai committed
1
# GraphCast
mashun1's avatar
mashun1 committed
2
3
4

## 论文

mashun1's avatar
mashun1 committed
5
`GraphCast: Learning skillful medium-range global weather forecasting`
mashun1's avatar
mashun1 committed
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

* https://arxiv.org/pdf/2212.12794

## 模型结构

网络是包含`编码-处理-解码`的GNN网络。

![alt text](asset/model_structure.png)

## 算法原理

基于GNN的学习模拟器在学习和模拟流体和其他材料的复杂物理动力学方面非常有效,因为它们的表示和计算结构类似于学习的有限元求解器。GNN的一个关键优势是,输入图的结构决定了通过学习消息传递相互作用的表示的哪些部分,允许任意范围的空间交互模式。

![alt text](asset/alg.png)

## 环境配置

### Docker(方法一)

    docker pull image.sourcefind.cn:5000/dcu/admin/base/jax:0.4.23-ubuntu20.04-dtk24.04-py310

    docker run --shm-size 10g --network=host --name=graphcast --privileged --device=/dev/kfd --device=/dev/dri --group-add video --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -v 项目地址(绝对路径):/home/ -v /opt/hyhal:/opt/hyhal:ro -it <your IMAGE ID> bash

mashun1's avatar
update  
mashun1 committed
29
    pip install -r requirements.txt --constraint constraints.txt
mashun1's avatar
mashun1 committed
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
    pip install -e .
    pip uninstall shapely
    pip install shapely

    pip install --upgrade google-api-python-client
    pip install google.cloud.bigquery
    pip install google.cloud.storage
    

### Dockerfile(方法二)

    docker build -t <IMAGE_NAME>:<TAG> .

    docker run --shm-size 10g --network=host --name=graphcast --privileged --device=/dev/kfd --device=/dev/dri --group-add video --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -v 项目地址(绝对路径):/home/ -v /opt/hyhal:/opt/hyhal:ro -it <your IMAGE ID> bash

mashun1's avatar
update  
mashun1 committed
45
    pip install -r requirements.txt --constraint constraints.txt
mashun1's avatar
mashun1 committed
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
    pip install -e .
    pip uninstall shapely
    pip install shapely

    pip install --upgrade google-api-python-client
    pip install google.cloud.bigquery
    pip install google.cloud.storage

### Anaconda(方法三)

    DTK驱动:dtk24.04
    python:python3.10
    jax: 0.4.23

Tips:以上dtk驱动、python、jax等DCU相关工具版本需要严格一一对应

2、其他非特殊库

mashun1's avatar
update  
mashun1 committed
64
    pip install -r requirements.txt --constraint constraints.txt
mashun1's avatar
mashun1 committed
65
66
67
68
    pip install -e .
    pip uninstall shapely
    pip install shapely

mashun1's avatar
update  
mashun1 committed
69
70
71
72
    pip install --upgrade google-api-python-client
    pip install google.cloud.bigquery
    pip install google.cloud.storage

mashun1's avatar
mashun1 committed
73
74
75
    
## 数据集

chenzk's avatar
chenzk committed
76
[Google Cloud](https://console.cloud.google.com/storage/browser/dm_graphcast)
mashun1's avatar
mashun1 committed
77
78


mashun1's avatar
update  
mashun1 committed
79
注意:该数据集按需下载,在执行`graphcast_demo.ipynb`时,可自动下载示例数据。
mashun1's avatar
mashun1 committed
80
81
82
83
84

## 训练

参考并执行`graphcast_demo.ipynb`中的`Train Model`部分。

mashun1's avatar
update  
mashun1 committed
85
86
注意:使用`jupyter notebook --no-browser --ip=0.0.0.0 --allow-root`启动服务以运行代码。

mashun1's avatar
mashun1 committed
87
88
89
90
## 推理

参考并执行`graphcast_demo.ipynb`中的`Run the model`部分。

mashun1's avatar
update  
mashun1 committed
91

mashun1's avatar
mashun1 committed
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
## result

![alt text](asset/result.png)

### 精度



## 应用场景

### 算法类别

`天气预报`

### 热点应用行业

`气象,交通,环境`

mashun1's avatar
update  
mashun1 committed
110
111
## 预训练权重

chenzk's avatar
chenzk committed
112
[Google Cloud](https://console.cloud.google.com/storage/browser/dm_graphcast)
mashun1's avatar
update  
mashun1 committed
113

mashun1's avatar
mashun1 committed
114
115
## 源码仓库及问题反馈

chenzk's avatar
chenzk committed
116
* https://developer.sourcefind.cn/codes/modelzoo/graphcast_jax
mashun1's avatar
mashun1 committed
117
118
119
120
121
122

## 参考资料

* https://github.com/google-deepmind/graphcast