-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
feat(paddle Bucketize):adding test function for bucketize #26665
Changes from 10 commits
570a08a
de15112
4275b3e
058bf76
042f047
e3e3665
43023d6
dde71dc
1d55e2b
3ee4192
4bc4968
f6d2bd0
91cb2fb
faa30f9
f4d6775
ae11377
4bb2428
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -149,6 +149,45 @@ def test_paddle_argsort( | |
) | ||
|
||
|
||
# bucketize | ||
@handle_frontend_test( | ||
fn_tree="paddle.bucketize", | ||
dtype_and_values=helpers.dtype_and_values( | ||
available_dtypes=helpers.get_dtypes("valid"), | ||
shared_dtype=True, | ||
min_num_dims=1, | ||
num_arrays=2, | ||
), | ||
out_int32=st.booleans(), | ||
right=st.booleans(), | ||
) | ||
def test_paddle_bucketize( | ||
*, | ||
dtype_and_values, | ||
out_int32, | ||
right, | ||
on_device, | ||
fn_tree, | ||
frontend, | ||
backend_fw, | ||
test_flags, | ||
): | ||
dtype, input = dtype_and_values | ||
input[0] = np.sort(input[0]) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this sorting needed ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, this not used so for by mistake this could happen. i made changes pls have a look. |
||
helpers.test_frontend_function( | ||
input_dtypes=dtype, | ||
frontend=frontend, | ||
backend_to_test=backend_fw, | ||
test_flags=test_flags, | ||
fn_tree=fn_tree, | ||
on_device=on_device, | ||
x=input[0], | ||
sorted_sequence=input[1], | ||
out_int32=out_int32, | ||
right=right, | ||
) | ||
|
||
|
||
@handle_frontend_test( | ||
fn_tree="paddle.index_sample", | ||
array_indices_axis=helpers.array_indices_axis( | ||
|
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.
We probably want to keep consistent signatures so I guess using
sorted_sequence
instead ofy
would make more sense, same for addingout_int32
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.
Thanks for your comments. All the changes are made and please have look.