-
Notifications
You must be signed in to change notification settings - Fork 214
【Hackathon 8th No.13】Domino 论文复现 #1093
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
Thanks for your contribution! |
复现Domino有两个问题:
|
请先提交 RFC 设计文档 |
不好意思这里任务描述有误,需要改为【推理】和【训练】 |
@wangguan1995 目前模型已经能正常训练,精度通过Padiff验证通过。训练代码存在随机性,每个step前处理数据没法通过随机数种子固定。 |
|
前10 个epoch日志: torch
paddle:
|
examples/domino/README.md
Outdated
@@ -0,0 +1,43 @@ | |||
# DoMINO: Decomposable Multi-scale Iterative Neural Operator for External Aerodynamics |
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.
ReadMe需要合入文档,可以参考:https://paddlescience-docs.readthedocs.io/zh-cn/latest/zh/development/#3
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.
已修改,麻烦review
from typing import Literal | ||
from typing import Tuple | ||
|
||
import torch |
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.
已清理
time_string = start_time.strftime("%m/%d/%y %H:%M:%S") | ||
client.set_tag(run.info.run_id, "date", time_string) | ||
client.set_tag(run.info.run_id, "host", os.uname()[1]) | ||
if torch.cuda.is_available(): |
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.
已清理
|
||
from datetime import datetime | ||
|
||
import torch |
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.
已清理
path : str | ||
Path to training checkpoint | ||
models : Union[paddle.nn.Layer, List[paddle.nn.Layer], None], optional | ||
A single or list of PyTorch models, by default None |
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.
已清理
examples/domino/README.md
Outdated
|
||
## 推理 | ||
|
||
1. 修改`conf/config.yaml`路径, 原始配置文件参考[DoMINO](https://github.com/NVIDIA/modulus/blob/main/examples/cfd/external_aerodynamics/domino/src/conf/config.yaml)。 |
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.
modulus相关内容代码需要进一步整理,使得文件夹的相关内容可以合入PaddleScience的arch文件夹
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文件,麻烦review
目前计划进行数据精度验证
|
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.
To fix
@@ -0,0 +1,124 @@ | |||
# SPDX-FileCopyrightText: Copyright (c) 2023 - 2024 NVIDIA CORPORATION & AFFILIATES. |
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.
Copy Right需要改为PaddlePaddle,并声明是对原始论文的复现
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.
done.
examples/domino/process_data.py
Outdated
@@ -0,0 +1,109 @@ | |||
# SPDX-FileCopyrightText: Copyright (c) 2023 - 2024 NVIDIA CORPORATION & AFFILIATES. |
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.
合入至 ppsci/data/process
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.
done.
examples/domino/requirements.txt
Outdated
@@ -0,0 +1,6 @@ | |||
hydra-core |
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.
done.
@@ -0,0 +1,17 @@ | |||
# SPDX-FileCopyrightText: Copyright (c) 2023 - 2024 NVIDIA CORPORATION & AFFILIATES. |
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.
data pipe文件夹需要按照要求合入至ppsci/data/dataset模块
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.
done.
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.
这部分manager对代码影响不大,只用到了rank和world size,直接用paddle.dist.get_rank和get_world_size做了替换
@@ -0,0 +1,18 @@ | |||
# SPDX-FileCopyrightText: Copyright (c) 2023 - 2024 NVIDIA CORPORATION & AFFILIATES. |
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.
同上
@@ -0,0 +1,378 @@ | |||
# SPDX-FileCopyrightText: Copyright (c) 2023 - 2024 NVIDIA CORPORATION & AFFILIATES. |
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.
done.
@@ -0,0 +1,1178 @@ | |||
# SPDX-FileCopyrightText: Copyright (c) 2023 - 2024 NVIDIA CORPORATION & AFFILIATES. |
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文件合并为单个ppsci/arch/physicsnemo.py
参考:ppsci/arch/kan.py
ppsci/arch/physicsnemo/utils/sdf.py
Outdated
@@ -0,0 +1,143 @@ | |||
# SPDX-FileCopyrightText: Copyright (c) 2023 - 2024 NVIDIA CORPORATION & AFFILIATES. |
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.
需要合入至:ppsci/utils/ 模块
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.
done.
examples/domino/train.py
Outdated
@@ -0,0 +1,946 @@ | |||
# SPDX-FileCopyrightText: Copyright (c) 2023 - 2024 NVIDIA CORPORATION & AFFILIATES. |
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.
train 和 test需要合并
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.
to fix
docs/zh/examples/domino.md
Outdated
|
||
外部空气动力学涉及高雷诺数Navier-Stokes方程求解,传统CFD方法计算成本高昂。神经算子通过端到端映射提升了效率,但面临多尺度耦合建模与长期预测稳定性不足的挑战。Decomposable Multi-scale Iterative Neural Operator(Domino)提出可分解多尺度架构,通过分层特征解耦、迭代残差校正及参数独立编码,显著提升跨尺度流动建模精度与泛化能力。实验显示,其计算速度较CFD快2-3个量级,分离流预测精度较FNO等模型提升约40%,为飞行器设计等工程问题提供高效解决方案。 | ||
|
||
## 2. 模型原理 |
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.
文档可以参考https://paddlescience-docs.readthedocs.io/zh-cn/latest/zh/examples/drivaernetplusplus/
进行修改,论文的主要结论需要体现
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.
已修改
requirements.txt
Outdated
@@ -2,19 +2,25 @@ colorlog | |||
einops | |||
h5py | |||
hydra-core | |||
hydra-core |
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.
del
PR types
New Features
PR changes
Others
Describe
support domino