-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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 API adaptor No.158】nanmedian #58889
Conversation
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.
nice work ~
但还有一些问题
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.
这个文件下遗漏了 TestNanmedianBF16Op 单测的适配
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.
Co-authored-by: Lu Qi <61354321+MarioLulab@users.noreply.github.com>
python/paddle/tensor/stat.py
Outdated
@@ -313,8 +313,12 @@ def nanmedian(x, axis=None, keepdim=False, name=None): | |||
>>> print(y4.numpy()) | |||
2.0 | |||
""" | |||
if not isinstance(x, Variable): |
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.
这里不用改成ifelse的形式,if not isinstance(x, (Variable, paddle.pir.OpResult)):
就可以~
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.
还请麻烦再 pre-commit 一下
Co-authored-by: Lu Qi <61354321+MarioLulab@users.noreply.github.com>
test/legacy_test/test_nanmedian.py
Outdated
@@ -150,6 +152,7 @@ def test_axis_case(data, axis): | |||
|
|||
paddle.enable_static() | |||
|
|||
@test_with_pir_api |
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.
test_errors 单测可以看一下哪些在 pir 模式下能正常通过,哪些不能正常通过。不能正常通过的关闭 pir 开关,然后在 pr 描述里注明一下跳过了哪些单测
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.
目前从 ci 来看,nanmedian 得 test_errors 单测暂不支持。辛苦在 pr 描述里写上 “test/legacy_test/test_nanmedian.py 文件里的 TestNanmedian.test_errors ” 单测尚不支持,并更新一下单测覆盖率~
Sorry to inform you that 8771d06's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually. |
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.
LGTM
辛苦在 pr 描述里写上 “test/legacy_test/test_nanmedian.py 文件里的 TestNanmedian.test_errors ” 单测尚不支持,并更新一下单测覆盖率
PR types
Others
PR changes
APIs
Description
#58067 158