-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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.174】 Migrate paddle.randint_like into pir #58953
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
2023-11-17 12:46:24 ======================================================================
2023-11-17 12:46:24 ERROR: test_static_api_with_float32 (test_randint_like.TestRandintLikeAPI)
2023-11-17 12:46:24 ----------------------------------------------------------------------
2023-11-17 12:46:24 Traceback (most recent call last):
2023-11-17 12:46:24 File "/workspace/Paddle/build/python/paddle/pir_utils.py", line 115, in impl
2023-11-17 12:46:24 func(*args, **kwargs)
2023-11-17 12:46:24 File "/workspace/Paddle/build/test/legacy_test/test_randint_like.py", line 138, in test_static_api_with_float32
2023-11-17 12:46:24 outs5 = exe.run(
2023-11-17 12:46:24 File "/workspace/Paddle/build/python/paddle/base/executor.py", line 1707, in run
2023-11-17 12:46:24 res = self._run_pir_impl(
2023-11-17 12:46:24 File "/workspace/Paddle/build/python/paddle/base/executor.py", line 2020, in _run_pir_impl
2023-11-17 12:46:24 self._pir_feed_data(program, feed, scope)
2023-11-17 12:46:24 File "/workspace/Paddle/build/python/paddle/base/executor.py", line 1328, in _pir_feed_data
2023-11-17 12:46:24 cur_feed = feed[feed_target_name]
2023-11-17 12:46:24 KeyError: 'x_bool' @0x45f @MarioLulab 大佬帮忙看下?为什么会出现这种错误,改了几种都不行 |
收到,我在尝试复现。有结果了及时回复你~ |
我已在本地复现并 fix 了。请将: |
收到 |
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~
但是 test/legacy_test/test_zero_dim_tensor.py 里的 TestNoBackwardAPIStatic 还有 test_randint_and_randint_like 单测,麻烦也一起适配一下吧
2023-11-21 13:59:49 ======================================================================
2023-11-21 13:59:49 ERROR: test_randint_and_randint_like (test_zero_dim_tensor.TestNoBackwardAPIStatic)
2023-11-21 13:59:49 ----------------------------------------------------------------------
2023-11-21 13:59:49 Traceback (most recent call last):
2023-11-21 13:59:49 File "C:\home\workspace\Paddle\build\python\paddle\pir_utils.py", line 115, in impl
2023-11-21 13:59:49 func(*args, **kwargs)
2023-11-21 13:59:49 File "C:\home\workspace\Paddle\build\test\legacy_test\test_zero_dim_tensor.py", line 5815, in test_randint_and_randint_like
2023-11-21 13:59:49 out3 = paddle.randint(-10, 10, self.shape)
2023-11-21 13:59:49 File "C:\home\workspace\Paddle\build\python\paddle\tensor\random.py", line 997, in randint
2023-11-21 13:59:49 shape = paddle.utils.convert_shape_to_list(shape)
2023-11-21 13:59:49 File "C:\home\workspace\Paddle\build\python\paddle\utils\layers_utils.py", line 490, in convert_shape_to_list
2023-11-21 13:59:49 shape = [x.item(0) if isinstance(x, Variable) else x for x in shape]
2023-11-21 13:59:49 File "C:\home\workspace\Paddle\build\python\paddle\utils\layers_utils.py", line 490, in <listcomp>
2023-11-21 13:59:49 shape = [x.item(0) if isinstance(x, Variable) else x for x in shape]
2023-11-21 13:59:49 File "C:\home\workspace\cache\python_venv\lib\site-packages\decorator.py", line 231, in fun
2023-11-21 13:59:49 args, kw = fix(args, kw, sig)
2023-11-21 13:59:49 File "C:\home\workspace\cache\python_venv\lib\site-packages\decorator.py", line 203, in fix
2023-11-21 13:59:49 ba = sig.bind(*args, **kwargs)
2023-11-21 13:59:49 File "C:\Python310\lib\inspect.py", line 3177, in bind
2023-11-21 13:59:49 return self._bind(args, kwargs)
2023-11-21 13:59:49 File "C:\Python310\lib\inspErrors while running CTest
2023-11-21 13:59:49 ect.py", line 3098, in _bind
2023-11-21 13:59:49 raise TypeError('too many positional arguments') from None
2023-11-21 13:59:49 TypeError: too many positional arguments |
2023-11-21 13:59:49 ======================================================================
2023-11-21 13:59:49 ERROR: test_randint_and_randint_like (test_zero_dim_tensor.TestNoBackwardAPIStatic)
2023-11-21 13:59:49 ----------------------------------------------------------------------
2023-11-21 13:59:49 Traceback (most recent call last):
2023-11-21 13:59:49 File "C:\home\workspace\Paddle\build\python\paddle\pir_utils.py", line 115, in impl
2023-11-21 13:59:49 func(*args, **kwargs)
2023-11-21 13:59:49 File "C:\home\workspace\Paddle\build\test\legacy_test\test_zero_dim_tensor.py", line 5815, in test_randint_and_randint_like
2023-11-21 13:59:49 out3 = paddle.randint(-10, 10, self.shape)
2023-11-21 13:59:49 File "C:\home\workspace\Paddle\build\python\paddle\tensor\random.py", line 997, in randint
2023-11-21 13:59:49 shape = paddle.utils.convert_shape_to_list(shape)
2023-11-21 13:59:49 File "C:\home\workspace\Paddle\build\python\paddle\utils\layers_utils.py", line 490, in convert_shape_to_list
2023-11-21 13:59:49 shape = [x.item(0) if isinstance(x, Variable) else x for x in shape]
2023-11-21 13:59:49 File "C:\home\workspace\Paddle\build\python\paddle\utils\layers_utils.py", line 490, in <listcomp>
2023-11-21 13:59:49 shape = [x.item(0) if isinstance(x, Variable) else x for x in shape]
2023-11-21 13:59:49 File "C:\home\workspace\cache\python_venv\lib\site-packages\decorator.py", line 231, in fun
2023-11-21 13:59:49 args, kw = fix(args, kw, sig)
2023-11-21 13:59:49 File "C:\home\workspace\cache\python_venv\lib\site-packages\decorator.py", line 203, in fix
2023-11-21 13:59:49 ba = sig.bind(*args, **kwargs)
2023-11-21 13:59:49 File "C:\Python310\lib\inspect.py", line 3177, in bind
2023-11-21 13:59:49 return self._bind(args, kwargs)
2023-11-21 13:59:49 File "C:\Python310\lib\inspErrors while running CTest
2023-11-21 13:59:49 ect.py", line 3098, in _bind
2023-11-21 13:59:49 raise TypeError('too many positional arguments') from None
2023-11-21 13:59:49 TypeError: too many positional arguments |
@MarioLulab randint的0维好像有问题 |
请问具体是什么问题呢?有报错栈吗 |
@MarioLulab 您好:
2023-11-21 13:59:49
2023-11-21 13:59:49 ERROR: test_randint_and_randint_like (test_zero_dim_tensor.TestNoBackwardAPIStatic)
2023-11-21 13:59:49 ----------------------------------------------------------------------
2023-11-21 13:59:49 Traceback (most recent call last):
2023-11-21 13:59:49 File "C:\home\workspace\Paddle\build\python\paddle\pir_utils.py", line 115, in impl
2023-11-21 13:59:49 func(*args, **kwargs)
2023-11-21 13:59:49 File "C:\home\workspace\Paddle\build\test\legacy_test\test_zero_dim_tensor.py", line 5815, in test_randint_and_randint_like
2023-11-21 13:59:49 out3 = paddle.randint(-10, 10, self.shape)
2023-11-21 13:59:49 File "C:\home\workspace\Paddle\build\python\paddle\tensor\random.py", line 997, in randint
2023-11-21 13:59:49 shape = paddle.utils.convert_shape_to_list(shape)
2023-11-21 13:59:49 File "C:\home\workspace\Paddle\build\python\paddle\utils\layers_utils.py", line 490, in convert_shape_to_list
2023-11-21 13:59:49 shape = [x.item(0) if isinstance(x, Variable) else x for x in shape]
2023-11-21 13:59:49 File "C:\home\workspace\Paddle\build\python\paddle\utils\layers_utils.py", line 490, in <listcomp>
2023-11-21 13:59:49 shape = [x.item(0) if isinstance(x, Variable) else x for x in shape]
2023-11-21 13:59:49 File "C:\home\workspace\cache\python_venv\lib\site-packages\decorator.py", line 231, in fun
2023-11-21 13:59:49 args, kw = fix(args, kw, sig)
2023-11-21 13:59:49 File "C:\home\workspace\cache\python_venv\lib\site-packages\decorator.py", line 203, in fix
2023-11-21 13:59:49 ba = sig.bind(*args, **kwargs)
2023-11-21 13:59:49 File "C:\Python310\lib\inspect.py", line 3177, in bind
2023-11-21 13:59:49 return self._bind(args, kwargs)
2023-11-21 13:59:49 File "C:\Python310\lib\inspErrors while running CTest
2023-11-21 13:59:49 ect.py", line 3098, in _bind
2023-11-21 13:59:49 raise TypeError('too many positional arguments') from None
2023-11-21 13:59:49 TypeError: too many positional arguments 所以在zero_dim那里,我把randint_like和randint分开了。试着改了下randint的,发现不行,就分开了。 |
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 types
Others
PR changes
APIs
Description
No.174 paddle.randint_like
PIR API 推全升级
将
paddle.randint_like
迁移升级至 pir,并更新单测 单测覆盖率:1/1