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

Make sure pruning does prune #1014

Merged
merged 5 commits into from
Jan 19, 2021
Merged

Make sure pruning does prune #1014

merged 5 commits into from
Jan 19, 2021

Conversation

jrapin
Copy link
Contributor

@jrapin jrapin commented Jan 18, 2021

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Motivation and Context / Related issue

This may solve #1013
The issue came from repeated values which may not be pruned, making the pruning mechanism be called way too often

How Has This Been Tested (if it applies)

Added a test to make sure pruning was not called too often, in the constant return case (worst case scenario)

Checklist

  • The documentation is up-to-date with the changes I made.
  • I have read the CONTRIBUTING document and completed the CLA (see CLA).
  • All tests passed, and additional code has been covered with new tests.

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Jan 18, 2021
@jrapin jrapin changed the title Make sure pruning does prune [WIP] Make sure pruning does prune Jan 18, 2021
@jrapin jrapin changed the title [WIP] Make sure pruning does prune Make sure pruning does prune Jan 18, 2021
@@ -6,7 +6,7 @@
import pickle
Copy link
Contributor Author

Choose a reason for hiding this comment

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

changes to this files are unrelated, just a convention update since I stumbled on it in the process

@@ -269,8 +275,9 @@ def __call__(self, archive: Archive[MultiValue]) -> Archive[MultiValue]:
new_archive.bytesdict = {
b: v
for b, v in archive.bytesdict.items()
if any(v.get_estimation(n) <= quantiles[n] for n in names)
}
if any(v.get_estimation(n) < quantiles[n] for n in names)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

the strict comparison is the big change that make it work.

@@ -13,4 +13,4 @@
__all__ = ["optimizers", "families", "callbacks", "p", "typing"]


__version__ = "0.4.2.post5"
__version__ = "0.4.2.post6"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

new version because this is very impactful

@jrapin jrapin merged commit 894b9d6 into master Jan 19, 2021
@jrapin jrapin deleted the betterpruning branch January 19, 2021 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants