-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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(frontends): Add nanmedian to PyTorch reduction ops #23394
Conversation
Thanks for contributing to Ivy! 😊👏 |
If you are working on an open task, please edit the PR description to link to the issue you've created. For more information, please check ToDo List Issues Guide. Thank you 🤗 |
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.
Hey @spacefarers, thanks a lot for the PR. 😄 Before we can proceed, we need to fix the failing tests for the function you've added. We also need to test the function for a wider range of input values as mentioned in the comment I left. Can you address these points and request a re-review once done? Thanks! :)
min_value=-1e04, | ||
max_value=1e04, |
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.
Why are we testing for such a small range of the input values?
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.
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.
@spacefarers, can you also fix the failing tests on this PR? Thanks |
Thank you for your comments. I'm referencing nanmean as well as median in the frontend functions to try to create this one. I'm confused as to why median was not calling ivy.median but instead is doing its own logic. Could you explain this to me? Does the datatypes not work? Would I need to do the same for nanmedian? |
@spacefarers Not sure what you mean by
How do you arrive at this conclusion? Also, I think you have overwritten the existing test of |
Here is the current implementation of median for pytorch frontend
Why is it not simply calling Thanks for the notice about |
If you have a minute to answer a few questions via discord that'd be awesome. I've been stuck on this for a while now. |
Sure feel free to reach out on discord |
Cool what's your username? Mine is the same as github it should be @spacefarers |
Same as my name :) |
Awesome sent you a friend request |
) | ||
def test_torch_nansum( | ||
def test_torch_nanmedian( |
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.
Question: is there a reason to remove the nansum? or was it done by mistake?
.github/workflows/test-ivy-cron.yml
Outdated
@@ -2,7 +2,7 @@ name: test-ivy-cron | |||
on: | |||
workflow_dispatch: | |||
schedule: | |||
- cron: '30 * * * *' | |||
- cron: '0 8 * * *' |
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.
Question: Was this cron change on purpose? I think if we are going to change it we might need to talk with the CI team, otherwise we can just revert this changes.
I apologize those are all mistakes. I'm working on the nanmedian frontend function and mistakendly affected some other things. I'll change those back along with my updated nanmedian function. Sorry again for the inconvenience. |
PR Description
Add nanmedian to frontend torch by basically copying
nanmean
since it is implemented inivy.nanmedian
. First time contributor please tell me if I did something wrong.Related Issue
Close #23397
Checklist