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

Update median #2681

Merged
merged 18 commits into from
Sep 4, 2022
Merged

Update median #2681

merged 18 commits into from
Sep 4, 2022

Conversation

puhuk
Copy link
Contributor

@puhuk puhuk commented Aug 30, 2022

Description: Update median to prevent difference from numpy.median and torch.median

Check list:

  • New tests are added (if a new feature is added)
  • New doc strings: description and/or example code are in RST format
  • Documentation is updated (if required)

@github-actions github-actions bot added the module: contrib Contrib module label Aug 30, 2022
@vfdev-5
Copy link
Collaborator

vfdev-5 commented Aug 31, 2022

@puhuk do you have a test for _torch_median only somewhere ?

  1. consistency with torch.median on odd size
  2. consistency with torch.quantile(interpolation="midpoint") for even size

@puhuk
Copy link
Contributor Author

puhuk commented Aug 31, 2022

@vfdev-5
I'm implementing test for checking consistency with np.median in tests/ignite/contrib/regression/test_base.py.
Let me implement test about torch.median and torch.quantile here as well.

@vfdev-5
Copy link
Collaborator

vfdev-5 commented Aug 31, 2022

@puhuk have you committed tests/ignite/contrib/regression/test_base.py ? I do not see it in the PR

Copy link
Collaborator

@vfdev-5 vfdev-5 left a comment

Choose a reason for hiding this comment

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

Looks ok to me

@vfdev-5 vfdev-5 enabled auto-merge (squash) September 4, 2022 20:43
@vfdev-5 vfdev-5 merged commit 3a0c9b8 into pytorch:master Sep 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: contrib Contrib module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants