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

Fix Frontend Failing Test: paddle - comparison.numpy.less_equal #28688

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ZJay07
Copy link
Contributor

@ZJay07 ZJay07 commented Mar 26, 2024

PR Description

https://www.paddlepaddle.org.cn/documentation/docs/en/2.2/api/paddle/less_equal_en.html#less-equal
Specify dtypes based on paddlepaddle docs

Related Issue

Close #28687

Checklist

  • Did you add a function?
  • Did you add the tests?
  • Did you run your tests and are your tests passing?
  • Did pre-commit not fail on any check?
  • Did you follow the steps we provided?

Socials

Copy link
Contributor

@github-actions github-actions bot left a 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.

Issue Reference

In order to be considered for merging, the pull request description must refer to a specific issue number. This is described in our contributing guide and our PR template.
This check is looking for a phrase similar to: "Fixes #XYZ" or "Resolves #XYZ" where XYZ is the issue number that this PR is meant to address.

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

Copy link
Contributor

@Ishticode Ishticode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ZJay07
Thanks for the PR
The implementation here should be able to handle more than just ones specified as supported. For example int8 works but is not included in the supoorted types
you can check by

ivy.set_paddle_backend()
x = ivy.array(2, dtype="int8")
print(ivy.less_equal(x,x))

In addition, the function also seems to be explicitly handling complex types.

@ZJay07
Copy link
Contributor Author

ZJay07 commented Mar 29, 2024

In addition, the function also seems to be explicitly handling complex types.

Hi @Ishticode, thanks for the review, should the function be allowed to handle complex type, is it mainly to accommodate the jax implementation?

@Ishticode
Copy link
Contributor

In addition, the function also seems to be explicitly handling complex types.

Hi @Ishticode, thanks for the review, should the function be allowed to handle complex type, is it mainly to accommodate the jax implementation?

Yes. Does it get the same results as jax?

@ZJay07 ZJay07 requested a review from Ishticode April 1, 2024 19:32
@ZJay07
Copy link
Contributor Author

ZJay07 commented Apr 1, 2024

Hey @Ishticode managed to fix it seems like it was missing some equal signs since it is comparing less_equal. And from what I understand the idea for numpy comparisons for complex numbers is to compare real first, if its <= then return True, else if the real part is equivalent compare the <= of the imag part

Copy link
Contributor

@Ishticode Ishticode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks right but the int8 dtype is still not speciifed as supported. As you can see it does work with native paddle in the example given above. Could you include that? Thanks :)

@Ishticode
Copy link
Contributor

any updates @ZJay07 on this one? :)

@ZJay07
Copy link
Contributor Author

ZJay07 commented May 1, 2024

Hey @Ishticode, currently busy with exams but will be back to fixing it later this month!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix Frontend Failing Test: paddle - comparison.numpy.less_equal
3 participants