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

feat: Implementation of inv function in Paddle frontend. #26979

Merged
merged 1 commit into from
Oct 26, 2023

Conversation

HPatto
Copy link
Contributor

@HPatto HPatto commented Oct 12, 2023

PR Description

Implementation of the inv function in Paddle frontend. Tests pass locally, although I believe namespace choice in the initial ToDo List should be changed. Current version of Paddle puts the inv function in the "paddle.linalg" namespace.

Related Issue

Closes #26522

Checklist

  • [y] Did you add a function?
  • [y] Did you add the tests?
  • [y] Did you run your tests and are your tests passing?
  • [y] Did pre-commit not fail on any check?
  • [y] 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.

Protected Branch

In order to be considered for merging, the pull request changes must not be implemented on the "main" branch. This is described in our Contributing Guide. We are closing this pull request and we would suggest that you implement your changes as described in our Contributing Guide and open a new pull request.

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 Paddle Frontend Developing the Paddle Frontend, checklist triggered by commenting add_frontend_checklist label Oct 12, 2023
@github-actions
Copy link
Contributor

Thank you for this PR, here is the CI results:


This pull request does not result in any additional test failures. Congratulations!

@HPatto
Copy link
Contributor Author

HPatto commented Oct 12, 2023

I have some general thoughts/questions on the submission.

  1. The namespace of the implemented function (paddle.linalg.inv) is different to the suggestion inside the ToDo List Issue (paddle.math.inv). This was done for two reasons: (1), it matches the current Paddle documentation and (2), the tests would throw a "Key Error" if the frontend function was not in the linalg namespace - I think it couldn't determine the ground truth.

  2. The control of acceptable data-types is partially handled within the function decorator, and partially within the test definition. This mimics the implementation of jax.numpy.inv, but I'm not sure if it's best practice.

@ivy-seed ivy-seed assigned hmahmood24 and unassigned KevinUnadkat Oct 13, 2023
Copy link
Contributor

@hmahmood24 hmahmood24 left a comment

Choose a reason for hiding this comment

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

The linked issue is for adding paddle.inverse (https://github.com/PaddlePaddle/Paddle/blob/release/2.2/python/paddle/tensor/math.py#L1167) and not paddle.linalg.inv even though both functions have the same functionality. Can you please move your function and the test to the correct files? Thanks :)

@HPatto HPatto reopened this Oct 18, 2023
@HPatto HPatto requested a review from hmahmood24 October 18, 2023 19:05
@HPatto
Copy link
Contributor Author

HPatto commented Oct 24, 2023

Hey @hmahmood24,

Let me know if there's anything else to fix, and I'll get on it.

Copy link
Contributor

@hmahmood24 hmahmood24 left a comment

Choose a reason for hiding this comment

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

Changes look good to me. Thanks so much for the contribution! @HPatto 🚀

@hmahmood24 hmahmood24 merged commit 4801d9d into ivy-llc:main Oct 26, 2023
385 of 406 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Paddle Frontend Developing the Paddle Frontend, checklist triggered by commenting add_frontend_checklist
Projects
None yet
Development

Successfully merging this pull request may close these issues.

inverse
4 participants