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: Added a decorator function, which will be used to test explicit examples #28251

Merged
merged 9 commits into from
Feb 14, 2024

Conversation

Sai-Suraj-27
Copy link
Contributor

PR Description

Added a decorator function, which will be used to test explicit examples that are difficult/not feasible to define as strategies.
The decorator is also generalized so that we can test all 4 ivy tests, frontend tests, methods, frontend methods with explicit examples.

Related Issue

Closes #28207

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

@vedpatwardhan vedpatwardhan left a comment

Choose a reason for hiding this comment

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

Hey @Sai-Suraj-27, could you please test this out for frontend tests and methods as well? Probably just add the decorator to a function from those categories temporarily as well so that we can confirm in the CI if that example ran correctly?
The changes look great to me otherwise, thanks for looking into this 😄

@Sai-Suraj-27
Copy link
Contributor Author

Sai-Suraj-27 commented Feb 13, 2024

Hey @Sai-Suraj-27, could you please test this out for frontend tests and methods as well? Probably just add the decorator to a function from those categories temporarily as well so that we can confirm in the CI if that example ran correctly? The changes look great to me otherwise, thanks for looking into this 😄

Hey, @vedpatwardhan. I actually did that already, but didn't committed those changes. Sure, I will add few more example decorators and the documentation part👍🏻.

@ivy-leaves ivy-leaves added NumPy Frontend Developing the NumPy Frontend, checklist triggered by commenting add_frontend_checklist Paddle Frontend Developing the Paddle Frontend, checklist triggered by commenting add_frontend_checklist labels Feb 13, 2024
@Sai-Suraj-27
Copy link
Contributor Author

Sai-Suraj-27 commented Feb 13, 2024

Hey, @vedpatwardhan. In the CI, I see that the following 2 tests are mentioned as passing in main (main: pass) but failing after these changes.

  1. https://github.com/unifyai/ivy/actions/runs/7884526822/job/21515049892?pr=28251#step:6:34
  2. https://github.com/unifyai/ivy/actions/runs/7884526822/job/21515049892?pr=28251#step:6:127

But when I tested locally, the first 2nd one is passing all the backends successfully.

image

The first one is already failing on main (present here as currently one of the failing tests). So, I'm not sure, why they are shown in the CI. Just thought of clarifying. Thank you.

Copy link
Contributor

@vedpatwardhan vedpatwardhan left a comment

Choose a reason for hiding this comment

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

lgtm! Feel free to revert the changes with the dummy handle_example and merge the PR (the 2 test failures that are passing on main seem unrelated to the changes made)
Thanks @Sai-Suraj-27 😄

@Sai-Suraj-27 Sai-Suraj-27 merged commit 9e9c086 into Transpile-AI:main Feb 14, 2024
121 of 141 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NumPy Frontend Developing the NumPy Frontend, checklist triggered by commenting add_frontend_checklist 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.

Adding a way to enable explicit @example in our tests
4 participants