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

Add support for custom weight specification during cross partition combining #472

Merged
merged 10 commits into from
Jul 31, 2023

Conversation

RamSaw
Copy link
Collaborator

@RamSaw RamSaw commented Jul 20, 2023

Right now we just combine all partitions equally during utility analysis. We want to allow clients do it in a more elaborate way, giving them some set of predefined good weighing functions and allowing them to specify their own. For example, we can provide them with a weighing function that weighs based on the contribution of the partition (e.g. in case of COUNT metric, it is partitions size).

@RamSaw RamSaw requested a review from dvadym July 20, 2023 12:01
Copy link
Collaborator

@dvadym dvadym left a comment

Choose a reason for hiding this comment

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

Thanks, it looks good! I left some comments

analysis/cross_partition_combiners.py Outdated Show resolved Hide resolved
analysis/cross_partition_combiners.py Outdated Show resolved Hide resolved
analysis/cross_partition_combiners.py Outdated Show resolved Hide resolved
analysis/cross_partition_combiners.py Outdated Show resolved Hide resolved
analysis/cross_partition_combiners.py Outdated Show resolved Hide resolved
analysis/cross_partition_combiners.py Outdated Show resolved Hide resolved
analysis/cross_partition_combiners.py Outdated Show resolved Hide resolved

def __init__(self, dp_metrics: List[pipeline_dp.Metrics],
public_partitions: bool):
AccumulatorType = Tuple[Tuple, metrics.UtilityReport, Tuple[float]]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please extend the comment above about AccumulatorType structure

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added comment, but better to improve it. will do.

analysis/cross_partition_combiners.py Outdated Show resolved Hide resolved
analysis/cross_partition_combiners.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@dvadym dvadym left a comment

Choose a reason for hiding this comment

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

It looks great, only minor comments. And please run make format to fix lint failure

analysis/cross_partition_combiners.py Outdated Show resolved Hide resolved
analysis/cross_partition_combiners.py Show resolved Hide resolved
Copy link
Collaborator

@dvadym dvadym left a comment

Choose a reason for hiding this comment

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

Thanks!

@dvadym dvadym merged commit 9413b3c into OpenMined:main Jul 31, 2023
7 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants