-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for configuring tasks with DP strategy (#1173)
* Add support for configuring tasks with DP strategy * Check entire validation error object in tests * Add support to divviup-client * Add re-exports * Add support to the CLI * Mark new enums as non-exhaustive * Update OpenAPI schema
- Loading branch information
1 parent
db5b5da
commit 93f503b
Showing
16 changed files
with
800 additions
and
103 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
use num_bigint::BigUint; | ||
use num_rational::Ratio; | ||
use serde::{Deserialize, Serialize}; | ||
|
||
#[derive(Serialize, Deserialize, Debug, Clone, Eq, PartialEq, Default)] | ||
#[serde(tag = "dp_strategy")] | ||
#[non_exhaustive] | ||
pub enum Prio3Histogram { | ||
#[default] | ||
NoDifferentialPrivacy, | ||
PureDpDiscreteLaplace(PureDpDiscreteLaplace), | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Debug, Clone, Eq, PartialEq, Default)] | ||
#[serde(tag = "dp_strategy")] | ||
#[non_exhaustive] | ||
pub enum Prio3SumVec { | ||
#[default] | ||
NoDifferentialPrivacy, | ||
PureDpDiscreteLaplace(PureDpDiscreteLaplace), | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Debug, Clone, Eq, PartialEq)] | ||
pub struct PureDpDiscreteLaplace { | ||
pub budget: PureDpBudget, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Debug, Clone, Eq, PartialEq)] | ||
pub struct PureDpBudget { | ||
pub epsilon: Ratio<BigUint>, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.