-
-
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
Sum per partition histogram #512
Conversation
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, only nits :)
"map to lowers") | ||
def generate_lowers(min_max: Tuple[float, float]) -> List[float]: | ||
min_, max_ = min_max | ||
if min_ == max_: |
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.
will it generate min_
number_of_buckets + 1
times otherweise?
@@ -185,7 +185,8 @@ def test_find_candidate_parameters_count(self, max_value, max_candidates, | |||
mock_l0_histogram.max_value = mock.Mock(return_value=max_value) | |||
|
|||
mock_histograms = histograms.DatasetHistograms(mock_l0_histogram, None, | |||
None, None, None, None) | |||
None, None, None, None, | |||
None) |
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.
weird formatting but maybe that's what the tool generates
sum=-10.0, | ||
max=-1.0), | ||
hist.FrequencyBin(lower=0.0, | ||
upper=0.00019999999999997797, |
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.
hm, so this value we have here due to imprecise math, should then try to assert with an interval around 0.0002? But I guess then assertion will be more complicated because we won't be able to assert just like assert(actual == expected).
Computing histogram for sum per partition (i.e. of non-dp sum per partition). Its computation similar to
linf_sum_contributions_histogram
: i.e. the range between min/max split on 10^4 bins and count/sum/max for each bin is computed.