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

Chore: Update version 0.5.0 #67

Merged
merged 4 commits into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 15 additions & 32 deletions examples/broadcasting/tests/broadcasting.yaml
Original file line number Diff line number Diff line change
@@ -1,35 +1,18 @@
---
program: broadcasting
inputs:
B_1:
SecretInteger: "3"
A_0:
SecretInteger: "3"
C_1:
SecretInteger: "3"
B_0:
SecretInteger: "3"
D_0:
SecretInteger: "3"
C_2:
SecretInteger: "3"
C_0:
SecretInteger: "3"
A_2:
SecretInteger: "3"
A_1:
SecretInteger: "3"
D_1:
SecretInteger: "3"
B_2:
SecretInteger: "3"
D_2:
SecretInteger: "3"

B_1: 3
A_0: 3
Copy link
Contributor

Choose a reason for hiding this comment

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

interesting change. how do we know if these values are public/secret and signed/unsigned?
can we no longer customize this is these YAML files?

Copy link
Member Author

Choose a reason for hiding this comment

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

Basically, the value is introduced into the specific type expected by the Nada program. So it takes it already from the Nada Program.

C_1: 3
B_0: 3
D_0: 3
C_2: 3
C_0: 3
A_2: 3
A_1: 3
D_1: 3
B_2: 3
D_2: 3
expected_outputs:
my_output_1:
SecretInteger: "-3"
my_output_2:
SecretInteger: "-3"
my_output_0:
SecretInteger: "-3"
my_output_1: -3
my_output_2: -3
my_output_0: -3
24 changes: 7 additions & 17 deletions examples/dot_product/tests/dot_product.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
---
program: dot_product
inputs:

A_0:
SecretInteger: "3"
A_1:
SecretInteger: "3"
A_2:
SecretInteger: "3"
B_0:
SecretInteger: "3"
B_1:
SecretInteger: "3"
B_2:
SecretInteger: "3"

A_0: 3
A_1: 3
A_2: 3
B_0: 3
B_1: 3
B_2: 3
expected_outputs:
my_output:
SecretInteger: "27"
my_output: 27
31 changes: 10 additions & 21 deletions examples/linear_regression/tests/determinant-3.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,13 @@
---
program: determinant
inputs:
A_0_0:
SecretInteger: "1"
A_0_1:
SecretInteger: "0"
A_0_2:
SecretInteger: "0"
A_1_0:
SecretInteger: "0"
A_1_1:
SecretInteger: "2"
A_1_2:
SecretInteger: "0"
A_2_0:
SecretInteger: "0"
A_2_1:
SecretInteger: "0"
A_2_2:
SecretInteger: "3"
A_0_0: 1
A_0_1: 0
A_0_2: 0
A_1_0: 0
A_1_1: 2
A_1_2: 0
A_2_0: 0
A_2_1: 0
A_2_2: 3
expected_outputs:
my_output:
Integer: "6"
my_output: 6
31 changes: 10 additions & 21 deletions examples/linear_regression/tests/determinant_1.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,13 @@
---
program: determinant
inputs:
A_0_0:
SecretInteger: "1"
A_0_1:
SecretInteger: "2"
A_0_2:
SecretInteger: "3"
A_1_0:
SecretInteger: "4"
A_1_1:
SecretInteger: "5"
A_1_2:
SecretInteger: "6"
A_2_0:
SecretInteger: "7"
A_2_1:
SecretInteger: "8"
A_2_2:
SecretInteger: "10"
A_0_0: 1
A_0_1: 2
A_0_2: 3
A_1_0: 4
A_1_1: 5
A_1_2: 6
A_2_0: 7
A_2_1: 8
A_2_2: 10
expected_outputs:
my_output:
Integer: "-3"
my_output: -3
31 changes: 10 additions & 21 deletions examples/linear_regression/tests/determinant_2.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,13 @@
---
program: determinant
inputs:
A_0_1:
SecretInteger: "3"
A_2_2:
SecretInteger: "3"
A_1_0:
SecretInteger: "3"
A_1_2:
SecretInteger: "3"
A_2_0:
SecretInteger: "3"
A_0_0:
SecretInteger: "3"
A_1_1:
SecretInteger: "3"
A_2_1:
SecretInteger: "3"
A_0_2:
SecretInteger: "3"
A_0_1: 3
A_2_2: 3
A_1_0: 3
A_1_2: 3
A_2_0: 3
A_0_0: 3
A_1_1: 3
A_2_1: 3
A_0_2: 3
expected_outputs:
my_output:
Integer: "0"
my_output: 0
58 changes: 19 additions & 39 deletions examples/linear_regression/tests/gauss_jordan.yaml
Original file line number Diff line number Diff line change
@@ -1,42 +1,22 @@
---
program: gauss_jordan
inputs:
A_0_0:
SecretInteger: "2"
A_0_1:
SecretInteger: "4"
A_0_2:
SecretInteger: "6"
A_1_0:
SecretInteger: "1"
A_1_1:
SecretInteger: "3"
A_1_2:
SecretInteger: "5"
A_2_0:
SecretInteger: "3"
A_2_1:
SecretInteger: "1"
A_2_2:
SecretInteger: "2"
B:
Integer: "456"
A_0_0: 2
A_0_1: 4
A_0_2: 6
A_1_0: 1
A_1_1: 3
A_1_2: 5
A_2_0: 3
A_2_1: 1
A_2_2: 2
B: 456
expected_outputs:
my_output_0_0:
Integer: "1"
my_output_0_1:
Integer: "0"
my_output_0_2:
Integer: "0"
my_output_1_0:
Integer: "0"
my_output_1_1:
Integer: "1"
my_output_1_2:
Integer: "0"
my_output_2_0:
Integer: "0"
my_output_2_1:
Integer: "0"
my_output_2_2:
Integer: "1"
my_output_0_0: 1
my_output_0_1: 0
my_output_0_2: 0
my_output_1_0: 0
my_output_1_1: 1
my_output_1_2: 0
my_output_2_0: 0
my_output_2_1: 0
my_output_2_2: 1
51 changes: 16 additions & 35 deletions examples/linear_regression/tests/linear_regression.yaml
Original file line number Diff line number Diff line change
@@ -1,38 +1,19 @@
---
program: linear_regression
inputs:
A_0_0:
SecretInteger: "-256"
A_0_1:
SecretInteger: "-199"
A_0_2:
SecretInteger: "-142"
A_1_0:
SecretInteger: "-85"
A_1_1:
SecretInteger: "-28"
A_1_2:
SecretInteger: "28"
A_2_0:
SecretInteger: "85"
A_2_1:
SecretInteger: "142"
A_2_2:
SecretInteger: "256"
b_0:
SecretInteger: "-256"
b_1:
SecretInteger: "-199"
b_2:
SecretInteger: "-142"
# lambda_0:
# Integer: "1"
A_0_0: -256
A_0_1: -199
A_0_2: -142
A_1_0: -85
A_1_1: -28
A_1_2: 28
A_2_0: 85
A_2_1: 142
A_2_2: 256
b_0: -256
b_1: -199
b_2: -142
expected_outputs:
b:
SecretInteger: "330643400256"
w_0:
SecretInteger: "1102041164640"
w_1:
SecretInteger: "-993683999568"
w_2:
SecretInteger: "1868226984"
b: 330643400256
w_0: 1102041164640
w_1: -993683999568
w_2: 1868226984
51 changes: 16 additions & 35 deletions examples/linear_regression/tests/linear_regression_1.yaml
Original file line number Diff line number Diff line change
@@ -1,38 +1,19 @@
---
program: linear_regression
inputs:
A_0_0:
SecretInteger: "-256"
A_0_1:
SecretInteger: "-199"
A_0_2:
SecretInteger: "-142"
A_1_0:
SecretInteger: "-85"
A_1_1:
SecretInteger: "-28"
A_1_2:
SecretInteger: "28"
A_2_0:
SecretInteger: "85"
A_2_1:
SecretInteger: "142"
A_2_2:
SecretInteger: "256"
b_0:
SecretInteger: "-256"
b_1:
SecretInteger: "-199"
b_2:
SecretInteger: "-142"
# lambda_0:
# Integer: "1"
A_0_0: -256
A_0_1: -199
A_0_2: -142
A_1_0: -85
A_1_1: -28
A_1_2: 28
A_2_0: 85
A_2_1: 142
A_2_2: 256
b_0: -256
b_1: -199
b_2: -142
expected_outputs:
b:
SecretInteger: "330643400256"
w_0:
SecretInteger: "1102041164640"
w_1:
SecretInteger: "-993683999568"
w_2:
SecretInteger: "1868226984"
b: 330643400256
Copy link
Contributor

Choose a reason for hiding this comment

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

If we can no longer type-annotate in these YAMLs, that removes any prospect of annotating as Rational to abstract away this scaling logic?
Or do we just assume that if a float is passed then it is a rational?

w_0: 1102041164640
w_1: -993683999568
w_2: 1868226984
Loading
Loading