-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
103 changed files
with
4,818 additions
and
1,708 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
|
@@ -73,3 +73,5 @@ nohup.out | |
|
||
# notebook data | ||
notebooks/helm/scenario_data.jsonl | ||
# tox syft.build.helm generated file | ||
out.txt |
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 |
---|---|---|
|
@@ -103,12 +103,14 @@ | |
}, | ||
"outputs": [], | ||
"source": [ | ||
"root_client.register(name=\"Sheldon Cooper\",\n", | ||
" email=\"[email protected]\",\n", | ||
" password=\"abc123\",\n", | ||
" password_verify=\"abc123\",\n", | ||
" institution=\"Caltech\",\n", | ||
" website=\"https://www.caltech.edu/\")" | ||
"root_client.register(\n", | ||
" name=\"Sheldon Cooper\",\n", | ||
" email=\"[email protected]\",\n", | ||
" password=\"abc123\",\n", | ||
" password_verify=\"abc123\",\n", | ||
" institution=\"Caltech\",\n", | ||
" website=\"https://www.caltech.edu/\"\n", | ||
")" | ||
] | ||
}, | ||
{ | ||
|
@@ -167,13 +169,15 @@ | |
"outputs": [], | ||
"source": [ | ||
"# The Data Scientist does some basic statistics function on the object\n", | ||
"@sy.syft_function(input_policy=sy.ExactMatch(data=dataset_ptr.assets[0]),\n", | ||
" output_policy=sy.SingleExecutionExactOutput())\n", | ||
"@sy.syft_function(\n", | ||
" input_policy=sy.ExactMatch(data=dataset_ptr.assets[0]),\n", | ||
" output_policy=sy.SingleExecutionExactOutput()\n", | ||
")\n", | ||
"def calculate_sum(data):\n", | ||
" import opendp.prelude as dp\n", | ||
" dp.enable_features(\"contrib\")\n", | ||
" from opendp.measurements import make_laplace\n", | ||
" \n", | ||
"\n", | ||
" #compute sum\n", | ||
" res = data.sum()\n", | ||
" base_lap = dp.m.make_base_laplace(\n", | ||
|
@@ -225,7 +229,7 @@ | |
"source": [ | ||
"project = new_project.start()\n", | ||
"\n", | ||
"project " | ||
"project" | ||
] | ||
}, | ||
{ | ||
|
@@ -249,7 +253,7 @@ | |
}, | ||
"outputs": [], | ||
"source": [ | ||
"assert len(project.events) ==1\n", | ||
"assert len(project.events) == 1\n", | ||
"assert isinstance(project.events[0], sy.service.project.project.ProjectRequest)" | ||
] | ||
}, | ||
|
@@ -263,13 +267,15 @@ | |
"outputs": [], | ||
"source": [ | ||
"# The Data Scientist would like to submit another code request after the start of the project\n", | ||
"@sy.syft_function(input_policy=sy.ExactMatch(data=dataset_ptr.assets[0]),\n", | ||
" output_policy=sy.SingleExecutionExactOutput())\n", | ||
"@sy.syft_function(\n", | ||
" input_policy=sy.ExactMatch(data=dataset_ptr.assets[0]),\n", | ||
" output_policy=sy.SingleExecutionExactOutput()\n", | ||
")\n", | ||
"def calculate_mean(data):\n", | ||
" import opendp.prelude as dp\n", | ||
" dp.enable_features(\"contrib\")\n", | ||
" from opendp.measurements import make_laplace\n", | ||
" \n", | ||
"\n", | ||
" #compute mean\n", | ||
" mean = data.mean()\n", | ||
" base_lap = dp.m.make_base_laplace(\n", | ||
|
@@ -290,7 +296,7 @@ | |
}, | ||
"outputs": [], | ||
"source": [ | ||
"res = project.create_code_request(calculate_mean ,ds_client)\n", | ||
"res = project.create_code_request(calculate_mean, ds_client)\n", | ||
"res" | ||
] | ||
}, | ||
|
@@ -482,7 +488,7 @@ | |
}, | ||
"outputs": [], | ||
"source": [ | ||
"assert isinstance(mean_result,float)" | ||
"assert isinstance(mean_result, float)" | ||
] | ||
}, | ||
{ | ||
|
@@ -515,7 +521,7 @@ | |
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.11.4" | ||
"version": "3.11.5" | ||
}, | ||
"toc": { | ||
"base_numbering": 1, | ||
|
Oops, something went wrong.