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

add torch tensor maximum instance method with its test #22805

Merged
merged 6 commits into from
Sep 3, 2023

Conversation

imessam
Copy link
Contributor

@imessam imessam commented Aug 30, 2023

PR Description

Add torch tensor maximum instance method with its test,

Related Issue

Close #22742

Checklist

  • Did you add a function?
  • Did you add the tests?
  • Did you follow the steps we provided?

@github-actions
Copy link
Contributor

Thanks for contributing to Ivy! 😊👏
Here are some of the important points from our Contributing Guidelines 📝:
1. Feel free to ignore the run_tests (1), run_tests (2), … jobs, and only look at 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 are passing on main, but fail on the PR Fork. Please try to make sure that there are no such tests. 💪
2. The lint / Check formatting / check-formatting tests check for the formatting of your code. 📜 If it fails, please check the exact error message in the logs and fix the same. ⚠️🔧
3. Finally, the test-docstrings / run-docstring-tests check for the changes made in docstrings of the functions. This may be skipped, as well. 📚
Happy coding! 🎉👨‍💻

@ivy-leaves ivy-leaves added the PyTorch Frontend Developing the PyTorch Frontend, checklist triggered by commenting add_frontend_checklist label Aug 30, 2023
@@ -288,16 +288,6 @@ def _get_dtype_and_multiplicative_matrices(draw):
)


@st.composite
Copy link
Contributor

Choose a reason for hiding this comment

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

Please do not remove any existing code!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These lines prevents me from doing commits, the pre-commit tool catch those errors and block my commit.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

image

Copy link
Contributor

@aparajith21 aparajith21 Sep 3, 2023

Choose a reason for hiding this comment

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

Okay if this is the case, then please recommit without removing any code. This may be because of a failure from our side, but feel free to use the --no-verify flag to commit if everything else is okay, but do not remove existing code. EDIT: I see Kareem's already shared this message and these changes have been made. LGTM as failures don't seem to be related to your PR, thanks for contributing!

@aparajith21
Copy link
Contributor

Hi, thank you for contributing! There appear to be some failures on the CI. Could you please check these locally and see what shows up there. Further, it would be great if you could check off the items in the front end checklist by commenting add_frontend_checklist and confirm everything has been completed properly before requesting review. Thanks for taking the time and contributing!

@imessam
Copy link
Contributor Author

imessam commented Aug 30, 2023

Thanks for taking time to review my PR. I don't understand exactly what should I do regarding the checklist part, could you explain it more clearly.
Thanks.

@aparajith21
Copy link
Contributor

Thanks for taking time to review my PR. I don't understand exactly what should I do regarding the checklist part, could you explain it more clearly. Thanks.

Please comment add_frontend_checklist and give it a moment. A bot would create a checklist which you can go through and tick off the items as you complete them, and request a review after that. Thanks!

@imessam
Copy link
Contributor Author

imessam commented Aug 30, 2023

Frontend Task Checklist

IMPORTANT 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 🗺:

  • ❌ : Check item is not completed.
  • ✅ : Check item is ready for review.
  • 🆘 : Stuck/Doubting implementation (PR author should add comments explaining why).
  • ⏩ : Check is not applicable to function (skip).
  • 🆗 : Check item is implemented and does not require any edits.

CHECKS 📑:

    • ✅ : The function/method definition is not missing any of the original arguments.
    • ⏩: In case the function/method to be implemented is an alias of an existing function/method:
        • ⏩: It is being declared as such by setting fun1 = fun2, rather than being re-implemented from scratch.
        • ⏩: The alias is added to the existing function/method's test in the aliases parameter of handle_frontend_test/handle_frontend_method.
    • ✅: The naming of the function/method and its arguments exactly matches the original.
    • ✅: No defined argument is being ignored in the function/method's implementation.
    • ⏩: In special cases where an argument's implementation should be pending due to an incomplete superset of an ivy function:
        • ⏩: A ToDo comment has been added prompting to pass the frontend argument to the ivy function whose behavior is to be extended.
    • ⏩: In case a frontend function is being added:
        • ⏩: It is a composition of ivy functions.
        • ⏩: In case the needed composition is long (using numerous ivy functions), a Missing Function Suggestion issue has been opened to suggest a new ivy function should be added to shorten the frontend implementation.
        • ⏩: @to_ivy_arrays_and_back has been added to the function.
    • ✅: In case a frontend method is being added:
        • ✅: It is composed of existing frontend functions or methods.
        • ⏩: If a required frontend function has not yet been added, the method may be implemented as a composition of ivy functions, making sure that:
          • ⏩: @to_ivy_arrays_and_back has been added to the method.
          • ⏩: A ToDo comment has been made prompting to remove the decorator and update the implementation as soon as the missing function has been added.
    • ✅: The function/method's test has been added (except in the alias case mentioned in <2>):
        • 🆘: All supported arguments are being generated in handle_frontend_test/handle_frontend_method and passed to test_frontend_function/test_frontend_method.
        • 🆘: The argument generation covers all possible supported values. Array sizes, dimensions, and axes adhere to the full supported set of the original function/method.
        • ✅: The available_dtypes parameter passed to the helper generating the function/method's input array is set to helpers.get_dtypes("valid"). If there are unsupported dtypes that cause the test to fail, they should be handled by adding @with_supported_dtypes/@with_unsupported_dtype to the function/method.
    • ✅: The PR is not introducing any test failures.
        • ✅: The lint checks are passing.
        • ✅: The implemented test is passing for all backends.
    • ✅: The PR closes a Sub Task issue linked to one of the open frontend ToDo lists.
    • ✅: The function/method and its test have been added to the correct .py files corresponding to the addressed ToDo list.
    • ✅: The PR only contains changes relevant to the addressed subtask.

@imessam
Copy link
Contributor Author

imessam commented Aug 30, 2023

Hi, thank you for contributing! There appear to be some failures on the CI. Could you please check these locally and see what shows up there. Further, it would be great if you could check off the items in the front end checklist by commenting add_frontend_checklist and confirm everything has been completed properly before requesting review. Thanks for taking the time and contributing!

image

The test I provided passes locally, is that what you want me to check ?

@KareemMAX
Copy link
Contributor

Hey @imessam,
Regarding the pre-commit issue you were facing, I've reverted the unrelated changes you made. As those errors weren't caused by you. We will fix them directly on main so you can merge them, if something similar happened again you may use git commit --no-verify. As our lint checks are per file basis such errors may occur.

@imessam
Copy link
Contributor Author

imessam commented Aug 31, 2023

@KareemMAX
Okay, I'll do that, thank you.

@aparajith21 aparajith21 merged commit a9c2468 into ivy-llc:main Sep 3, 2023
110 of 133 checks passed
@imessam imessam deleted the torch_maximum_instance_remote branch September 9, 2023 12:53
druvdub pushed a commit to druvdub/ivy that referenced this pull request Oct 14, 2023
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
Development

Successfully merging this pull request may close these issues.

maximum
4 participants