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

Python unitest "test_network_with_dtype" keeps failing. #10604

Closed
wanglei828 opened this issue May 12, 2018 · 1 comment · Fixed by #10629 or #10667
Closed

Python unitest "test_network_with_dtype" keeps failing. #10604

wanglei828 opened this issue May 12, 2018 · 1 comment · Fixed by #10629 or #10667
Assignees

Comments

@wanglei828
Copy link
Contributor

When running "test_all_ops", the "test_network_with_dtype" keeps failing. The error message as follows:

ERROR: test_cpu (test_network_with_dtype.TestNetWithDtype)

Traceback (most recent call last):
File "test_network_with_dtype.py", line 58, in test_cpu
self.set_network()
File "test_network_with_dtype.py", line 30, in set_network
self.x = fluid.layers.data(name='x', shape=[13], dtype=self.dtype)
File "/paddle/build/python/paddle/fluid/layers/io.py", line 82, in data
is_data=True)
File "/paddle/build/python/paddle/fluid/layer_helper.py", line 344, in create_global_variable
*args, persistable=persistable, **kwargs)
File "/paddle/build/python/paddle/fluid/framework.py", line 763, in create_var
var = Variable(block=self, *args, **kwargs)
File "/paddle/build/python/paddle/fluid/framework.py", line 195, in init
"matched.".format(self.name, old_shape, shape))
ValueError: Variable x has been created before. the previous shape is (-1L, 3L); the new shape is (-1, 13). They are not matched.

======================================================================
ERROR: test_gpu (test_network_with_dtype.TestNetWithDtype)

Traceback (most recent call last):
File "test_network_with_dtype.py", line 65, in test_gpu
self.set_network()
File "test_network_with_dtype.py", line 30, in set_network
self.x = fluid.layers.data(name='x', shape=[13], dtype=self.dtype)
File "/paddle/build/python/paddle/fluid/layers/io.py", line 82, in data
is_data=True)
File "/paddle/build/python/paddle/fluid/layer_helper.py", line 344, in create_global_variable
*args, persistable=persistable, **kwargs)
File "/paddle/build/python/paddle/fluid/framework.py", line 763, in create_var
var = Variable(block=self, *args, **kwargs)
File "/paddle/build/python/paddle/fluid/framework.py", line 195, in init
"matched.".format(self.name, old_shape, shape))
ValueError: Variable x has been created before. the previous shape is (-1L, 3L); the new shape is (-1, 13). They are not matched.

@wanglei828
Copy link
Contributor Author

Hi, I don't think this has been fixed. In CI and local dev, we can still see this test failure.
The error message as follows:

ERROR: test_cpu (test_network_with_dtype.TestNetWithDtype)

Traceback (most recent call last):
File "test_network_with_dtype.py", line 63, in test_cpu
self.run_net_on_place(place)
File "test_network_with_dtype.py", line 49, in run_net_on_place
exe.run(fluid.default_startup_program())
File "/paddle/build/python/paddle/fluid/executor.py", line 337, in run
fetch_var_name=fetch_var_name)
File "/paddle/build/python/paddle/fluid/executor.py", line 209, in _add_feed_fetch_ops
tmp_program = program.clone()
File "/paddle/build/python/paddle/fluid/framework.py", line 1055, in clone
p.sync_with_cpp()
File "/paddle/build/python/paddle/fluid/framework.py", line 1160, in sync_with_cpp
block.sync_with_cpp()
File "/paddle/build/python/paddle/fluid/framework.py", line 909, in sync_with_cpp
op = Operator(self, op_desc)
File "/paddle/build/python/paddle/fluid/framework.py", line 409, in init
"type to initilized an Operator can not be None.")
ValueError: type to initilized an Operator can not be None.

======================================================================
ERROR: test_gpu (test_network_with_dtype.TestNetWithDtype)

Traceback (most recent call last):
File "test_network_with_dtype.py", line 70, in test_gpu
self.run_net_on_place(place)
File "test_network_with_dtype.py", line 49, in run_net_on_place
exe.run(fluid.default_startup_program())
File "/paddle/build/python/paddle/fluid/executor.py", line 337, in run
fetch_var_name=fetch_var_name)
File "/paddle/build/python/paddle/fluid/executor.py", line 209, in _add_feed_fetch_ops
tmp_program = program.clone()
File "/paddle/build/python/paddle/fluid/framework.py", line 1055, in clone
p.sync_with_cpp()
File "/paddle/build/python/paddle/fluid/framework.py", line 1160, in sync_with_cpp
block.sync_with_cpp()
File "/paddle/build/python/paddle/fluid/framework.py", line 909, in sync_with_cpp
op = Operator(self, op_desc)
File "/paddle/build/python/paddle/fluid/framework.py", line 409, in init
"type to initilized an Operator can not be None.")
ValueError: type to initilized an Operator can not be None.

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 a pull request may close this issue.

2 participants