Merge pull request #21 from ZKStats/tmp/support-rest-operations

Tmp/support rest operations
This commit is contained in:
JernKunpittaya
2024-02-29 18:28:15 +07:00
committed by GitHub
5 changed files with 4 additions and 758 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +0,0 @@
{
"col_name": [
33.0, 15.0, 38.0, 38.0, 70.0, 14.0, 34.0, 67.0, 54.0, 78.0, 80.0, 21.0,
41.0, 47.0, 57.0, 5.0, 6.0, 43.0, 51.0, 14.0
]
}

View File

@@ -59,7 +59,7 @@ def compute(
prover_gen_settings(
data_path=data_path,
col_array=selected_columns,
selected_columns=selected_columns,
sel_data_path=str(sel_data_path),
prover_model=model,
prover_model_path=str(model_path),
@@ -67,6 +67,7 @@ def compute(
mode="resources",
settings_path=str(settings_path),
)
setup(
str(model_path),
str(compiled_model_path),

View File

@@ -52,7 +52,7 @@ def create_dummy(data_path: str, dummy_data_path: str) -> None:
# ===================================================================================================
# ===================================================================================================
# we decide to not have sel_data_path as parameter since a bit redundant parameter.
def prover_gen_settings(
data_path: str,
selected_columns: list[str],
@@ -333,7 +333,7 @@ def _gen_settings(
# Poseidon is not homomorphic additive, maybe consider Pedersens or Dory commitment.
gip_run_args = ezkl.PyRunArgs()
gip_run_args.input_visibility = "hashed" # one commitment (values hashed) for each column
gip_run_args.param_visibility = "private" # no parameters used
gip_run_args.param_visibility = "private" # no parameters shown
gip_run_args.output_visibility = "public" # should be `(torch.Tensor(1.0), output)`
# generate settings