Skip to content

Conversation

jiangandhao
Copy link

PR types

PR changes

Describe

Copy link

paddle-bot bot commented Jun 18, 2025

Thanks for your contribution!

@CLAassistant
Copy link

CLAassistant commented Jun 18, 2025

CLA assistant check
All committers have signed the CLA.

jiangandhao

This comment was marked as off-topic.

=== "amgnet_airfoil"

``` sh
python amgnet_airfoil.py mode=export EVAL.pretrained_model_path=https://paddle-org.bj.bcebos.com/paddlescience/models/amgnet/amgnet_airfoil_pretrained.pdparams
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
python amgnet_airfoil.py mode=export EVAL.pretrained_model_path=https://paddle-org.bj.bcebos.com/paddlescience/models/amgnet/amgnet_airfoil_pretrained.pdparams
python amgnet_airfoil.py mode=export

=== "amgnet_cylinder"

``` sh
python amgnet_cylinder.py mode=export EVAL.pretrained_model_path=https://paddle-org.bj.bcebos.com/paddlescience/models/amgnet/amgnet_cylinder_pretrained.pdparams
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
python amgnet_cylinder.py mode=export EVAL.pretrained_model_path=https://paddle-org.bj.bcebos.com/paddlescience/models/amgnet/amgnet_cylinder_pretrained.pdparams
python amgnet_cylinder.py mode=export

# curl https://paddle-org.bj.bcebos.com/paddlescience/datasets/AMGNet/data.zip -o data.zip
# unzip it
unzip data.zip
python amgnet_airfoil.py mode=infer EVAL.pretrained_model_path=https://paddle-org.bj.bcebos.com/paddlescience/models/amgnet/amgnet_airfoil_pretrained.pdparams
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
python amgnet_airfoil.py mode=infer EVAL.pretrained_model_path=https://paddle-org.bj.bcebos.com/paddlescience/models/amgnet/amgnet_airfoil_pretrained.pdparams
python amgnet_airfoil.py mode=infer

# curl https://paddle-org.bj.bcebos.com/paddlescience/datasets/AMGNet/data.zip -o data.zip
# unzip it
unzip data.zip
python amgnet_cylinder.py mode=infer EVAL.pretrained_model_path=https://paddle-org.bj.bcebos.com/paddlescience/models/amgnet/amgnet_cylinder_pretrained.pdparams
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
python amgnet_cylinder.py mode=infer EVAL.pretrained_model_path=https://paddle-org.bj.bcebos.com/paddlescience/models/amgnet/amgnet_cylinder_pretrained.pdparams
python amgnet_cylinder.py mode=infer

Comment on lines 268 to 270



Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

多个空行请缩减为一行

Comment on lines 279 to 280


Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines 289 to 290


Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

)



Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

删除多余空行

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

examples/amgnet/amgnet_airfoil.py一样的问题,请一起修改

@HydrogenSulfate
Copy link
Collaborator

@jiangandhao 可参考

# inference settings
INFER:
pretrained_model_path: https://paddle-org.bj.bcebos.com/paddlescience/models/AllenCahn/allen_cahn_piratenet_pretrained.pdparams
export_path: ./inference/allen_cahn
pdmodel_path: ${INFER.export_path}.pdmodel
pdiparams_path: ${INFER.export_path}.pdiparams
onnx_path: ${INFER.export_path}.onnx
device: gpu
engine: native
precision: fp32
ir_optim: true
min_subgraph_size: 5
gpu_mem: 2000
gpu_id: 0
max_batch_size: 1024
num_cpu_threads: 10
batch_size: 1024

添加INFER字段到配置文件中

Copy link
Author

@jiangandhao jiangandhao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

应该没问题了

@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label Jun 19, 2025
@luotao1
Copy link
Collaborator

luotao1 commented Jun 19, 2025

PR标题请按照规范修改

@jiangandhao jiangandhao changed the title 完成export和inference功能,修改AMGNet文档 PPSCI Export&Infer No.8 Jun 19, 2025
@jiangandhao
Copy link
Author

Collaborator

已修改

@luotao1
Copy link
Collaborator

luotao1 commented Jun 19, 2025

https://www.paddlepaddle.org.cn/documentation/docs/zh/dev_guides/git_guides/codestyle_check_guide_cn.html

请安装precommit工具,来通过CodeStyle流水线的格式检查

@luotao1 luotao1 changed the title PPSCI Export&Infer No.8 【PPSCI Export&Infer No.8】Add export and inference for amgnet_cylinder Jun 19, 2025
@HydrogenSulfate
Copy link
Collaborator

@jiangandhao 你好,代码无法跑通,如果自测可以跑通的话请贴上跑通模型导出和推理的截图到PR中,谢谢

@jiangandhao
Copy link
Author

0b2b653a-b317-4470-92bc-bc0de4c51bd8
这个是通过还是没通过?

@jiangandhao 你好,代码无法跑通,如果自测可以跑通的话请贴上跑通模型导出和推理的截图到PR中,谢谢

@HydrogenSulfate
Copy link
Collaborator

0b2b653a-b317-4470-92bc-bc0de4c51bd8 这个是通过还是没通过?

@jiangandhao 你好,代码无法跑通,如果自测可以跑通的话请贴上跑通模型导出和推理的截图到PR中,谢谢

上面这个截图里的是普通的测试流水线,并不会测试你PR新增的功能,而我说的自测是指:你这个PR是支持amgnet两个模型的导出和推理,那你需要本地自测是否能够跑通导出、推理,以及推理结果是否正确(和eval的结果相同)。

@HydrogenSulfate
Copy link
Collaborator

HydrogenSulfate commented Jun 19, 2025

另外给开源仓库提交PR时,请安装pre-commit:
image
https://paddlescience-docs.readthedocs.io/zh-cn/latest/zh/development/#1

@jiangandhao jiangandhao closed this by deleting the head repository Jun 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor HappyOpenSource 快乐开源活动issue与PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants