Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

【Fix PIR Unittest No.398,No.399】 #66299

Closed

Conversation

inaomIIsfarell
Copy link
Contributor

@inaomIIsfarell inaomIIsfarell commented Jul 20, 2024

PR Category

Others

PR Types

Bug fixes

Description

No.398
AttributeError: 'paddle.base.libpaddle.pir.Value' object has no attribute 'grad'
使用with paddle.pir_utils.OldIrGuard() 包裹问题代码块

No.399
使用paddle.static.nn的api,在代码前加入paddle.enable_static(),同时给文件加上_deprecated后缀

关联issue: #63740

Copy link

paddle-bot bot commented Jul 20, 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.

@CLAassistant
Copy link

CLAassistant commented Jul 20, 2024

CLA assistant check
All committers have signed the CLA.

@paddle-bot paddle-bot bot added the contributor External developers label Jul 20, 2024
@inaomIIsfarell inaomIIsfarell changed the title 【Fix PIR Unittest No.398】 【Fix PIR Unittest No.398,No.399】 Jul 21, 2024
@inaomIIsfarell
Copy link
Contributor Author

Unittest No.399 似乎上个月已经被修复
paddle_unittest

@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label Jul 22, 2024
input_pd.grad = paddle.to_tensor(
np.random.random([1, 2]).astype(np.float32)
)
clip_grad_norm_(input_pd, max_norm=2, norm_type=float("inf"))
Copy link
Contributor

Choose a reason for hiding this comment

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

这个应该去看clip_grad_norm_里有什么问题,为什么在PIR下不支持。而不是用OldIrGuard裹上了之。

Comment on lines -1 to -2
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
Copy link
Contributor

Choose a reason for hiding this comment

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

这个单测报了问题,就应该修问题,而不是放到_deprecated.py下

Copy link

paddle-ci-bot bot commented Jul 29, 2024

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

@luotao1 luotao1 closed this Oct 8, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
contributor External developers HappyOpenSource 快乐开源活动issue与PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants