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: fixed test_torch___getitem__ for paddle backend #28631

Merged
merged 1 commit into from
Mar 26, 2024

Conversation

ZenithFlux
Copy link
Contributor

@ZenithFlux ZenithFlux commented Mar 18, 2024

PR Description

  • Fixed the syntax for checking if x is True.
  • Added a function to remove negative values in arrays inside query of paddle.get_item because paddle currently throws an error if any of the value in the arrays inside the query is negative.
  • paddle does not support cloning tensors with a 0 length dimension, hence fixed this by creating a new tensor with same shape when asked for a copy.

Related Issue

Closes #28630

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

@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 @ZenithFlux
Thank you very much for the PR.
The changes here are critical and seem to have lead to many many failures for paddle tests that you can check under logs here at https://github.com/unifyai/ivy/actions/runs/8326992315/job/22798877642?pr=28631
Check Display Test Failures for a list of functions failing.

@ZenithFlux ZenithFlux force-pushed the fixing_test_torch___getitem__ branch 4 times, most recently from f685516 to 282e0d9 Compare March 21, 2024 17:50
Fixed the syntax for checking if x is a True.
Added a function to remove negative values in `query` of `paddle.get_item`.
@ZenithFlux ZenithFlux force-pushed the fixing_test_torch___getitem__ branch from 282e0d9 to bda8b7b Compare March 21, 2024 18:52
@ZenithFlux
Copy link
Contributor Author

@Ishticode I don't think these failures are due to changes on this branch.

I confirmed this by reverting all my changes and adding only a comment to both the functions (to trigger the same tests). Even without any changes to the code, there were still about a 100 tests failing. I also ran the tests for the some other failing functions on my local machine and I couldn't find any failure that was newly introduced by this branch. On the contrary, the tests I ran for unfold function passed successfully with no errors. I think this is because this change triggers many failing tests whose issues may be unrelated.

If there's is still something I am missing I will be happy to fix that.

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.

Right, otherwise looks good. I will merge it after quick few checks later today :)

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.

tests seems fine and i've checked with some custom examples. Looks good. I will merge now. Thank you very much for the effort put into this contribution @ZenithFlux :)

@Ishticode Ishticode merged commit 56a06fd into ivy-llc:main Mar 26, 2024
63 of 277 checks passed
@ZenithFlux ZenithFlux deleted the fixing_test_torch___getitem__ branch March 27, 2024 08:23
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 - tensor.torch.Tensor.__getitem__
3 participants