-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Implemented testing for copy #19683
Implemented testing for copy #19683
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @KevinUli, this looks good overall but you will need to merge master and resolve the conflicts. There's been a refactor in function_testing.py regarding the backend handling so make sure to keep that in mind. Thanks!
@@ -309,6 +314,18 @@ def test_function( | |||
target_fn, *args, test_compile=test_flags.test_compile, **kwargs | |||
) | |||
|
|||
if test_flags.with_copy: | |||
array_fn = ivy.is_array | |||
if "copy" in list(inspect.signature(target_fn).parameters.keys()): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't do this kind of search in arguments for each example, but instead this logic should be moved into the decorator where this is done only once.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By decorator, do you mean the handle_frontend_test
and handle_test
decorator?
c5b1b17
to
2bbec50
Compare
# Conflicts: # ivy_tests/test_ivy/helpers/function_testing.py
97ac897
to
4b53291
Compare
# Conflicts: # ivy_tests/test_ivy/helpers/function_testing.py # ivy_tests/test_ivy/helpers/test_parameter_flags.py # ivy_tests/test_ivy/helpers/testing_helpers.py
# Conflicts: # ivy_tests/test_ivy/helpers/function_testing.py # ivy_tests/test_ivy/helpers/test_parameter_flags.py # ivy_tests/test_ivy/helpers/testing_helpers.py
Hey @sherry30, could you review this? We have dragged this for 2 months now 😅 And I would say it's an important feature missing from the pipeline. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes mostly looks good.
Can you add this flag to the functions which require it.
This PR has been labelled as stale because it has been inactive for more than 7 days. If you would like to continue working on this PR, then please add another comment or this PR will be closed in 7 days. |
Thank you for this PR, here is the CI results: This pull request does not result in any additional test failures. Congratulations! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @KevinUli, apologies for this PR taking so long to merge. I will review it so we can finish it asap.
I have made the changes requested. I also updated the return call for the ivy API tests to include |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
No description provided.