Repository navigation
[PIR] Adaptation of test_zero_dim_no_backward_api, extract init data - #62808
Merged
Merged
Conversation
|
你的PR提交成功,感谢你对开源项目的贡献! |
gouzil
commented
Mar 18, 2024
| @@ -312,6 +315,7 @@ def test_arange(self): | |||
| np.testing.assert_array_equal(res, [1.0, 2.0, 3.0, 4.0, 5.0]) | |||
|
|
|||
| def test_normal(self): | |||
SigureMo
reviewed
Mar 18, 2024
| def setUp(self): | ||
| paddle.enable_static() | ||
| self.exe = paddle.static.Executor() | ||
| self.shape = [] |
Collaborator
There was a problem hiding this comment.
我们不应该在setUp中加载任何数据,因为在这时还没确定是哪种 IR 模式运行
这个默认的 self.shape 是针对什么情况的?如果所有 case 都有 init_data 的话,就不存在需要 self.shape 默认值的情况
另外,既然现在是在具体 test case 里调用的,就不要写成带有 side effect 的函数了,直接作为返回值返回即可,能写成纯函数就写成纯函数,函数名改名为 create_dynamic_shape
SigureMo
approved these changes
Mar 18, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR types
Bug fixes
PR changes
Others
Description
我们不应该在
setUp中加载任何数据,因为在这时还没确定是哪种 IR 模式运行相关链接:
test_zero_dim_*.py- step: 2 #62652