Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
888631b6
P
Paddle
项目概览
PaddlePaddle
/
Paddle
接近 2 年 前同步成功
通知
2323
Star
20933
Fork
5424
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
888631b6
编写于
12月 06, 2022
作者:
N
Nyakku Shigure
提交者:
GitHub
12月 06, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[CodeStyle][isort][Dy2St] sort imports in test_error (#48746)
* [CodeStyle][isort][Dy2St] sort imports in test_error * update lineno
上级
e4ee872c
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
12 addition
and
11 deletion
+12
-11
pyproject.toml
pyproject.toml
+0
-1
python/paddle/fluid/tests/unittests/dygraph_to_static/test_error.py
...dle/fluid/tests/unittests/dygraph_to_static/test_error.py
+12
-10
未找到文件。
pyproject.toml
浏览文件 @
888631b6
...
...
@@ -19,6 +19,5 @@ extend_skip_glob = [
"python/paddle/fluid/tests/unittests/mlu/**"
,
# These files will be fixed in the future
"python/paddle/fluid/tests/unittests/dygraph_to_static/test_error.py"
,
"python/paddle/jit/**"
,
]
python/paddle/fluid/tests/unittests/dygraph_to_static/test_error.py
浏览文件 @
888631b6
...
...
@@ -12,10 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import
os
import
inspect
import
os
import
unittest
import
numpy
as
np
import
paddle
import
paddle.fluid
as
fluid
from
paddle.jit.dy2static
import
error
...
...
@@ -254,11 +256,11 @@ class TestErrorStaticLayerCallInCompiletime(TestErrorBase):
def
set_message
(
self
):
self
.
expected_message
=
[
'File "{}", line 3
3
, in func_error_in_compile_time'
.
format
(
'File "{}", line 3
5
, in func_error_in_compile_time'
.
format
(
self
.
filepath
),
'inner_func()'
,
'File "{}", line 2
6
, in inner_func'
.
format
(
self
.
filepath
),
'File "{}", line 2
8
, in inner_func'
.
format
(
self
.
filepath
),
'def inner_func():'
,
'fluid.layers.fill_constant(shape=[1, 2], value=9, dtype="int")'
,
'<--- HERE'
,
...
...
@@ -285,7 +287,7 @@ class TestErrorStaticLayerCallInCompiletime_2(
def
set_message
(
self
):
self
.
expected_message
=
[
'File "{}", line 4
4
, in func_error_in_compile_time_2'
.
format
(
'File "{}", line 4
6
, in func_error_in_compile_time_2'
.
format
(
self
.
filepath
),
'def func_error_in_compile_time_2(x):'
,
...
...
@@ -311,7 +313,7 @@ class TestErrorStaticLayerCallInCompiletime_3(
def
set_message
(
self
):
self
.
expected_message
=
[
'File "{}", line
89
, in forward'
.
format
(
self
.
filepath
),
'File "{}", line
91
, in forward'
.
format
(
self
.
filepath
),
'@paddle.jit.to_static'
,
'def forward(self):'
,
'self.test_func()'
,
...
...
@@ -335,7 +337,7 @@ class TestErrorStaticLayerCallInRuntime(TestErrorStaticLayerCallInCompiletime):
def
set_message
(
self
):
self
.
expected_message
=
[
'File "{}", line 5
2
, in func_error_in_runtime'
.
format
(
'File "{}", line 5
4
, in func_error_in_runtime'
.
format
(
self
.
filepath
),
'x = fluid.dygraph.to_variable(x)'
,
...
...
@@ -352,7 +354,7 @@ class TestErrorStaticLayerCallInRuntime2(TestErrorStaticLayerCallInRuntime):
def
set_message
(
self
):
self
.
expected_message
=
[
'File "{}", line 10
4
, in func_error_in_runtime_with_empty_line'
.
format
(
'File "{}", line 10
6
, in func_error_in_runtime_with_empty_line'
.
format
(
self
.
filepath
),
'two = fluid.layers.fill_constant(shape=[1], value=2, dtype="int32")'
,
...
...
@@ -399,7 +401,7 @@ class TestJitSaveInCompiletime(TestErrorBase):
def
set_message
(
self
):
self
.
expected_message
=
[
'File "{}", line
78
, in forward'
.
format
(
self
.
filepath
),
'File "{}", line
80
, in forward'
.
format
(
self
.
filepath
),
'def forward(self, x):'
,
'y = self._linear(x)'
,
'z = fluid.layers.fill_constant(shape=[1, 2], value=9, dtype="int")'
,
...
...
@@ -433,9 +435,9 @@ class TestSuggestionErrorInRuntime(TestErrorBase):
def
set_message
(
self
):
self
.
expected_message
=
[
'File "{}", line 11
6
, in forward'
.
format
(
self
.
filepath
),
'File "{}", line 11
8
, in forward'
.
format
(
self
.
filepath
),
'return self.inner_net.forward(x)'
,
'File "{}", line 12
5
, in forward'
.
format
(
self
.
filepath
),
'File "{}", line 12
7
, in forward'
.
format
(
self
.
filepath
),
'def forward(self, x):'
,
'out = paddle.matmul(self.w, x)'
,
'<--- HERE'
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录