created extra class and method for the issue in dp_engine.py #534
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Summary of Changes:
1)Dimensions Class:
Allows users to define partitions using dimensions.
Includes a method to compute the Cartesian product of the dimensions.
2)Integration with aggregate Method:
Checks if public_partitions is a Dimensions object.
Computes the Cartesian product of the dimensions before processing.
3)Helper Method:
_generate_cartesian_product generates the Cartesian product of the Dimensions object.
Affected Dependencies
import functools
from typing import Any, Callable, Optional, Sequence, Tuple, Union
import pipeline_dp
from pipeline_dp import budget_accounting
from pipeline_dp import combiners
from pipeline_dp import contribution_bounders
from pipeline_dp import dp_computations
from pipeline_dp import partition_selection
from pipeline_dp import pipeline_functions
from pipeline_dp import report_generator
from pipeline_dp import sampling_utils
from pipeline_dp.dataset_histograms import computing_histograms
from pipeline_dp.pipeline_backend import PipelineBackend
from pipeline_dp.private_contribution_bounds import PrivateL0Calculator
import itertools
import dataclasses
from typing import Any, Callable, Tuple
import numpy as np
import pipeline_dp
from pipeline_dp import combiners
import pipeline_dp.report_generator as report_generator
import pydp.algorithms.partition_selection as partition_selection # type: ignore
How has this been tested?
Checklist