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: torch.linalg.matrix_rank #28390

Merged

Conversation

ZenithFlux
Copy link
Contributor

@ZenithFlux ZenithFlux commented Feb 22, 2024

PR Description

  • Pytorch docs mistakenly say that matrix_rank() takes 'A' as the first argument, but it actually takes 'input'. Thus, parameter 'A' changed to 'input' in ivy.functional.frontends.torch.linalg.matrix_rank.
  • 'atol' and 'rtol' args were not being passed to the frontend function because testing function was eating them up. Hence added support for kwargs with same names as test_frontend_function params.
  • 'atol' and 'rtol' for testing are set to 0, since matrix_rank outputs whole numbers.
  • Both 'atol' and 'rtol' for matrix_rank must be either floats or Tensors or either one should be None, i.e. they should have the same type when not None.

Closes #28385
Closes #28388
Closes #28389

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?

Pytorch docs mistakenly say that matrix_rank() takes 'A' as the first argmunent, but it actually takes 'input'. Thus, parameter 'A' changed to 'input' in ivy.functional.frontends.torch.linalg.matrix_rank().

'atol' and 'rtol' args were not being passed to the frontend function because testing function was eating them up. Hence added support for kwargs of same names. 'atol' and 'rtol' are set to 0, since matrix_rank outputs whole numbers.
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 Passed!

@ZenithFlux ZenithFlux changed the title Fix Frontend Failing Test: torch.linalg.matrix_rank fix: Frontend Failing Test: torch.linalg.matrix_rank Feb 22, 2024
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.

Congrats on making your first Pull Request and thanks for supporting Ivy! 🎉
Join the conversation in our Discord.

For every PR opened, we run unit tests and comment the results in the PR to ensure the functionality remains intact.
Please make sure they are passing. 💪

If you want to check them from the action runners, you can open the display_test_results job. 👀
It contains the following two sections:

  • Combined Test Results: This shows the results of all the ivy tests that ran on the PR. ✔️
  • New Failures Introduced: This lists the tests that fail on this PR.

Keep in mind that we will assign an engineer for this task and they will look at it based on the workload that they have, kindly be patient 😄.

@ivy-leaves ivy-leaves added the PyTorch Frontend Developing the PyTorch Frontend, checklist triggered by commenting add_frontend_checklist label Feb 22, 2024
@ZenithFlux
Copy link
Contributor Author

Hi @Ishticode, I have not received a review for the last 5 days. Please review the PR and tell if it is okay!

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. Sorry for the delay.
The fix looks good for conflicting arg names between the func and the test functions but I will have a quick check later today as the change applies to a fundamental testing function and will merge asap.

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.

Looks great. Thanks for your contribution and patience @ZenithFlux

@Ishticode Ishticode merged commit f4faa04 into ivy-llc:main Mar 1, 2024
152 of 165 checks passed
@ZenithFlux ZenithFlux deleted the chaitanya/fixing_torch_matrix_rank_test branch March 2, 2024 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PyTorch Frontend Developing the PyTorch Frontend, checklist triggered by commenting add_frontend_checklist
Projects
None yet
3 participants