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

[Cherry-Pick]Fix the bug that ParamBase lose attributes when paddle.save(Layer) #33567

Closed

Conversation

hbwx24
Copy link
Contributor

@hbwx24 hbwx24 commented Jun 15, 2021

PR types

Bug fixes

PR changes

APIs

Describe

修复paddle.save(Layer)时参数属性丢失的问题:通过实现__reduce__的方式保存layer中的ParamBase的所有信息。

兼容性问题:

  • paddle2.1 无法加载paddle2.1.1 保存的Layer对象。paddle2.1.1可以加载paddle2.1保存的Layer对象。
  • 对于非Layer对象,如state_dict等,2.1与2.1.1完全兼容,2.1可以加载2.1.1保存的非Layer对象。可以脱离框架加载pickle格式的模型文件。

详情见原始PR:#33500

* Save all the information of 'ParamBase' in 'Layer'.

* edit unittest
@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@hbwx24 hbwx24 changed the title Save all the information of 'ParamBase' in 'Layer'. (#33500) Fix the bug that ParamBase lose attributes when paddle.save(Layer) (#33500) Jun 15, 2021
@hbwx24 hbwx24 changed the title Fix the bug that ParamBase lose attributes when paddle.save(Layer) (#33500) Fix the bug that ParamBase lose attributes when paddle.save(Layer) Jun 15, 2021
@hbwx24 hbwx24 changed the title Fix the bug that ParamBase lose attributes when paddle.save(Layer) [Cherry-Pick]Fix the bug that ParamBase lose attributes when paddle.save(Layer) Jun 15, 2021
@paddle-bot-old
Copy link

Sorry to inform you that 4c91388's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually.

@paddle-bot-old paddle-bot-old bot closed this Jun 28, 2022
@paddle-bot-old
Copy link

Since you haven't replied for more than a year, we have closed this issue/pr.
If the problem is not solved or there is a follow-up one, please reopen it at any time and we will continue to follow up.
由于您超过一年未回复,我们将关闭这个issue/pr。
若问题未解决或有后续问题,请随时重新打开,我们会继续跟进。

@paddle-bot-old
Copy link

很抱歉,经过我们的反复讨论,你的PR暂未达到合入标准,请阅读飞桨原生算子开发规范,你可以重新提交新的PR,我们先将此PR关闭,感谢你的贡献。
Sorry to inform you that through our discussion, your PR fails to meet the merging standard (Reference: Paddle Custom Operator Design Doc). You can also submit an new one. Thank you.

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