-
-
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
Introduce boolean variable for enabling/disabling of cross partition contribution bounding #515
Introduce boolean variable for enabling/disabling of cross partition contribution bounding #515
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.
PTAL
tests/contribution_bounders_test.py
Outdated
self.assertLen(bound_result[('pid1', 'pk1')], 1) | ||
self.assertLen(bound_result[('pid2', 'pk1')], 1) | ||
|
||
def test_sampling_applied_nothing_dropped(self): |
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: I would rename this methods to "test_more_contributions_than_bound_nothing_dropped" to make it clear that we expect all contributions to be kept under specific circumstances.
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.
done
tests/dp_engine_test.py
Outdated
unittest.mock.ANY) | ||
|
||
@patch('pipeline_dp.contribution_bounders.NoOpSampler.bound_contributions') | ||
def test_aggregate_computation_graph_only_no_sampling_for_sum_when_no_cross_partition( |
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.
in "test_aggregate_computation_graph_only_no_sampling_for_sum_when_no_cross_partition"
what does "only" refer to? is it "only test graph and nothing else"? In that case, I think we can drop "only". "test_computational_graph" already indicates what's being tested.
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.
thx, we can drop only. Done
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 for review!
tests/contribution_bounders_test.py
Outdated
self.assertLen(bound_result[('pid1', 'pk1')], 1) | ||
self.assertLen(bound_result[('pid2', 'pk1')], 1) | ||
|
||
def test_sampling_applied_nothing_dropped(self): |
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.
done
tests/dp_engine_test.py
Outdated
unittest.mock.ANY) | ||
|
||
@patch('pipeline_dp.contribution_bounders.NoOpSampler.bound_contributions') | ||
def test_aggregate_computation_graph_only_no_sampling_for_sum_when_no_cross_partition( |
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.
thx, we can drop only. Done
No description provided.