Skip to content
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

【pir_save_load】add null type saveload and modify save_inference_model api #63438

Merged
merged 7 commits into from
Apr 16, 2024

Conversation

xiaoguoguo626807
Copy link
Contributor

@xiaoguoguo626807 xiaoguoguo626807 commented Apr 12, 2024

PR Category

others

PR Types

Improvements

Description

pcard-67164

  1. 补充null type 的序列化和反序列化规则以支持单测样例
  2. 适配save_inference_model主要逻辑,支持pir, 遗留部分逻辑相关函数需要重新实现。
    TODO:
    predictor 相关的内容需要调研,如何和pir 的saveload对接

Copy link

paddle-bot bot commented Apr 12, 2024

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@@ -578,7 +674,12 @@ def save_inference_model(
except OSError as e:
if e.errno != errno.EEXIST:
raise
model_path = path_prefix + ".pdmodel"

if in_pir_mode():
Copy link
Contributor

Choose a reason for hiding this comment

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

这样写的话函数中引入了太多in_pir_mode的判断,显得有点乱,是否考虑直接新开一个pir的完整函数分支,在主函数中引入。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

后续提pr修改

changeyoung98
changeyoung98 previously approved these changes Apr 15, 2024
@xiaoguoguo626807 xiaoguoguo626807 merged commit fe5e25e into PaddlePaddle:develop Apr 16, 2024
29 checks passed
@xiaoguoguo626807 xiaoguoguo626807 deleted the save_2 branch April 16, 2024 03:01
Asthestarsfalll pushed a commit to Asthestarsfalll/Paddle that referenced this pull request Apr 17, 2024
… api (PaddlePaddle#63438)

* add nulltype saveload

* add load test

* add save

* modify

* modify load_inference_model

* modify loadinference
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants