-
-
Notifications
You must be signed in to change notification settings - Fork 77
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
Add logic for finding max_sum_per_partition
candidates
#484
Conversation
…ysis for sum is not yet implemented.
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.
Thanks, it looks great! I left some comments
analysis/parameter_tuning.py
Outdated
@@ -139,6 +138,11 @@ def _find_candidate_parameters( | |||
l0_bounds = linf_bounds = None | |||
max_sum_per_partition_bounds = min_sum_per_partition_bounds = None | |||
|
|||
if calculate_sum_per_partition_param: | |||
assert not parameters_to_tune.min_sum_per_partition, "Tuning of min_sum_per_partition is not supported yet" |
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.
Please put this check in _check_tune_args
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.
added, wdyt? afaiu options.parameters_to_tune.min_sum_per_partition should never be true because we don't support it in any cases.
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.
Yes, agree that tuning min_sum_per_partition should be false for now
analysis/parameter_tuning.py
Outdated
find_candidates_func1: Callable[[histograms.Histogram, int], | ||
Sequence[Number]], | ||
find_candidates_func2: Callable[[histograms.Histogram, int], | ||
Sequence[Number]], max_candidates: int): |
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.
Nit: please add docstring for this function (it has pretty complicated API)
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.
added, wdyt?
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.
SGTM, thanks
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.
LGTM! Just a minor comment
analysis/parameter_tuning.py
Outdated
find_candidates_func1: Callable[[histograms.Histogram, int], | ||
Sequence[Number]], | ||
find_candidates_func2: Callable[[histograms.Histogram, int], | ||
Sequence[Number]], max_candidates: int): |
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.
SGTM, thanks
analysis/parameter_tuning.py
Outdated
@@ -139,6 +138,11 @@ def _find_candidate_parameters( | |||
l0_bounds = linf_bounds = None | |||
max_sum_per_partition_bounds = min_sum_per_partition_bounds = None | |||
|
|||
if calculate_sum_per_partition_param: | |||
assert not parameters_to_tune.min_sum_per_partition, "Tuning of min_sum_per_partition is not supported yet" |
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.
Yes, agree that tuning min_sum_per_partition should be false for now
Uses
linf_sum_contributions_histogram
to compute that, candidates are taken as max values of bins, bins are sampled uniformly.min_sum_per_partition is not implemented and is always zero.
utility analysis for sum was not implemented, this PR also adds support for it modifying
_sum_metrics_to_data_dropped
method.