-
Notifications
You must be signed in to change notification settings - Fork 231
Add Climateformer for climate prediction #1211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
使用pre-commit对代码格式化。
add Climateformer model for climate prediction add docs for Climateformer add examples for Climateformer add era5climate_dataset for Climateformer
Thanks for your contribution! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
USE_SAMPLED_DATA: false | ||
|
||
# set train data path | ||
TRAIN_FILE_PATH: /data/jinqizhao/ERA5/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
删除/jinqizhao
DATA_STD_PATH: ./datasets/era5/stat/std.nc | ||
|
||
# set evaluate data path | ||
VALID_FILE_PATH: /data/jinqizhao/ERA5/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
删除/jinqizhao
examples/climateformer/main.py
Outdated
"sampler": { | ||
"name": "BatchSampler", | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可删除
"sampler": { | |
"name": "BatchSampler", | |
}, |
examples/climateformer/main.py
Outdated
"sampler": { | ||
"name": "BatchSampler", | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可删除
"sampler": { | |
"name": "BatchSampler", | |
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
跟develop合并一下,不要删除无关代码
ppsci/arch/climateformer.py
Outdated
# MultiDecoder | ||
class Decoder(nn.Layer): | ||
def __init__(self, C_hid: int, C_out: int, N_S: int): | ||
super(Decoder, self).__init__() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
super(Decoder, self).__init__() | |
super().__init__() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上,请合并一下最新分支
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
请在mkdocs.yml里添加当前案例文档
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
请在arch.md
中加入Climateformer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
请在dataset.md
中加入ERA5ClimateDataset
Changes for Climateformer
docs/zh/examples/climateformer.md
Outdated
@@ -0,0 +1,265 @@ | |||
# Climateformer | |||
|
|||
开始训练、评估前,请下载ERA5数据集文件 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
请添加ERA5数据集下载链接
docs/zh/examples/climateformer.md
Outdated
=== "模型评估命令" | ||
|
||
``` sh | ||
python main.py mode=eval EVAL.pretrained_model_path=./outputs_climateformer/checkpoints/best_model.pdparams |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
模型已经上传,将./outputs_climateformer/checkpoints/best_model.pdparams修改为https://paddle-org.bj.bcebos.com/paddlescience/models/climateformer/climateformer.pdparams
docs/zh/examples/climateformer.md
Outdated
|
||
开始训练、评估前,请下载ERA5数据集文件 | ||
|
||
开始评估前,请下载或训练生成预训练模型 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs/zh/examples/climateformer.md
Outdated
--8<-- | ||
examples/climateformer/conf/climateformer.yaml | ||
--8<-- | ||
``` No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
添加可视化预测结果和参考资料
Revised Version of Climateformer for climate prediction
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
有一处小问题,然后解决一下冲突,基本没其他问题了
docs/zh/examples/climateformer.md
Outdated
--8<-- | ||
``` | ||
|
||
#### 3.2.6 模型导出 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个应该叫训练时评估吧
examples/climateformer/main.py
Outdated
epochs=cfg.TRAIN.epochs, | ||
iters_per_epoch=ITERS_PER_EPOCH, | ||
log_freq=cfg.log_freq, | ||
eval_during_train=True, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里建议改成cfg.TRAIN.eval_during_train
docs/index.md
Outdated
|-----|---------|-----|---------|----|---------|---------| | ||
| 化学分子生成 | [Moflow](./zh/examples/moflow.md) | 数据驱动 | moflow | 监督学习 | qm9/ zink250k | [MoFlow: An Invertible Flow Model for Generating Molecular Graphs](https://arxiv.org/abs/2006.10137v1) | | ||
| 化学反应预测 | [IFM](./zh/examples/ifm.md) | 数据驱动 | IFM-MLP | 监督学习 | tox21/sider/hiv/bace/bbbp | [Understanding the Limitations of Deep Models for Molecular property prediction: Insights and Solutions](https://openreview.net/pdf?id=NLFqlDeuzt) | | ||
| 天气预报 | [Climateformer 气候预测](./zh/examples/climateformer.md) | 数据驱动 | Transformer | 监督学习 | [ERA5](https://https://cds.climate.copernicus.eu/datasets/reanalysis-era5-pressure-levels?tab=download) | - | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
把这个放到地球物理分类里
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
py和yaml请用pre-commit过一遍
import h5py | ||
import numpy as np | ||
import paddle | ||
import xarray as xr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
xarray不是PaddleScience的依赖,请修改
import xarray as xr | |
try: | |
import xarray as xr | |
except ModuleNotFoundError: | |
pass |
均已pre-commit过了。
@zhangpu00000 yaml文件也需要用pre-commit过一遍 |
PR types
Others
PR changes
Others
Describe
add Climateformer model for climate prediction
add docs for Climateformer
add examples for Climateformer
add era5climate_dataset for Climateformer