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

added paddle.nanmean function frontend and test for it #23278

Merged
merged 2 commits into from
Sep 11, 2023

Conversation

sabre-code
Copy link
Contributor

@sabre-code sabre-code commented Sep 8, 2023

PR Description

Added paddle.nanmean function and test for it.

Related Issue

Close #22885

Checklist

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

Socials:

discord - Sulaiman

@github-actions
Copy link
Contributor

github-actions bot commented Sep 8, 2023

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! 🎉👨‍💻

@sabre-code sabre-code changed the title reformatting added paddle.nanmean function frontend and test for it Sep 8, 2023
@ivy-leaves ivy-leaves added the Paddle Frontend Developing the Paddle Frontend, checklist triggered by commenting add_frontend_checklist label Sep 8, 2023
@sabre-code
Copy link
Contributor Author

sabre-code commented Sep 8, 2023

@tomatillos hello, can you please review the PR and merge if things are fine

@sabre-code
Copy link
Contributor Author

@tomatillos hello can you please review the PR?

@tomatillos
Copy link
Contributor

Hi, looks good so far. Could you ensure that the test function is testing for NaN values too, otherwise we aren't properly testing the function for values it might encounter. You should be able to find examples of this in the other nan test functions in the file

@sabre-code
Copy link
Contributor Author

Hi, looks good so far. Could you ensure that the test function is testing for NaN values too, otherwise we aren't properly testing the function for values it might encounter. You should be able to find examples of this in the other nan test functions in the file

Yeah you are absolutely correct 😄. Will get back to you shortly.

@sabre-code
Copy link
Contributor Author

@tomatillos
image
the test fail randomly on one or 2 of the backends. Please see the attached screenshot. the difference between the output from function is negligible. (due to difference in precision probably). I am sure this is not because of testing for Nan value. I face this error earlier for other function. and the failing of test for this reason is random. sometime all pass sometime one or 2 fail for same reason. Any suggestions?

@tomatillos
Copy link
Contributor

Does the same thing happen with test_paddle_nansum?

@sabre-code
Copy link
Contributor Author

Does the same thing happen with test_paddle_nansum?

image
I made changes to rtol and atol. now all test pass. and also added allow_nan to use nan values for testing.

@tomatillos
Copy link
Contributor

Thanks for this :)

@tomatillos tomatillos merged commit 70d8127 into ivy-llc:main Sep 11, 2023
128 of 133 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.

nanmean
3 participants