-
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
implement bincount function #18199
implement bincount function #18199
Conversation
could someone clarify if the implementation is correct or not? |
If you are working on an open task, please edit the PR description to link to the issue you've created. For more information, please check ToDo List Issues Guide. Thank you 🤗 |
Hi @druvdub! Thank you for contributing to Ivy 🤗 The implementation looks okay to me at first glance, but could you link to the issue that you've created (if you've been following the Frontend API Guide) so that I know what you're working on precisely? Also, please comment
to create a checklist so that I know where you're stuck on. Thank ya ⭐ |
add_frontend_checklist |
Hi @xoiga123 I have added the reference to the issue and the checklist comment. |
Hey thank you for linking to the issue, but please re-comment add_frontend_checklist as editing a comment doesn't work 😢 |
ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_paddle_tensor.py
Outdated
Show resolved
Hide resolved
ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_paddle_tensor.py
Outdated
Show resolved
Hide resolved
ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_paddle_tensor.py
Outdated
Show resolved
Hide resolved
ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_paddle_tensor.py
Outdated
Show resolved
Hide resolved
ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_paddle_tensor.py
Outdated
Show resolved
Hide resolved
Frontend Task ChecklistIMPORTANT NOTICE 🚨:The Ivy Docs represent the ground truth for the task descriptions and this checklist should only be used as a supplementary item to aid with the review process. Please note that the contributor is not expected to understand everything in the checklist. It's mainly here for the reviewer to make sure everything has been done correctly 🙂 LEGEND 🗺:
CHECKS 📑:
|
@xoiga123 hello, I made some changes to the test, but I still am not able to run it. Is it possible to test the function separately somewhere manually to test? [UPDATE], @with_unsupported_device_and_dtypes(
{
"2.5.0 and below": {
"cpu": (
"int8",
"int16",
"uint8",
"float16",
"float32",
"float64",
"complex64",
"complex128",
"bool",
)
}
},```
should I update my function to be this? including the device as well? |
@xoiga123 I have updated the method and the test now, should hopefully work correctly. |
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.
Sorry for the late review 😓
min_value=1, | ||
max_value=2, |
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.
Why did you limit it to only [1, 2]
? From their example,
x = paddle.to_tensor([1, 2, 1, 4, 5])
result1 = paddle.bincount(x)
print(result1) # [0, 2, 1, 0, 1, 1]
min_dim_size=1, | ||
max_dim_size=2, |
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.
Why is the dimension only in [1, 2]
? Same example as above.
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.
Hi, sorry was busy last week, I couldn't figure why the tests are not running so I tried duplicating the test from paddle.linalg.bincount
def test_paddle_instance_bincount( | ||
dtypes_and_x, | ||
frontend_method_data, | ||
init_flags, | ||
method_flags, | ||
frontend, | ||
on_device, | ||
): |
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.
Please also test for all the arguments, i.e. weights
and minlength
This PR has been labelled as stale because it has been inactive for more than 7 days. If you would like to continue working on this PR, then please add another comment or this PR will be closed in 7 days. |
hi @xoiga123 sorry have been busy for a while so didn't do any changes till now but, I wrote the test with only two values since I was trying to follow the similar format to @handle_frontend_test(
fn_tree="paddle.bincount",
dtype_and_x=helpers.dtype_and_values(
available_dtypes=helpers.get_dtypes("integer"),
min_value=1,
max_value=2,
shape=st.shared(
helpers.get_shape(
min_num_dims=1,
max_num_dims=1,
),
key="a_s_d",
),
),
test_with_out=st.just(False),
)
def test_paddle_bincount(
*,
dtype_and_x,
on_device,
fn_tree,
backend_fw,
frontend,
test_flags,
):
input_dtype, x = dtype_and_x
helpers.test_frontend_function(
input_dtypes=input_dtype,
frontend=frontend,
test_flags=test_flags,
backend_to_test=backend_fw,
fn_tree=fn_tree,
on_device=on_device,
x=x[0],
weights=None,
minlength=0,
) to this test which is in linalg.py |
@druvdub that test seems to be misimplemented as well, it is also missing tests for |
will update and push soon |
Hi, thanks for contributing, please let me know if this is still being worked on or in progress? |
Hi, yea really sorry haven't made any progress on this due to some work issues. Will get around this week and push the tests. |
…ld python 3.10 specific wheels (ivy-llc#26912)
Co-authored-by: hirwa-nshuti <[email protected]>
…lc#26867) Co-authored-by: vedpatwardhan <[email protected]>
we were only testing with the `numpy` backend uptil now
…lc#26746) Co-authored-by: vedpatwardhan <[email protected]>
…ilation report to 5 instead of 1
Co-authored-by: Sam Armstrong <[email protected]>
Co-authored-by: ivy-branch <[email protected]>
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.
PR Compliance Checks
Thank you for your Pull Request! We have run several checks on this pull request in order to make sure it's suitable for merging into this project. The results are listed in the following section.
Conventional Commit PR Title
In order to be considered for merging, the pull request title must match the specification in conventional commits. You can edit the title in order for this check to pass.
Most often, our PR titles are something like one of these:
- docs: correct typo in README
- feat: implement dark mode"
- fix: correct remove button behavior
Linting Errors
- Found type "null", must be one of "feat","fix","docs","style","refactor","perf","test","build","ci","chore","revert"
- No subject found
Thank you for this PR, here is the CI results: This pull request does not result in any additional test failures. Congratulations! |
hi @aparajith21 |
Close #18183