diff --git a/README.md b/README.md index 2706052..c63c74e 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,212 @@ -# Zk Stats - -A library to generate and verify proof for statistical queries to one data provider. - -Functions to support - -- `mean` -- `geometric_mean` -- `harmonic_mean` -- `median` -- `mode` -- `pstdev` -- `pvariance` -- `stdev` -- `variance` -- `covariance` -- `correlation` -- `linear_regression` - -Note: -[to be updated after benchmark test] - -- All functions above work, except correlation. It is unnecessary to write correlation's own circuit because it can be derived from covariance and std + its circuit can be too big. -- We implement using witness approach instead of directly calculating the value in circuit. This sometimes allows us to not calculate stuffs like division or exponential which requires larger scale in settings. (If we dont use larger scale in those cases, the accuracy will be very bad) +# ZKStats Library + +## Overview + +ZKStats Library is the core library for ZKStats Platform, designed to generate zero-knowledge (ZK) proofs for statistical functions, leveraging PyTorch and powered by [EZKL](https://github.com/zkonduit/ezkl). This library allows data providers to share statistical result of their dataset with users while still preserving privacy. Users can be convinced the correctness of their computation by verifying a ZK proof without learning the underlying data. + +## Supported Statistical Functions + +ZKStats Library supports the same set of statistical functions as [Python statistcs module](https://docs.python.org/3/library/statistics.html#averages-and-measures-of-central-location): `mean`, `geometric_mean`, `harmonic_mean`, `median`, `mode`, `pstdev`, `pvariance`, `stdev`, `variance`, `covariance`, `correlation`, and `linear_regression`. + +## Installation + +Make sure you have Python 3.9 or later installed. + +You can install ZKStats library using pip: + +```bash +pip install zkstats +``` + +To hack on the library, you'll need to [install poetry](https://python-poetry.org/docs/#installing-with-pipx) to build the project: + +```bash +git@github.com:ZKStats/zk-stats-lib.git +cd zk-stats-lib +poetry install +``` + +## Getting Started + +### Define Your Computation + +User computation must be defined as **a function** using ZKStats operations and PyTorch functions. The function signature must be `Callable[[State, list[torch.Tensor]], torch.Tensor]`: + +```python +import torch + +from zkstats.computation import State + +# User-defined computation +def user_computation(s: State, data: list[torch.Tensor]) -> torch.Tensor: + # Define your computation here + ... + +``` + +- first argument is a `State` object, which contains the statistical functions that ZKStats supports. +- second argument is a list of PyTorch tensors, the input data. `data[0]` is the first column, `data[1]` is the second column, and so on. + +For example, we have two columns of data and we want to compute the mean of the medians of the two columns: + +```python +def user_computation(s: State, data: list[torch.Tensor]) -> torch.Tensor: + # Compute the median of the first column + median1 = s.median(data[0]) + # Compute the median of the second column + median2 = s.median(data[1]) + # Compute the mean of the medians + return s.mean(torch.Tensor([median1, median2]).reshape(1, -1, 1)) +``` + +> NOTE: `reshape` is required for now since input must be in shape `[1, data_size, 1]` for now. It should be addressed in the future + +#### Torch Operations + +Aside from the ZKStats operations, you can also use PyTorch functions like (`torch.abs`, `torch.max`, ...etc). + +**Caveats**: Not all PyTorch functions are supported. For example, filtering data from a list by `X[X > 0]` is not supported because the zk circuit needs to be of a predetermined size, hence we cannot arbitrarily reshape our X into a new shape based on the filter condition inside the circuit. + +TODO: We should have a list for all supported PyTorch functions. + +#### Data Filtering + +Since we cannot filter data into any arbitrary shape using just condition + index (e.g. `X[X > 0]`), we need to filter data while still preserving the shape. We use condition + `torch.where` instead. + +```python +def user_computation(s: State, data: list[torch.Tensor]) -> torch.Tensor: + # Compute the mean of the absolute values + x = data[0] + condition = x > 20 + # Filter out data that is greater than 20. For the data that is greater than 20, we will use 0.0 + fil_X = torch.where(condition=condition, input=x, other=0.0) + return s.mean(fil_X) +``` + +**Caveats**: Currently, this 'where' operation still doesn't work correctly, since we cannot just plug fil_X into our current s.mean() due to incompatible shape of fil_X and X in reality, we will update the compatible implementation of how to do data filtering soon. Keep posted! + +### Proof Generation and Verification + +The flow between data providers and users is as follows: +![zkstats-lib-flow](./assets/zkstats-lib.png) + +#### Data Provider: generate data commitments + +Data providers should generate commitments for their dataset beforehand. For a dataset (e.g. a table in a SQL database), there should be a commitment for each column. These commitments are used by users later, to verify the zkp proof and be convinced the computation is done with the correct dataset. + +```python +from zkstats.core import get_data_commitment_maps + +data_path = "/path/to/your/data.json" +# possible_scales is a list of possible scales for the data to be encoded. For example, here we use [0, 20) as the possible scales, to make sure +possible_scales = list(range(20)) +# `commitment_maps` is derived by data providers and shared with users +commitment_maps = get_data_commitment_maps(data_path, possible_scales) +``` + +When generating a proof, since dataset might contain floating points, data providers need to specify a proper "scale" to encode and decode floating points. Scale is chosen based on the value precision in the dataset and the type of computation. `possible_scales` should cover as many scales as possible and data providers should always use the scales within `possible_scales`, to make sure users can always get the corresponding commitments to verify the proofs. + +#### Both: derive PyTorch model from the computation + +When a user wants to request a data provider to generate a proof for their defined computation, the user must send the data provider first. Then, both the data provider and the user transform the model to necessary settings, respectively. + +```python +from zkstats.core import computation_to_model + +_, model = computation_to_model(user_computation) +``` + +#### Data Provider: generate settings + +```python +prover_gen_settings( + data_path, # path to the dataset + selected_columns, # the column names to be used by the computation + sel_data_path, # path to the preprocessed dataset + prover_model, # the model generated from the computation + prover_model_path, # path to store the generated onnx format of the model + scale, # scale to encode and decode floating points + mode, # mode to generate settings + settings_path, # path to store the generated settings +) +``` + +#### Data Provider: get proving key + +```python +setup( + prover_model_path, # path to the onnx format model + prover_compiled_model_path, # path to store the compiled model + settings_path, # path to the settings file + vk_path, # path to store the generated verification key + pk_path, # path to store the generated proving key +) +``` + +#### User: generate verification key + +```python +verifier_define_calculation( + dummy_data_path, # path to the dummy data + selected_columns, # selected columns + sel_dummy_data_path, # path to store the selected dummy data + verifier_model, # the model generated from the computation + verifier_model_path, # path to store the generated onnx format of the model +) +``` + +```python +setup( + verifier_model_path, # path to the onnx format model + verifier_compiled_model_path, # path to store the compiled model + settings_path, # path to the settings file + vk_path, # path to store the generated verification key + pk_path, # path to store the generated proving key +) +``` + +#### Data Provider: generate proof + +```python +prover_gen_proof( + prover_model_path, # path to the onnx format model + sel_data_path, # path to the preprocessed dataset + witness_path, # path to store the generated witness file + prover_compiled_model_path, # path to store the generated compiled model + settings_path, # path to the settings file + proof_path, # path to store the generated proof + pk_path, # path to the proving key +) +``` + +#### User: verify proof and get the result + +```python +res = verifier_verify( + proof_path, # path to the proof + settings_path, # path to the settings file + vk_path, # path to the verification key + selected_columns, # selected columns + commitment_maps, # commitment maps +) +print("The result is", res) +``` + +- **Success**: The result is correct and the computation is verified. +- **Failure Cases**: + - Computations not within the acceptable error margin. + - Runtime errors should be reported for further investigation. + +## Examples + +See our jupyter notebook for [examples](./examples/). + +## Benchmarks + +See our jupyter notebook for [benchmarks](./benchmark/). + +## Note + +- We implement using witness approach instead of directly calculating the value in circuit. This sometimes allows us to not calculate stuffs like division or exponential which requires larger scale in settings. (If we don't use larger scale in those cases, the accuracy will be very bad) - For non-linearity function, larger scale leads to larger lookup table, hence bigger circuit size. Can compare between geomean_OG (implemented in traditional way, instead of witness approach) which is the non-linearity function (p bad with larger scale), and mean_OG which is linear function (p fine with larger scale). Hence, we can say that for linearity func like mean, we can use traditional way, while for non-linear func like geomean, we should use witness approach. - Dummy data to feed in verifier onnx file needs to have same shape as the private dataset, but can be filled with any value (we just randomize it to be uniform 1-10 with 1 decimal). diff --git a/assets/zkstats-lib.png b/assets/zkstats-lib.png new file mode 100644 index 0000000..ef5a61b Binary files /dev/null and b/assets/zkstats-lib.png differ diff --git a/bench.py b/bench.py index 1544857..7214aa8 100644 --- a/bench.py +++ b/bench.py @@ -137,7 +137,7 @@ def prover_gen_settings(data_path, col_array, sel_data_path, prover_model,prove # Here prover can concurrently call this since all params are public to get pk. # Here write as verifier function to emphasize that verifier must calculate its own vk to be sure -def verifier_setup(verifier_model_path, verifier_compiled_model_path, settings_path,vk_path, pk_path ): +def setup(verifier_model_path, verifier_compiled_model_path, settings_path,vk_path, pk_path ): # compile circuit res = ezkl.compile_circuit(verifier_model_path, verifier_compiled_model_path, settings_path) assert res == True @@ -164,28 +164,6 @@ def verifier_setup(verifier_model_path, verifier_compiled_model_path, settings_p # =================================================================================================== # =================================================================================================== -def prover_setup( - data_path, - col_array, - sel_data_path, - prover_model, - prover_model_path, - prover_compiled_model_path, - scale, - mode, - settings_path, - vk_path, - pk_path, -): - data_tensor_array = process_data(data_path, col_array, sel_data_path) - - # export onnx file - export_onnx(prover_model, data_tensor_array, prover_model_path) - # gen + calibrate setting - gen_settings(sel_data_path, prover_model_path, scale, mode, settings_path) - verifier_setup(prover_model_path, prover_compiled_model_path, settings_path, vk_path, pk_path) - - def prover_gen_proof( prover_model_path, sel_data_path, @@ -307,7 +285,7 @@ def bench_one(data_path, col_array, model_func, gen_param_func, data_name, scale f_setting['run_args']['logrows']=logrow json.dump(f_setting, open(settings_path, "w"), indent=2) # You can adjust the 'indent' parameter for formatting print("logrow cal settings: ",json.loads(open(settings_path, "r").read()) ) - verifier_setup(verifier_model_path, verifier_compiled_model_path, settings_path,vk_path, pk_path ) + setup(verifier_model_path, verifier_compiled_model_path, settings_path,vk_path, pk_path) gen_prf_time = prover_gen_proof(prover_model_path, sel_data_path, witness_path, prover_compiled_model_path, settings_path, proof_path, pk_path) diff --git a/examples/computation/computation.ipynb b/examples/computation/computation.ipynb index daf0510..f8dbcae 100644 --- a/examples/computation/computation.ipynb +++ b/examples/computation/computation.ipynb @@ -9,41 +9,39 @@ "name": "stdout", "output_type": "stream", "text": [ - "Requirement already satisfied: ezkl==7.0.0 in /Users/mhchia/projects/work/pse/zk-stats-lib/.venv/lib/python3.9/site-packages (from -r ../../requirements.txt (line 1)) (7.0.0)\n", - "Requirement already satisfied: torch in /Users/mhchia/projects/work/pse/zk-stats-lib/.venv/lib/python3.9/site-packages (from -r ../../requirements.txt (line 2)) (2.1.1)\n", - "Requirement already satisfied: requests in /Users/mhchia/projects/work/pse/zk-stats-lib/.venv/lib/python3.9/site-packages (from -r ../../requirements.txt (line 3)) (2.31.0)\n", - "Requirement already satisfied: scipy in /Users/mhchia/projects/work/pse/zk-stats-lib/.venv/lib/python3.9/site-packages (from -r ../../requirements.txt (line 4)) (1.11.4)\n", - "Requirement already satisfied: numpy in /Users/mhchia/projects/work/pse/zk-stats-lib/.venv/lib/python3.9/site-packages (from -r ../../requirements.txt (line 5)) (1.26.2)\n", - "Requirement already satisfied: matplotlib in /Users/mhchia/projects/work/pse/zk-stats-lib/.venv/lib/python3.9/site-packages (from -r ../../requirements.txt (line 6)) (3.8.2)\n", - "Requirement already satisfied: statistics in /Users/mhchia/projects/work/pse/zk-stats-lib/.venv/lib/python3.9/site-packages (from -r ../../requirements.txt (line 7)) (1.0.3.5)\n", - "Requirement already satisfied: onnx in /Users/mhchia/projects/work/pse/zk-stats-lib/.venv/lib/python3.9/site-packages (from -r ../../requirements.txt (line 8)) (1.15.0)\n", - "Requirement already satisfied: fsspec in /Users/mhchia/projects/work/pse/zk-stats-lib/.venv/lib/python3.9/site-packages (from torch->-r ../../requirements.txt (line 2)) (2023.12.0)\n", - "Requirement already satisfied: filelock in /Users/mhchia/projects/work/pse/zk-stats-lib/.venv/lib/python3.9/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.13.1)\n", - "Requirement already satisfied: typing-extensions in /Users/mhchia/projects/work/pse/zk-stats-lib/.venv/lib/python3.9/site-packages (from torch->-r ../../requirements.txt (line 2)) (4.8.0)\n", - "Requirement already satisfied: jinja2 in /Users/mhchia/projects/work/pse/zk-stats-lib/.venv/lib/python3.9/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.1.2)\n", - "Requirement already satisfied: networkx in /Users/mhchia/projects/work/pse/zk-stats-lib/.venv/lib/python3.9/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.2.1)\n", - "Requirement already satisfied: sympy in /Users/mhchia/projects/work/pse/zk-stats-lib/.venv/lib/python3.9/site-packages (from torch->-r ../../requirements.txt (line 2)) (1.12)\n", - "Requirement already satisfied: idna<4,>=2.5 in /Users/mhchia/projects/work/pse/zk-stats-lib/.venv/lib/python3.9/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.6)\n", - "Requirement already satisfied: certifi>=2017.4.17 in /Users/mhchia/projects/work/pse/zk-stats-lib/.venv/lib/python3.9/site-packages (from requests->-r ../../requirements.txt (line 3)) (2023.11.17)\n", - "Requirement already satisfied: charset-normalizer<4,>=2 in /Users/mhchia/projects/work/pse/zk-stats-lib/.venv/lib/python3.9/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.3.2)\n", - "Requirement already satisfied: urllib3<3,>=1.21.1 in /Users/mhchia/projects/work/pse/zk-stats-lib/.venv/lib/python3.9/site-packages (from requests->-r ../../requirements.txt (line 3)) (2.1.0)\n", - "Requirement already satisfied: python-dateutil>=2.7 in /Users/mhchia/projects/work/pse/zk-stats-lib/.venv/lib/python3.9/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (2.8.2)\n", - "Requirement already satisfied: contourpy>=1.0.1 in /Users/mhchia/projects/work/pse/zk-stats-lib/.venv/lib/python3.9/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.2.0)\n", - "Requirement already satisfied: fonttools>=4.22.0 in /Users/mhchia/projects/work/pse/zk-stats-lib/.venv/lib/python3.9/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (4.46.0)\n", - "Requirement already satisfied: cycler>=0.10 in /Users/mhchia/projects/work/pse/zk-stats-lib/.venv/lib/python3.9/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (0.12.1)\n", - "Requirement already satisfied: kiwisolver>=1.3.1 in /Users/mhchia/projects/work/pse/zk-stats-lib/.venv/lib/python3.9/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.4.5)\n", - "Requirement already satisfied: pyparsing>=2.3.1 in /Users/mhchia/projects/work/pse/zk-stats-lib/.venv/lib/python3.9/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (3.1.1)\n", - "Requirement already satisfied: importlib-resources>=3.2.0 in /Users/mhchia/projects/work/pse/zk-stats-lib/.venv/lib/python3.9/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (6.1.1)\n", - "Requirement already satisfied: pillow>=8 in /Users/mhchia/projects/work/pse/zk-stats-lib/.venv/lib/python3.9/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (10.1.0)\n", - "Requirement already satisfied: packaging>=20.0 in /Users/mhchia/projects/work/pse/zk-stats-lib/.venv/lib/python3.9/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (23.2)\n", - "Requirement already satisfied: docutils>=0.3 in /Users/mhchia/projects/work/pse/zk-stats-lib/.venv/lib/python3.9/site-packages (from statistics->-r ../../requirements.txt (line 7)) (0.20.1)\n", - "Requirement already satisfied: protobuf>=3.20.2 in /Users/mhchia/projects/work/pse/zk-stats-lib/.venv/lib/python3.9/site-packages (from onnx->-r ../../requirements.txt (line 8)) (4.25.1)\n", - "Requirement already satisfied: zipp>=3.1.0 in /Users/mhchia/projects/work/pse/zk-stats-lib/.venv/lib/python3.9/site-packages (from importlib-resources>=3.2.0->matplotlib->-r ../../requirements.txt (line 6)) (3.17.0)\n", - "Requirement already satisfied: six>=1.5 in /Users/mhchia/projects/work/pse/zk-stats-lib/.venv/lib/python3.9/site-packages (from python-dateutil>=2.7->matplotlib->-r ../../requirements.txt (line 6)) (1.16.0)\n", - "Requirement already satisfied: MarkupSafe>=2.0 in /Users/mhchia/projects/work/pse/zk-stats-lib/.venv/lib/python3.9/site-packages (from jinja2->torch->-r ../../requirements.txt (line 2)) (2.1.3)\n", - "Requirement already satisfied: mpmath>=0.19 in /Users/mhchia/projects/work/pse/zk-stats-lib/.venv/lib/python3.9/site-packages (from sympy->torch->-r ../../requirements.txt (line 2)) (1.3.0)\n", + "Requirement already satisfied: ezkl==7.0.0 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from -r ../../requirements.txt (line 1)) (7.0.0)\n", + "Requirement already satisfied: torch in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from -r ../../requirements.txt (line 2)) (2.2.0)\n", + "Requirement already satisfied: requests in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from -r ../../requirements.txt (line 3)) (2.31.0)\n", + "Requirement already satisfied: scipy in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from -r ../../requirements.txt (line 4)) (1.12.0)\n", + "Requirement already satisfied: numpy in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from -r ../../requirements.txt (line 5)) (1.26.3)\n", + "Requirement already satisfied: matplotlib in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from -r ../../requirements.txt (line 6)) (3.8.2)\n", + "Requirement already satisfied: statistics in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from -r ../../requirements.txt (line 7)) (1.0.3.5)\n", + "Requirement already satisfied: onnx in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from -r ../../requirements.txt (line 8)) (1.15.0)\n", + "Requirement already satisfied: filelock in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.13.1)\n", + "Requirement already satisfied: typing-extensions>=4.8.0 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from torch->-r ../../requirements.txt (line 2)) (4.9.0)\n", + "Requirement already satisfied: sympy in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from torch->-r ../../requirements.txt (line 2)) (1.12)\n", + "Requirement already satisfied: networkx in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.2.1)\n", + "Requirement already satisfied: jinja2 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.1.3)\n", + "Requirement already satisfied: fsspec in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from torch->-r ../../requirements.txt (line 2)) (2023.12.2)\n", + "Requirement already satisfied: charset-normalizer<4,>=2 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.3.2)\n", + "Requirement already satisfied: idna<4,>=2.5 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.6)\n", + "Requirement already satisfied: urllib3<3,>=1.21.1 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from requests->-r ../../requirements.txt (line 3)) (2.2.0)\n", + "Requirement already satisfied: certifi>=2017.4.17 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from requests->-r ../../requirements.txt (line 3)) (2024.2.2)\n", + "Requirement already satisfied: contourpy>=1.0.1 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.2.0)\n", + "Requirement already satisfied: cycler>=0.10 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (0.12.1)\n", + "Requirement already satisfied: fonttools>=4.22.0 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (4.47.2)\n", + "Requirement already satisfied: kiwisolver>=1.3.1 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.4.5)\n", + "Requirement already satisfied: packaging>=20.0 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (23.2)\n", + "Requirement already satisfied: pillow>=8 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (10.2.0)\n", + "Requirement already satisfied: pyparsing>=2.3.1 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (3.1.1)\n", + "Requirement already satisfied: python-dateutil>=2.7 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (2.8.2)\n", + "Requirement already satisfied: docutils>=0.3 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from statistics->-r ../../requirements.txt (line 7)) (0.20.1)\n", + "Requirement already satisfied: protobuf>=3.20.2 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from onnx->-r ../../requirements.txt (line 8)) (4.25.2)\n", + "Requirement already satisfied: six>=1.5 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from python-dateutil>=2.7->matplotlib->-r ../../requirements.txt (line 6)) (1.16.0)\n", + "Requirement already satisfied: MarkupSafe>=2.0 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from jinja2->torch->-r ../../requirements.txt (line 2)) (2.1.4)\n", + "Requirement already satisfied: mpmath>=0.19 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from sympy->torch->-r ../../requirements.txt (line 2)) (1.3.0)\n", "\n", - "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip available: \u001b[0m\u001b[31;49m22.3.1\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m23.3.2\u001b[0m\n", + "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m23.3.1\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m23.3.2\u001b[0m\n", "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n", "Note: you may need to restart the kernel to use updated packages.\n" ] @@ -78,7 +76,7 @@ "metadata": {}, "outputs": [], "source": [ - "from zkstats.core import prover_gen_settings, verifier_setup, prover_gen_proof, verifier_verify" + "from zkstats.core import prover_gen_settings, setup, prover_gen_proof, verifier_verify, get_data_commitment_maps" ] }, { @@ -105,9 +103,9 @@ "proof_path = os.path.join('shared/test.pf')\n", "settings_path = os.path.join('shared/settings.json')\n", "# srs_path = os.path.join('shared/kzg.srs')\n", - "witness_path = os.path.join('prover/witness.json')\n", "# this is private to prover since it contains actual data\n", - "comb_data_path = os.path.join('prover/comb_data.json')" + "sel_data_path = os.path.join('prover/sel_data.json')\n", + "witness_path = os.path.join('prover/witness.json')" ] }, { @@ -136,8 +134,18 @@ "metadata": {}, "outputs": [], "source": [ - "data_path = os.path.join('data.json')\n", - "dummy_data_path = os.path.join('shared/dummy_data.json')" + "data_path = os.path.join('data.json')" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [], + "source": [ + "scales = [2]\n", + "selected_columns = ['x', 'y']\n", + "commitment_maps = get_data_commitment_maps(data_path, scales)" ] }, { @@ -147,26 +155,26 @@ "source": [ "## Step 2\n", "- User defines their computation in a function with signature `computation(state: State, x: list[torch.Tensor])`.\n", - "- Prover calls `create_model(computation)` to derive the actual model.\n", + "- Prover calls `computation_to_model(computation)` to derive the actual model.\n", "- Prover calls `prover_gen_settings`: export onnx file and compute the settings required by `ezkl.calibrate_settings`" ] }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 7, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ - "/var/folders/t3/5psrvr1x0w1_6n9kx2n7d9700000gn/T/ipykernel_56057/1617438771.py:8: TracerWarning: torch.tensor results are registered as constants in the trace. You can safely ignore this warning if you use this function to create tensors out of constant variables that would be the same every time you call this function. In any other case, this might cause the trace to be incorrect.\n", + "/var/folders/t3/5psrvr1x0w1_6n9kx2n7d9700000gn/T/ipykernel_37051/4262130413.py:7: TracerWarning: torch.tensor results are registered as constants in the trace. You can safely ignore this warning if you use this function to create tensors out of constant variables that would be the same every time you call this function. In any other case, this might cause the trace to be incorrect.\n", " return state.mean(torch.tensor([out_0, out_1]).reshape(1,-1,1))\n", - "/var/folders/t3/5psrvr1x0w1_6n9kx2n7d9700000gn/T/ipykernel_56057/1617438771.py:8: TracerWarning: Converting a tensor to a Python float might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!\n", + "/var/folders/t3/5psrvr1x0w1_6n9kx2n7d9700000gn/T/ipykernel_37051/4262130413.py:7: TracerWarning: Converting a tensor to a Python float might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!\n", " return state.mean(torch.tensor([out_0, out_1]).reshape(1,-1,1))\n", "/Users/mhchia/projects/work/pse/zk-stats-lib/zkstats/computation.py:75: TracerWarning: torch.tensor results are registered as constants in the trace. You can safely ignore this warning if you use this function to create tensors out of constant variables that would be the same every time you call this function. In any other case, this might cause the trace to be incorrect.\n", " is_precise_aggregated = torch.tensor(1.0)\n", - "/Users/mhchia/projects/work/pse/zk-stats-lib/.venv/lib/python3.9/site-packages/torch/onnx/symbolic_opset9.py:2174: FutureWarning: 'torch.onnx.symbolic_opset9._cast_Bool' is deprecated in version 2.0 and will be removed in the future. Please Avoid using this function and create a Cast node instead.\n", + "/Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages/torch/onnx/symbolic_opset9.py:2174: FutureWarning: 'torch.onnx.symbolic_opset9._cast_Bool' is deprecated in version 2.0 and will be removed in the future. Please Avoid using this function and create a Cast node instead.\n", " return fn(g, to_cast_func(g, input, False), to_cast_func(g, other, False))\n" ] }, @@ -175,23 +183,22 @@ "output_type": "stream", "text": [ "==== Generate & Calibrate Setting ====\n", - "scale: default\n", - "setting: {\"run_args\":{\"tolerance\":{\"val\":0.0,\"scale\":1.0},\"input_scale\":8,\"param_scale\":8,\"scale_rebase_multiplier\":10,\"lookup_range\":[-34048,33628],\"logrows\":17,\"num_inner_cols\":2,\"variables\":[[\"batch_size\",1]],\"input_visibility\":{\"Hashed\":{\"hash_is_public\":true,\"outlets\":[]}},\"output_visibility\":\"Public\",\"param_visibility\":\"Private\"},\"num_rows\":1312,\"total_assignments\":289,\"total_const_size\":52,\"model_instance_shapes\":[[1],[1]],\"model_output_scales\":[0,8],\"model_input_scales\":[8],\"module_sizes\":{\"kzg\":[],\"poseidon\":[1312,[1]],\"elgamal\":[0,[0]]},\"required_lookups\":[\"Abs\",{\"GreaterThan\":{\"a\":0.0}},\"KroneckerDelta\"],\"check_mode\":\"UNSAFE\",\"version\":\"7.0.0\",\"num_blinding_factors\":null}\n" + "scale: [2]\n", + "setting: {\"run_args\":{\"tolerance\":{\"val\":0.0,\"scale\":1.0},\"input_scale\":2,\"param_scale\":2,\"scale_rebase_multiplier\":10,\"lookup_range\":[-194,338],\"logrows\":12,\"num_inner_cols\":2,\"variables\":[[\"batch_size\",1]],\"input_visibility\":{\"Hashed\":{\"hash_is_public\":true,\"outlets\":[]}},\"output_visibility\":\"Public\",\"param_visibility\":\"Private\"},\"num_rows\":2624,\"total_assignments\":370,\"total_const_size\":74,\"model_instance_shapes\":[[1],[1]],\"model_output_scales\":[0,2],\"model_input_scales\":[2,2],\"module_sizes\":{\"kzg\":[],\"poseidon\":[2624,[2]],\"elgamal\":[0,[0]]},\"required_lookups\":[\"Abs\",{\"GreaterThan\":{\"a\":0.0}},\"KroneckerDelta\"],\"check_mode\":\"UNSAFE\",\"version\":\"7.0.0\",\"num_blinding_factors\":null}\n" ] } ], "source": [ - "from zkstats.computation import State, create_model\n", + "from zkstats.computation import State, computation_to_model\n", "\n", "\n", "def computation(state: State, x: list[torch.Tensor]):\n", - " x_0 = x[0]\n", - " out_0 = state.median(x_0)\n", - " out_1 = state.median(x_0)\n", + " out_0 = state.median(x[0])\n", + " out_1 = state.median(x[1])\n", " return state.mean(torch.tensor([out_0, out_1]).reshape(1,-1,1))\n", "\n", - "_, prover_model = create_model(computation)\n", - "prover_gen_settings([data_path], comb_data_path, prover_model, prover_model_path, \"default\", \"resources\", settings_path)\n" + "_, prover_model = computation_to_model(computation)\n", + "prover_gen_settings(data_path, selected_columns, sel_data_path, prover_model, prover_model_path, scales, \"resources\", settings_path)\n" ] }, { @@ -210,14 +217,15 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 8, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ - "spawning module 0\n" + "spawning module 0\n", + "spawning module 2\n" ] }, { @@ -231,22 +239,20 @@ "name": "stderr", "output_type": "stream", "text": [ - "spawning module 2\n", "spawning module 0\n", - "spawning module 2\n" + "spawning module 2\n", + "spawning module 0\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Time setup: 23.758974313735962 seconds\n", + "Time setup: 0.8651909828186035 seconds\n", "=======================================\n", - "!@# compiled_model exists? True\n", - "!@# compiled_model exists? True\n", "==== Generating Witness ====\n", "witness boolean: 1.0\n", - "witness result 1 : 59.6015625\n", + "witness result 1 : 12.75\n", "==== Generating Proof ====\n" ] }, @@ -254,7 +260,6 @@ "name": "stderr", "output_type": "stream", "text": [ - "spawning module 0\n", "spawning module 2\n" ] }, @@ -262,42 +267,41 @@ "name": "stdout", "output_type": "stream", "text": [ - "proof: {'instances': [[[1969817931821079592, 14093252634055327186, 3010599488369023793, 2676483216109330922], [12436184717236109307, 3962172157175319849, 7381016538464732718, 1011752739694698287], [10077958863098660019, 689600963559187911, 14561112591056096131, 381975124955332008]]], 'proof': '0d74573c6f907eddd298a72bc0d97b89e8b39d3fbb63b132fb6e9a72e566f5b41dcee3495d40f3c0ce73f2469c5e3d7b48d69b25a37ce19d15536c2932d72e9c0838b9435df676b85297131d7b3e791ee365137a82cf577503ffb33102d520c4035446c0cf0045c3843f163586289422aa07d07ea9be17c207f54110fe7a3d00047e0c4de126417a3f04612935c7f516afb647eb5cc7cddca9121d487e2483651f84e3676caf3cd1646cea8f8e2451226dae62df907ed6a2e68f38d005cf08562cf756873193135047aa8a8d49f58672b4d7794c97aaf8f4af9497bb67cc12750c7abb9cd75076e03b8888d8975c8764311a62ac32545333ccef4785e130fda7160ff719ebb890f2081264d4bba44927d8be5919e1c666674c2755170ba123220f7dd8ce25687e6ac5d95e241feaab2712c94983f67c29a772c8d970c2bd7169224746428dec36a5f3c16020a8b6ee18259514335861468bf6e84d473d9221fb2447517cce833b359fccef7522a8d952d5ca23fcaa082dd6f1514f52723ef9210bb7576513c1ef3cce490647cb837b08c6b4acdb03c1c9f264a1d64dc118f2bc09b2c109d4987985cd361a8499a4df32590dcb9e8bdbcab4c28a197df35e6e9922fe3b7279f14a74092a92f5e7f70bbf5e377a61dd60387ac1a92da4c1bbb9c00954ebf7edf548662a711bd2e52533944aba6ce9921c1f471763fca211eb07170c70dd8103c25a9603740d68957c1b80924e47ade661f37ca5062371c5742165266e959e6e2c1833ed79a8967122ead5d9b32f62436fef8299947d8758d09d6d17f3a6383e7a59088449c46f2feb8be94ec9f036509e6290f8a8074b71813f55148ac214874c53b13f0571434448e2958b2e85144c85b7955a572c0e51185dc61716b3eb33f2c7c4af200ad596b5d416fdd1f1478b0e5fb7fa9bdebc218352e81fc72471d8a2d94f5002b448da9617a44f52811d4e41764283aabedcac125b011bad373dfcab6e667d24437f81c79a7b3c7c1f1b18d6c0677e96b1bac0183c222c4123462f41ce90e95048721c31654f56608ca1301cf9d425459b829dfdf1fc0d820f7098f968194f86ac1991515b2b05014acdf91ae3bc3b642bd1805786b42a2d58523a287bc3d22f6593bf5b3a10ac389a8c87bcea4ebd07ee89a95be84a258378494e05856815bc60053749bac64c7bedc73cfa56e88568270ff351518e0a9b004760f47917851594a043051f318d360c836664414796fb995ef40ce62f1efe61e76ba18f81867e524093084dce151b53f82c4f931753d3978cbdaa35191f31d46738d333142c225f5325273b6a22ead726b44ee175b2b0ddd45072efc426c012dd6df12681f4af332c0414016d1e6f6cd75aef6201a544cd1687ceb41806e489bc802bb995c2fbde070b951809b206e4748e75d3a642e7fccc0b7ca0000d99afb5d3f4ccefea59ca330d767e7b79e56acb85c6c24fadc59d3f5d852788084a258c1e3874529bf0d9412f7f7c63927bcf806499c0e7eeb44dd36da9028f0c923bb943a7ae05b8ac0d3024c6063d3aed875588e0f1225c5301eb6633a724011e450181f5214ccc78abd0086e9e9bef1aee8a5b9e20e998ec057e03017dc208679bd6413fcebde6c4dbf52d76fbddc3faf87d1f4ddfda25edadf0a520bbef2be7d0015d752d95f14be0d917d1d0089c9911ad88fc77ee1ed616f25f5bd487089837c45b2314a172fca59efaab4ebfe385fda79983be91b4323f1997a00a7e21dba837d83dd616e93c6e8ad2c390979ec52a3cfcbb95973673b2a7b71f2dda064c80125534e7e9ba00525078ac45d3eacb159b5663228522211abadbacda611eb71f7d52b3594b618bc3b970b92dfc740bb6982a684d80b036c12380fe9703193e02af3a2763b23a61f34ee86cd1273a0bdcbf75326950554dc24c3ed88a082bcfde2527168466b8f7e0745dab28d67232c91b1e9bb2f23d874e5bfcd4dc1c2983117118161f343c89ca25da3238bd8820925402e43e727229b74d55879a4d2d2c9752bb49b861ec02fd0dfb3012b762ee7530a00b6c15006bff88393da58e074a62330c34bc11579235620d6f7b4415d01da2d3705fb9495d7ba4615e915806d28b6d4b17ba5e7144ae13e4d1391195b24f4bae6e8a6733c8ddb325f22faf1fda1fd8dbb3f05f8e01a6b1e53d5155342db351d33307ef259815b6d1f7b2e103d70459abd1ab645af41307b457c609f4da2dff8febe99c5bbeaaa8bd0ed1e52b52bd1a0fe2dec76756f8da36597d19632c58cbe991bfc422eb1a55964bbabd21c03dc3e1f5270c9ec9e1686a60dcbb6b568d5602b14645ba8dadcf13d09677096c94b2f21446a9d997f3e83aaa62b7b22aa10934a17a23d1b1574f48be449c1905c22027e5edbb8b6e5190185e84723b85fc65e8ff71b65e632756520f41111e8870cbfac707e5041f3eb09c7379958f0d7eeb8f3aa44646c962b7dde389f3182121c7c1a6ef54d340fcab3225874e9ca59c24abe4df8aea9ca07c6365300611124426da29867818a7715675b4ff52974a6be243fe74ff775d90053381a6242be2780ad42b36eb8f8b190319598f3faaf6bc62c2b6505a16d94e65eca1a1a113cb32304440a8d0ea59afbdbe017bef522d2093e2e31bc51c3787ccac5bc81809bdbe6667c13502de1411f257a4fd20487495427099a6f8ccc77e753bc48f19077b314e3f4de1892f253d809c7448dde49b1699fd025fea9bf7c266660370f2148ad5d6651103711fa712c27b502baaa40730cb8d5b176a28cb9d1bcc518ab520894e31c6d7cf9c98340e7830f747d2a2635716f78e8f46ff2fbd77532587842be522f8edb4d4e43fda32a6cfa8996bb73951a921d93a3d52b0e3d63bf4a97f20e37c379aa4724b7c4461597806e1fe2a2119744538ee0673db36f5fe344c9e1ec252442b148c0f4f7add1b0e0fd382f63b9283b98c745fb3481d185423ac4c2e89f497d17fde562ca8bad8a18e2000d913d87b854e653b69c065d09a6815902333789e2205ac548e65e36f1c14bb3825ca6725ec5098a659428ed2931effe515e4ae1490839108062431323a33d33606c0f7b7b777a0c51356e5086968e5780c013ada34a9fdd250e084b7882ae78596c61d7d02a5bc49d9153157a4a595cd140f633afb3d903c3831c3ec70e5b3fc892dadf44b490ab2ccdc122e90dd5e5e26316c206063e07ec0cbcf3794f4f5a3bf528362b5e2ceaf43ffb27c97f307092c850a621b59b9903927fa21b4e1fda318e7984770fc467a29163b722c72002c06e5d0db9b79081070bc8829c80a69619e2699aca320e89c1359fd3e8ce9ab8818c77b79eeaec47489643196ec35d5c9bdbd3ae8dbe2673a380a1da733129979201223d66dc653a712d2d91f7f1e58f2650e107ec9bf65318d25a4d9748e0b0c073af7958e473cd3b326159b82c1ccb720bbde41d1dc030e7569a06070525d1c07f829e9af2735f64d01d40407c498c362d1e5eef71c0c244e0516bc1f427e991069dec9cf3ee13f0d3ac65c817af7d82821e53106eb28b74cee5e52c971674d17bd47df935b55c5c00f706e90323ae9b476774ba2683bd866765851133bcda50d96e701a511eeb94d9dacb3c02f19cb5c852f325fd97237feff265c27c289802fca59ed7a8cf79bfbafec937480ab28a129acce6af9149d0520c4f8b06375e121f0be4f9f34318aff158a6fc53879ca91407f014537327a6bf804526ee1136b112e9669af424f3b52835700b46e19ce2fb32a17ff231b99a36c5472da1d8720015d8fc9cfd0dd5318f156e60ae2c6fb18f32cf7b12c57829660da5e7fbd10a51b3236c833ccd49584b8b07182ec995803c49996560fc4ac6cf9d525819588492b9c9b95694137cb3ff1aa402ff539c148961da42630b9ae4c72b5f4671c38c62206b9812a3341d7d0ebf2f0da44c98f88d76e8da60637c0a3a7a7baf424f81a000000000000000000000000000000000000000000000000000000000000000017496b23d94e929942aa11c316527cbd6e9ac8f4157f407527ac0245f354d9e41c6b0ca3128a7237b1d7e42d3672db1ca1b2f1a88fc81b482f98247bb044ad9b186c8395da679ddabfeec1b838c22bf1da9f546882149a7be44dbe07df733c980a65ae9642693327faa111be7a472407a532c99148075741480c148c6f66f46c183d50ddd9a3cc2d5a6040d49bcafe5092f3ff2cef34075196f5f89568248fe02ec17570bc48b40b0f069f821f77f6f066aee27798bcda6f14dd08e48a11d0760110a8e30d150b90bf5f45599cc8de233d1fec25b77da680a8a31fabb670ad730f2e595bbf06ff6137317f705833095cdc58f5ffe93188231bd0d2be1e833d6712ea7ec02056218b3dea4fe4e8023da3b01ef541b3117a7d240cc488b5a4c7792178a927b6c5aa490cb67baccbdb26520becf36c083087f0410b1ecd25c4958f15456ba16a8829dfa67b50d881e4d996e588b22bd5312aee3698e969c6bcc16705ef97e7a85bce8dd9b91ba9612606f7345a2ff0981d5803b9343cae9556dc012506f4f92a3f8b5458250e0ab7a2eb51e3f55e7ab9747e1f7fc1115722c2114326a35eb56285e116e789eac4471ad45b3a64dd2d63207ad2d1e65f3537cf31171ac44734853ff134c35a62af8ef0aa57ab9ef0fe3f47b605a03c7d5a600056020a8ce61589f9d8c165298be34e61b14e156196ded3920fda5198dd7e8b20759d2b7d1e0758c86b33d7c1f0700cd01ab96e75c6a4947913e9344a15254367406821c49600dd6a726cf438a3b8fb2ff9d12b45234ac18530e490b1d467706b441f1f8f9f2d770a9913e14e87d53b0a18c34d9298669fd91a495735f2bfb418d9602b01c7d764de4321d0df626dc0c0f48b6fd627214f1711f59267edc81e4bfa1b0a934ccc44ceea2dd4ee1642a1201f9384aef2f59398fdcbe6cdbc5c15b799cc28b96ba77b0e7e9c944ac15fb5ad911c48b57c2333e9d7c0b145756cec51fbb72d4c07c0b9afcc50006c3fe5494240d2be4c05c1e8b4ffcca2b2c97bd2d5585611ee24149cab975ba15fc2c535beb7f40609b83148848bd54274a16fb280d83f2aeaabdafe8b712c68637e14691a39c22c7a00f6c300667471413a797c0470dd11e5f9ac00f7eedf98a95427ac86acaccf5cc84dc43ad6dba483f2881077982a1a7a4ae57e699cf693c340e337ed96dda66f950904fc43146b5c1755ef9782cd16e75f6675eff5d0f8035113c447268a75f6f778327c14e3218e7f9e9b968bb219e17cb8437ae289e78d46f0920b6b9bf995ed8718d1eae0c7df5821a223782309ba31973ff2fe0928c70e017b03cbbf5030dc3f9aeed3bea7977c0c4e8fc5210048e741c4d05e2c0df89139046f1319219b1031fa2de4e1c34b1a68c779c3b30e984a6692a248b91f7f587a41e8e1906b24139d763792044218e68e2e49c4b8243b77b3d6b488ce9e42f408e30e0849f3d22e396ad92040e1a20b8fe7c9af7d0668e080bfac2ef7a0109f8557eec41e57712a79eac6a19a7c12266b88e1f33c11d0c5d2e88d80682654f0e59f2292eb170bd051553417b0e37666d0aabd0c7500fb34d4cccceb5dc0e1c2d55e70ae047058da4f045614026a5106d3cd563fee0a3a0b14dedc96b9a04974582f8b221bb874ae0642a2a18ee9eecd06cc0b67e51c5133b2212bb2faf450dac68cdcba1acc3bcca474353e55ff2b11d7198d6bd017237910652f40983be73c91be2719902a26bf2cd4311ddb231fa4ac082f81c223a0164241d6888a351455c6cbaa425e1f1514e1aec5084f09e8bc007ff753a217af1a45aa1e5248f38f0a38e3c600ccca1892fc1bc322e0633dcd399add8ca5203a72cbb04b66d341b662b3dbc40018da547c7d23ba446215115c2e0278729915157fe4b9d9c2ef2360b4dc23871a614279764c81bbcf7b848a82178259bb40203f203c911267069d1dbdc7a6f111559d22be7f5fc88d17a9f581760401c4d41fb57ee64b04ff83c7ecdc77f3efa8571dc60f01f3a22489d62ed2728b523a32136e25abb4db7d7a808c8e51bd5879e8937e07e17773c009117152df90632c231d92bb18ba49e5f2179f81169c1abb0a69334fe36b165008ee3bdfd7f714211706f42eda605931cb2db589822a2d1491419e17cca022b18fc3158f7afc67a7312afab1f21db369a1c078c74c97cb151a88e48a220fd4037a6663fb9ace95561121844c751cea4c06bae23358f6d1d09826f27d77930075f614efbfecd38a0b242e354742cb6b9893124f330765a7d8cbde3188732aefb69d17c1fda64ee80fb7', 'transcript_type': 'EVM'}\n", - "Time gen prf: 32.832326889038086 seconds\n" + "proof: {'instances': [[[3403910923874899465, 10189271995497415241, 320534846571637606, 100697469688841817], [13248845538017813727, 14468596293127334607, 8656550560197473959, 2161239339877761890], [12436184717236109307, 3962172157175319849, 7381016538464732718, 1011752739694698287], [12362648763242643187, 13940026059969050459, 6027715406760125980, 2781413989188023337]]], 'proof': '1ece89bb01f80c0829026081ae5558d4d6fbb7347311be4b21b8b89e7e42bfb7078a69191dbfc31e1873d596b492a5ae9a599349e8cba18db69ff91a76dc59a41527fb20a6b65bc4ea7687e3a2df3307eb6c3134121c7ff624c92292d86171751d7496d8be004190b11a393f4ad05c3d2de6d1aae53d5210dbc16048f350f9cf2ce86cc113c462e83d2b0608a9b88aa28a6b5de96ef0c151bec1cbf0618405770471913d8efd53d6212bb1ffce224221b343a0a81b1f0eee91905e71a6dbf1210f62d553b5d61772c4c80eb5a19bcaf6b5337248975fffe83598fcf08ae432b3272188c85b274937b54c77f81124b28c9e7024e7deb1d8ee3bfd3bbceef4f00028195ff5ea5711e0871410610bc3f53b0ca2397958aeb119b1169c7d6096422e0aa17a4859ad681733e6bebbbb023c99d53b270e134215f3c4c8523f5330e60919acef5e89b7466cb100ef4f5422a1178691c241923a533c4843d5443e4fdf9b0b9784601fdedc8e30df0c84defec5c7478ad4080467bb5387e87b581f18751100b17c2e9825d5a0bfaa14a49d6da29fbbc3bb322ecd8f1705454401d34060f32c10c6c3b20ed3ede4c86fbe2d084270c165d862e407a2050c6fab3cb6ebd4140b69bd5635263ac0c92baa05f2d6d32e239713d6552a04a7de0775856e28a12917bab7243e9a5fcc466606618d83e21694b910dbd62465549971e5ac987b00021d0143cba8756a8bb0e71a15e37b5cf048ba5318b53fd67176c9a37d9ef09fee056732c36c46114cbaa03d10747f16454b8adb77d97e62df6ebbe32847716b93085b51671d3c1f036ded2a70bdcf8f5bb5035d17d7bbb0b3dbcb1d76ab567aea0ae4e37d1e9b0c79c0c92df767e0ed5bac5dfecf3ae3206cee2a025bf360d0a20fe03847173a7f908c1e0937126820f0a2522bf28bb1b9d603233bb0399efb8d2e83b0f0b8f8da12eb0ff6340bcc50fb635433b3d537b44c2fac508d61a0fbf40849d8bcbf2c21549a612d449c85a3c2996a654f05f9071aa3b01547624475642316e2aba3a2d1d26d33457ab1b3a6bcefe6a4d80305c538142b7c39f4e670c516ded3691d3cd14369e93f5f4ccd2941a39ae529b193e2a89c398d6eb589661014935337b8b7a8dee134f3419424453974742038de6026d64ae163b8e5e56c0518e1c210ed08a17d8c9834d6c933ec350cd052e49569dfeb3e4ff63d01664da72735323e7b62dbb195ac8eb2c16223c4a6a1afb22e8383f4acaa5f1a233d4406161377416d8cbb451075147c682ef3ceb7dd50cb874f4d3cecd973e4434b60d512106651494e9a0f64c81b849c2dba84b44cd19fb74299d861c8ff68c2fbbcd5286cfbbefbb21d994f9f9276220b507b46ed321036fe886e89a68e291048d7fc0d14fd51b216f80e10a16c4366633fa020035bc8f306a6ce252bf4f5f32f5b4c17b613d3c0bcb66b728873b65cf01ad1ca97846f6eb6732ef8247a10959f8e2808e8945a94c94fb9be82c2874d17f72fb120352151823391fdc8140eaadb9a952affcd3b601cf21c9aec0866cc6afdeba5cecd916983784911d087372f1272f01940eb61e014de0b7f8895beb973f7f9db4f76ea8b7ddbe85541cc0788231cd31e1ce9a7463dc08f9e6ab6f5b69ad1d732ca55dfdc15f0caeb8c457ecdcb841b256c286c71ed44aab9a240bbdf42fda8ed7e18d3b5074ce99b6eaaef6a2b972b079ea567b22007be2e01cd1afcfe1606c7cccb0b7824288dd0aced3b5dee359a0b0bac0e6c884b74ececed91c1f10e94a9dd83280db53fe7008d3f311265212204841ab74038fb42e92aa9d5767754f104ad1278efb6528e377d58053eaee8fe006ba7e09807a317d022480542967933be4604ad22c6f337bf3552e70f72692c2f381bdd20855a40a30c5b80a8835861bd035ea6402322c9156549fe04131a3b19b3bbd4cbc9123f290461e22b26361dbc83f7b75b5f8d54a03e985593564c672e454e18e7a10f97416c866de820db8fa45a7ea8fb3e7a1eaa82118e7b78f9c80cf6bd21c6465b22438ae19f3b5299ae7bd1df370035501683fc40b27aa94a3427ca3c3857676e6bdf93bef8d3638d802dea6e85b48b7fda37b4739ff539625c066363dae71b1d36b653e7573d48cff2c0b932a95f5b24d046e614732e279e9d2cee2b6aac3674f2bf6f656216b6cc16e7f6b9e21abab7ae52d0d11616d5a0c51d02aaf6812cb3dc887c93cf475e44350f5d58d93e4f562530346a36fb7bd5f2188e6eb3633e75323bba8e30fce2f9590ce9f49158f856ca42b3f37cfb14f07221940b8e881297f450fc990ad7b3e46556314b0fb64af4266fd42fe9c79baa63064bc004e360744e84bae394842bdacdcd0bfb3c3f9b27ea740267edca608a2f0ccee91252780f697291240892d748a70cd0611d0ba620b8a66677705ff0f1a2225a69f301769c390b119a6a51423e1404858b1c96669a4cfeaf4365817205920dbbf318c8cb857013e4815cbc957e11bbd3d2912fead5ba999ecbb3a6c2aab52d28af56f02a97cd52b61aebf064328e8625b299de1788973f1814b4a89a077901ebc9b47961a2300db7017904ed7b64b66554df7ce0d0854e65a9a0c81732fb26071d3cdb8e50ab38297e8c1fce9f0a330a6a850402ee2eed1d83f9d1f923c00d5ed1a1f7b3fdfe90fd65237a0842de3b272470a49256e9e6d26e17fa13cb4d083d6749cab53ac7f5421cc351832dc7267528b7dfdfd32d80ed401d926b55080c50401ca78c59a4f04c447f657862084b472d15455fe9845303d39d8111b8e21536003f6c0af96af30f39b4c9ef590df8f38882f9428ab6e04446e8f8aeeb8d17d504e0f1e7069ec38a56209fb88008bde75d8cdafe8cb4098718da3b76a93815c95d75e33c33cceb00787cbcb62fa2f826043fe050ce43847bc8c61e21fbd826fe23a5b98181ff580e024039cc71bf3c7365ac57761956a80c8d6d794cdd9e2904425522242181b0143ffb8ee862ae52d8d4dd8d21dcde392c13d98233b713303fe1d509168267c9d48e358e53271cc98c84a3cbfe29b7373bae694348c16f22bf3799a13a882ccbfab2b88e9a35eef3929dbc0b9ec3a1c0804a2b59e165b90b733134c446dba5ea36bcf0b00d52b758c4c8f354e9ea4d52c51dc176f4c8640e523d6d6713b61d79a1467d82c25c473fe9f3361af7936c5beea4278fdf5fca06bb845fd533a72244df47857c301ee4620b725d83f374900aafaa332b7d30fe0d3205363dd57ad3d1eaa74625c07430253f23c588beff666b5bed38e1630cb80c5b5bf281b55b3fd60d8a12e24eaf4caa6f70c1e4361bbd304294f9e5656b50139541e6de46e591b33d8c9ef0007d4fec692e50535e5baafde1f404afa3f3b72bc9d99022be1467164ccf2b262344172850eeadf0f119cbd343b0b9a878850c058be9297e1a21e979f1b2229b4fda3d864a397b5fcefc32c55025d4aec074a12fa643cd3c54e3f217f34c3aa0c2bbc77efb7b618b71c5e80c1533337b6f55942a3e83d2dd302401ea4215547cdfa1458fc1e34eafcddea05e55ca7a0f29fa9d130d5a6efa31477716cd068879c25f7d2f5e92bc11398eb612d97d3a6949eb462b1f11885f60092f146fe2a5e8dffbf576db73cb804df19220efbad56efd535412974be77f803cfbbcb582f2737542c30e5c9b9497f8152e717a284f4fbc6dea1a192c72fc07b29ae888350a182df4849ecf356bd7b9fd39b07a0fa5caf0b6bd1947c4a03e0a8ab0128f7fcf2eec4780636f12144269527f835e55279de732b62559c5a7c1c6c57cb6118b8d221df76744b9a9195db7ab0b8533872ebbd957bb1b606436a9618ebcc2e78df93307634882942c997334f158bc877b3fba6c1e1e23065de9c4c1204765a80507fcfca1933d6194d3915990a93172282cc0bfc0fc0e3166600fbad46c0b840a1dd381270de25f85b0345f70edeace91fd352d253000000000000000000000000000000000000000000000000000000000000000000da56cfb290469c365a3361f31b086a6e6c9138dbbf7e4a21b87c20b75c640d510d1dfe5ac9d43871bed9229c78e2b990b10003f82a6173419c98fd175d0adbf29f7dc301f72a85f050b012b7334f8ccccfb4fd207de3a135bc7dff8d2a81b3c1d3ea64556457c6479e0aac9adbba1ed1f58db4af39bfd4e409648d17b552cec15f86f4a6f2c134e66eed943df463909126546aa963186e4f06c3a4be3a524a72a9805899141c0ea5729b20799b5948128bcb61900572c67489bd8fbbff23cdb000000000000000000000000000000000000000000000000000000000000000008eadeba03d209585c8fb24bcfb740e4e6bf060e0e3ae634fa92f96ed709db1c0db75a0008eddb8a168bb048be304926e2ff6c11ca11dfcec838ff46cecaace918f3aff6df2dd6e12cb369fb75bb3f273afb12366012acc8bd75d14fa6fc2db20e56c885b0bc996c4622f1934960d0767ebad2534d2ab3df5a451f2b7c929b001ed707704a7cc5cd52c5a7993690e667d2ab9debfe868808df6fb96df7d515e11d032981b12115715de970d60a966b6247c414a2f734e4c9eacdd96cc56b5e3e0dd8c4a42e4d049eb1dfdd384ca3addba3c5ca1d686a41b2f16e7b6e5f68e2a0041cf7feeeeb48d2d154820f54c3e785851f3166371a66a968aa3dcf6dd1a48717137415d8e8505a2d710042840b9f4041c8329a580ecd602ce3a09baf80f449171c33467189cd4f9e8c0100f10a3ca71e57174e9a7616c04faf40c88cf4bfb62e33ac2632c39eeee64666d6e38668350bb82a7973b0d28bd67f20ea9533d0690c5949e2147f681cb01e1259f09e89bbec5eb26e70eb76a03de2d13b8768b885189e8bcb8503b3c759ebd86d9335eaf48f3a52e1edf53027cc38c55046d691221ec88286a8909a63a069e5da6742655e3f35ef20029d92015beb39838f32863430202acad94f6f52b29acda8df1232e9f1bb22c0e3b51f4a0ccbe378f35b11702c338f04d632244f8be600481549c40faa6174956e67de96c465178bba3ab39728c53cfe30ae0a17ebc52980bbafb7f4f3cefac4bf66c3ee43d15313bd7c301a093265845c82c0f25f0d29d7a5404c711e0224693241d313b0e3d2cff026c83e016cf4e62c017bfc8dbb0536e7990b56011490f7bc6152aca638c6b8d67013380633c1271cf9c1ba8bbe9354dc036801f2094e01592715a08be7f1941a77a5cd0ef27b481413e6f0e1978257ba87917052b42f048e868cf632a00d9ac9c9b4b917f2b38462be7ae5990ee0f05e2b7e3d7bd87f71669040cbd4112485e000f40c0880845b0ef79c873bccbe094b22f48bcee8e92291fbf06608e64929b2c837180963e14e6519fb7cb664eab40040635be4d060a8ca81364bad5e92d2641e5df728742a052b3126d2447c3198e6e7bccb03fabe7752841ccdb6186b433b1e64670bc28c08138d636b448198ba408148466eef6c752b45350f36dacedc46dad806154740362784b561e66f34daee5ba6c4499701275b9360dbc57454e8d51094e507caec7acfe21713dfcbc46e90603304d0a252824bd835198f54ef9ba04bce872a17a95527ff6145bc9c6c02c9f1fa4613385e6becc634530267fbd3797d03610efa1b176aa234b7eedb079adef9f8d9ae5792eec3744534f2865a0bb6f23b4f0a0090c9f6b9f78313c86a6a2b8ced696c59bad06bfe7a881424e355bdf4405d167a784e39b828e0049e34556e94f5f94d4b81414017dd7fcd64372eaf1aa1370e0c9d732106748aa845ab28b773e1f4e6a557004218086f7b41fd65c5599fc5072d013e5f34f25c0866dd5194ba5cba9622f413716e7a9b7054d366f2662b5f19cbb1ee142b8499c44db9e0cde6d31c28851d34a75246b735c36db7b9c483390944fb4c848eeaf1860e162fb66810d58acfbc81a3c65c34c64aeb59b57e622c26f746786ad077b29fa13c2fb521162b2374f2078709cc8808f6e1fe3d72080026df16d2cf414571dff77b5000386703c911de1c64cdba3b3d9de7f565ff760708451d0f4e53f76fd5b218bbb97d25589288591d9d51d2930ee88754b83ce8ae0afdfcb60b4ae98dd83e42f37626e75df17ef3701a2c7a7bbcb756d499c99af50410f27040fe030bab897feb6cc7bbf2594f63f08771197ed3ac2e65b1f1aa0418002090625ca12b163bb8bc0a1ab1213c4b8d4b7a9d13b01a3277b93f8d24db1b498506b99c926684858641a521dbbcd08b45f840d8de4ea3c82376739edd7f102344846006fe1601907294e7cde5852524769571894a0d914d9e2aec4494d5', 'transcript_type': 'EVM'}\n", + "Time gen prf: 1.2174098491668701 seconds\n" ] } ], "source": [ "# Here verifier & prover can concurrently call setup since all params are public to get pk.\n", "# Here write as verifier function to emphasize that verifier must calculate its own vk to be sure\n", - "verifier_setup(prover_model_path, prover_compiled_model_path, settings_path, vk_path, pk_path )\n", + "setup(prover_model_path, prover_compiled_model_path, settings_path, vk_path, pk_path )\n", "\n", "print(\"=======================================\")\n", "# Prover generates proof\n", "# print(\"Theory output: \", theory_output)\n", - "prover_gen_proof(prover_model_path, comb_data_path, witness_path, prover_compiled_model_path, settings_path, proof_path, pk_path)" + "prover_gen_proof(prover_model_path, sel_data_path, witness_path, prover_compiled_model_path, settings_path, proof_path, pk_path)" ] }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 9, "metadata": {}, "outputs": [ { - "name": "stdout", - "output_type": "stream", - "text": [ - "num_inputs: 1\n", - "prf instances: [[[1969817931821079592, 14093252634055327186, 3010599488369023793, 2676483216109330922], [12436184717236109307, 3962172157175319849, 7381016538464732718, 1011752739694698287], [10077958863098660019, 689600963559187911, 14561112591056096131, 381975124955332008]]]\n", - "proof boolean: 1.0\n", - "proof result 1 : 59.6015625\n", - "verified\n" - ] + "data": { + "text/plain": [ + "12.75" + ] + }, + "execution_count": 9, + "metadata": {}, + "output_type": "execute_result" } ], "source": [ "# Verifier verifies\n", - "verifier_verify(proof_path, settings_path, vk_path)" + "verifier_verify(proof_path, settings_path, vk_path, selected_columns, commitment_maps)" ] } ], @@ -317,7 +321,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.6" + "version": "3.12.1" }, "orig_nbformat": 4 }, diff --git a/examples/computation/data.json b/examples/computation/data.json index 15cd182..787a579 100644 --- a/examples/computation/data.json +++ b/examples/computation/data.json @@ -1,31 +1,8 @@ { - "input_data": [ - [ - 23.2, 92.8, 91.0, 37.2, 82.0, 15.5, 79.3, 46.6, 98.1, 75.5, 78.9, 77.6, - 33.8, 75.7, 96.8, 12.3, 18.4, 13.4, 6.0, 8.2, 25.8, 41.3, 68.5, 15.2, - 74.7, 72.7, 18.0, 42.2, 36.1, 76.7, 1.2, 96.4, 4.9, 92.0, 12.8, 28.2, - 61.8, 56.9, 44.3, 50.4, 81.6, 72.5, 12.9, 40.3, 12.8, 28.8, 36.3, 16.1, - 68.4, 35.3, 79.2, 48.4, 97.1, 93.7, 77.0, 48.7, 93.7, 54.1, 65.4, 30.8, - 34.4, 31.4, 78.7, 12.7, 90.7, 39.4, 86.0, 55.9, 6.8, 22.2, 65.3, 18.8, - 7.1, 55.9, 38.6, 15.6, 59.2, 77.3, 76.9, 11.9, 19.9, 19.4, 54.3, 39.4, - 4.0, 61.1, 16.8, 81.9, 49.3, 76.9, 19.2, 68.2, 54.4, 70.2, 89.8, 23.4, - 67.5, 18.7, 10.8, 80.7, 80.3, 96.2, 62.3, 17.2, 23.0, 98.0, 19.1, 8.1, - 36.2, 7.5, 55.9, 1.2, 56.8, 85.1, 18.9, 23.0, 13.5, 64.3, 9.1, 14.1, 14.1, - 23.1, 73.2, 86.6, 39.1, 45.5, 85.0, 79.0, 15.8, 5.2, 81.5, 34.3, 24.3, - 14.2, 84.6, 33.7, 86.3, 83.3, 62.8, 72.7, 14.7, 36.8, 92.5, 4.7, 30.0, - 59.4, 57.6, 37.4, 22.0, 20.9, 61.6, 26.8, 47.1, 63.6, 6.0, 96.6, 61.2, - 80.2, 59.3, 23.1, 29.3, 46.3, 89.2, 77.6, 83.2, 87.2, 63.2, 81.8, 55.0, - 59.7, 57.8, 43.4, 92.4, 66.9, 82.1, 51.0, 22.1, 29.9, 41.0, 85.2, 61.5, - 14.6, 48.0, 52.7, 31.4, 83.9, 35.5, 77.3, 35.8, 32.6, 22.2, 19.3, 49.1, - 70.9, 43.9, 88.8, 56.3, 41.8, 90.3, 20.4, 80.4, 36.4, 91.5, 69.6, 75.3, - 92.4, 84.8, 17.7, 2.3, 41.3, 91.3, 68.6, 73.3, 62.5, 60.5, 73.5, 70.7, - 77.5, 76.8, 98.1, 40.9, 66.3, 8.6, 48.9, 75.4, 14.7, 35.9, 89.6, 15.1, - 45.0, 77.6, 30.5, 76.1, 46.9, 34.3, 65.1, 43.9, 91.6, 88.8, 8.9, 42.9, - 11.8, 32.1, 20.1, 48.9, 79.7, 15.3, 45.4, 80.1, 73.1, 76.5, 52.4, 9.6, - 41.9, 52.7, 55.1, 30.9, 83.7, 46.7, 39.3, 40.5, 52.4, 19.2, 25.8, 52.7, - 81.0, 38.0, 54.5, 15.3, 64.3, 88.3, 49.8, 90.5, 90.4, 79.7, 87.3, 32.3, - 11.9, 5.7, 33.6, 75.1, 65.9, 29.1, 39.4, 87.5, 3.3, 66.3, 79.0, 97.9, - 69.6, 22.0, 62.8, 97.1, 90.4, 39.5, 11.7, 30.3, 18.9, 34.6, 6.6 - ] + "x": [ + 0, 1, 2, 3, 4 + ], + "y": [ + 2.0, 5.2, 47.4, 23.6, 24.8 ] } diff --git a/examples/correlation/correlation.ipynb b/examples/correlation/correlation.ipynb index ba748b5..a7d91ef 100644 --- a/examples/correlation/correlation.ipynb +++ b/examples/correlation/correlation.ipynb @@ -2,46 +2,47 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": 6, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Requirement already satisfied: ezkl==7.0.0 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 1)) (7.0.0)\n", - "Requirement already satisfied: torch in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 2)) (2.1.1)\n", - "Requirement already satisfied: requests in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 3)) (2.31.0)\n", - "Requirement already satisfied: scipy in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 4)) (1.11.4)\n", - "Requirement already satisfied: numpy in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 5)) (1.26.2)\n", - "Requirement already satisfied: matplotlib in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 6)) (3.8.2)\n", - "Requirement already satisfied: statistics in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 7)) (1.0.3.5)\n", - "Requirement already satisfied: onnx in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 8)) (1.15.0)\n", - "Requirement already satisfied: sympy in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (1.12)\n", - "Requirement already satisfied: networkx in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.2.1)\n", - "Requirement already satisfied: fsspec in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (2023.10.0)\n", - "Requirement already satisfied: typing-extensions in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (4.8.0)\n", - "Requirement already satisfied: jinja2 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.1.2)\n", - "Requirement already satisfied: filelock in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.13.1)\n", - "Requirement already satisfied: urllib3<3,>=1.21.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->-r ../../requirements.txt (line 3)) (2.1.0)\n", - "Requirement already satisfied: idna<4,>=2.5 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.6)\n", - "Requirement already satisfied: charset-normalizer<4,>=2 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.3.2)\n", - "Requirement already satisfied: certifi>=2017.4.17 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->-r ../../requirements.txt (line 3)) (2023.11.17)\n", - "Requirement already satisfied: cycler>=0.10 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (0.12.1)\n", - "Requirement already satisfied: fonttools>=4.22.0 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (4.45.1)\n", - "Requirement already satisfied: packaging>=20.0 in /Users/jernkun/Library/Python/3.10/lib/python/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (23.2)\n", - "Requirement already satisfied: python-dateutil>=2.7 in /Users/jernkun/Library/Python/3.10/lib/python/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (2.8.2)\n", - "Requirement already satisfied: pyparsing>=2.3.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (3.1.1)\n", - "Requirement already satisfied: kiwisolver>=1.3.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.4.5)\n", - "Requirement already satisfied: contourpy>=1.0.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.2.0)\n", - "Requirement already satisfied: pillow>=8 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (10.1.0)\n", - "Requirement already satisfied: docutils>=0.3 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from statistics->-r ../../requirements.txt (line 7)) (0.20.1)\n", - "Requirement already satisfied: protobuf>=3.20.2 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from onnx->-r ../../requirements.txt (line 8)) (4.25.1)\n", - "Requirement already satisfied: six>=1.5 in /Users/jernkun/Library/Python/3.10/lib/python/site-packages (from python-dateutil>=2.7->matplotlib->-r ../../requirements.txt (line 6)) (1.16.0)\n", - "Requirement already satisfied: MarkupSafe>=2.0 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from jinja2->torch->-r ../../requirements.txt (line 2)) (2.1.3)\n", - "Requirement already satisfied: mpmath>=0.19 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from sympy->torch->-r ../../requirements.txt (line 2)) (1.3.0)\n", - "\u001b[33mWARNING: You are using pip version 21.2.3; however, version 23.3.2 is available.\n", - "You should consider upgrading via the '/usr/local/bin/python3 -m pip install --upgrade pip' command.\u001b[0m\n", + "Requirement already satisfied: ezkl==7.0.0 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 1)) (7.0.0)\n", + "Requirement already satisfied: torch in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 2)) (2.2.0)\n", + "Requirement already satisfied: requests in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 3)) (2.31.0)\n", + "Requirement already satisfied: scipy in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 4)) (1.12.0)\n", + "Requirement already satisfied: numpy in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 5)) (1.26.3)\n", + "Requirement already satisfied: matplotlib in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 6)) (3.8.2)\n", + "Requirement already satisfied: statistics in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 7)) (1.0.3.5)\n", + "Requirement already satisfied: onnx in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 8)) (1.15.0)\n", + "Requirement already satisfied: filelock in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.13.1)\n", + "Requirement already satisfied: typing-extensions>=4.8.0 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (4.9.0)\n", + "Requirement already satisfied: sympy in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (1.12)\n", + "Requirement already satisfied: networkx in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.2.1)\n", + "Requirement already satisfied: jinja2 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.1.3)\n", + "Requirement already satisfied: fsspec in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (2023.12.2)\n", + "Requirement already satisfied: charset-normalizer<4,>=2 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.3.2)\n", + "Requirement already satisfied: idna<4,>=2.5 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.6)\n", + "Requirement already satisfied: urllib3<3,>=1.21.1 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from requests->-r ../../requirements.txt (line 3)) (2.2.0)\n", + "Requirement already satisfied: certifi>=2017.4.17 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from requests->-r ../../requirements.txt (line 3)) (2024.2.2)\n", + "Requirement already satisfied: contourpy>=1.0.1 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.2.0)\n", + "Requirement already satisfied: cycler>=0.10 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (0.12.1)\n", + "Requirement already satisfied: fonttools>=4.22.0 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (4.47.2)\n", + "Requirement already satisfied: kiwisolver>=1.3.1 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.4.5)\n", + "Requirement already satisfied: packaging>=20.0 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (23.2)\n", + "Requirement already satisfied: pillow>=8 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (10.2.0)\n", + "Requirement already satisfied: pyparsing>=2.3.1 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (3.1.1)\n", + "Requirement already satisfied: python-dateutil>=2.7 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (2.8.2)\n", + "Requirement already satisfied: docutils>=0.3 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from statistics->-r ../../requirements.txt (line 7)) (0.20.1)\n", + "Requirement already satisfied: protobuf>=3.20.2 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from onnx->-r ../../requirements.txt (line 8)) (4.25.2)\n", + "Requirement already satisfied: six>=1.5 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from python-dateutil>=2.7->matplotlib->-r ../../requirements.txt (line 6)) (1.16.0)\n", + "Requirement already satisfied: MarkupSafe>=2.0 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from jinja2->torch->-r ../../requirements.txt (line 2)) (2.1.4)\n", + "Requirement already satisfied: mpmath>=0.19 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from sympy->torch->-r ../../requirements.txt (line 2)) (1.3.0)\n", + "\n", + "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m23.2.1\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m24.0\u001b[0m\n", + "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n", "Note: you may need to restart the kernel to use updated packages.\n" ] } @@ -60,7 +61,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 7, "metadata": {}, "outputs": [], "source": [ @@ -79,7 +80,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 8, "metadata": {}, "outputs": [], "source": [ @@ -88,7 +89,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 9, "metadata": {}, "outputs": [], "source": [ @@ -129,20 +130,20 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 10, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "corr: tensor(0.7295)\n", - "check: tensor(0.7295, dtype=torch.float64)\n", - "x mean: tensor(24.5000, dtype=torch.float64)\n", - "y mean: tensor(56.2012)\n", - "dummy corr: tensor(0.1248)\n", - "dummy x mean: tensor(5.6500)\n", - "dummy y mean: tensor(5.5680)\n" + "corr: tensor(0.5182)\n", + "check: tensor(0.5182, dtype=torch.float64)\n", + "x mean: tensor(2.5000, dtype=torch.float64)\n", + "y mean: tensor(21.6667)\n", + "dummy corr: tensor(0.2342)\n", + "dummy x mean: tensor(15.5000)\n", + "dummy y mean: tensor(13.2500)\n" ] } ], @@ -189,37 +190,48 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 11, "metadata": {}, "outputs": [], "source": [ - " def covariance(X, Y, cov, x_mean, y_mean):\n", - " x_mean_cons = torch.abs(torch.sum(X)-X.size()[1]*(x_mean))<=torch.abs(0.01*X.size()[1]*(x_mean))\n", - " y_mean_cons = torch.abs(torch.sum(Y)-Y.size()[1]*(y_mean))<=torch.abs(0.01*Y.size()[1]*(y_mean))\n", - " return (torch.logical_and(torch.logical_and(x_mean_cons,y_mean_cons), torch.abs(torch.sum((X-x_mean)*(Y-y_mean))-(X.size()[1]-1)*(cov))<0.01*(X.size()[1]-1)*(cov)), cov)" + "scales = [3]\n", + "selected_columns = ['x', 'y']\n", + "commitment_maps = get_data_commitment_maps(data_path, scales)" ] }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 12, "metadata": {}, "outputs": [], "source": [ - " def stdev(X, x_std, x_mean):\n", - " x_mean_cons = torch.abs(torch.sum(X)-X.size()[1]*(x_mean))<=torch.abs(0.01*X.size()[1]*x_mean)\n", - " return (torch.logical_and(torch.abs(torch.sum((X-x_mean)*(X-x_mean))-x_std*x_std*(X.size()[1]-1))<=torch.abs(0.02*x_std*x_std*(X.size()[1]-1)),x_mean_cons),x_std)" + "def covariance(X, Y, cov, x_mean, y_mean):\n", + " x_mean_cons = torch.abs(torch.sum(X)-X.size()[1]*(x_mean))<=torch.abs(0.01*X.size()[1]*(x_mean))\n", + " y_mean_cons = torch.abs(torch.sum(Y)-Y.size()[1]*(y_mean))<=torch.abs(0.01*Y.size()[1]*(y_mean))\n", + " return (torch.logical_and(torch.logical_and(x_mean_cons,y_mean_cons), torch.abs(torch.sum((X-x_mean)*(Y-y_mean))-(X.size()[1]-1)*(cov))<0.01*(X.size()[1]-1)*(cov)), cov)" ] }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 13, + "metadata": {}, + "outputs": [], + "source": [ + "def stdev(X, x_std, x_mean):\n", + " x_mean_cons = torch.abs(torch.sum(X)-X.size()[1]*(x_mean))<=torch.abs(0.01*X.size()[1]*x_mean)\n", + " return (torch.logical_and(torch.abs(torch.sum((X-x_mean)*(X-x_mean))-x_std*x_std*(X.size()[1]-1))<=torch.abs(0.02*x_std*x_std*(X.size()[1]-1)),x_mean_cons),x_std)" + ] + }, + { + "cell_type": "code", + "execution_count": 14, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ - "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/torch/onnx/symbolic_opset9.py:2174: FutureWarning: 'torch.onnx.symbolic_opset9._cast_Bool' is deprecated in version 2.0 and will be removed in the future. Please Avoid using this function and create a Cast node instead.\n", + "/Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages/torch/onnx/symbolic_opset9.py:2174: FutureWarning: 'torch.onnx.symbolic_opset9._cast_Bool' is deprecated in version 2.0 and will be removed in the future. Please Avoid using this function and create a Cast node instead.\n", " return fn(g, to_cast_func(g, input, False), to_cast_func(g, other, False))\n" ] } @@ -236,7 +248,8 @@ " self.y_mean = nn.Parameter(data = dummy_y_mean, requires_grad = False)\n", " self.x_std = nn.Parameter(data = dummy_x_std, requires_grad = False)\n", " self.y_std = nn.Parameter(data = dummy_y_std, requires_grad = False)\n", - " def forward(self,X,Y):\n", + " def forward(self, *x):\n", + " X, Y = x\n", " # need to enforce same length, not yet\n", " bool1, cov = covariance(X,Y, self.cov, self.x_mean, self.y_mean)\n", " bool2, x_std = stdev(X, self.x_std, self.x_mean)\n", @@ -244,29 +257,29 @@ " bool4 = torch.abs(cov - self.corr*x_std*y_std)<=0.01*cov\n", " return (torch.logical_and(torch.logical_and(bool1, bool2),torch.logical_and(bool3, bool4)), self.corr )\n", "\n", - "verifier_define_calculation(dummy_data_path, ['x', 'y'],sel_dummy_data_path,verifier_model, verifier_model_path)" + "verifier_define_calculation(dummy_data_path, selected_columns,sel_dummy_data_path,verifier_model, verifier_model_path)" ] }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 15, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "theory output: tensor(0.7295)\n", + "theory output: tensor(0.5182)\n", "==== Generate & Calibrate Setting ====\n", "scale: [3]\n", - "setting: {\"run_args\":{\"tolerance\":{\"val\":0.0,\"scale\":1.0},\"input_scale\":3,\"param_scale\":3,\"scale_rebase_multiplier\":10,\"lookup_range\":[-64240,14942],\"logrows\":17,\"num_inner_cols\":2,\"variables\":[[\"batch_size\",1]],\"input_visibility\":{\"Hashed\":{\"hash_is_public\":true,\"outlets\":[]}},\"output_visibility\":\"Public\",\"param_visibility\":\"Private\"},\"num_rows\":7872,\"total_assignments\":651,\"total_const_size\":16,\"model_instance_shapes\":[[1],[1]],\"model_output_scales\":[0,3],\"model_input_scales\":[3,3],\"module_sizes\":{\"kzg\":[],\"poseidon\":[7872,[2]],\"elgamal\":[0,[0]]},\"required_lookups\":[\"Abs\",{\"GreaterThan\":{\"a\":0.0}}],\"check_mode\":\"UNSAFE\",\"version\":\"7.0.0\",\"num_blinding_factors\":null}\n" + "setting: {\"run_args\":{\"tolerance\":{\"val\":0.0,\"scale\":1.0},\"input_scale\":3,\"param_scale\":3,\"scale_rebase_multiplier\":10,\"lookup_range\":[-3086,86],\"logrows\":12,\"num_inner_cols\":2,\"variables\":[[\"batch_size\",1]],\"input_visibility\":{\"Hashed\":{\"hash_is_public\":true,\"outlets\":[]}},\"output_visibility\":\"Public\",\"param_visibility\":\"Private\"},\"num_rows\":2624,\"total_assignments\":123,\"total_const_size\":16,\"model_instance_shapes\":[[1],[1]],\"model_output_scales\":[0,3],\"model_input_scales\":[3,3],\"module_sizes\":{\"kzg\":[],\"poseidon\":[2624,[2]],\"elgamal\":[0,[0]]},\"required_lookups\":[\"Abs\",{\"GreaterThan\":{\"a\":0.0}}],\"check_mode\":\"UNSAFE\",\"version\":\"7.0.0\",\"num_blinding_factors\":null}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "/var/folders/89/y9dw12v976ngdmqz4l7wbsnr0000gn/T/ipykernel_7472/4119416261.py:2: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).\n", + "/var/folders/89/y9dw12v976ngdmqz4l7wbsnr0000gn/T/ipykernel_87897/280034176.py:2: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).\n", " theory_output = torch.tensor(real_corr)\n" ] } @@ -284,7 +297,8 @@ " self.y_mean = nn.Parameter(data = y_mean, requires_grad = False)\n", " self.x_std = nn.Parameter(data = x_std, requires_grad = False)\n", " self.y_std = nn.Parameter(data = y_std, requires_grad = False)\n", - " def forward(self,X,Y):\n", + " def forward(self, *x):\n", + " X, Y = x\n", " # need to enforce same length, not yet\n", " bool1, cov = covariance(X,Y, self.cov, self.x_mean, self.y_mean)\n", " bool2, x_std = stdev(X, self.x_std, self.x_mean)\n", @@ -292,12 +306,12 @@ " bool4 = torch.abs(cov - self.corr*x_std*y_std)<=0.01*cov\n", " return (torch.logical_and(torch.logical_and(bool1, bool2),torch.logical_and(bool3, bool4)), self.corr )\n", "\n", - "prover_gen_settings(data_path,['x', 'y'], sel_data_path, prover_model,prover_model_path, [3], \"resources\", settings_path)" + "prover_gen_settings(data_path, selected_columns, sel_data_path, prover_model,prover_model_path, scales, \"resources\", settings_path)" ] }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 16, "metadata": {}, "outputs": [ { @@ -319,6 +333,8 @@ "name": "stderr", "output_type": "stream", "text": [ + "spawning module 0\n", + "spawning module 2\n", "spawning module 0\n", "spawning module 2\n" ] @@ -327,38 +343,22 @@ "name": "stdout", "output_type": "stream", "text": [ - "Time setup: 11.328320980072021 seconds\n", + "Time setup: 0.5547151565551758 seconds\n", "=======================================\n", - "Theory output: tensor(0.7295)\n", - "!@# compiled_model exists? True\n", - "!@# compiled_model exists? True\n", + "Theory output: tensor(0.5182)\n", "==== Generating Witness ====\n", "witness boolean: 1.0\n", - "witness result 1 : 0.75\n", - "==== Generating Proof ====\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "spawning module 0\n", - "spawning module 2\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "proof: {'instances': [[[4361588021930202802, 11452771843424695699, 17406203981540687110, 449645176536645986], [17475259421703607016, 4715985628661660007, 18118935885768207713, 749760773435915941], [12436184717236109307, 3962172157175319849, 7381016538464732718, 1011752739694698287], [14385415396251402209, 2429374486035521128, 12558163205804149944, 2583518171365219058]]], 'proof': '28a5f1df34661a88b2bbd09442323bcd93183407bcda9d7ab85c5572a82d073217710cf2a5f874a391e721199ad458be9ef3a06cee2d8ff1a20fafccf3ef4bf104301350ecc5772470ee90ebdfb873d689277133c97f9d3bf2eaf79998119946237315d006f9d3b64eee027853da53a7a41e8a7674878384385f2b933de2c678022228aa5f2d74db8e3f77fe51b9855b52762692b7b6bcd346aeb0038ccea3e915de17ef2da0bb88785cabb6ce69e00d09e85231cb6276b0c09c4238b8c0c0a720e871c01ea8449f1cdc6fc5d0654bb800b0f4cc71fb38f389752cba8a1a6e8f2e310814631629e4b932c1fbb7772e75b66687bcbb7c8cb65d9df9df0c4c2f290ffcbda8b44e703b0e6547925964d1151e08b0f243c4d55c00b92421ddf4ec4a23314aaa58737a3193c5e04ea765e87d3be10286bce428ee73eeaa65ea429cf715b24794a1996ebc4a7d87189e02d5ba228d0c4db4400bd21b1a0e9ab609c0c61f199821415e3e4238feaed3e5ea46945e25a005192a643db2db2dff20139c7604353b18eaf7d2672b12572f494b94db8fc92e52816a509ff748293d45fd62ad252aaa13273e7bc403f4d14e369904b779c724833392df887439cf46d423b3f32375b09c1d87298bd85b8e2732852ffc5ecac46f7a93636cd4848a2337407d7c176f5f58e41f9d43e44e57c449dd5d9107f32c808b2f832ebac10006c94cbb9407cd991f6221b104a2816ea6c80247f887ecb90ff8d90f84e70b03d89fdf464c204f2ebd7c2b41412e3dfd6854ff08e45d48f8650bf0c668a032b0ef0ceb4eba1efe61e76ba18f81867e524093084dce151b53f82c4f931753d3978cbdaa35191f31d46738d333142c225f5325273b6a22ead726b44ee175b2b0ddd45072efc41cedfee362ba9ce48ab512a7c06e98f983c954df100d70f2bd13a2f441bb90da05b3fbdc2d9818bdd8e695c38e10a492ef69742bdbacc8981f5d6334e826b6e01efe61e76ba18f81867e524093084dce151b53f82c4f931753d3978cbdaa35191f31d46738d333142c225f5325273b6a22ead726b44ee175b2b0ddd45072efc42c1472cc7f153f359adb9bb03352e1ce296abaaa568cdb8c6f8c485e9ccec60d0e59287ee6c69c17cdb932f6bec9066e14f6551b5dd2d3fa6a5b6ab083e5e28a1a317627d2ce81afe60258a7a684757f05969e789ef71dca56c27c9a2d467b1d2f4588f87051cbd0b78215818b14bd79c7a96ddacfac0983955e920e89655fa71bee7476f9faef736faad815319dbbd168ce596c8c57b3b4434b013c77fbe6c60392c8913ce8247be29ebb8cf6b9f28c4cb04f323e988866c836b06950411064059d912c81e675095e07c68d01f2e994276f15853b9935d3f31501086443f47e151637ecee226039fdb56a0c34fb52fe351c62a0c9b3e231d09441084ed3a2152b560da9bceb44352f41e4af27c6739b0ea75574cfb63301dc7c70bb98a780321e089da4dc8759d0f634838fb74e9f09162de043312d7e1c5aa1d560302d9a2902b96f6e7bc17cd09f33e15fabb01073333adf3a18c47f351fe1c8707310e820222e12a49efad27c9347500de1aebb55d69600cfa143ad177b7ec4ce66477b4a0ddc22fe006569444127f9e9a77c72220828b3631e78d578c523aa905b2b3c331b9cd6664946bec5acb0d215b6b1b7bfc8fa49af8ae08b5094a2b89ca03b0ed917ac48712eca797865415033373531243c4b978087739d71bfcef5893c97a5320ec175c9a72e0c0d18451a8210485f14a0dc1b3daf3be91ae0c8bfd5b91d6d461d271dfac042658a11026bdd82497b3daac4f2ac8388109815ef903278e4e0e323f6b003f67e38b085e24e9aa604d794814a8d40624f497d90affbbc38315c810ba4e7a25f0eda2aeca81d14d3956ab565b6cd724912698129fc95190824eaa32a23b94caa066a138ade627429a3c18b6366535282c8594db71142810a430fac25acee065d41009d39623dd1904368fa604281f3c17e74634eee5faba2488bab060cd948e0e04ed90cefffddfcb95b1149cd88af1f8acc39befa1e72d34c07c013edf061351aa452b1e375b565907052c6fd0d815b072d5c0e304e6ec10740d925a09f6868cac2db33ea4ef85db98d8106c150de100c2cd26279f58cf85421c307a825e91679f42d353c4379947fb9483f5e4bb875d580f6e96f92793b30372427a1defce3edbe8268e2491bb9a31fe5e6ff975504034edf3853b8619125a0ee02f67ecfde6aaac350915ee9dc1f94d831e8386454cdb17a5a27c54046876ce11200998be74a333759889bbc62fad1a015fa15e5a613af0336334f61102520a706aa99d82374c1082e8ab7f9b7d0712c04e015aefb4d4d7941bd431db02a019019d13dc875d03d03be861e9de0c7d2ecbe0db592898c289af193aa0cf22f11141ce5dc36a3f15149c3cd1fc1ca25de752aef577cb932526c358b94e77dc476bd17403aa7a813942a183610689df41f354ee837f02d1b56047872552c223744942432fbc016cb853eb0928ccdded0e3e0ddc2bfcc5823848935fb5d7fedacf74108988a23342d409c9fea61baa9863f8b2f6f764d3b91e0a828a8c438de9ab8aa1cc622551f933adbe867789d4069c588eb19738d90b21f2dd08b58f808dec9350654e6c2480a50903c46f61f1f902a7c05f3b4e2d1df00a61522e381039f86d615c2eae49adfafae8c0d962353f85623da494f429246afbe7976a0d440f21fce24a4b5a5d49f72ebf14cbd7978f8ebe679c24d98a63d7152b23d3edb2ab0c79a16fb2026f3b33423c21cbbcff594723c7c7714af055cb3c7685aceac0a34ba261a1d209bc028750e9aff12e14ad5aadc5349c1e0a20cbbc1a6cd892c30fba73c032789ce043e094e264a5bfe6096813e97bac22be520bb683a082e74aa168bd11bedb91e385902be413b27943c21b2391b00ddc872ad6509d3a8d2c9a21a69ac20a463c25421b76f5f71110d1d9e4a1ee2a86b825ceb26411b2ec1737719c3e524b171717aa94a9aadc94bcb8533cbf41ff08e07c4d0c63b79032a423270739617f40e279d3309179ecab1de27ff9812f16065bc8de2ef1183fa33a55fe4ba151a4bc451e1bb9e128b7521f6bf07798f38887387bc06b0f71059bdd5e223d9a22331337e5ae8036f0c96df634185e367fd64758e5f2a71cc3952400805f0086f296f2bd8723638e3127ce7230a0457e9c7e8946702bee14f43c74af4d9b2754912ac0ff04676132ecb65be6f5ed13d17dc1e9b3d924dd2b1a56161efeb59855507605244715e23d5286898d6e3f7477fbf04879fb0d36c3865de793fc4ccd95f00000000000000000000000000000000000000000000000000000000000000000235e4a7092f6754ba7e48c15abfcbb5ac703026c956c558d5bf3af0939374b2000000000000000000000000000000000000000000000000000000000000000012fe06f7f03437286b2bc780d8a5a65c79cb814e87123f08b30ad7aec633d6f02a31d49981a6ba239bf54566806ba5ef68757232cdd5f27eec2f9f862df53bde0514272f665ead6d30fe7c48d846a98f33d30318fecae291e254fa5bd83135c5067243bc58f452a14ff7e6fa5705297f9ee5d72e287c7d18afd4d5b83e5388d10c3bcf8df0a109b10aec79a0c2a9d6598bd95fcc0354b8d61b292bc0430dfd382f8aac44cb0552d3f8ba5c0c81da27805a6140c0ca3a38abd908baacc64fea8509a95f9a5e46422ba9888e0729c939549ebe8b0180b7ec8ab5f85280ee40eb63149cf7268de1f7c70cb8ad6178dbc2147566ba91d1fba433ebbebc204cf4ade221db06b980ec6c8d2651d6e248945c0c1f5bc57c29d2ac5a3bfa061f6a4e6fdc2fdb3feec96f06ef1bee735fd576a368a5ea923b91f4b6cd6c83a1cd4905e2eb12ca163a7098db22a50c1e988ad565d3c7f7f657471b23e1813da0927dcec47b15b555c77fc7094ea49c69168bef480e64fe0daba38511dfb355690e936db39402a963b026dfa8ba0273fa2fc2f80cef6df6fb8f87c473c5a205b0ca303009a921f87a21ef02723ac4957b51402a6f572aa804b95f9e9d39984224e48f786bdb15b6f35d945d28c920e3c6c1aa12de4331d471774f6edeacd43d27c179871a8a24e87555360a86288b5c5c50882d09e8e3f7c621b38c74f11d166066f7ecfc7a2576c841f98bf280e6840f212177246bf22b3b3d5ce2169e1821630c2689d4cc17dcd4945cc5d9ba2df510c459339e68e5619a25aab2d348751a09b9a0c5805a2160a90caf67c03acb7e60b6468c9b2d80f2079a9528454e59132f5638b10a2309dc2bce70b4e311427c08fe364356b67d9d0da5dee48dc6803e86b9f027e5ba2f2672d5a56226248ba498c6f6b16fa1a5897f372217035f84d90e71583c93fb0d8992385c0965b1f12dcbe4382c95cb5e549a49365be6eef18ea6b55211456429c23c32cb9eb25fada295d2301a46f040df89efd688270e7c53cad0f4d54b012dceafaff0cbb67d7c2f24871d1edcc263cadd421c3c7423b5c867862a3313aa1ba1e2e0dfafdfa58d1a7c9d524560da41d7e94b379c2e77b9194cbecdbf2a471f737b9d7c6842079d6dac518c9eb61bc4fdbb11a0dfa057888f91ec452819c61c3cef930007a40a00fc97919f52e3475b36b8078f4a2045798f2b1dff64d3600d1fb95fd2a53fd5acd7b39d016a4db665981b7cfd2a8139f335e8f2f1c77ad212f47145a736c4482de251366c39b2d93b434badeabd243cc2e1b54d2f39ec9509f33edf33842c9c801c9fe69ffc5a4a98d6366317ed5195171fcf9a7e8c9241029456403ac49981525c0290b97b96245c8b947619f8cf655ae94d37d2d1cd811e756e40669c6603b191d14fc4e22015a33dc442fe5c52289a79a6d1cfe016622ae7fc83d2de914de5231b9e354a6cc2662bbf68636b3f2465a76e636ab8731804f254d8169758f53773f40bb0e363e56d716fa013a9074e46a7a8cb324b2faf0acff94ff022a588edd4c7c5b2768abcd4a1be46e3c88e842896f68c278e1ef23015609355879990cb457603239c1d9cb285354667434fb7203d60ad0675c6d302eee3d410e0c4338872c3a43d49137d87d0a108fb189ce27d4f13085ad7604c224476ccfdacbad4167ac5f56507d19840b0746406455156616b0c5749c4a3d92ae7fc83d2de914de5231b9e354a6cc2662bbf68636b3f2465a76e636ab87318166bec79028e305d0b256b77689d92606fea06721535f85b4db42f81831fe79811bce071142e0b75d1ff98fbe5a52499a5a6f502762cc0b6748da945f6905984127952db8d0c7a21332515f107e607deaca6f9a6636a99ae92e42a569f7fdb8906cce3bb4ce54c353f1c71148396f9376acac8bce34f9d665598a44045b10af01d6d3d1652702792f57ecf89a60575f830282472ac856b3facd11ced6b5843b72368bb5bcc8955d24c5965b5a1013229fb73134d947f8375b65727ba4d60079827ede9c982f1fb19f808f20f4fac77e76721700cb7ebca3818ebfdad50955035', 'transcript_type': 'EVM'}\n", - "Time gen prf: 14.686086177825928 seconds\n" + "witness result 1 : 0.5\n", + "==== Generating Proof ====\n", + "proof: {'instances': [[[7878865789954254792, 13676651756402193216, 14598220794878025105, 2053479320262803094], [957313277933440172, 8558673717091004388, 16115511877586365498, 2713079561337169730], [12436184717236109307, 3962172157175319849, 7381016538464732718, 1011752739694698287], [7959790035488735211, 12951774245394433045, 16242874202584236123, 560012691975822483]]], 'proof': '20a2b3a65cb1b1260f55370fd47b9fce30db34bdc3911eabd86b121a8a255ed309b774babc91e067135b098dcb301970846b1d168fead22f63a8e3c535384e5e2404f7f58f7912a1517b809b38b87ac904c4c977cfd631676a2a336a068ae31a2a00ab4035d72f61caead42552612019fcbeeead6e25b873edbea960ebf88bc21037919ee4407f6790996c3930866fe75d43c4cdd260bb24942d28390cb449e6073772411cf01a8c175681fa48e6eccf6a8d3b3710d56fb5eac6975e5d3beadc23aed390e10b5be1638896d037d79d734df9523a0786f2283923b649b28f5f8127e022529026fbb9f049ca94675199616b59888bd69a18610304f8f2da29b98107445a1cac9fc4f909685042c745a6870af25235bc3852990c63ed61f387df02014ddf014df5edbd6aee71924bed3c7e75fe1a27055c4a43bf32252ce5230425116b27f0576f658d4222665cd0dfbe5c02ae4b8f2de43e1db7e34f7ed0518ece0c1f14b3583c501864f9c2d6f32119cea4bac6bf1382f6b5815a8498333b678310f1ee21aa4c08ff188ec8d3ae4beba6b9ab81bce26f0d836bc4cb1e651e52ea0def4159676a7e48ec4b43771792c3af220ed27a5bc29e9a24d2682b722519cb12599a2c44cc9bcf9d63c1240e488d797af644a7dd269d67734292acdf9ee2461c888b65bff7d6b31aa6b80afd46b790c34a68b14483028d6ba872b2b20333780b4e975a5da4bac7c77990a58fc71f8e9dfb751e5f0bb4d8d39daf50934263690263b1a5afe6fd648dfa77af8f2fdde649e016a694af7f5f0230383aa4e3e3c4161377416d8cbb451075147c682ef3ceb7dd50cb874f4d3cecd973e4434b60d512106651494e9a0f64c81b849c2dba84b44cd19fb74299d861c8ff68c2fbbcd5287f38431a337e790ffb07563284469372e229fdb6e36a200308e737d65beb5c2168ee660595242e3ed034c0e8d6cc9d682af6aa37e6bf03fa49408af6e39649161377416d8cbb451075147c682ef3ceb7dd50cb874f4d3cecd973e4434b60d512106651494e9a0f64c81b849c2dba84b44cd19fb74299d861c8ff68c2fbbcd50a13ee192651396b49591d9afd66d156933272414687de3ef88e2d653696c69b08392a1542740b9b7c7ad0039e137aeba84cb081c9dc634dc2a738e2a6044fe92255792f31452b7e38e21226350ea3dddd966002783b5ab5e3160f1f3a944e82118ce6432c555bea52e6d2258f8a8c7cbe1926281cbd30dbc3b3a33df6cd7f5616536f888102f5bd3dced681381373a5525d7ac668f95b90105947ed7f33fa8d2f741f9b9826c468b884e77cbfbc2854e29f7772ef7709f79d27a3c2d124263e2f7f179357f860c2f1260a321f2cbad1a025d4c3d55dcdb46f56019981a34d8a0a68767eb1165ac8e147202e314e6c75d99c88329084c75b0e41e1c166a238011b606db0253660705a1c13b5613e830d3e9124c6c73f3cae2b7f6cdb357f2e0e1666cf18a9839b66ffe94e58448f912a1883049ee754d2fc4424592aec99845e2d4f670d3ecd975860e91ce446d2f25edc625edd0fd64d8c0992bb69bfce54981bca565235176c377347610b2a790d7b3820d52cbe8c68642c8e0074bc9188771a98b19961077812a18168737e12e101c8f7bf1a9fa3ed55024225232cc5e99f0157381b86975cce630db2495fa9d8683c4dc45708827f8a462478cbf1f6bf7e279cf5d902830ef2d8fa36fb8a52d3cb469ba5c483d27715a1cbd8db25c915930ff89f2dfff28b1692a51a8b6d28358ac32cf13b29ccbf07d7b16806514c5dae1c43a57e71f6f9cf6b05aca78d5614b510a545ebb6c7318cf56af146a4da4543130d99569a5032940bc71c714762ba9535c892f29fa971035d97b22bf7694346183e5631d227f2096e8d66b2c36c2002d2b94927ecfb6c02261b7657a447cd3612b4318874b4169990c6be80c0b2605abf5349faf3f4ba4b8b71c1783026f85f16cc5bd6008906e42e9ce272cd410d1d0cb76b81ee194134e3c5c81219135fb415515d136b15fa60cef9e7133882820655b84fc83685bbf34ec95efef8f4f97b21d5551367998e3eb46064d2141ebc740b3e77c553f2e84b084eb1e7911f4a852b1c17bee7d33d3ba53758a94af682be35a100699552fb1039bc46d6cd12e04220069e757623468b5638619d17cc7909fd306fc4a96b6698979e77851b51ac1b0e17f4292ee2cc9ba3edb8a534a7136709e84fd1bc658aadcea37038b076daaa2d1683031eb0a4ee6798913ba2c1c8e795226bf7c5b8894fded640bef01de9002fa2a8aa8fa3fe7e2609565ec17b7b59d440849e69e1faaa56318594087775af051d70ef0a76ef946ba77d41f0aacca2057a61961f4bed9f4fd1447e34ec1b191755fbe46a266ad353f9e70b4b6977c893792c6b06e1de77266be104cf6bf9d20213383672bb72049e892099e6cffe9af83ca8faf6cf217400bad546ac6fb80e2edbed922b90a4e2d40cfa19ab81ac88be85f08e0c42872d3c6d9af80259f01b288b9c05088314a9741f29f6d9ee840c5eaec4d092e9c396d3e16bcbde74843b00cf67d8e591ccf4e54fb15a3e7ef9f5ad81a3c59848be5106e92735ff621b44213dc47a3c6d233f7177da09be21431a9cf069492bb0a1f41b6808c1a1878f2221c0ef6f649e31ffe130ed94bf8d8ff46d09dafd7046bb38f13745a07898f0021b14c349e0b12d1ab31825c9f9b33719bd80c8e8b9bda6cc2cd1277f65360d200aca9c1a5f42aec7015185397363b5884c5560ace138ac0c15ae735ef186f9e01b442858d01f74d06277a6f5ee5ec6f76e124b59afcd28e70b4929b78ba5d9bf0f9765c392d6849fa89a5e575987a7fc2f9fffdda126ed07c92fb858fa54b7fb2aa8fbf7302cfa8f3da118197479d0161e2c9530dbbfd6ccdbedeec03dc1d9882186fc2f122f11bad65e5e0abcb47b133c6a7b9d8d2b07300c23e5a6e88772d52774bd9ae1a771308f61932a5c6b3538ed93bd6c3aa1835c25212bca97d33f0620d7241941ea2d871ee879daa5e87b3ab6c5f9123fdbbc1b5fb8d468d9f74df724cee75e106f074b26eb2eec53cc0afd4cfa6a2811de90a03ed366e325ea9a7b10b8c74229d3062dbb4471b362e68e1d4618395017ddf38d721f9acf1c73fc3c11484bebae00ebf2cd33fb674cc2401fbad66dbb98a9a1d1076dfc204de19d510e95e36139eaac4b1ab23f6112631abdda034298b3195ef75f9baee876b579a1113cb9f1e503bd3737e20d18e233d1af694e59b5dca76c9717224c784f13dcd11277064ce84eeecd364b30028573e60907bb7d0a32a1b128b2e0bebf5b8250ab000000000000000000000000000000000000000000000000000000000000000021381d112ee46f822a8eb5723a3e683df6cf341b4d19c363ec4eeedda37577c100000000000000000000000000000000000000000000000000000000000000002feeaa0c03cb861bbf95e015156a8432865b07dd4d593c6c982fddbc3351440829afc9816225f53a0b6b9a7af346c5d2a4b6cf6cca5e7eaac1c4f277bd48769000a4794295a9a8d50148a65c7b8175be6b9323de3c0cf2105a32b8181e84585629dd2570a415f1dfcf1b6e6c681a1ee48d52e4631f521ae958c0acdf67f8aa4d056034954c9c949442ccaca84f08bc9657967a324b1c67f74b97c9a55915b98601e5f925242ebacbec84a17c3fd95a953497962ca45e2ecca505e1f2d932ca871a5ffc787ba85efe4ee524fb1a1be7de5c396e28b3824f624d02ef71d4f1eb02000000000000000000000000000000000000000000000000000000000000000022efcc0c2feda75413712f29c9158f01d4a8efbba4e7776b77a1b91eff1a932b1b9133c589cf6f8b28f7c119898044a6ff0c38964395716c40bd664585c85e030bc1b14843dd4c5a32877bab4b5b8dbc151eeb89dbb1e6e5bf559835f6d93e072a1a9fabc76950287c7f4a7f221e6cc3af38049f7462e91f07fdbc69a401a4fe1ba08424796428d887e8e4134bc8f307d03da5472c01319f0909038e8beef65d1eb417be62afcf0293c14d19534b34f3d2f90f4354123fc64c655f7d69f8f99a0f842d4cde8afff8e5428a0bae61103aa12f8a6c2fb9dc68a3b6c5e28a15ecf401ac60707e8f4786c3149193f77b42f50c7d1bd94ae37115d706b418c4cb14990b78073f2cc685d0fffeec760c1af16f750506211fd599beba29176f4313a9282886da8b6ab5575d0001c356a66b0af4b04f11a6cd5c0496ddcaa8e8764ddca10dfe60c0266dac97fc05b6b826d223d1751938cff0c50371a5c113d0123c573925604d6931c784713bd57ada380712c131c1c4b62ff1c943d398e534aa44945c0cffd0c2267d7a1d923f16c6daf211480c7be174c30ae0174427dc98fc50c67b301c3cd4d529957c2c31b360495806afe61bd8e0947383632238fae692a244b702387c95dd02aceeb708afd118d3f659d0da746a7b56d263cc51feafee36e82f2a0d7187ab680ba963ed7cea9564b7582a104cfe09cc6fd504d7ff20eabfe80e0f28d8f9b093b5c37cbefbf1e762b67122dbe6dd613486b3e6010f6ac67c5f2c1ed433ed300e3ca2bcbce52f82c871d67195dee1d09629e41b6ac6c23c29b55f0c9ba27002365f3f64f2d6a5c7c0c55e89473404a82a74cc9964c3d7103d51220c51ebd344826e71bcfe1c9e0a272ceedbb8ad52152c0bc15d55b433bb6e7c1a0db121df97c0739fd27b0fc955731e38bda800fed4dca7b91e4b073e75218ff9126bbd2bdaeb767b0bee92f245003b07cad3d008c460f75191b3fe26ab3e8c712681489c1f17a83d4bec90af459808400564c794c1489dab3969fe019b93f8ba2b03ce150b10b1c3de763607d7ab277a9ed9fa541a14f2898f23b8ead6ce2204094dd9d114e6912a6173c3771fcb78479b39852502349dd05e8b9c059a77e58625ed5b3931daac33f5c68fc98e703a8b9b9eedd2ab6e0251bcb979d54bd4655f11a8c5db3655e8e2ef33fc8cdb91bdad9020b850be16d762b46acb037868a92c2a7bf45f60c6c96393e6786acce7383fa0e41ef95800775ece4a196ec616aa9524ac3a2bc57f5a0616ab8f059e9ffc4e1f35a18464f749f0e2d11a4ebac6674a15bdc72c5c49007d15ad588f8b1b9d659320df066fd2ba22582b2e5f8e265b0c094dd9d114e6912a6173c3771fcb78479b39852502349dd05e8b9c059a77e58626c9e6152c6fed33114d3a8f7643953e25e4be3f7ea886fdab14447dbe2a1c062b7dca6b7d5980d828bae0607ec8a1de80cf07ceb1555436cfd24879b39f52bb2ae2f52eceea7f006f038195faebb5bb6d11454863246efaeb5bf3022dc845b21b5026f99f8e1e75fca1bfc317f7674f4e599b491a9658d337a2687db6a1dcca1e79599c3cad1c4867f7c39f176a300b42630c5429b920463c599c33351d779e2250e105cde9ab157c91a040170c141c1598d3c0b60ab3d1bbe8e71c94fe724a1798542059afb6f22edc57532d14b2cb744df1f3d7d0493a7cefa6737c9b0886', 'transcript_type': 'EVM'}\n", + "Time gen prf: 0.7244601249694824 seconds\n" ] } ], "source": [ "# Here verifier & prover can concurrently call setup since all params are public to get pk.\n", "# Here write as verifier function to emphasize that verifier must calculate its own vk to be sure\n", - "verifier_setup(verifier_model_path, verifier_compiled_model_path, settings_path,vk_path, pk_path )\n", + "setup(verifier_model_path, verifier_compiled_model_path, settings_path,vk_path, pk_path )\n", "\n", "print(\"=======================================\")\n", "# Prover generates proof\n", @@ -368,24 +368,23 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 17, "metadata": {}, "outputs": [ { - "name": "stdout", - "output_type": "stream", - "text": [ - "num_inputs: 2\n", - "prf instances: [[[4361588021930202802, 11452771843424695699, 17406203981540687110, 449645176536645986], [17475259421703607016, 4715985628661660007, 18118935885768207713, 749760773435915941], [12436184717236109307, 3962172157175319849, 7381016538464732718, 1011752739694698287], [14385415396251402209, 2429374486035521128, 12558163205804149944, 2583518171365219058]]]\n", - "proof boolean: 1.0\n", - "proof result 1 : 0.75\n", - "verified\n" - ] + "data": { + "text/plain": [ + "0.5" + ] + }, + "execution_count": 17, + "metadata": {}, + "output_type": "execute_result" } ], "source": [ "# Verifier verifies\n", - "verifier_verify(proof_path, settings_path, vk_path)" + "verifier_verify(proof_path, settings_path, vk_path, selected_columns, commitment_maps)" ] }, { @@ -412,7 +411,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.0" + "version": "3.11.4" }, "orig_nbformat": 4 }, diff --git a/examples/covariance/covariance.ipynb b/examples/covariance/covariance.ipynb index d3a8f50..e8606ac 100644 --- a/examples/covariance/covariance.ipynb +++ b/examples/covariance/covariance.ipynb @@ -9,39 +9,40 @@ "name": "stdout", "output_type": "stream", "text": [ - "Requirement already satisfied: ezkl==7.0.0 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 1)) (7.0.0)\n", - "Requirement already satisfied: torch in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 2)) (2.1.1)\n", - "Requirement already satisfied: requests in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 3)) (2.31.0)\n", - "Requirement already satisfied: scipy in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 4)) (1.11.4)\n", - "Requirement already satisfied: numpy in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 5)) (1.26.2)\n", - "Requirement already satisfied: matplotlib in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 6)) (3.8.2)\n", - "Requirement already satisfied: statistics in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 7)) (1.0.3.5)\n", - "Requirement already satisfied: onnx in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 8)) (1.15.0)\n", - "Requirement already satisfied: networkx in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.2.1)\n", - "Requirement already satisfied: jinja2 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.1.2)\n", - "Requirement already satisfied: filelock in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.13.1)\n", - "Requirement already satisfied: sympy in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (1.12)\n", - "Requirement already satisfied: fsspec in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (2023.10.0)\n", - "Requirement already satisfied: typing-extensions in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (4.8.0)\n", - "Requirement already satisfied: urllib3<3,>=1.21.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->-r ../../requirements.txt (line 3)) (2.1.0)\n", - "Requirement already satisfied: idna<4,>=2.5 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.6)\n", - "Requirement already satisfied: certifi>=2017.4.17 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->-r ../../requirements.txt (line 3)) (2023.11.17)\n", - "Requirement already satisfied: charset-normalizer<4,>=2 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.3.2)\n", - "Requirement already satisfied: contourpy>=1.0.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.2.0)\n", - "Requirement already satisfied: pyparsing>=2.3.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (3.1.1)\n", - "Requirement already satisfied: kiwisolver>=1.3.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.4.5)\n", - "Requirement already satisfied: pillow>=8 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (10.1.0)\n", - "Requirement already satisfied: fonttools>=4.22.0 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (4.45.1)\n", - "Requirement already satisfied: python-dateutil>=2.7 in /Users/jernkun/Library/Python/3.10/lib/python/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (2.8.2)\n", - "Requirement already satisfied: packaging>=20.0 in /Users/jernkun/Library/Python/3.10/lib/python/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (23.2)\n", - "Requirement already satisfied: cycler>=0.10 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (0.12.1)\n", - "Requirement already satisfied: docutils>=0.3 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from statistics->-r ../../requirements.txt (line 7)) (0.20.1)\n", - "Requirement already satisfied: protobuf>=3.20.2 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from onnx->-r ../../requirements.txt (line 8)) (4.25.1)\n", - "Requirement already satisfied: six>=1.5 in /Users/jernkun/Library/Python/3.10/lib/python/site-packages (from python-dateutil>=2.7->matplotlib->-r ../../requirements.txt (line 6)) (1.16.0)\n", - "Requirement already satisfied: MarkupSafe>=2.0 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from jinja2->torch->-r ../../requirements.txt (line 2)) (2.1.3)\n", - "Requirement already satisfied: mpmath>=0.19 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from sympy->torch->-r ../../requirements.txt (line 2)) (1.3.0)\n", - "\u001b[33mWARNING: You are using pip version 21.2.3; however, version 23.3.2 is available.\n", - "You should consider upgrading via the '/usr/local/bin/python3 -m pip install --upgrade pip' command.\u001b[0m\n", + "Requirement already satisfied: ezkl==7.0.0 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from -r ../../requirements.txt (line 1)) (7.0.0)\n", + "Requirement already satisfied: torch in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from -r ../../requirements.txt (line 2)) (2.2.0)\n", + "Requirement already satisfied: requests in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from -r ../../requirements.txt (line 3)) (2.31.0)\n", + "Requirement already satisfied: scipy in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from -r ../../requirements.txt (line 4)) (1.12.0)\n", + "Requirement already satisfied: numpy in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from -r ../../requirements.txt (line 5)) (1.26.3)\n", + "Requirement already satisfied: matplotlib in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from -r ../../requirements.txt (line 6)) (3.8.2)\n", + "Requirement already satisfied: statistics in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from -r ../../requirements.txt (line 7)) (1.0.3.5)\n", + "Requirement already satisfied: onnx in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from -r ../../requirements.txt (line 8)) (1.15.0)\n", + "Requirement already satisfied: filelock in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.13.1)\n", + "Requirement already satisfied: typing-extensions>=4.8.0 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from torch->-r ../../requirements.txt (line 2)) (4.9.0)\n", + "Requirement already satisfied: sympy in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from torch->-r ../../requirements.txt (line 2)) (1.12)\n", + "Requirement already satisfied: networkx in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.2.1)\n", + "Requirement already satisfied: jinja2 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.1.3)\n", + "Requirement already satisfied: fsspec in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from torch->-r ../../requirements.txt (line 2)) (2023.12.2)\n", + "Requirement already satisfied: charset-normalizer<4,>=2 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.3.2)\n", + "Requirement already satisfied: idna<4,>=2.5 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.6)\n", + "Requirement already satisfied: urllib3<3,>=1.21.1 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from requests->-r ../../requirements.txt (line 3)) (2.2.0)\n", + "Requirement already satisfied: certifi>=2017.4.17 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from requests->-r ../../requirements.txt (line 3)) (2024.2.2)\n", + "Requirement already satisfied: contourpy>=1.0.1 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.2.0)\n", + "Requirement already satisfied: cycler>=0.10 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (0.12.1)\n", + "Requirement already satisfied: fonttools>=4.22.0 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (4.47.2)\n", + "Requirement already satisfied: kiwisolver>=1.3.1 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.4.5)\n", + "Requirement already satisfied: packaging>=20.0 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (23.2)\n", + "Requirement already satisfied: pillow>=8 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (10.2.0)\n", + "Requirement already satisfied: pyparsing>=2.3.1 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (3.1.1)\n", + "Requirement already satisfied: python-dateutil>=2.7 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (2.8.2)\n", + "Requirement already satisfied: docutils>=0.3 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from statistics->-r ../../requirements.txt (line 7)) (0.20.1)\n", + "Requirement already satisfied: protobuf>=3.20.2 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from onnx->-r ../../requirements.txt (line 8)) (4.25.2)\n", + "Requirement already satisfied: six>=1.5 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from python-dateutil>=2.7->matplotlib->-r ../../requirements.txt (line 6)) (1.16.0)\n", + "Requirement already satisfied: MarkupSafe>=2.0 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from jinja2->torch->-r ../../requirements.txt (line 2)) (2.1.4)\n", + "Requirement already satisfied: mpmath>=0.19 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from sympy->torch->-r ../../requirements.txt (line 2)) (1.3.0)\n", + "\n", + "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m23.3.1\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m23.3.2\u001b[0m\n", + "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n", "Note: you may need to restart the kernel to use updated packages.\n" ] } @@ -123,9 +124,9 @@ "cov: 3214.7648484848482\n", "x mean: 49.5\n", "y mean: 227.703\n", - "dummy_cov: 0.8019999999999999\n", - "dummy x mean: 5.491\n", - "dummy y mean: 5.82\n" + "dummy_cov: 4.143981818181821\n", + "dummy x mean: 16.269\n", + "dummy y mean: 14.982\n" ] } ], @@ -159,6 +160,17 @@ "\n" ] }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [], + "source": [ + "scales = [0]\n", + "selected_columns = ['x', 'y']\n", + "commitment_maps = get_data_commitment_maps(data_path, scales)" + ] + }, { "attachments": {}, "cell_type": "markdown", @@ -167,14 +179,14 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 7, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ - "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/torch/onnx/symbolic_opset9.py:2174: FutureWarning: 'torch.onnx.symbolic_opset9._cast_Bool' is deprecated in version 2.0 and will be removed in the future. Please Avoid using this function and create a Cast node instead.\n", + "/Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages/torch/onnx/symbolic_opset9.py:2174: FutureWarning: 'torch.onnx.symbolic_opset9._cast_Bool' is deprecated in version 2.0 and will be removed in the future. Please Avoid using this function and create a Cast node instead.\n", " return fn(g, to_cast_func(g, input, False), to_cast_func(g, other, False))\n" ] } @@ -196,12 +208,12 @@ "\n", "\n", "\n", - "verifier_define_calculation(dummy_data_path, ['x', 'y'],sel_dummy_data_path,verifier_model, verifier_model_path)" + "verifier_define_calculation(dummy_data_path, selected_columns, sel_dummy_data_path,verifier_model, verifier_model_path)" ] }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 8, "metadata": {}, "outputs": [ { @@ -213,14 +225,6 @@ "scale: [0]\n", "setting: {\"run_args\":{\"tolerance\":{\"val\":0.0,\"scale\":1.0},\"input_scale\":0,\"param_scale\":0,\"scale_rebase_multiplier\":10,\"lookup_range\":[-448,6246],\"logrows\":14,\"num_inner_cols\":2,\"variables\":[[\"batch_size\",1]],\"input_visibility\":{\"Hashed\":{\"hash_is_public\":true,\"outlets\":[]}},\"output_visibility\":\"Public\",\"param_visibility\":\"Private\"},\"num_rows\":13120,\"total_assignments\":827,\"total_const_size\":8,\"model_instance_shapes\":[[1],[1]],\"model_output_scales\":[0,0],\"model_input_scales\":[0,0],\"module_sizes\":{\"kzg\":[],\"poseidon\":[13120,[2]],\"elgamal\":[0,[0]]},\"required_lookups\":[\"Abs\",{\"GreaterThan\":{\"a\":0.0}}],\"check_mode\":\"UNSAFE\",\"version\":\"7.0.0\",\"num_blinding_factors\":null}\n" ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/torch/onnx/symbolic_opset9.py:2174: FutureWarning: 'torch.onnx.symbolic_opset9._cast_Bool' is deprecated in version 2.0 and will be removed in the future. Please Avoid using this function and create a Cast node instead.\n", - " return fn(g, to_cast_func(g, input, False), to_cast_func(g, other, False))\n" - ] } ], "source": [ @@ -243,12 +247,12 @@ "\n", "# note scale = 2, or 3 makes it more precise, but too big.\n", "\n", - "prover_gen_settings(data_path,['x', 'y'], sel_data_path, prover_model,prover_model_path, [0], \"resources\", settings_path)" + "prover_gen_settings(data_path, selected_columns, sel_data_path, prover_model,prover_model_path, scales, \"resources\", settings_path)" ] }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 9, "metadata": {}, "outputs": [ { @@ -271,19 +275,16 @@ "output_type": "stream", "text": [ "spawning module 0\n", - "spawning module 2\n", - "spawning module 0\n" + "spawning module 2\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Time setup: 1.7675788402557373 seconds\n", + "Time setup: 3.663957118988037 seconds\n", "=======================================\n", "Theory output: tensor(3214.7649)\n", - "!@# compiled_model exists? True\n", - "!@# compiled_model exists? True\n", "==== Generating Witness ====\n", "witness boolean: 1.0\n", "witness result 1 : 3215.0\n", @@ -294,6 +295,7 @@ "name": "stderr", "output_type": "stream", "text": [ + "spawning module 0\n", "spawning module 2\n" ] }, @@ -301,15 +303,15 @@ "name": "stdout", "output_type": "stream", "text": [ - "proof: {'instances': [[[14955570959218682635, 4667139652385906200, 12836539004462631467, 1774684518626433649], [4224417983558473805, 851357164555783563, 5363851773531956453, 1448631618362554917], [12436184717236109307, 3962172157175319849, 7381016538464732718, 1011752739694698287], [5743885005642251665, 3430503978676436355, 7149667244725939006, 2902673458086333540]]], 'proof': '23ecb75a57561179742017f4c0fc5aaed571efc01c1afe8b4d7c44407008d1032cf18c02e69d98076df007ab49b3bb4c2ba2cf4115c40f0fb73f15a2bf02902716912fbc5a50f774ae9027d384c152e34a2fcd36888280236f61249838142df615a22c433b15928779c06da94e38927b448bcaea6f33f0508e2935d8434e5e51038e6daa87e59a50d4a5a855144fddff4b95d9c52dc0086073c3c1d32943d6c222c3c2aad06db1f956c7b9e3af183ea74ed14263c96a6aeadb080a410139fe041395498a13715c9938cb70bb20b04ec488b39a9ef9bb32206828e087009c71aa0164a40ab642f944b223cb999528fa735f66ab92c51ce5b11f03f4e11d0c69d3266244fcc7d2c167d03b20e688bec78747e20dba120a0468445882f10d5f84ac1f134a10df75dcaa6dff0bc5443100bb281b38e0c135fcb2507bbe0734b4e5921af502906ce0a331086a19aac18b2192b68781da7c39a69940464838cde43db0261a402a83d1bf3c71eaa8dff18924a816a828f0e825a613c274cbdc14f706af2d7d66978d15e8f6ed36c8172cb64b6e48a9320e6a5e4eb7d8b2d85336c97f5f2c7304c8938cb6206d0dc6e2a51a36ed785af6f50e71b78db8d210737d0e8b742b75ac3f5fd07ca56b951d4679019ed1d2ba4a60ca13417f0d8be95841ac6b711202d8894c993c1500b5e7eb6499f4c9ef02f98120fd4fd2a435494944b6bd640ae2a348ee78e0847cce26c7eddda9ada120d9de1032e8cb12f446af85e2c2cd2ddcc653b44e449df23901fc14b2e66f40f0e0b14977e1e964840d8ea37a5d5d105dade3188d564c2098eec6848b2bb72cc74b2de6f4966517af714da24f2cca2e415654867b72c619f9d6e70bfb58fccd62b25b201f8d4bff39a0921a024bf7123fcfedf2f8de0e89f1bd7b0c9542c1401b3a7c22ffc74f50b0edc74e84c9ff12ddfbfc264b4dd8575d555ba392b120f00d6259947268d08b3c1dad512e03cb105dade3188d564c2098eec6848b2bb72cc74b2de6f4966517af714da24f2cca2e415654867b72c619f9d6e70bfb58fccd62b25b201f8d4bff39a0921a024bf726755fdf8425e36069f280491c626203d2df775b1ef47eca8be60efdb05ddb84284d74ad55a6ff524b72e03701bdf084fcdd5bbb0184c8b807bb6f4197822d9a1291feda34ac5c4e083a4bafe614238781fcaa09922febea1a67dc575d7b361c2bc5a9122a9789cbaf15b21f3a73b2d6c465696920df52738748fff6fed949f3000fd209ded5e9bdedb29889c24be7833174c383f477f9b36c6fdf64563cb73f00be82b4a2347095f0b7b8879c03674f4a81f26eacf39b1303612e0f2b6943570e104a5cf7c9ede6a2565b7a83135ec7922e079cc88527006d7f5597a0de16b7098a7e550b4050c3b2ed3a114cfbd95c7643ab9ea63fb36dc050e351ef6db36c29b9e75ccde42cffe56d32ced13e16a4e82ed747a9bb3f94115ce9401ad323a82ba3ed535a570270337168b9ea2af0b7fc32ad9d8d2024232549c51b2a9649132c1ecca0d340e68d91a7dfe403cb013b64df7519382fc4d5302e864837d1d9d81e5ad96204e696dc18ca2183597f95cca89f5ce76473bcfbacc72de6fb665ccd0b69c3e839f9c9babc2000970823f9eb84c4520b80fa95a3014f2667dca253b0002210aed668b7cd4a9da17d3e941018c528f26e5361433fa6081268754f65041a85ef7cbc6b90a00709ae1638a7982c97dde4727de6362c5efac31b726a586b255bc0e715dd89efc4379ebdfe618c6fa0cfab0f7ad4e7d8c2195c5988f0f8742ab37fb268eac1d8cfad3e57fefc6560510c023844a1c470f06ef208445e552a12dcea6f625dda0544a6c29680aa4650fefb3a63370185f39f35bd8783171b771db8a3a09014dc7259d4224acab5dda19c43029f2866a821ccb270258669f830164c16f6dfbec288bc68163595eac62f8ece0bf639b6394a152091ce5ccc308e2bd8329856cd3a2af2a0e21f2aea412a832ec383f9c965ffadf7e576d5f9e86a1003206bc350c57a0ef316ae438718343c215ea292adec42f65cb6ef42d795952a35626c86147a4de47489b57931ad0dd1de8cc3e8f4554c6d297638baf69e93059746713e6d3ff66deae41385bc6c1271c3a76b7970402ff21dead32ab9eb0a09b9423659544ff1016f086431aa5959d36693207e4ed54d82d957a6e2af26cf23371b72725510c3f90afec31286457d566b83867a067f844056aa7552a5c9742d131388c9743b5c8fc3880729730fc13a9b6c528f7d6fc3f6076210c44e8bd81604a76f676d3c19bf579368d1463851a08285a4411f6b784415d919e4f08a5614c9bacc5e4954677ef1905ea789b86702ace434c030c7a077e112c05516da762e96e668ce9fbae5cbbbe5ba74f8157fd597ff56a75fd7c247445811d21ea7f5026c77c34cc4f6b85ded86539894532410f04af81569424ebdfb3d4cbceafc360f3c8428ed7acb544a3eb3d8e173a83c051ee7e2edde45e8b745458456de0c751459d4a182b3b8c265edc00313418c0258a385d2c69ae2f73d387d464cbd91102a03e254a17f4e0f902f5203a884204e8c72adb255389588760022d2fde86d9c16197b69b00910a9d70b02c314558bb98a7b8b9ce22aecaeb0bc684c756992d01b9a9b26a2152eecc92af7d8fb08caa9ce3f67420e0a32276936941234a08c862466aacc204e28918a093d1decd3e3519edb166c39aa721c9765479ab0a195261d631ea3d05aefbbd5440a597e1efb26709e871136b36908c53b51ce9d1dd8d32a68388c1be1b72037309370bde32f7ab99b318604b6af45295cf36461c243a40cd043416960f49bfdaf62720f2291703922ad933f0d1da4c3efb357a11a1efb13a1864b2a6581454d1b032ee660a51493a106db38ab59d13d4decdff8ee7228080be7502d04315b8f40efef8ecaaf984ef7a7871b9c59a1c021bdf500a121df0b777f02df9b37c5595e3289565fd26c1018a0a7fbd7427b142089fe66c8274a2face2d3a88bde25a27f08e20452424d4785675951824a5fee1c031a4db511780338d7001f0e60fc09cc6ffe9356d62f4be43ef2ba08090d1c77ef759a87267c2eee670a75055daca647bbc262a92318715be075d9d5ca64b1eaa982f6a777682f07e1a07756c1195ddd017bf458242ceccbe1a862967a0e39b84c8d0291f360124ff5f59af46cbc64da4938aed87fd5cb9b80fdc9ede176d66f6f7f8994e04e118842007cf54394cf4abcf4f3e24ecd8750a8c1e2775952505cb2664b200c8c2ce779edfe782cb002bc37865670493f8638098fd7e64c8a6ad9d74b5556ec0b000000000000000000000000000000000000000000000000000000000000000011cdb512750a7136cfbaebc7f1576dc7cfe97d6b7d5cee505ca4f9d055019d1e000000000000000000000000000000000000000000000000000000000000000028a4b23675d8d7dcbca733aa449c962ec66b1d96cc5c3cf95f8f7651997af1ab1d939c89966e9f5865611122390a284967bc6fcd09b7cdbf05ef48f1e77506cb160cec3e57c1d6ff89c5d4a3ab47d8bd0e4e5803cffb6d87b92284e7d56691832d7baf1aa929b2b03f2d694a8770b2a770b8ce16b68446ad451bcbad074579d602f409a67359ca9dde7b99a3120de36420e96a12be0632162e0224f507327d422e806b284e1d943f077b9b6227190ffd65194a6935eb1def361aab8b331731d52f1442fb380dea31b4802ff4ebe55e6b093f16fc11df6c173e2cd82400dd0fa01888a261a41403054612dbd9c61af464d54392b4c0d2aa7bc73e4f499071b346086cedbe8679b7813ea459d69b802a6ba547f504e358fc610baaa050ecb966322cbfb36349fd42f2b02cd64b316fbcd0a3e395ff09cf8feec9b3638686714fc014d46d86a5858194d8bbe1d71156799974dc5961a902daf6f404e50935bc46272ef6a94a05ceeb735fadbb15a542a5ff9fd640d482e4d673efc4be6492512cce1578fb31586d0438d8b529229f70ab2acbb9835d8018e48c9f01a7455ca601892f1735befa70b77b77852977c41c1ef1914bfde50a5b0cdcbe05b55fe4375c2520e3482e994617f2d6fbc97f84b5f760aa4a9797a292171099ac37750d85dfeb16fc79469861e5d3892c772771af86432b2e62ea47c801f308760a64c64836ab1cd783503bcb6f55f1b6aa4d359df5c6da111ee72c5bde328eeddcdb14da0c7019c6e8ab104b8c21a9fa73a316db8269d94caff1fcaf0d058ad5285cf58a7d852bd78f65b6d6c14e2eb4ce030b506eac54935ba2a564149613dbc3a472815064034c52cb21176c41dd1c7ea544b059304c5935c5c7c764f843da50aefea5ce80246fe246249466493f028dc0326709204fa099f84c3865867576fdf1c39a6cad16738563c79aeb2878f8f8f51c655de0c7bac6b66afa36796160fd58702c1efe2470330472fea1437484dcf4a55aefde8810644ae162b674a8f3594758a157512ac6a55de98dc7e21002a619c4b47381660cbc9af7da6a24b589786bc9a9f6e70a743d177fd5a4b5b7d3145bcb80a2007c57d250f02a7b12aa9d58e68d0eafb62a324ee52fbaae0202eff57b6f91d2eae6979546393e540c6fa3352f128206351e45d307cf137bd1417778a1b60ca5cd8e3a8c72aeb98e4b4e574209da692ed213f2f6bbd4a79458d52b32222c529fc22611ce22dfd58a8b823452fd71faf3af20a8618f26f840129f6370d3e7a07e213f0217c69df27a9f2f1736907335b9e22a7a459c26442e5bb4b7d85cec634d84166b45592a7c323bf359463dacace7fc1c7a262de781d1b2301b4a11d5740b4e67254013355569b02696fd7790d8dd4e03f44b2b484d6703aaa888010856a301b5852f6499927e0a77df35e13129990419cf6372449c686e266f1cdcd60d7b2a3d7c85f5749031b8494a269d018c4370078a4b33029f7d52c70e824c141d9525ec2a7e0c0b3a22cb22c8b1fb21c06ff9052b1b2a73727e9eebdd372563701cec4b6d8a74a72faeb0e68a56c9794810af009b57c02a9e837600dc50f81391d3ecda7de301df524118a4a5e39f1d7bfe2c1ae533ac8c0c39c8a57b2078341e645c067cbfe21156d9de20370ce5e7e6ed5512885f32b750f5d6e2280aa39acafca5cc0691d1f73c416fb1017b6ffc7d35e919cf6372449c686e266f1cdcd60d7b2a3d7c85f5749031b8494a269d018c43701ae4db532006d124e5f12385bf507283530472f7e47b47fc054a08c65ca97a44263c12cce7387f1d780cc5e563d53108978cd8dd9288a4ffb90673ebda816e681133410af6e39c107ca6e3c34c74b729183d31a2ceca0db2ca18e13efed7a42e1f6e3421c76913b64f6175eaf7d878c912c86909eb7d7c0e5cc2d716ae114c4d28d00e0835551bec116bc5132e64ae911de28d10930bfbce1846b36999e44a2c2082bdcee39662e45c1ca68455069dd079c86a7866743256e0ba24f0e823855d14fb3d07691c4e6753db92c574b4fdcd797f1612ad4718445aad9c22675687a4', 'transcript_type': 'EVM'}\n", - "Time gen prf: 2.553421974182129 seconds\n" + "proof: {'instances': [[[14955570959218682635, 4667139652385906200, 12836539004462631467, 1774684518626433649], [4224417983558473805, 851357164555783563, 5363851773531956453, 1448631618362554917], [12436184717236109307, 3962172157175319849, 7381016538464732718, 1011752739694698287], [5743885005642251665, 3430503978676436355, 7149667244725939006, 2902673458086333540]]], 'proof': '09f31a308bb02ed2663ca4b9af3f0dd1bee0126b250e0a9341f158901177c3a61383e691b48fd8a0b1180ae7d907a02f8467bafcba5675e77274185f93a3c0520317ca3e628360b6c0a6ce277f259ad80c13674f2cb30ccc12647142589ace7323086df037f2f7fa2189bd962feec853d12d586c308d425bcbc69e7488a149a11f41c138c2dab61b54439029f1d7119c4ef1c3176d29f32dad8b413c5d950e18148f7d46cb315e67269ded0c7ae98272007bea8ceaf68a5f7f0b64790b078f4a03ab8468919687ead541bc0933800935772927d77489369c58a30f84df7717912fd8bd7ed5c8628b941e7592c5e0f30afa0bcb026ae5241a2d950b2b78da96601380ba104d1ef7e5156473213d4908f90d7d2bdbee93ef004cd526e6f8395f5a276069c4e89f4664bb8415bdc3bf1b900d13006609846db4fd48c0767ec506860aaa348dae3fda720d0de2d575e4de60754d7a9d61a5d0c8202f9df54843ee511fc433548f263248cb5f64a413abce8567c6a5240893622b4f16c18f3f55bc712e8fc3cd51838d1f7691bd6b3351ff713c0d947ae1f0c7c92bb2e03dd4042aa216884b4c03d43f97c0fe73065c897004b0f22a485d4d93c3c5b3ee5810a7acb311b4f76b166dc4bdd3873539ae4969d289dbbc2cc68af763cd2b55a22e2ded6c2166e3424c03fe07850a3a7548849cdfb02a196ab043b6082b75bdccf76f99e127c787d39371d17204d358ddbad8fc45a0838228c6a9c4d704af1e9188e290ab0e8d9208614bde6dae2ed41ac8db3cda64e920de6f1637f662563e58ea21d2ec105dade3188d564c2098eec6848b2bb72cc74b2de6f4966517af714da24f2cca2e415654867b72c619f9d6e70bfb58fccd62b25b201f8d4bff39a0921a024bf7123fcfedf2f8de0e89f1bd7b0c9542c1401b3a7c22ffc74f50b0edc74e84c9ff12ddfbfc264b4dd8575d555ba392b120f00d6259947268d08b3c1dad512e03cb105dade3188d564c2098eec6848b2bb72cc74b2de6f4966517af714da24f2cca2e415654867b72c619f9d6e70bfb58fccd62b25b201f8d4bff39a0921a024bf726755fdf8425e36069f280491c626203d2df775b1ef47eca8be60efdb05ddb84284d74ad55a6ff524b72e03701bdf084fcdd5bbb0184c8b807bb6f4197822d9a04c417a45da9ade6361a54e8a24d64a75923a8cb843036c8b9165e86cbd4a72311f772d472fea089fa9585be54ad13a59c279cdbd83bd53817b654c90a03933826f85ef10043d1be60e53c826260510925fb09889386f3a3c14df52dbb121f7119f990d421b4b70b62cc73c103f1fa849832a195b45161946e303ca2cb6ffebd0482af2f8bf2ce2caee6443cbc6dd220d609494bba8c76f055c363133cd365700be05b99a2a8c929270f12c03b3862caab2fc5da3a4d129009c00c4c642d1bf81ff8f08f45dd78d799418b0c14615ab7f1c243854c92f362a0e41a95987aad8b2ee4f9eac70c03819ce6268db640f8ddca3eb6c39f7195e5e2daa6439a52421f0a1853a51fa5a13b30a4fb7e45c47db00be615c75e05a9b704c38909036d855a1a06f6c3acff600ff129d9484c17047daea26214293a7208f46ab020b35191cc1a085b6629c57e1d5d494281913d9d1b9202660c93f94ee95df44d8f708e464618563676fe5662760591772b82242de49e982282a6d13bac14e2fc3ac95c18f32fd050f9de6563830ee32a68a993544188734135e5debeaa8d1503f5d419a36b1b402b9e3fc9f90a96ab9c573d2ee0ebb5b62a1c0d9ea784807718f306bfa1272b2107f4a922888be6013d21942e827e51b03828fb746a6e4a3e0c86682ea2f3095a9034e84779b7a5ca12d167c1565cbcdd0e670171909e48de8a43a594f79a03f8ca7de39f8392e1e441134ca7985a485f1b24a47555844ce23d9286415458142d22ed9aeadc629e3612ffe73a820309f275baac28c39e2c6dd9418b313b4c1cb05ca2fa15e7422de4bcb62d881321fad93a3ae4cfa0fcf644b29b68e0efb013c9053cf394ec120133f1745962bf99f13f29507f929ee37d2fbe39c1d536592b1625f24877c9c4873c722c551d501f7c4f5edbfe40d0c4fee8355397c003d61fa48e16e4f5d3162471c3d284fe7ff5b61d35a9131a692ac44bb8c58bc0f5a3133c6eca860ca07b0439b58cb2e127ec6133f0d9c4e56f0ffaccf6d99cfa4c390182a852866328988158c02b1c8061f4e3e68a74434a82b8975670f84634c41d19ab4dbc3e3128d07f1fe82352d5926dbca73306447e0e667d6346c0352701041b63312ddf76fd758b25735465cf47520189122e657fde1a85a164fa599e5bcc0cbcbdae2a151be996024eca34595c85340ada6f906dbaf0525b8e33fb7b670a25a8c85bae74e194d834f4e560086caaa6c98029e59c1725561fd643cc143faf272b32b30bf2eec5d6a3f7f5c0511bb1ef27f3be8466493043bba26da103c1d92e365e8656afefdd5ceb1164be68f4a212caee4e288cd583f6cd91c0fd7840080b01afb3bd8a7c963c4740759e47c56ee95b136d1b69521d120174683dedb390013816788ec6accba2a43747ae433127931c3261ef7da610b6a712a1ccea7b8e1b4ba5d0b2928a94623ff104cfa309c0dcba6acc8f7e2988ee51b3c25fd9d58213b3f88114dda28778d25202e340e4b2205aca600dbaa1e4c21b4852d67ac0341cad5db77bea8eeb57ae8b9c76a73199786fd04300dff83d530b1ddf9c1ead0b1567c6433b17e55e1c2b305dcfdb9420c38ea095c804365f63b49b96c9be94d0301fd5703467576577108eba8ac0d02ae9e54cdd80cfc783eff2575ee59a8ead3062e3c8b30b6cea011fd4986f515bfcdb530b5165d0264801c609f0c58543e3036e8945cc2b5048351993349373d0e0e365fd2e78b330db48d25abdb3f842cb10bbc1fdd0c7cf3fe195032c6979ed6ddb7b101fc345045f35c9f1925ac13c5325c68b8e51ee2c9d379028258d09bbe80ac159b3dd737ee1bdac469afa78127608dcc17fbad79fd9b5fa94c5b3610074f1ff397b869f1a7f33531323f97c298e01758f61a88fccf3de110a34a5c0ccc4c914412221f3b032cfe128965a0ce62a022f4b30e4d2712137aac55fd13fa51d6836c706661cbf62f02bfefb2051ba710fd7ec770a0999ead4f5fc57815c08143917148e2def57ad67644ef785bf921c23132a627f9043983c817e2adfcbc0e53b31e339e82ef27253bd1c9741f182f11103419392dc6127c251218f05d6ead87f1c4b6222768c2c5d2a290f31d6a44b0c186e3f84822a0b9f4638fff30e4fc47da34f9646a04e6db6333745d3b8cac600000000000000000000000000000000000000000000000000000000000000000676395156bf6ae50811fb219177e404109e5478df16101bc24db5de804244ef000000000000000000000000000000000000000000000000000000000000000013c86a8a35bfdb85366862d29e6dc908e88c4bfac4d2040a528ad920229c70d7033b963ceac830010dc072006c2d613ba947c075da228344bdc7a8ab68cb1af913771b211312c8ca13076d6a9a7326f13190c0db8d1e83fb043f327d73c8d283205bf4d0494c32d483199e46f95076caac14e6beccd2baf651c5f06d3278893214f7c7a579804e44ac799d98ff46c37b45bba4c236df2d639319bf73042449df2c10e39664f9f4e1da698950749f37247d8401b38e9a214910ceb18159c2167b0ec73e4c98c686c1124aa692f42923804ca6f9dff999f0301e02788230b8174d2086b552650e0697e9934fe710dc46b38d3cd8786609ffc327cadb0566f3d72314cfb26e3ac3dc546bc3e287552650b0c08a6e124f07b0b2c1553038fd44d15120a0e93db4fd47b9995d959cdbfc250a348d087a66613f244d30e3f7639979d619a9d26c4c1209ccf910cd3a50973e26dcd49c06309158f57e9a98040f10b92b0d8b9a6701fcceff878ecd85f8869014251e827c7cf0f1b7e7d65011390950aa0a560e7267fdda9de8cc45574499923e8c8f4ca7bc045801be7ee95083fd450a151fe9ac1ef30aacd299eb59319685c2dc65ea6d162d4d76f027de84ee893a7e17ef673e0c440a7439c0cc6545bd2588f6b6934b1312870270641c41b861e5662eca43c531f2b7428982128d06fff7d09653b7c69527c37d07cbecb9bd0178c311919068d6e87626a5d16bafb00971768e7bf6fad0a3c91df8f5d7356b9adf1e11f828a3dd8fb569f5cfd75874f7340e9d1c75d6851677a0ff26037ea4e1cd0e11f299e6f298755f7ab015329af8d199f4217ca801d69abaa7fe48485924d98529fb1b54c739c4876586eb1d24658ec3f9734859b6e96ed79af233c4e5b1f28211c658ef7cf4a32994f5508158fdb750e0b8ace9d1dd5b48a8d5c438988f70800afe8d66b4da362644946805d4245466a11b6dd617b4c29b61e41d49ee46b3951b55cb12f2bdc41b3156e946817ea3408383f8fed6009ea3d998b89104391b571e52ff6b4893ae7bd845cf7688f1e6c57539ea1babb34c47f8851a73e6894270028e5266ef4ebeed10194219a3ae39da8e049402c1cdec67c0b7e352eae6d0fc29bbcf9e566f785c10b0272659d4bd38830d057d123506958ecee6f33943bcea2854a90fa73750807cd46f82eb2ea5ea9c3a15747d746099f551ee8a3c4f41610a503d706d5fb63780db63643895255542871503e0af35bb595b26aecef9f18b00084221f3a637ff61b4ff837dd774aa053d93df371102c5b307d4c514bb23881d570b0991892451c3437e3172201b38ec8316301608231f7bcc1396e4d1fa840e28e3421acf48f110788302dbd923c3bc77220f738fec3d38f8329621f006e529a141bcc3a1d4903103f11c5375e34b7cce40751ffe9abb7ea57fa28f87236c142455e48ab03ee991a1a1f4bcf214e4840629bb510abd0d5369edc529f8b7592bc8eae207ccb473a619340873a5ab5fb496074e5d7417f42c9a9e9cb54a23d215908b83f749bf9985d5ba6e59212b1dbae4b8d7089ab69f6729341096d395930131eecd5ed9473c41b9fd4127b7c58196b4fece3cc83ceec2a88203827db283063666e9b0046996cba5ef622193cfc780942e0b05525f17abd1d11c08f7c74808e61bcdb2297e886f4cb91582cc23e59156cf03546a52950ce3543cdb1fd517142455e48ab03ee991a1a1f4bcf214e4840629bb510abd0d5369edc529f8b7592895b5900518f4d127261e116eba2133f1bfb534e8f4fc7d37ae74ebbbf1a77322c3a8b3fe25db8dad72c333e13f968a116c5bef5128293ccae31799f38a870a032b3731ea0ce231a1bf3e2c4cf796e79f56999bc25af38d0a5aae0a8d569fec12cdc264f92f2a56349eb8a37023da3cc8adacf7fd5160fb9793cc6a8ab1335a160d90e39d2bfce32d10ad1dc0152159f73f4fef7c82d04b35641461fc2cbe55033083c37f782d66d0d3691bfa9f6fb23d57e41421462c85897c1bd596f1cb382ca71d46c7a07b574d8a738b50536114936b7eb5172e2407516a48ba238b4deb', 'transcript_type': 'EVM'}\n", + "Time gen prf: 4.607888221740723 seconds\n" ] } ], "source": [ - "# Here verifier & prover can concurrently call setup since all params are public to get pk. \n", + "# Here verifier & prover can concurrently call setup since all params are public to get pk.\n", "# Here write as verifier function to emphasize that verifier must calculate its own vk to be sure\n", - "verifier_setup(verifier_model_path, verifier_compiled_model_path, settings_path,vk_path, pk_path )\n", + "setup(verifier_model_path, verifier_compiled_model_path, settings_path,vk_path, pk_path )\n", "\n", "print(\"=======================================\")\n", "# Prover generates proof\n", @@ -319,24 +321,23 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 10, "metadata": {}, "outputs": [ { - "name": "stdout", - "output_type": "stream", - "text": [ - "num_inputs: 2\n", - "prf instances: [[[14955570959218682635, 4667139652385906200, 12836539004462631467, 1774684518626433649], [4224417983558473805, 851357164555783563, 5363851773531956453, 1448631618362554917], [12436184717236109307, 3962172157175319849, 7381016538464732718, 1011752739694698287], [5743885005642251665, 3430503978676436355, 7149667244725939006, 2902673458086333540]]]\n", - "proof boolean: 1.0\n", - "proof result 1 : 3215.0\n", - "verified\n" - ] + "data": { + "text/plain": [ + "3215.0" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" } ], "source": [ "# Verifier verifies\n", - "verifier_verify(proof_path, settings_path, vk_path)" + "verifier_verify(proof_path, settings_path, vk_path, selected_columns, commitment_maps)" ] }, { @@ -363,7 +364,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.0" + "version": "3.12.1" }, "orig_nbformat": 4 }, diff --git a/examples/geomean/geomean.ipynb b/examples/geomean/geomean.ipynb index f6ca7f3..b69f082 100644 --- a/examples/geomean/geomean.ipynb +++ b/examples/geomean/geomean.ipynb @@ -2,46 +2,47 @@ "cells": [ { "cell_type": "code", - "execution_count": 2, + "execution_count": 11, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Requirement already satisfied: ezkl==7.0.0 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 1)) (7.0.0)\n", - "Requirement already satisfied: torch in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 2)) (2.1.1)\n", - "Requirement already satisfied: requests in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 3)) (2.31.0)\n", - "Requirement already satisfied: scipy in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 4)) (1.11.4)\n", - "Requirement already satisfied: numpy in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 5)) (1.26.2)\n", - "Requirement already satisfied: matplotlib in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 6)) (3.8.2)\n", - "Requirement already satisfied: statistics in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 7)) (1.0.3.5)\n", - "Requirement already satisfied: onnx in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 8)) (1.15.0)\n", - "Requirement already satisfied: fsspec in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (2023.10.0)\n", - "Requirement already satisfied: networkx in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.2.1)\n", - "Requirement already satisfied: filelock in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.13.1)\n", - "Requirement already satisfied: sympy in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (1.12)\n", - "Requirement already satisfied: typing-extensions in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (4.8.0)\n", - "Requirement already satisfied: jinja2 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.1.2)\n", - "Requirement already satisfied: idna<4,>=2.5 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.6)\n", - "Requirement already satisfied: charset-normalizer<4,>=2 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.3.2)\n", - "Requirement already satisfied: certifi>=2017.4.17 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->-r ../../requirements.txt (line 3)) (2023.11.17)\n", - "Requirement already satisfied: urllib3<3,>=1.21.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->-r ../../requirements.txt (line 3)) (2.1.0)\n", - "Requirement already satisfied: contourpy>=1.0.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.2.0)\n", - "Requirement already satisfied: cycler>=0.10 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (0.12.1)\n", - "Requirement already satisfied: kiwisolver>=1.3.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.4.5)\n", - "Requirement already satisfied: packaging>=20.0 in /Users/jernkun/Library/Python/3.10/lib/python/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (23.2)\n", - "Requirement already satisfied: fonttools>=4.22.0 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (4.45.1)\n", - "Requirement already satisfied: pyparsing>=2.3.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (3.1.1)\n", - "Requirement already satisfied: pillow>=8 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (10.1.0)\n", - "Requirement already satisfied: python-dateutil>=2.7 in /Users/jernkun/Library/Python/3.10/lib/python/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (2.8.2)\n", - "Requirement already satisfied: docutils>=0.3 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from statistics->-r ../../requirements.txt (line 7)) (0.20.1)\n", - "Requirement already satisfied: protobuf>=3.20.2 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from onnx->-r ../../requirements.txt (line 8)) (4.25.1)\n", - "Requirement already satisfied: six>=1.5 in /Users/jernkun/Library/Python/3.10/lib/python/site-packages (from python-dateutil>=2.7->matplotlib->-r ../../requirements.txt (line 6)) (1.16.0)\n", - "Requirement already satisfied: MarkupSafe>=2.0 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from jinja2->torch->-r ../../requirements.txt (line 2)) (2.1.3)\n", - "Requirement already satisfied: mpmath>=0.19 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from sympy->torch->-r ../../requirements.txt (line 2)) (1.3.0)\n", - "\u001b[33mWARNING: You are using pip version 21.2.3; however, version 23.3.2 is available.\n", - "You should consider upgrading via the '/usr/local/bin/python3 -m pip install --upgrade pip' command.\u001b[0m\n", + "Requirement already satisfied: ezkl==7.0.0 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 1)) (7.0.0)\n", + "Requirement already satisfied: torch in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 2)) (2.2.0)\n", + "Requirement already satisfied: requests in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 3)) (2.31.0)\n", + "Requirement already satisfied: scipy in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 4)) (1.12.0)\n", + "Requirement already satisfied: numpy in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 5)) (1.26.3)\n", + "Requirement already satisfied: matplotlib in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 6)) (3.8.2)\n", + "Requirement already satisfied: statistics in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 7)) (1.0.3.5)\n", + "Requirement already satisfied: onnx in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 8)) (1.15.0)\n", + "Requirement already satisfied: filelock in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.13.1)\n", + "Requirement already satisfied: typing-extensions>=4.8.0 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (4.9.0)\n", + "Requirement already satisfied: sympy in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (1.12)\n", + "Requirement already satisfied: networkx in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.2.1)\n", + "Requirement already satisfied: jinja2 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.1.3)\n", + "Requirement already satisfied: fsspec in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (2023.12.2)\n", + "Requirement already satisfied: charset-normalizer<4,>=2 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.3.2)\n", + "Requirement already satisfied: idna<4,>=2.5 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.6)\n", + "Requirement already satisfied: urllib3<3,>=1.21.1 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from requests->-r ../../requirements.txt (line 3)) (2.2.0)\n", + "Requirement already satisfied: certifi>=2017.4.17 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from requests->-r ../../requirements.txt (line 3)) (2024.2.2)\n", + "Requirement already satisfied: contourpy>=1.0.1 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.2.0)\n", + "Requirement already satisfied: cycler>=0.10 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (0.12.1)\n", + "Requirement already satisfied: fonttools>=4.22.0 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (4.47.2)\n", + "Requirement already satisfied: kiwisolver>=1.3.1 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.4.5)\n", + "Requirement already satisfied: packaging>=20.0 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (23.2)\n", + "Requirement already satisfied: pillow>=8 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (10.2.0)\n", + "Requirement already satisfied: pyparsing>=2.3.1 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (3.1.1)\n", + "Requirement already satisfied: python-dateutil>=2.7 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (2.8.2)\n", + "Requirement already satisfied: docutils>=0.3 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from statistics->-r ../../requirements.txt (line 7)) (0.20.1)\n", + "Requirement already satisfied: protobuf>=3.20.2 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from onnx->-r ../../requirements.txt (line 8)) (4.25.2)\n", + "Requirement already satisfied: six>=1.5 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from python-dateutil>=2.7->matplotlib->-r ../../requirements.txt (line 6)) (1.16.0)\n", + "Requirement already satisfied: MarkupSafe>=2.0 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from jinja2->torch->-r ../../requirements.txt (line 2)) (2.1.4)\n", + "Requirement already satisfied: mpmath>=0.19 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from sympy->torch->-r ../../requirements.txt (line 2)) (1.3.0)\n", + "\n", + "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m23.2.1\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m24.0\u001b[0m\n", + "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n", "Note: you may need to restart the kernel to use updated packages.\n" ] } @@ -52,7 +53,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 12, "metadata": {}, "outputs": [], "source": [ @@ -71,7 +72,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 13, "metadata": {}, "outputs": [], "source": [ @@ -86,7 +87,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 14, "metadata": {}, "outputs": [], "source": [ @@ -119,7 +120,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 15, "metadata": {}, "outputs": [], "source": [ @@ -140,14 +141,25 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 32, + "metadata": {}, + "outputs": [], + "source": [ + "scales = [8]\n", + "selected_columns = ['col_name']\n", + "commitment_maps = get_data_commitment_maps(data_path, scales)" + ] + }, + { + "cell_type": "code", + "execution_count": 33, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ - "/var/folders/89/y9dw12v976ngdmqz4l7wbsnr0000gn/T/ipykernel_2484/1337869238.py:8: TracerWarning: torch.tensor results are registered as constants in the trace. You can safely ignore this warning if you use this function to create tensors out of constant variables that would be the same every time you call this function. In any other case, this might cause the trace to be incorrect.\n", + "/var/folders/89/y9dw12v976ngdmqz4l7wbsnr0000gn/T/ipykernel_86541/1155542345.py:8: TracerWarning: torch.tensor results are registered as constants in the trace. You can safely ignore this warning if you use this function to create tensors out of constant variables that would be the same every time you call this function. In any other case, this might cause the trace to be incorrect.\n", " return (torch.abs((torch.log(self.w)*X.size()[1])-torch.sum(torch.log(X)))<=X.size()[1]*torch.log(torch.tensor(1.01)), self.w)\n" ] } @@ -163,12 +175,12 @@ " return (torch.abs((torch.log(self.w)*X.size()[1])-torch.sum(torch.log(X)))<=X.size()[1]*torch.log(torch.tensor(1.01)), self.w)\n", "\n", "\n", - "verifier_define_calculation(dummy_data_path, ['col_name'],sel_dummy_data_path,verifier_model, verifier_model_path)" + "verifier_define_calculation(dummy_data_path, selected_columns,sel_dummy_data_path,verifier_model, verifier_model_path)" ] }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 34, "metadata": {}, "outputs": [ { @@ -177,15 +189,15 @@ "text": [ "Theory output: tensor(47.6981)\n", "==== Generate & Calibrate Setting ====\n", - "scale: default\n", - "setting: {\"run_args\":{\"tolerance\":{\"val\":0.0,\"scale\":1.0},\"input_scale\":8,\"param_scale\":9,\"scale_rebase_multiplier\":10,\"lookup_range\":[-3042,45056],\"logrows\":16,\"num_inner_cols\":2,\"variables\":[[\"batch_size\",1]],\"input_visibility\":{\"Hashed\":{\"hash_is_public\":true,\"outlets\":[]}},\"output_visibility\":\"Public\",\"param_visibility\":\"Private\"},\"num_rows\":14432,\"total_assignments\":911,\"total_const_size\":5,\"model_instance_shapes\":[[1],[1]],\"model_output_scales\":[0,9],\"model_input_scales\":[8],\"module_sizes\":{\"kzg\":[],\"poseidon\":[14432,[1]],\"elgamal\":[0,[0]]},\"required_lookups\":[\"Abs\",{\"Ln\":{\"scale\":256.0}},{\"GreaterThan\":{\"a\":0.0}}],\"check_mode\":\"UNSAFE\",\"version\":\"7.0.0\",\"num_blinding_factors\":null}\n" + "scale: [8]\n", + "setting: {\"run_args\":{\"tolerance\":{\"val\":0.0,\"scale\":1.0},\"input_scale\":8,\"param_scale\":8,\"scale_rebase_multiplier\":10,\"lookup_range\":[-1522,45056],\"logrows\":16,\"num_inner_cols\":2,\"variables\":[[\"batch_size\",1]],\"input_visibility\":{\"Hashed\":{\"hash_is_public\":true,\"outlets\":[]}},\"output_visibility\":\"Public\",\"param_visibility\":\"Private\"},\"num_rows\":14432,\"total_assignments\":910,\"total_const_size\":4,\"model_instance_shapes\":[[1],[1]],\"model_output_scales\":[0,8],\"model_input_scales\":[8],\"module_sizes\":{\"kzg\":[],\"poseidon\":[14432,[1]],\"elgamal\":[0,[0]]},\"required_lookups\":[\"Abs\",{\"Ln\":{\"scale\":256.0}},{\"GreaterThan\":{\"a\":0.0}}],\"check_mode\":\"UNSAFE\",\"version\":\"7.0.0\",\"num_blinding_factors\":null}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "/var/folders/89/y9dw12v976ngdmqz4l7wbsnr0000gn/T/ipykernel_2484/2234710793.py:10: TracerWarning: torch.tensor results are registered as constants in the trace. You can safely ignore this warning if you use this function to create tensors out of constant variables that would be the same every time you call this function. In any other case, this might cause the trace to be incorrect.\n", + "/var/folders/89/y9dw12v976ngdmqz4l7wbsnr0000gn/T/ipykernel_86541/669315669.py:10: TracerWarning: torch.tensor results are registered as constants in the trace. You can safely ignore this warning if you use this function to create tensors out of constant variables that would be the same every time you call this function. In any other case, this might cause the trace to be incorrect.\n", " return (torch.abs((torch.log(self.w)*X.size()[1])-torch.sum(torch.log(X)))<=X.size()[1]*torch.log(torch.tensor(1.01)), self.w)\n" ] } @@ -204,12 +216,12 @@ "\n", "\n", "\n", - "prover_gen_settings(data_path,['col_name'], sel_data_path, prover_model,prover_model_path, 'default', \"resources\", settings_path)" + "prover_gen_settings(data_path, selected_columns, sel_data_path, prover_model,prover_model_path, scales, \"resources\", settings_path)" ] }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 35, "metadata": {}, "outputs": [ { @@ -217,8 +229,7 @@ "output_type": "stream", "text": [ "spawning module 0\n", - "spawning module 2\n", - "spawning module 0\n" + "spawning module 2\n" ] }, { @@ -232,6 +243,7 @@ "name": "stderr", "output_type": "stream", "text": [ + "spawning module 0\n", "spawning module 2\n" ] }, @@ -239,14 +251,12 @@ "name": "stdout", "output_type": "stream", "text": [ - "Time setup: 7.222949981689453 seconds\n", + "Time setup: 6.883466958999634 seconds\n", "=======================================\n", "Theory output: tensor(47.6981)\n", - "!@# compiled_model exists? True\n", - "!@# compiled_model exists? True\n", "==== Generating Witness ====\n", "witness boolean: 1.0\n", - "witness result 1 : 47.697265625\n", + "witness result 1 : 47.69921875\n", "==== Generating Proof ====\n" ] }, @@ -262,15 +272,15 @@ "name": "stdout", "output_type": "stream", "text": [ - "proof: {'instances': [[[12773529019820117503, 7223165032241168505, 6388811546753741567, 1325363978837834469], [12436184717236109307, 3962172157175319849, 7381016538464732718, 1011752739694698287], [2305703999912675162, 13621332081612358697, 8265086842419367025, 2630935785179709972]]], 'proof': '2c8466c144c66c0654dcc77df8c71b41b1708171fb60c9d38b49c598ec7f5e131543d8eb178b034158e1523f4e6bade90e8aeec5518ba7b9fc82be37e363f97c19ab1203afa2fedf2cb53d6e337eee77f0f2755125a1e7135386041070a6366215b176ebd946f16c49f4c011716b50f3382c94df5298db2a1ab3adf55315abc21d95491dca429c7a07fe4d0a1f04dfd3d50e32aeca2297401849e9ba711590f612afebbfbdf429f36b5ca765ae5187be766be8c43f80045c046e2efde9a402d6118b2ae8028cd9f8f379b94228b291a97a33a7096f20bffa38abe5b142d6c95e0c1a7f6c755233da2711fb65ff44b86985a5e76f78a454dbc6021f02bb23812722441af3743db1ad43aa22a375ac73e7e7c1fbd4f612ef7c2df041a0575cea46160c6abbd3604c161df529c1f229ec90ecd9adb8b13a94d3c85d1024262fee471f48371bc36078875b1ea3bbb426af3c9b725609c02afcd36f04c792687904fa2d4f7c10853b84f8572178c62ae12cb3bdd9719c7afe47b2696d2cac2116def72236b3a8b7aa89e9c6d6abbbb22b7a1de87cdc03777aaafb776253e8649116f626be954db5dce25c8606eabc1f30b87b31c9b8d9caa56d70c80adb218c0a8c081adc78107f816909a417661b03a3ca08fc46519756478af887fc1d2790ddbadd060fb42f96e5715bafa22894338c8e25f3ea690cfca64ae95733071f5d5f5d1506c0ca616f52c03662acbfc583d0ae739498d1c48830fa92c5b64c84253e40960318a4f65eba00b30c5039371cd546609b2ecf5ff6cb1728e41079c0e1658bb023c097d2309340a1a502d314ef57e1878bc2cbdddbb7ce0825dbde9e377e6cf12a7b56f02e4a272147430f7b9109890e1cc70a863482f29c8f0f3c651f2f809a10923fc17f250f67ea7d803fbab9e04874f72097b6846c22a3c3f63e8991af6e29fc13f6d413264d51b687e311ca85a42d45c84aa11ae401a823f20ff9c6ec411a07a0fa7f58f59985a5ea45dbe970d357e2a5ec34db84e4d59f55aa1880e6422f885151097b9800eb3fe314a24e45eb29930afd9bd4a647f06e479bc579574e107496ae0322e005f8d92f54b95a981dfe3d5d8207775b38a13b078b1835bfef2b9f1472e88a750542fe8868b606f9a5ceb7ae6ad3a5da815a7b84832bf228a503476f0d6ee1903a84eb34a2bc8389ffabd6ff82ad57f682413eeb083ef6b90929ca9ad65f09f0b99386672663b89b81651210b6bf5ea03db5019305464ca5b410923fc17f250f67ea7d803fbab9e04874f72097b6846c22a3c3f63e8991af6e29fc13f6d413264d51b687e311ca85a42d45c84aa11ae401a823f20ff9c6ec410c350fd4f8c251f48cbbc376eef06964b660ceb2d9a71493a297f27cd81370ce2cd740206fdc620a113c4c7029720bc7feac7acbbb64134a0ede0fe167d0820c1b90311325c345ad56feefe7cec04b2fb91aa92dab763c4c57de076d5c9fa58f2fa3c17d79133a8b5e6eee1caa3057d28438ab13b074b5f3e3e6e5a9e58e56392b131c093590413a1c95ecc400d550bc368f39291f8f8a2386570eebc5f027eb16b32b852dae90b1ad032309a195fbb1b4263f7111ce0e92346cd8c592972d8c23f40c5550feaa255eedf2496aed4e8fc255303138611d2bd3c7faefe880aa642f183d07bd861aca48276858d75fab01e4fc3fdd90b38eb61d7565337c25932e2dcadb5b8ddb82d090f2a034e40b9a59adf7173767511f43a4a7d0b2e90d46e714474a0ae4b201cbfe1428cb808c677076b8a5a70c44a8a8cd0ba1017c01275c2c728d0e2be568e4763e1e5f7f55612743f31da54fad3e09a25a5f52a756b6f516dadff622018b0801203703894978518cbfc51f50c4c6a2e09c911b445902370dc319f7dc34bea170326c80c53bf1ab1938568545b98d1dde2ec3873257963905526a0b446005d9b80cf190c7d3655c7e1f4da6e791456e08da63a19b75165b21581ad4c6e3fabb253aeed6a44399768ad86cbf0e190a16781ce8ce04ef411d1f72da752f89291c987aa919b50c7a8d7b22469142203406d64382b46eebe2160f31427555295384c36cfb4b97f5dffc42de8f8909bcaeaee3d9687c764b29a11df71675d8cdf45e1494bbaf8cf22baa8ff2c75f5738d67ca76787656220d8680ee032a40e919b90379a6806aa36dee7711cf0ae4c578256e8a91ac8f59ec19c0cc9c2c2301a48c6753b2c55eb4d4d8ba538fc6232ea7dc8e00ecac72b6e375910af024e5ee3a72425d366f54a68dd79ad3022bcfbd90f0965313ed52f1219c82bfafb8a8c1a7f8923629eb35402bd0c9542a49a36b2257243a37a6542da5ade2aa60d70c8d2f5cee8783c0607621139bf3a0b95db83985dfefce9a7a8d444352f94c66698bd0eb396a01832f049bccd97ec17405ecfaeda9ce054ac4f004e95125ce6554d56a0187990979455697cdc8ff89f4267bbba43e9c3da25a4c0b8b5110c4000908fe0e11c8c97a583be8f601f889c6db629db00b08f8629590d7608115f9893226d85ba28d656fe4e5ede1a0ec0de70b049a6e08e3c0b67a58809602f1b184905a5f95dce3137369ec39b84824c22fdb192851ffe4e58b32f6a35f8288b1ced76c4a24186cff39503e47c47cb76a36d63eb98b3201d3238338c15a62c6ba8f7b66073154e3e4bd23077a37c79d91edefeecf0f0e1f96e9611ceabd40167614d27cca326df10564a1ed663fee78e17725d102927ed4087bdfe0a7aad20640dbda4f30e74bed6ba0d8f8fe27f283093d92c7914bfed772893004dff0a1ab52d01113c1b4305bb246d7dbf026317fc51e188bfa651253991262495d52f2c22469639139f89e12bd646c05cd0eed791b2a7f859c3e1bd4a7a0d2a01450f2a9fcd2b57b6cbfcedeab89974886bd5400c479aff374796df14395cbdd8a4fb0e41994bed5faeb1f6f7f76638319cfd8e2080e6969bf96c99bf062c2322412516668bb17b4a5dd9f42a3134cfefd8f901f2b26a8a6bc331b0dc84cf7837470a04c5c1c3b01cb4fc6c637cf40c7b237d70e2a558563412b290b09af1e704f42628bfcbea3e5cc0068641eabd777f5be00c6868c752170a9b3ebdc7067d9abddb0fcddff474be5d54a1982c0d73419f926297308a5dfb26123afb36fb89dd669f185de49879cc9f86f94af0e16eb0edb3e47cc0e4c911ef5ba01115d1d10eb63a2f74a464f9500548edbd6e7be88da84bd14d6f0270a85f490f143a4196d1b0d916f5530cef21864a5f5ea163a7e4b890e2632efd6a872049e3f3d52c26233991186e94c0f2aa4bab7012bea90738af1e63691e0cafe8ab8a487c839674a22c08172b5b0399536334edb1e08b2d8a2f8faa10f0bd9b59c41c441081db94a709e40aff8d6ddc777fd7a83dd3690ff3406fc6672771192a18e4db358b40d183cb9f159b48953f6b04be57528b5775f18b18af1f4b5a09bceb103fd23f7f9d62127b0aa70103836439f19a8aaf3508eb0a90ec744da62ff0dea552ca8cbb7bb4e0a02be545ba7bbc63edfdf68ad0efd5e823a807ec00f64b1cb0675f39ad96494f7f24d414812a441f4aef5400a1bed78db05c7c542283b34771ea8e745c2d1916fa0e829e6c5839d936ab8d7147c689afaa9b9365d4d54b3dc51e3b0f096e7dfd09188bfbf8ed08ab567c70fbb7ce064493d8fb3d3c3500ce7e8537803b53eb2e9620b490795097fad9998ace2928c1a4d80727a52404af3c01827c0677671be4f206baaede41359101bdd0e32f1ceec121b661e594da4b86196f48bf15c3d0635b000000000000000000000000000000000000000000000000000000000000000010e75af4a37e3bbdf828f0cdaf9944642f6db715e6d0f381ec2d6387f5867f3410e75af4a37e3bbdf828f0cdaf9944642f6db715e6d0f381ec2d6387f5867f340dc76bde05fcb984440188455c7fa227858cf5c95c44b309eb00542905ac64c000000000000000000000000000000000000000000000000000000000000000000972ea3a1a3ec85e6861ce0e2bb0c1ee2ccca845a0cb725bccd4a0ff1a952cc4008146d4595c6c3c0039def54fc178bc36e860daf23dc365d609d1427cb80cf612745ec860575316a1d6b37d79ce8506f6013c0fc2d7094c99123546dfccadfb22b678d89c602f108a0cf3721566bd9ffc18ab125ac3934e4b3c9623c41e790a089b18388678b93beefefd08dfa4869df52a722caa2f2d25e83edf3539d8a414000000000000000000000000000000000000000000000000000000000000000002b93070f71812c0fb5392f6b2d676ba7655606ac6520bd5ea9dba1b56eb9dd3197fd216d8a64847fe9f78fc45d56e5efc24bbcf5f3de686aaa61a896dd1024903b1a638df5f4190fcaa728992b4ec93688943e4a555b6f4433ca98ce4decb1b14e302edf7b3fa0e6f0ec67c2a97adb5a384fe7b4fcc8a0bcb0b467e6b4b2f4622ffa02193719ad6c141b3db881527b3b27ae807ee3c5307875e68aa2127725616c13ee9f5e25fc73100017fc4eeecc052be20f2fcf04a3552003c3258f00ec7275b30697f2fd78663d9424b2e04016e2e83744db420c2a668c02d8d40b79f6904d710b2004c1e889ca81885abeb7300dd7d92bb54a72c390ae47bd6b98a756111464d950515671beedc94e315d2786083548e46738e06729b651894d05f82bd018f250d50c884b917a8b7f1b710b4a0521172c679b77e0d9eebb79e10042dc6080f47aa5ee966cd8c28383aa4ee1884dec0fd72eab2de6c3539a587f4bf3b3509e4e048db796b631f2805d0bb496bce5d39d4d2664b421cd79ff8e703c880dd1c866e232b35b6dba429d11a5eb860f2536645fe503b1b48e236a7ad28e9f14501ab343232e49d23e7de87c289d0f8e849b454aed603515ed7770c3730d9cbc0146e4d547c08f582ceac093862d6817afcae9089b4a17ca435ebc2c1136e9e701a9cdf3eee4392c6468a9e1afa0c88d51a5cfa47841f84a04268f4cc627b658c1cd9fce23090002fda438bfe32ec5bb5d3418af11c6408c9059fb391baee97ea2a104af2db6c6df62b78547c541fe9956d47289931689eec7dd3562362f3de580aa6afb4959635eb1f592595373c986b0e5fca05c1967acf3ca368dc825013b00065f60b3b45b7bf7e4a295a4ba9c45a0801864ba00d8a69c3cfe82fb83bd2dd12b1af4945b536a5170363c2c9a0e899180018d2a788b513d47dd05e9c36a463253de5602be3a3f7ab2f897446b3a866751c1dea46fed3458f5b7ff28d9f085a2f5adbff11b1fe77fd9110c185b0d1d99ef893f6d79331d046f26248ae4440d30f099fb67c6f04fac7227e29ccd2b87edb28998c6aa6b54fe278ce17c45df18a2fb470ba6778227e5deebf6a0201bdbda298eb6230334f4361bfe6bce6d416ae1069aeadaf9e58ad072f171e5589cb48e5987c86afd6d6d4610bb89e39d0ccda29989d49414cfe9ef7893e652bb2068e6092033ac2455d1f9c630d0d6a66d9452c25a758413b42c837f3390fb07bf1d68d6b59bc2b8f039426902b56be1d457b10c9f0b9658fb2647486b959eb1cc49708d8f1bc948b2f3a48964a058ab7f0d127c2ccddfcb1efce40652db4dea57572ba4325f8f0b6fa0f111e9a32e1a45d4d0fe80c634cac7acb1a51fe193365a7a61297990b67032cd9468a9b87cbf86ee01c46727fb70cda12a8f43e6b1f9ec14a940362c18ac6e108c1d89a7060f4469d00375987e21d848ee31b831d0b028fef2132071f8374f186929f6c3d1774f50521e1424c455caf1e0b709b5e02fdb05c2702a0b87d0699f8590e500d76cf58fc035a8e2e0397cfd4403f1321da4c0ac7260a2bbc199296735e6b826e15a5535f05bb2db77ab3fdc74eee8787c3dafccaadfaa3db41abdc05463556194038dcf705288f09f4bc0d63e5df10138ad78eb02439233227815912797bdfd4265c705104829edc14429eb6b9230688c40f03ce017992d52c64718d0f34e6121363ffe11129f0e6a103ba01a8475af7a06497ba5db8804baee51a197bd3c50fde1838322044a2c0e86d74e4420032acbea0963bfb82aed1851c15725cf44dc79ccd391b10c9f0b9658fb2647486b959eb1cc49708d8f1bc948b2f3a48964a058ab7f0d11e7ff4bef25d5696f2058cbc00f47c139b06d59e6899a9b6bd54cb6b44a177be20aa158cccc084c76dabe9cbc3bd353e8820a25523d5df4a8da896caa05c7efa27e7da2346ddaa3ee004086592fb1b80710f92f93f40e7cdb4d236e5c5e590de042cf356294de9e8c189aef63e2400e8ac0f5e6770f09c13113639bd55ddc6f1', 'transcript_type': 'EVM'}\n", - "Time gen prf: 9.943438053131104 seconds\n" + "proof: {'instances': [[[12773529019820117503, 7223165032241168505, 6388811546753741567, 1325363978837834469], [12436184717236109307, 3962172157175319849, 7381016538464732718, 1011752739694698287], [14148586052410868650, 7343294927740416096, 1182455714804702497, 77845129035718797]]], 'proof': '27e87fc59b2f21def4950779279a643e4c30c4e2c29c3993d50fbf3ee17543e7156a2007a694a3bc1edc3134e57ead6f0503c990ac7d9a54c14ed6de017bad5e0ec353843542e2d0500f8395614a0f2f5b11ff7e9787eff0f9322fe5f6a2d0ae0a74af549f97067b6693be6e7060e10bc4a46c26718d82a8b9a090ae784e49a825f730f4dd5f15f373bfff184b6b1ec9e1f5022d7e654b23c0ff444e8ee60618264adca8a484af80f75b39b4075a865d78504e1ef245c31f5685c47adcd3553a20467d46d3fca2ad768d821439ecaae1b23bedf6d5e658cce059d276bc789dd61f5994763ffe4db06d8054530eb94a206e2a963f8069876951a8c2cbf629448e22f5965d130f65c0aa6922c165c9393a927b4218675bb594c442e98e7fe398712f9d755029519d99960cd9f6b905faa41821c47e9db31748627ddd1603cfd715236e5965aa5c6503bfee0a841055fc1d85a737b8d31b19b3758e93bec0a58db8013ea47ac5ef47f451859617182a857dce8a6011f7bd07c7948429f24200eac505495127e15ac611f424c365665dc0f1a424f7ffbd528650b18b8c9168b7ed1024223fe6f08bd240c0272edf15b1cabe2251a1ca6ec3a073df05c5dca9ee180e0fa72ac4498c9d25d6c47b53c488a6d99689dc868665509a33d0ce8a4ff240640890301e2df59927e82e634702e26ea8cd423237ee510568e999ff9519a9028e1b8106fd292519963f666cd56985b32108d1d5d18c8f0ffd3c7b26474a9272ec0c6f4819c08dde1aa0914dce4e9b771532dc48610a8ba534d3448f3c3316bcd110923fc17f250f67ea7d803fbab9e04874f72097b6846c22a3c3f63e8991af6e29fc13f6d413264d51b687e311ca85a42d45c84aa11ae401a823f20ff9c6ec4122c720986f0e8a457d7e911ce31821a17a84e189f1214e65fc658afc020e2606044e8554fd5dad102a724a6e015ae6f1e0e2168fce619290b5754c6e8c9fb3932b1b2db222fe7afe2c0c9de9ef0aa7eff6705f4e0dc8f7c0f271127834ea49fa2aaf6564d92fe931a4bb88379c256c8a392b3e2869583b840677bba0388d2f0c266ce06c1fb8e1947baece02497317a849561976deae07c12b5bde47574c974505a2c06ff719600474ce38b47e171cad8970f41909cc57033b1c3ed929f27be910923fc17f250f67ea7d803fbab9e04874f72097b6846c22a3c3f63e8991af6e29fc13f6d413264d51b687e311ca85a42d45c84aa11ae401a823f20ff9c6ec410f0df20d8bce531f1953d24d0673d55d5abd02add076346475c163bfab4759ac24c0b8485714b1e9ca1f0e2a934e6dfa097b5125ed781c99aeb137655e4d66922bc860c21e7335fe0a2d565d97b0362a44a58328fbb91e14a683c731814593ba27f61fa42c600b211eaaa3e7517d91d5984cc82f25e12b8916c28b497f8fd6242749dac1e7b68e9355a20c5b5088c8f11a9d30dde54826f45de6f7e54cf4041523a6a1b37ad3249c187aeab8fa7c174f72d3b8b5ed888fa4c746c6733eeffb551a1d6f650e9853b923bc82ba08777dc58c6bc26e6a3f059849671c78a3c1f89118ea3969e48ba87643aa7c34615a4c4e6532851950dcbd116e2b17f7e767bdd6099f86cfebed32c723c325c52376b97015e3f2afd4d246365aa6f22973e0f2d81b4bbb39b85a3d314ef6954ce9348408e9c73cde34c06c93c8e04a3f5cb24880159be2c67eb952c0cba3f7dbeefa6cc05e35be68482e26d87e7f05d9471a1e5b08bca33071c95d9d8f70f5c02e3229b2d215b701f064477e247faa9a4cb63c0a13a831f80509010bcd18fd6bf023b45a2ac00ce36260dcf1ae204672a5cae4fc19d7507348e0febcb24f906e6a008b5bfccdf9c436ae9d3b751fab92e53d68f40446845207cba337e4a568e4398a5910299bdfe356db3b5935ed1e22aba021181d9ac1a38e06d8f3658d88369783f44d20d8f3b7e8ccd36034cf3095cb8500522cacf924581337564b760c03815384fb34bf7c0f13d0ffdb272cc4e9483d6092100b53729f5ab65fc981e9079ed4309ec99ea6a01c9d3bf389c9735f56caa94c2bae2479ae54411a33b7dbd2639400d9428f7472d3de0d85f4347fcbce4b16ba192d5b781a030557735d4e4fbfe7c99dabae41365ab10d5fe4da089067ea6f2100c177df33f89c4fed13b8b5efb0f0c6afdf7ea0a9a8e8537d306571f549106710c47771e6912dc982b71c351caea3709120560223a269d896d642b5b9fddb122ab8dfb6f004ddcae61e0488cff8cbeceeeaa9ee3a416f7c6e155d5d2e37e37c289182cfdb7ff20bfca2bdc6a9254fc21e3a70fc2a4fb1bce81706f301981eee2444b9955fc7c3fc20788aa75954fc46838598ad308f3748da02cfb398820c4b1d89f55633063e4ed236b1652c71f79ec98df73f4f6f758325cd8a6bd2fccb6a1cf525303be1fb6c55fe0dca285f664aeb560cf23ec3c09c0e342d98663e108e156a872529a88ee03e789d4e5e7ae591b6a5145ce7e1532b8c167ebdc2e0db421c47ec827c1a83f25c47908d8c93779ca5037131a5f1d93b81517980cb93816109e805c4c3c15226ccc991cf344813a05be1c7a63fcb3b1f5e2e716ad45388ff072097823c65dd7347e382d9d096343c05277cff2b61e69953937959f5b1ef731b54eb5614c8ec443c5da6611bedfad096b7c44b9838cdea4277bf39322be9e72e9d3539e0044c637270645f2b0b956a6962708843ea4d3b75acf3f611157d6d0cff56a10d27a50c44e036c34f3a8949bcba89dc9e2dd3340b2ea29fa91a28bc2431b69a49f7721a10eeeeb5ec32046f9248a16e7d0c583ed0a7814dfedd427c2a13382ba122ee73c4df328ec64a4bddaa2a36071136a848046f1359ef7fc64f0e5928864185f0789f2390080fa6c36bd3e3aa94e8953cd041a342cc522859b61d7d650288b621b6d74d1f3b0340c219e214ac64a0441d669d635cf516ffd5c92cfe81c5376e5266b7416be64bbb322456baa347c1215f34036c0aa96db0d18f12f11e625c7cb4f76d49ee19ca840bace8a9546755553fe225ec452cccebef5811b6efa9486d889a5367bf72a6ba8c89a8c71e8e9e846f30e67502e537d02135175e3afb19b794c6576cc83b5b60c8fdab11139cadaa25321b5ded3c07df5d6b28c8457eb52c38484922410ae811d582900b880fdaa256943d30318721a1086d09f1c16c72e54c92e3725fd4bb06766cb8dfdbd47540a5f4cd8a0f1284815f250d64b5c448cabcae0fb53629ec256a71b1edcea171f843a9b20ea7e067eaf7870a938b59f67d6a9cae7664b0ed2a79f57a5969736ad3b4dd18afe5f04c70ef562e667a38b9cef38c9f9a2e388a43780525e61f8c66c328b0ff2c17564b39d4c325889a00595495628cd90b327264b43fcbe2684c68e1603374c664d75f636f6312d0162b4a7c767b5514d01c6e2497cb83e550bcb2fc2ae108af4bd1556611962dc01cd40b97a55e6e0d1278e6b97db798a65fb256473cc3779ce85a37ecafae1b00915ba738211d0604967b1ed6934d9106b183bb2ff4def4075d4302f4c6b72f39c7b565581f35441a7ca599da82b92cf35ac19f6d53eaa9852c9c7f7bc9d91777f7f2f702a62d1fad620b0308b3e37e07d5054a87034a7d7bde78f0c0890611363610adb687f3f78bc2c03f1180a140933f36279c6aadb3565d6500059aa20812777e456c8b2e4e8dbd7e65cf8293590cc18aed319fccbf39f64dbad8128c00000000000000000000000000000000000000000000000000000000000000000451151f194bd63774e0cd3496a3f7642f12496f91b79ace0a0a887b0479444d006b5c2ee4a80b0bd8865094c62cfab9acd6858ef7ed8aee3b1bfea290d20bd1006b5c2ee4a80b0bd8865094c62cfab9acd6858ef7ed8aee3b1bfea290d20bd10000000000000000000000000000000000000000000000000000000000000000158295e0c23f1dd9506e7f161a8810dcc2246e570504f4eb01d0f98f8a11e879041b46146517d6c77c4b643d63e49c49d6c17a431ee5dc584ab724a07efeac5c22663036223c9c5e63a74d844137c62044b051ccdc1943fa12bd7a08e513a71c08f271453ae00d983390d9c6c680abbe6eba1580520ab71ee0b54d537f5f1dc5000000000000000000000000000000000000000000000000000000000000000005acf9b12224b6f6dbc1c47efbdbce52bbf4b10c07fa4f8c4b2e76ace1a94c912005bfb61fb1e7c4d84c459864b0d61ae8cb9335183368228b52373c9d8c82c527d47cb111f307ac336cf0bac2247412e85f7b8edaadabcf8505802b4dd8f8e717be31a77f27a00a636de9adadeccd301665341b2afee5e975b2ede935e957be26d6e815cee9fa8d722c9b6a04905603adae6e0e66c514e90d1a9b59863ff7dd0088a3dd965ab4701cd673f0333fc402691c3fa8cd21483d34467e5dac05577b16d07ce2b9a181cdb6b669d18bc697c165af6c34b7b8a9e55ba9a16636135a1207731d6a3ff8a94acd3437a5e21c2819a3ff3e1fae5849dd4d66963c89fc5a1c2a06d905ee92e6ba4ba18fa59ee379933954fda3911a838f4bbe685a66f9380105a2a9f74255f9b25d1b3295d5abafe3958fb23a4eda4d458471348cb83696c22c9ba2b154de2c2eed82d757b44a307c86e1ee11a09bbe35a6c5daa0a75f4f75014f91bedda9962c1cd20b15b2ca351d58eb0a492a48b0343a9db701461f3d7d1fe9eb68847ce23b0339610bb0199f937be5e24b28fd801e865706bff02288fe158ec95799229e0976ae5fea05f82207cb905165dfdf5eae780dd69f4b8ff07228d94e6bf78813fcd3b39006c6f2493636c82a787c52eede1e90d51dfb78bab91e7c5fd0ec888eebc4dd6109db8621e3dde8b9c8db4db81492ff9a63ae00f9632d6cf1c731af9bab940878d194eac5ef425681f81837811d3190dcd6c7ed079403d01005f323db77968be00466f3c2ce2ddd3efb839f5b6575bf3cc1c84501e709df16d93fbd6715fea1d97df4d5a8bcd24e80f0b4b6826e66ef5aa4662087d106478561f17f312f4ac699614dfadf7df6bb1f83a041c910f532f29062d2190b0617cca00e3b50d0e367d17186b48fafb00b74f4876236acfb5b286a07a5e0ee0cddb840fbef28fc970750d6f800af7f84887d37ff1fdf0e03402b63c18954ca040f1475613b3072237ee87eef9a759f8842a1f345b0ccfd4f42827bcdf1e17905731863a70af326c50f05865e7bc63f4cef3426f765e6ceba8e7350c6dfce3b1b14cc7a91e111448b5bfa6d4511f0441125a4c19781cad46d8265ce76558d5a2bb8c91c1079c11c99c7b6e4ace4252203e3ee260bf423166f942abbb8c89409255caf7a9168675543f563ad6576d27db6a914b9dba67b763c653ec248bb60a208b1eacee5de7eb1c3db30adb54b554740045279eea68ce63ffab41a3117096d0c2050f1243d0e9c03f8823d63f548b2b06660770ca9aba58435930c760ec7e70ef630e331e30c315f98ccf3da2b9057d53ef530ac7481edfc2afd80cafe81d81b0886b9feaca379574bc72ae56a3340effe7ce46106fcc6f09efc041ac8287e0bc1413436e3fae952442be59ac0cf528f22ff4cd38630b5c50af4367ab391eb07f25c1b35f816bb995297fea0d05c648bf06f9dfb5e03c460f83a92099b628429299926999935f674febe7f3bfdfc9eed72cd438749b38265e3d572f967712617b802ce17381abb6d8605488f643ed3c03241a75aa35701d85edf0270d443a027ec8f35c11c5f70b5392863fab574c9520c8b135e2210f1f5426c93cfb136b52838ca3e31de0df9ab73207c2ed42b487f4b622ae00a686ad5d9afa651ccdff5106a507733f910496bc8843c2b205abe736c830d609416ee168ed44941667a7f1f89a90dbea9bd330c1fb00d09be6132198ac6f411c6e047c04b0c33e78f0f3608b1eacee5de7eb1c3db30adb54b554740045279eea68ce63ffab41a3117096d19739b2f8de7e9121d11752ba1fc9a18b461013fa7dabbed21aac9171c37d3c5100ced227af0948eaaab055d54a11105c8918ef026d08635c091fdc004b046dd1aff5bb2e54a5f8d12c06e00671b9b08215be2dd326ce5ed36d83b5993a76531260a56ccf15acf84b54935b22431407c491947015245b0a07f036eaa7c4528f4250d5b7e9b1925e88a607f169496529694b707d784f2d0cceec7cc95911f976004d397b4b43163b40d865418d16bd67148e00052dfedfbeda2bdc7a5028cd6d203a8d81937f7e9b2919698ae5137435a7ae90326514320d9c8731ec33538862c', 'transcript_type': 'EVM'}\n", + "Time gen prf: 10.143173694610596 seconds\n" ] } ], "source": [ "# Here verifier & prover can concurrently call setup since all params are public to get pk.\n", "# Here write as verifier function to emphasize that verifier must calculate its own vk to be sure\n", - "verifier_setup(verifier_model_path, verifier_compiled_model_path, settings_path,vk_path, pk_path )\n", + "setup(verifier_model_path, verifier_compiled_model_path, settings_path,vk_path, pk_path )\n", "\n", "print(\"=======================================\")\n", "# Prover generates proof\n", @@ -280,24 +290,23 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 36, "metadata": {}, "outputs": [ { - "name": "stdout", - "output_type": "stream", - "text": [ - "num_inputs: 1\n", - "prf instances: [[[12773529019820117503, 7223165032241168505, 6388811546753741567, 1325363978837834469], [12436184717236109307, 3962172157175319849, 7381016538464732718, 1011752739694698287], [2305703999912675162, 13621332081612358697, 8265086842419367025, 2630935785179709972]]]\n", - "proof boolean: 1.0\n", - "proof result 1 : 47.697265625\n", - "verified\n" - ] + "data": { + "text/plain": [ + "47.69921875" + ] + }, + "execution_count": 36, + "metadata": {}, + "output_type": "execute_result" } ], "source": [ "# Verifier verifies\n", - "verifier_verify(proof_path, settings_path, vk_path)" + "verifier_verify(proof_path, settings_path, vk_path, selected_columns, commitment_maps)" ] }, { @@ -331,7 +340,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.0" + "version": "3.11.4" }, "orig_nbformat": 4 }, diff --git a/examples/geomean/geomean_OG.ipynb b/examples/geomean/geomean_OG.ipynb index 05dc7cb..18b7104 100644 --- a/examples/geomean/geomean_OG.ipynb +++ b/examples/geomean/geomean_OG.ipynb @@ -9,39 +9,40 @@ "name": "stdout", "output_type": "stream", "text": [ - "Requirement already satisfied: ezkl==7.0.0 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 1)) (7.0.0)\n", - "Requirement already satisfied: torch in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 2)) (2.1.1)\n", - "Requirement already satisfied: requests in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 3)) (2.31.0)\n", - "Requirement already satisfied: scipy in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 4)) (1.11.4)\n", - "Requirement already satisfied: numpy in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 5)) (1.26.2)\n", - "Requirement already satisfied: matplotlib in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 6)) (3.8.2)\n", - "Requirement already satisfied: statistics in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 7)) (1.0.3.5)\n", - "Requirement already satisfied: onnx in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 8)) (1.15.0)\n", - "Requirement already satisfied: sympy in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (1.12)\n", - "Requirement already satisfied: typing-extensions in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (4.8.0)\n", - "Requirement already satisfied: jinja2 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.1.2)\n", - "Requirement already satisfied: fsspec in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (2023.10.0)\n", - "Requirement already satisfied: networkx in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.2.1)\n", - "Requirement already satisfied: filelock in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.13.1)\n", - "Requirement already satisfied: idna<4,>=2.5 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.6)\n", - "Requirement already satisfied: charset-normalizer<4,>=2 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.3.2)\n", - "Requirement already satisfied: certifi>=2017.4.17 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->-r ../../requirements.txt (line 3)) (2023.11.17)\n", - "Requirement already satisfied: urllib3<3,>=1.21.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->-r ../../requirements.txt (line 3)) (2.1.0)\n", - "Requirement already satisfied: fonttools>=4.22.0 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (4.45.1)\n", - "Requirement already satisfied: cycler>=0.10 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (0.12.1)\n", - "Requirement already satisfied: kiwisolver>=1.3.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.4.5)\n", - "Requirement already satisfied: python-dateutil>=2.7 in /Users/jernkun/Library/Python/3.10/lib/python/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (2.8.2)\n", - "Requirement already satisfied: pyparsing>=2.3.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (3.1.1)\n", - "Requirement already satisfied: packaging>=20.0 in /Users/jernkun/Library/Python/3.10/lib/python/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (23.2)\n", - "Requirement already satisfied: contourpy>=1.0.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.2.0)\n", - "Requirement already satisfied: pillow>=8 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (10.1.0)\n", - "Requirement already satisfied: docutils>=0.3 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from statistics->-r ../../requirements.txt (line 7)) (0.20.1)\n", - "Requirement already satisfied: protobuf>=3.20.2 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from onnx->-r ../../requirements.txt (line 8)) (4.25.1)\n", - "Requirement already satisfied: six>=1.5 in /Users/jernkun/Library/Python/3.10/lib/python/site-packages (from python-dateutil>=2.7->matplotlib->-r ../../requirements.txt (line 6)) (1.16.0)\n", - "Requirement already satisfied: MarkupSafe>=2.0 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from jinja2->torch->-r ../../requirements.txt (line 2)) (2.1.3)\n", - "Requirement already satisfied: mpmath>=0.19 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from sympy->torch->-r ../../requirements.txt (line 2)) (1.3.0)\n", - "\u001b[33mWARNING: You are using pip version 21.2.3; however, version 23.3.2 is available.\n", - "You should consider upgrading via the '/usr/local/bin/python3 -m pip install --upgrade pip' command.\u001b[0m\n", + "Requirement already satisfied: ezkl==7.0.0 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from -r ../../requirements.txt (line 1)) (7.0.0)\n", + "Requirement already satisfied: torch in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from -r ../../requirements.txt (line 2)) (2.2.0)\n", + "Requirement already satisfied: requests in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from -r ../../requirements.txt (line 3)) (2.31.0)\n", + "Requirement already satisfied: scipy in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from -r ../../requirements.txt (line 4)) (1.12.0)\n", + "Requirement already satisfied: numpy in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from -r ../../requirements.txt (line 5)) (1.26.3)\n", + "Requirement already satisfied: matplotlib in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from -r ../../requirements.txt (line 6)) (3.8.2)\n", + "Requirement already satisfied: statistics in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from -r ../../requirements.txt (line 7)) (1.0.3.5)\n", + "Requirement already satisfied: onnx in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from -r ../../requirements.txt (line 8)) (1.15.0)\n", + "Requirement already satisfied: filelock in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.13.1)\n", + "Requirement already satisfied: typing-extensions>=4.8.0 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from torch->-r ../../requirements.txt (line 2)) (4.9.0)\n", + "Requirement already satisfied: sympy in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from torch->-r ../../requirements.txt (line 2)) (1.12)\n", + "Requirement already satisfied: networkx in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.2.1)\n", + "Requirement already satisfied: jinja2 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.1.3)\n", + "Requirement already satisfied: fsspec in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from torch->-r ../../requirements.txt (line 2)) (2023.12.2)\n", + "Requirement already satisfied: charset-normalizer<4,>=2 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.3.2)\n", + "Requirement already satisfied: idna<4,>=2.5 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.6)\n", + "Requirement already satisfied: urllib3<3,>=1.21.1 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from requests->-r ../../requirements.txt (line 3)) (2.2.0)\n", + "Requirement already satisfied: certifi>=2017.4.17 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from requests->-r ../../requirements.txt (line 3)) (2024.2.2)\n", + "Requirement already satisfied: contourpy>=1.0.1 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.2.0)\n", + "Requirement already satisfied: cycler>=0.10 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (0.12.1)\n", + "Requirement already satisfied: fonttools>=4.22.0 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (4.47.2)\n", + "Requirement already satisfied: kiwisolver>=1.3.1 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.4.5)\n", + "Requirement already satisfied: packaging>=20.0 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (23.2)\n", + "Requirement already satisfied: pillow>=8 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (10.2.0)\n", + "Requirement already satisfied: pyparsing>=2.3.1 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (3.1.1)\n", + "Requirement already satisfied: python-dateutil>=2.7 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (2.8.2)\n", + "Requirement already satisfied: docutils>=0.3 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from statistics->-r ../../requirements.txt (line 7)) (0.20.1)\n", + "Requirement already satisfied: protobuf>=3.20.2 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from onnx->-r ../../requirements.txt (line 8)) (4.25.2)\n", + "Requirement already satisfied: six>=1.5 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from python-dateutil>=2.7->matplotlib->-r ../../requirements.txt (line 6)) (1.16.0)\n", + "Requirement already satisfied: MarkupSafe>=2.0 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from jinja2->torch->-r ../../requirements.txt (line 2)) (2.1.4)\n", + "Requirement already satisfied: mpmath>=0.19 in /Users/mhchia/Library/Caches/pypoetry/virtualenvs/zkstats-brXmXluj-py3.12/lib/python3.12/site-packages (from sympy->torch->-r ../../requirements.txt (line 2)) (1.3.0)\n", + "\n", + "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m23.3.1\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m23.3.2\u001b[0m\n", + "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n", "Note: you may need to restart the kernel to use updated packages.\n" ] } @@ -142,12 +143,23 @@ "cell_type": "code", "execution_count": 6, "metadata": {}, + "outputs": [], + "source": [ + "scales = [8]\n", + "selected_columns = ['col_name']\n", + "commitment_maps = get_data_commitment_maps(data_path, scales)" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ - "/var/folders/89/y9dw12v976ngdmqz4l7wbsnr0000gn/T/ipykernel_2544/3753290993.py:8: TracerWarning: torch.tensor results are registered as constants in the trace. You can safely ignore this warning if you use this function to create tensors out of constant variables that would be the same every time you call this function. In any other case, this might cause the trace to be incorrect.\n", + "/var/folders/t3/5psrvr1x0w1_6n9kx2n7d9700000gn/T/ipykernel_38873/3257546855.py:8: TracerWarning: torch.tensor results are registered as constants in the trace. You can safely ignore this warning if you use this function to create tensors out of constant variables that would be the same every time you call this function. In any other case, this might cause the trace to be incorrect.\n", " return (torch.tensor(1), torch.exp(torch.mean(torch.log(X))))\n" ] } @@ -163,12 +175,12 @@ " return (torch.tensor(1), torch.exp(torch.mean(torch.log(X))))\n", "\n", "\n", - "verifier_define_calculation(dummy_data_path, ['col_name'],sel_dummy_data_path,verifier_model, verifier_model_path)" + "verifier_define_calculation(dummy_data_path, selected_columns,sel_dummy_data_path,verifier_model, verifier_model_path)" ] }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 8, "metadata": {}, "outputs": [ { @@ -185,7 +197,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "/var/folders/89/y9dw12v976ngdmqz4l7wbsnr0000gn/T/ipykernel_2544/1886633819.py:12: TracerWarning: torch.tensor results are registered as constants in the trace. You can safely ignore this warning if you use this function to create tensors out of constant variables that would be the same every time you call this function. In any other case, this might cause the trace to be incorrect.\n", + "/var/folders/t3/5psrvr1x0w1_6n9kx2n7d9700000gn/T/ipykernel_38873/4202400027.py:12: TracerWarning: torch.tensor results are registered as constants in the trace. You can safely ignore this warning if you use this function to create tensors out of constant variables that would be the same every time you call this function. In any other case, this might cause the trace to be incorrect.\n", " return (torch.tensor(1), torch.exp(torch.mean(torch.log(X))))\n" ] } @@ -205,7 +217,7 @@ " return (torch.tensor(1), torch.exp(torch.mean(torch.log(X))))\n", "\n", "\n", - "prover_gen_settings(data_path,['col_name'], sel_data_path, prover_model,prover_model_path, [8], \"resources\", settings_path)" + "prover_gen_settings(data_path, selected_columns, sel_data_path, prover_model,prover_model_path, scales, \"resources\", settings_path)" ] }, { @@ -213,6 +225,13 @@ "execution_count": 9, "metadata": {}, "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "==== setting up ezkl ====" + ] + }, { "name": "stderr", "output_type": "stream", @@ -225,7 +244,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "==== setting up ezkl ====\n" + "\n" ] }, { @@ -240,11 +259,9 @@ "name": "stdout", "output_type": "stream", "text": [ - "Time setup: 219.55537796020508 seconds\n", + "Time setup: 245.56888508796692 seconds\n", "=======================================\n", "Theory output: tensor(47.6981)\n", - "!@# compiled_model exists? True\n", - "!@# compiled_model exists? True\n", "==== Generating Witness ====\n", "witness boolean: 1.0\n", "witness result 1 : 92.68629455566406\n", @@ -263,15 +280,15 @@ "name": "stdout", "output_type": "stream", "text": [ - "proof: {'instances': [[[12773529019820117503, 7223165032241168505, 6388811546753741567, 1325363978837834469], [12436184717236109307, 3962172157175319849, 7381016538464732718, 1011752739694698287], [9340507686675262708, 12576478094795452846, 16595392862476743742, 1007129139500821923]]], 'proof': '22df37dac0ac9a5c8f99b34e177d0f83bb847512c7948f08bb6838f1d3d2813823f76704dfe20fd5b52753439a3f031e5f85df8e1eacf08f4bfdefbe01a7fa3b2a0303d3ccf17a6499fa4008ab8749776bfbc1e5d60bad5f67980e80b5690a9e0387e223ebea43741d97104c12f821daa0b63c1c7e4f783117bc8d16ac7579eb08cdbbc4a24a325c90359792c8a6b2cdc24e972c204e0aa1aac14210a386649d0bb19842e11022a538be33391b0b16907190850fe7d7ee4aabeaa0a8899fb39f1113171d155bd30679963c6fdcc2fda33e346c59027538ddb05ee49d93af544a25b98cac646d67bfd83d357f15c6934fc08dc49952e00365b40cff83c991fac52c0905b243126ada9653b49bc01c0aa9b1846b7038af7415d77c8796181ada6102823f7e380b84b3379337e23cec47a3fbe33b9db9b373791ca0822c9e5fa40e1218495cfc6f04b4650cc4f7e1e631b9f090001efcd3409b0cc3c7130b8199070bcf952dbccaae61563ba9b2c77bd0dbc25f42b246e053754e6f1c7fdd43d09b09677c7dc821cde97e2ca60032dab6a62f4f1351732187179a17ce342b65fcbb1a4eab151511b270aaf988a2781eab69d09f549dcb0b3d5353968a6c17e3fee002ca825b6f3ac4714aebb39f9823ed4405cce62db78c1ce7824b01225df13b290f569f418555b9d57d7aec8e265d897ac9fca4794511830a51ccb14f1a7092161a28d5ae05eed7278978da1cb09c40771a01fb1f9f4ee05caf47ed144b6741b1109caecdffaaa1b2feb8f6fc745071071a646bb138bf70df6b62f5d156a5ac492b48cc8e69fc0f8fe9717e257e752709356cfdea1cbf91dfd50c1d237116d6d50070c07ac3d7a8f905937734546dfbab2ef8a2ca339605b14d401e334b34268f2309b9a7326d39387808a3e29f25e523bd537636dc33831e7a3b87a05867edf22ad3e9434992ecb7c7d57abebe05de462c465eb512ac04e4614c58b42300b202097f65d30833c986ded60e888fcce945d75ed84875764a432d33e2636eac5d6d0d06a7bdb3e7224a1889a7fb0532c57bb02bad2a20aed29f5832fc585051511f1fe35885edb13e386afc370a904fb04582a5d8c768a8d720ea5220454a6f26751a187c745fbbf61abdc48a08808dbd2c90400981d0a0f0febb4d50dd2731c9cd2b48cc8e69fc0f8fe9717e257e752709356cfdea1cbf91dfd50c1d237116d6d50070c07ac3d7a8f905937734546dfbab2ef8a2ca339605b14d401e334b34268f25d86afb8ce7eb528de147f322892dc1673222ba94fa4119c61eba6da99fd7d01266f1a37f4d5ac88407d09cd56f1a0157170c51caf7eab3c0fd860c74f79d75063d79fb95e298ec83063ed73339cca06a61971ed3976d92cb362f4c2668b8c32e0b173971ccd152af0abfe555a82bcf7c9c056fd68f4efe9041551bdd2b810d028d287b744ecb1eeb2ec05a4fdeb7dc2dc191d1ae45f4ef65b39f0024e869d12f2f269fa964636da3d7260a9d43a0a4f923567b68998f6d6c914272d1c29ffa0ab9947bffcaa459a97fd1b5cdb3db584bd223b7105e8c819135cf901b38cd6700892408daebd86fd83d8060b17da6c085c4f623214a33cd0cf3961ce3c070cc0dd70b6858d392986b35d7485ac9622de43ef90a7d879e88ea717a6e429401022bf28357de7a1a8445ee9c497762c532daa630623f7bf7e36a74884c493048e01b350384c59aaa7ef823387ec24aee5cbe07b33810916e535c6f166a090057fa1cd8dccd13bd6b6dae1d289bb05a9814e563f6f0ce1ccf86b97723dbcf3e22061dc9ba70058076ee435973a5f08583e746d2d81a79ce1f1cf9e27dd10362594910704766e18dd3d426d7459222b09b3df86cb87d7283e001bb669d3a9245850411845af04f6390c0dc06f52e82f24e9ee17a0b583f6181dc3e00e9f077688639025c3ffa0c49f6aaba68c34ef392f93e00d87b6c8b5bb84cbd6a9a11e78950e322f70fea8769665e4ba23565b26490c1dfed437c2ca5dffdfef3ce8d3bf32b1a080f32e9802703c072d7107079b26d4f4f19292eb836d7a85a011731179f5b3f24ed848b490cf647185941beb98635a3ada4005d9ade47493aec2aae8be5003f26b6bf728a1433a3f34782f65c52215a5095b8b959b804ab728a3a20ec757b60113a0b8bd352af7cdf2ae51856a799625fcbce801e618c4c5e56c594b352d05c11c93377058a3173249ffd05465236dcfac73fea56d023d55cbb0652bf04d6c72c55322befd01c58dc4db678fb842b0ee500e536d0c375fd17925b7863f29ac429908408734000efbabd2f50a3e05970532a2949adccb4f851e68343e1ec81e00f5b447c95b59622269c98ddf012c19f7e0068175ada17dcd07aded8b424a431056f909d2ca888ff31c80c2c6b09408996b2f08be24e710c6f2e9382864d0c1208b878479db48b2185b8886caa4f457025b53a6a0bd31caef9db03ab31c10f8809d1a95e4cdafa757d22e5966bcc1a7da883f84d6374395ef0545164dd4403682755d4a09ea8f39c26e1097cdead146975b774ce0b1b7fe1f09c3b5108e5a5490aed33fc89f993197b98864b5b34d78d01f6253d69da8d2db94f994b8c2b511b2a1a67444d07670ebd069f3a524d0482c305357e8e9ec9b57289869f66e937af2337adbac01c9324e8b20480d6bd97805f8d9ab8c01e825eea1a5b3582ad6bfc20153159d450925650c8e04ea502935650d80864b2d3746d9640d2b741f0b99120c8be2e72741e3f2ad80bc6fb408d972ecd7b0077c04ccc9352787b2d894d3f21eca209802d67845b194d45a0c0ae3a9d8d337c9cad7a217a2c1782ed5e88b92fa79efbe6311d9a54be7d43954e36901b80774f667ba4f8386c052d91d0c35113b6ea37752a17895be20b6036e46ca4d0b2be76d38b067fc3699afe62612e740498ab5dae689ac484c3280173a199f806bc8b80a3011009566ba62fb9d7afac13f9c1ca87e5d1ca134d8dae2be466b14d429fc0a36a003c21f6849a0a0777ac29bca0d31b249dc5ca620ad0465a111e2e963d73abcb3a57a3796b2d22e7ef3c10ed613cd91e65ea29c20057cfb60e33ebf4232e8afa7b247a76604e6bea24aa04f6574b2ff1d6045a739cd2aaf83fb88c36e2f484e892746125f9d9993c74d52401d853274a6f9fa27520e8852274c9652919b11235d58fb0327ff9acdee5a617bbc61cb605a4b0b0ece709410bf73a352fa911f74921cff4d3f9171c95d137258ad4a28c0ead277059111b3921d38c84f8c6dc8dc683f142410562af9afefc1ad395f3acc66542806ac4e9fa5e8246c3e8ad5908e2f62d55231e1a9161d30210f4996d9789a8b95fe6b3030fb09e60e5c20e55e9ffe19e3b9b598c11b861f11822013e0924084a895b9f6b5931a0b306905736c2e389c575e196bc08f4d23d2cc4f0dff9a021a97d2d256593a0c096dd02f7f032fd0e2c16531096efb97e2718a61bb6c41c72a1dc6f40408032e566bc4be7162193f038294c8c8e10e55181087378c6112fb13a6e56e08bfa78999ead41245e0cfa91a27ea77980298c4f092bccc2b27481c864d12752c6c87f271e0e3007f18e90865f936e5bf1de00eded2a191583ee29ea964969a6f818f1cb2224b458309141687ff3ade4dee2f605c4229c6a772339890268d6444cbe25ded480577a0878dbf2e86f65faaeefcd6ec009297be89397b0e525526abd838dbfbaf640a67401f9116989e40377445b3ae70000000000000000000000000000000000000000000000000000000000000000190fa706f529225fc74e793e69db2fe251a1a4cf770622061bc9d46537f807270888983f811ec930e6c0ceb23218727fe4e8efd0d8d3383ea7e63771701bbf190888983f811ec930e6c0ceb23218727fe4e8efd0d8d3383ea7e63771701bbf19000000000000000000000000000000000000000000000000000000000000000029d5953d020d356ffb2d87702523b8f7fe42b61e07b08df6046db8884eedeb8e1d6ba8a580ed53ae800f6b1847aaaa928c4d4bed95835112ea505868568b7f4b021dfb4e309e0f68b770b99db17a4413f0aaa04512a57109bf94e84462acf4c6098b7e5d0231315b54a048b14e3417cd46994db7108acab0c43fec364e4d306829d5953d020d356ffb2d87702523b8f7fe42b61e07b08df6046db8884eedeb8e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002c71d3fffc9c8097529247587650f2fd5e4670835f560d0be9f66664b162ff7e2fa8a0b29907c18569191d90c36ba9706eb7c1a24f9db716b9b26f45a17c10ec16247f16b2733f5c526747d4fd9246e0f108155a4819324a4a22def48dea176003df705b8eab44a69e481861223498a4a0b9a07fc9f5c65d99aecd118bf3efe12d4a608aca05adebe078d0044aa817e3466bf708414a3b20db86bca536ff91682ed0839a065f10b17b54cd3ba7f7b980f57faff116ae7796cc5e735e5c3b078b07d1d10dfd60fa5ca7026cc8f682f70fd6beb92a540104b2580e81ea1f3ce8721ea143e60119abb3824c4c2adbd08b2a72c201d57cb42425a695118b57612a181138595145d630cc1d22e94681fb966b1fc8316c657fbab0e74264fe510f25ee0f9c34f4219764577673627fb91ac9c13a1fbf505cd05bc2e94adfd9d5a557521a2bdc3ab5d8cf92170b2bce601b5c3f9d1d755555ac5f37016c77f96b451ec902bfcb1344f28cb746a4f392f1032eee5e57e9dcec8900f899f5598dac01cc0d0b441871fb0ac0ca0d027a1b1df909ca41cd48d4202610798fae002e99282df61a242294124dad851051ef7108fbac985f640021c48394388db97d2fedc3797e23a482c6347e2975947dc4940525958313d65e60fe4f49ab96a53fa869622dbc1c4616af0bcdd73239dc92ec07141af812081326535c66a82148916064e7d75705d1b13ca619fd96100106615a4eace9ff3c0c6e4eb5c158bdde1a87b07235c02da980223c408b517236bb8cedcff8b7c8c26b310a8da527336ccdcb01876f75264fff119c27690698c64f77cdff71ec28fb946cc3ce9261978a24fa87138cfa00641cb0dacf9933a921238bff9260418badac5d1539fc523dabe6fa1e5f967800c2cfec370fc32b9c0fa15c97cd2f731ddafdf121624d25212cbd2dc8e949cb245e6ff774d6d32cb0511c93fc811a482cf90fd2d7810e0fba308c6eb9f89ffa0ce5c58f08f55705980007147368369b7c2445a55d6a2c3651ebdb54e131f8b228f674398f08d6766c4a4fefba5fc1d9ac3e1d96ea548cd2fa702339b45a994814e3aa5c84d221a85f06327944974c3f5669851befd52973b686181be4b53db92fba78773206767b6f43c24fd7cb061b23ada977e6e1c0f8625cd63eed845bb503bf92c32b0cbc5522b3f4dcb54d50b1355568d5b78d1288063f971e2cc2bf112dad82a658732c3852a1518476fee2bd4772307f6dca24f7b8153e6d792e001207c4e52a1e8253c71906c41be108dacc6f6a6bfeb9e2a87d68ef40c20a0b5cb802d163f7874ba62fd748ec426ee95cfab14a88664c9bc7ef0bc4a2e7dbe73438037dd843bf75ec583f08820e5418c7204304fcf4c4abfb1320c55c613a2238070fbae6f66b23803236be1f5ec80655d8f2bb54a9f8c5c2bf6bec88c9c757742f0a83fb2e4659d2c98218cbfc23e68c67eee1abcb5735ced4bb01af5c540c7d2121da78d26e37a80f55761eb6ac27dd666907d6119a826868dce7e91b903c45030b62c71d1cf85538234149a66c37539ba4b39965f95baac26d0b9558a9b142051b1d45b02d52ab5aee986857e63ad78b8cd06ad9544432cedf804dcf9947b19708ac55427de260f5139ef644b5309eececdcd97774b93550f9eb192305c753a62fba78773206767b6f43c24fd7cb061b23ada977e6e1c0f8625cd63eed845bb51b4b5f63cb5120dc7b2734f23dd5b7259b14801d655eb41fa5f1c5ac1601ad07211ba8f72290f864a6c15e08b484649b18075fb52d490d0d263f82f883941c041e5c478e5575f3d196d8e23d716eb3be7cb19a178b2eebdf89c1ea21454d66921ff4fc08a52262ec404e957309b4d5b8144d00514943673cb67ff6b835bad3c80b329ca21cbba26ae8049f30d48dd24a600f12314d61401ba2573e8df25592e81855d53f2546ef10a80cf57d1d86654b44a04190e7872709b992a8a66dbee74a15752083a8ce398705e92346e65d8003a030606ca804b2597f4626998d5cc7a1', 'transcript_type': 'EVM'}\n", - "Time gen prf: 187.8102400302887 seconds\n" + "proof: {'instances': [[[12773529019820117503, 7223165032241168505, 6388811546753741567, 1325363978837834469], [12436184717236109307, 3962172157175319849, 7381016538464732718, 1011752739694698287], [9340507686675262708, 12576478094795452846, 16595392862476743742, 1007129139500821923]]], 'proof': '179d52bf0251a56c68a8598e122fdf80ea20844d6f7b9d80fe8123a29344a2dd2a7748c09ee3f30cffd02a5d2fa0cee7f6647d76f201e9567d5a15c9687ff0d22e1cece22553ceac961011ebd185607caf8d377e6ca8b798e5639e892403d1582b66ff95afae2f4b9841222dc4938d5ff38f6eb695fd2cd43dbea59575678b812a273ab9fd719a9426ae91d2cdc7a0807bd502b0dcd7c9855b3cf0b88551dfa313fb2f441c1dc56de01614d73570536c6293588828a5747cfade63f783be71a626d8cecd2882b70ec738ed1d5bdc0927699cdbbf5915604c7cb4d209e22e0c532fda252164b43399d99605c1c56eba6c6f53aad05c1108a24f8fcc935ce29b6d0a2712937bc765ae4536a051fc8c1fe48042ee6436f1d96ce40d3640dc4e33ab1ccabb61d6840425ec59ccd790a627863a9b99947743c1a953ec9215599d841d1e5b0fcd012935c195dc76a2ed157faa35d5ab613fafd5a9102ecb99ec94ebac1de92b3c3cccddfb6880fe5c882308634b8e4f2829f4c9f2f51d471cf3ed1132046849bf63a07622c74ababccaaef6d96b0d2ea4f4e2dd89a6829dbf09d5e9f90d5df4735683fd00a82dfa9c63333a3df2afd1409fb839cef973d385509a64a427ea7aeb35a54b9de1adce4ebd226513dae827d8888f048942aefe3cb43f3dcf15f5d3234022ec0634c3388e743814efe082b2020c2b96c807b7064ee4dd5c65042f97289e9bd286e21bda6036886032f039e561009068eb51e766d5a762f49b11233c533ede91977c4582788f296de65f1caa13b48a6ffe933c44b849491eee2b48cc8e69fc0f8fe9717e257e752709356cfdea1cbf91dfd50c1d237116d6d50070c07ac3d7a8f905937734546dfbab2ef8a2ca339605b14d401e334b34268f2309b9a7326d39387808a3e29f25e523bd537636dc33831e7a3b87a05867edf22ad3e9434992ecb7c7d57abebe05de462c465eb512ac04e4614c58b42300b202097f65d30833c986ded60e888fcce945d75ed84875764a432d33e2636eac5d6d0d06a7bdb3e7224a1889a7fb0532c57bb02bad2a20aed29f5832fc585051511f1fe35885edb13e386afc370a904fb04582a5d8c768a8d720ea5220454a6f26751a187c745fbbf61abdc48a08808dbd2c90400981d0a0f0febb4d50dd2731c9cd2b48cc8e69fc0f8fe9717e257e752709356cfdea1cbf91dfd50c1d237116d6d50070c07ac3d7a8f905937734546dfbab2ef8a2ca339605b14d401e334b34268f25d86afb8ce7eb528de147f322892dc1673222ba94fa4119c61eba6da99fd7d01266f1a37f4d5ac88407d09cd56f1a0157170c51caf7eab3c0fd860c74f79d750ebd6f1e2ce0ef0c57f845b8763b2f8b9fe76f4abd4ce3739889e02eb43e3ff51b303347a9f6afc86831f81dd3083297f6cd4b7e9477dda1bd17224eab2ddfb7210e586229a50e865e3b585e5bfd9a96978715627197d89d93ac331fc7e81f72030b3f63a6fc117135bba6a9ede3b466fb87bdaa9be2e65b1b0262654b1bcfd402ee50571f8316ea9db79ba67abbc31a523b49d2f208c20683e0c35cb572ce4916a20fb914790e099fa3efcf07c953176f6cd80360ac4e03bc992dd24fd11a0225f2b5869aa761e2a38db7a6cd473511daccda0e1184d2a8f4dfb76bdaf553e604ffc89999ddaaea5f88f5010427db8d804452bb6afc55543a1a1f5b536dd6e903042fd79a28fcc794075fad0c0cd10c158e40f14c35498bfeb3a83de4aa42542c81418142d6161af5c283ca788b84f6d1b4f8a38d99f14020fadefb3d1a020115c4ac0bb24d20ccf921ba94b781b6b6d961c09497cf259dba068bd1050d9cf00f0e17aa92a08bb9c42e4616e3cd222fba062fa2456373fed8132705ee994e34156b82fe4aeea4f62154723e83d04715c1f4af24a719eaf0f53d6cdc25cc3fa406cf98273292c6d88c7fad15c5f5e0780b52be3c23d7980bf592515411a250c90ccdad0433625db1c9d0d04fa249d892b2d59cf48f6f83e8212912d1c9ec007d26c96812ed5277c46a1450d745582b16320a88dee83d074e759839dd879cb80f10f26fe5129d34c168a3d0abba2c0c7032ff830abfb479e5f87ed372df9c8a5506b9ba443e49bfcf059750ba69befe446d116190a46a8e4390cc516699fcd8780a3a1db154b3e240dff310693d94c9d5bf15fba7beda245f3898e1f1c72717dc0ed2f5043953efd80c4a5b6cbf7d8b78dc502bd0d2bd015685628b85f0ae892414bdbba6a7de5c200984142aadf95860c18075c370d6fc680517f65f4d75129c00036a48eb793f6a6f359d71925853a7f2355c71e75584852c8b1181624ca1dc2142f56562ed2bcbe0124253df04fb178dc75b7619ee1985e9a184d7a322d6e02dd9a932dc1a098ad6f1007ac8ef8e8c4e4f91a8deb92083aee9c60f6501cda7116d5a917fe1561d95b1c52255fda186a6eb347d532c2e775b945358f020ef9c04837bb3f8b226ce55661f34496403bd98cc53087ea10346546cc47976b5d5fc22c53aa7a2957f2a87b44e814bae2cb2622c29a69eecac952ca383407989d8411c8d7856f2c9e7f192bb17c4a9d3513fe5c3b53e4767d2b27cac2ac4c349f709218729b7d1e353973ab9a44dcc9d0326f844c49f65f731ccd6154b7064fa4cee0839871dc8bfe09001e3b5a3ab29436b828c212051c4cb6d6ad21bbc8ede6dd207e8f9ca882c69aa0d1723234cae143ab3a15235067c4ee28e1fb58eef56e9192857441a605bb1395b85e4c387ae91910f25f8cddc0a2d2fdeeaf2559f2e91c10441e1b4aa9739dbc56fb4a603903bdfc604180c6dba5337e318f08a11b959e11ac4e49733dedda17f805102086c4c4114a13740a2ca501bbd405f42e339949b14e95b914803dfb850ded510824216b3a1e294bd9ddbd5a542310cd8e023a55e09219ec7457a478d411a71cf16d4c777f6bd58e225d5c8ee6dc0e4afc88f42b20ee2b7ea2ff2affa8dca6dcfeafe19778f22ddb75036e477b401ba1b1b26b8f0165310e6a045a6c6f530b5a60bf2d0f7d18166976675a7394054fef7774a272c0e73a1e3ab885031562b564da280dd73bff4bc8156304b950668fe9f9014c5082c40f5866bbff24755fe6f1d88ea06baf67aced54ad29124acfd90131afd842d16c73f87aa97ab45f70d0465220427b0a858720c13ba64dd8ccab99689712253117af04b84f9164a29d187527581127ba296ff8243c6d11fd962956f2cddde32170f07bb3532bca9450929ccc3d4f872ad9778cdd21384b8413795dee602526e2610eb7feb42caf19d46c912f6d41fd564cfc8e8a0398916cecb4f332a056f8f1e28c5f06b043f16e8f348a39cf68884a668eb849b050ca44a25cba9c81ca5f92b528eb0e1a083ca02098f9980d8157248d1a11af94373b8bc77cd7ba63c2ab6024a5717dbb9fa6f7161d5bd502ed717a6b53a6f3b475fe1a146d86a67c0362d13a78e6a2096b813da99ce7d7b04b1142616a499250122584fa131f87d8fb3891071c8f9248c46e476b8441916d136f9146a325110121b1f4e606fbf8469e0ac21fb1403f83c78061095a3528d856ad9e2c771f9c746b36fcbda1884e27e5e571f1dc8ea5d073b779342fc96685666dfdbd8ed772dda6fb60a19cfa7c984303925fd2e35f10f38b0d32168041b34170e65621d8ef82bc9b22cad57e95db8f88b09b5824211cfb56e0ce73686ad4d4e79fff19c7b6af63ac7b7f9e952e2992afe00000000000000000000000000000000000000000000000000000000000000002e203a683c488c13ea77fb2d083f474859c7f5869b91de85217c5bcc9acfd0ab072e7b821a5c10223b379866e1d4b311630bdf03bd778ae2852789e710fe572e072e7b821a5c10223b379866e1d4b311630bdf03bd778ae2852789e710fe572e000000000000000000000000000000000000000000000000000000000000000011914a6dad956f7ab30426212f96ab91531d02acfd8dc2294368ce50eeb3ef61209f49ccc69e29e42c516454431eced285c74e06072be4efe8e3b94bef48d9622c91c3fcc8082501dbf303c0be0280d5c0e33c456f5b6bc4179e2b3f442962ba2a190f4a141393fc47238ae79309ab07463c2481d114157cf040c2e2e8c3095b11914a6dad956f7ab30426212f96ab91531d02acfd8dc2294368ce50eeb3ef61000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001542ad329eb1181e7fb5eeb630bd2aacf4e2d73f21f52750fd5ec3bdebf319a911b42a293c2d5440d0ddc3e0ac35296d86f29395b7caf47e368ac078675f822b204143421b33d1c0befd2455d8ef7951e9a2a6c2ca8126e8707a1aee9bfb2bff13fff2271b33213499dda33cab4e9f8c52f7d5157fffe8e3f6c8e19bd4a2da031f1b372d1201cf6ed497323926eba7a2e11627f771dd3e9219e79363fd2364ed01995c9d00c9f231f62e12c40699d440e73f07f4d54eb83036baa13ca2ab67722e34502328fd02737ca29e06379866a009c15259bb0b92e5b9c566f9b1b7731c1b5813c1ff12c95ed098c70e1c3cc4f522dc2181d688fbc5de598947e9d6e3e00597fb33340ff07d126192a1f2a9cf0fb51d4de905ebbd6ad6c7630f4619837b0d9a99ce0591b66b07832419f1c9b677badce5bff4ecfb92fbeb3049c81f566c13816ad6052ee374b29945bd01a959af71e5d984d27a11e69526611982fb1ecb17b92ec3529736f119dc05f3cf80958c40f99f48b3e92dd98bb1718851f486611290064eec9ad5dfa8c4c146c068a694c2fa4db68344e5814d81028229778c56136a263ebc9552c4faeb22a81408b6e2d4fb34fc311e93842c9cf0ca0bb7429728a46c426921d96bee6222cdf1f1b41d9babd46802947f979757f361dea9b1903027f3e60a28245c8f9efad75ce2c27854ed4f2c1c7e674543f6df3428e6f603248ffacec0ed9f049bfeef7f088f8220b10bbd13b2596e943d007a0591a506d9169ee5a059aa45a9e0051af4b48260dd7da873b1a8576f7356e3c65e6f411ad22e3a1bb05a67e709f2b217b6608a26357dc490b2481cd8f2cd45abcd2bd48dd3094ee3478ac1580c226568cdcda69d3f42ef4e86c5acda3e1a2fe5e7b6326a9d138e457e3e1a927867b0be8c458a41d0bbc436fa8b49a043525a4679c4dcb7f30b17bdb657a5a060e0eb79ca61dbb3c69b85c678ca4c731138bc601d069b545a0a9640d847686e0e2458b9085374be73eb4689bd26bb1a7e864a0f8924ce76a71468a29d7ac78f44dda9f96ec9a8e83934236364ea06a89cd6568f7ae636021e1ae36200808b0b30ac82bbc83cee1dee4bda322020865aed50d715a57d68eeb904ccad52afa4e186a1873a8809d4a83f5526ce2dd302d11ecb5cd0942ad776700e566f9a3783cc0b278dc071a861007f7686895082d10e8fc9dde5f293005a2405730fd9c95896bd0cccf9d236ac30c71a2d577aadc88578e41d149b219052c404f2af0c03dbe779fc37d85fdbdb2c96d417c0187169c8dd72f61d250145b8c820afa618e51921517dc6d510605bd591d35592051e1ef0468dc8e99f91d545510d59ced0bc37fda2bde449e07e93b9227c60f19f6cee49947a0a322b71f68e1315cf0e438885b5c767ac3a88c8bf20f5ed6f1322aee100da9c8b67845b5c39e32ef2185755c77d52e9af4092e7cdc0dd25404c01df0ac87b50c91c1ea49889e80b7696eb9fa92f71932e47ab4fd16c32b54ae40aadb9f752fdb5233e9ae16e1422a1306f243b0237a32afb5e13f56ade99006a7d163d8d0140d9a943d7e77a8528d7a532958d86b229e0f4f31460a5b187c9be4cbbc59e59301156c26a82da8f299eeb5108bdaea02a3ff9fa5c75142cd70fef1f7a402b0e4a46a513f23355b804ccad52afa4e186a1873a8809d4a83f5526ce2dd302d11ecb5cd0942ad776701487db41f7ccf3ba4354e55566acfd8c6a257f6940e45093964ec1229184da3c0e03637dfa03b491f628b33c84d6163964a5a911cbd79136754411a60ec8dc2d0b0030e1ced24b677bfd4f712b1c72e7b387bd3c6040fc856b70164b8d2a6f57119fbda208638e1d8417a53942f62b3c1ef17d07f1b575a884b483d96732e5b8164aec8b33d585793026df41b2f4153a5352f2158197989783f67bcd3ef69891169e0b3333d2447a61c9323d0cc979b4706502544bd5d1c2161d9eea30cd5a2a1b53ed5634a0cfca5bdeff5228d2590b5dcddb11c81017691100784e3238d669', 'transcript_type': 'EVM'}\n", + "Time gen prf: 364.6829569339752 seconds\n" ] } ], "source": [ - "# Here verifier & prover can concurrently call setup since all params are public to get pk. \n", + "# Here verifier & prover can concurrently call setup since all params are public to get pk.\n", "# Here write as verifier function to emphasize that verifier must calculate its own vk to be sure\n", - "verifier_setup(verifier_model_path, verifier_compiled_model_path, settings_path,vk_path, pk_path )\n", + "setup(verifier_model_path, verifier_compiled_model_path, settings_path,vk_path, pk_path )\n", "\n", "print(\"=======================================\")\n", "# Prover generates proof\n", @@ -286,20 +303,19 @@ "metadata": {}, "outputs": [ { - "name": "stdout", - "output_type": "stream", - "text": [ - "num_inputs: 1\n", - "prf instances: [[[12773529019820117503, 7223165032241168505, 6388811546753741567, 1325363978837834469], [12436184717236109307, 3962172157175319849, 7381016538464732718, 1011752739694698287], [9340507686675262708, 12576478094795452846, 16595392862476743742, 1007129139500821923]]]\n", - "proof boolean: 1.0\n", - "proof result 1 : 92.68629455566406\n", - "verified\n" - ] + "data": { + "text/plain": [ + "92.68629455566406" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" } ], "source": [ "# Verifier verifies\n", - "verifier_verify(proof_path, settings_path, vk_path)" + "verifier_verify(proof_path, settings_path, vk_path, selected_columns, commitment_maps)" ] }, { @@ -333,7 +349,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.0" + "version": "3.12.1" }, "orig_nbformat": 4 }, diff --git a/examples/harmomean/harmomean.ipynb b/examples/harmomean/harmomean.ipynb index 2051fbc..37c7540 100644 --- a/examples/harmomean/harmomean.ipynb +++ b/examples/harmomean/harmomean.ipynb @@ -9,39 +9,40 @@ "name": "stdout", "output_type": "stream", "text": [ - "Requirement already satisfied: ezkl==7.0.0 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 1)) (7.0.0)\n", - "Requirement already satisfied: torch in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 2)) (2.1.1)\n", - "Requirement already satisfied: requests in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 3)) (2.31.0)\n", - "Requirement already satisfied: scipy in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 4)) (1.11.4)\n", - "Requirement already satisfied: numpy in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 5)) (1.26.2)\n", - "Requirement already satisfied: matplotlib in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 6)) (3.8.2)\n", - "Requirement already satisfied: statistics in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 7)) (1.0.3.5)\n", - "Requirement already satisfied: onnx in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 8)) (1.15.0)\n", - "Requirement already satisfied: networkx in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.2.1)\n", - "Requirement already satisfied: jinja2 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.1.2)\n", - "Requirement already satisfied: fsspec in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (2023.10.0)\n", - "Requirement already satisfied: typing-extensions in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (4.8.0)\n", - "Requirement already satisfied: filelock in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.13.1)\n", - "Requirement already satisfied: sympy in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (1.12)\n", - "Requirement already satisfied: charset-normalizer<4,>=2 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.3.2)\n", - "Requirement already satisfied: urllib3<3,>=1.21.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->-r ../../requirements.txt (line 3)) (2.1.0)\n", - "Requirement already satisfied: idna<4,>=2.5 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.6)\n", - "Requirement already satisfied: certifi>=2017.4.17 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->-r ../../requirements.txt (line 3)) (2023.11.17)\n", - "Requirement already satisfied: packaging>=20.0 in /Users/jernkun/Library/Python/3.10/lib/python/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (23.2)\n", - "Requirement already satisfied: kiwisolver>=1.3.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.4.5)\n", - "Requirement already satisfied: cycler>=0.10 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (0.12.1)\n", - "Requirement already satisfied: pillow>=8 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (10.1.0)\n", - "Requirement already satisfied: python-dateutil>=2.7 in /Users/jernkun/Library/Python/3.10/lib/python/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (2.8.2)\n", - "Requirement already satisfied: fonttools>=4.22.0 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (4.45.1)\n", - "Requirement already satisfied: pyparsing>=2.3.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (3.1.1)\n", - "Requirement already satisfied: contourpy>=1.0.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.2.0)\n", - "Requirement already satisfied: docutils>=0.3 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from statistics->-r ../../requirements.txt (line 7)) (0.20.1)\n", - "Requirement already satisfied: protobuf>=3.20.2 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from onnx->-r ../../requirements.txt (line 8)) (4.25.1)\n", - "Requirement already satisfied: six>=1.5 in /Users/jernkun/Library/Python/3.10/lib/python/site-packages (from python-dateutil>=2.7->matplotlib->-r ../../requirements.txt (line 6)) (1.16.0)\n", - "Requirement already satisfied: MarkupSafe>=2.0 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from jinja2->torch->-r ../../requirements.txt (line 2)) (2.1.3)\n", - "Requirement already satisfied: mpmath>=0.19 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from sympy->torch->-r ../../requirements.txt (line 2)) (1.3.0)\n", - "\u001b[33mWARNING: You are using pip version 21.2.3; however, version 23.3.2 is available.\n", - "You should consider upgrading via the '/usr/local/bin/python3 -m pip install --upgrade pip' command.\u001b[0m\n", + "Requirement already satisfied: ezkl==7.0.0 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 1)) (7.0.0)\n", + "Requirement already satisfied: torch in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 2)) (2.2.0)\n", + "Requirement already satisfied: requests in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 3)) (2.31.0)\n", + "Requirement already satisfied: scipy in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 4)) (1.12.0)\n", + "Requirement already satisfied: numpy in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 5)) (1.26.3)\n", + "Requirement already satisfied: matplotlib in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 6)) (3.8.2)\n", + "Requirement already satisfied: statistics in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 7)) (1.0.3.5)\n", + "Requirement already satisfied: onnx in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 8)) (1.15.0)\n", + "Requirement already satisfied: filelock in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.13.1)\n", + "Requirement already satisfied: typing-extensions>=4.8.0 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (4.9.0)\n", + "Requirement already satisfied: sympy in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (1.12)\n", + "Requirement already satisfied: networkx in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.2.1)\n", + "Requirement already satisfied: jinja2 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.1.3)\n", + "Requirement already satisfied: fsspec in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (2023.12.2)\n", + "Requirement already satisfied: charset-normalizer<4,>=2 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.3.2)\n", + "Requirement already satisfied: idna<4,>=2.5 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.6)\n", + "Requirement already satisfied: urllib3<3,>=1.21.1 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from requests->-r ../../requirements.txt (line 3)) (2.2.0)\n", + "Requirement already satisfied: certifi>=2017.4.17 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from requests->-r ../../requirements.txt (line 3)) (2024.2.2)\n", + "Requirement already satisfied: contourpy>=1.0.1 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.2.0)\n", + "Requirement already satisfied: cycler>=0.10 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (0.12.1)\n", + "Requirement already satisfied: fonttools>=4.22.0 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (4.47.2)\n", + "Requirement already satisfied: kiwisolver>=1.3.1 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.4.5)\n", + "Requirement already satisfied: packaging>=20.0 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (23.2)\n", + "Requirement already satisfied: pillow>=8 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (10.2.0)\n", + "Requirement already satisfied: pyparsing>=2.3.1 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (3.1.1)\n", + "Requirement already satisfied: python-dateutil>=2.7 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (2.8.2)\n", + "Requirement already satisfied: docutils>=0.3 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from statistics->-r ../../requirements.txt (line 7)) (0.20.1)\n", + "Requirement already satisfied: protobuf>=3.20.2 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from onnx->-r ../../requirements.txt (line 8)) (4.25.2)\n", + "Requirement already satisfied: six>=1.5 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from python-dateutil>=2.7->matplotlib->-r ../../requirements.txt (line 6)) (1.16.0)\n", + "Requirement already satisfied: MarkupSafe>=2.0 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from jinja2->torch->-r ../../requirements.txt (line 2)) (2.1.4)\n", + "Requirement already satisfied: mpmath>=0.19 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from sympy->torch->-r ../../requirements.txt (line 2)) (1.3.0)\n", + "\n", + "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m23.2.1\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m24.0\u001b[0m\n", + "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n", "Note: you may need to restart the kernel to use updated packages.\n" ] } @@ -136,6 +137,17 @@ "execution_count": 6, "metadata": {}, "outputs": [], + "source": [ + "scales = [6]\n", + "selected_columns = ['col_name']\n", + "commitment_maps = get_data_commitment_maps(data_path, scales)" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [], "source": [ "# Verifier/ data consumer side:\n", "# since have division, scale must be very LARGE, cant use just 0\n", @@ -149,12 +161,12 @@ " return (torch.abs((self.w*torch.sum(torch.div(1.0,X)))-X.size()[1])<=torch.abs(0.1*X.size()[1]), self.w)\n", "\n", "\n", - "verifier_define_calculation(dummy_data_path, ['col_name'],sel_dummy_data_path,verifier_model, verifier_model_path)" + "verifier_define_calculation(dummy_data_path, selected_columns,sel_dummy_data_path,verifier_model, verifier_model_path)" ] }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 8, "metadata": {}, "outputs": [ { @@ -181,12 +193,12 @@ " def forward(self,X):\n", " return (torch.abs((self.w*torch.sum(torch.div(1.0,X)))-X.size()[1])<=torch.abs(0.1*X.size()[1]), self.w)\n", "\n", - "prover_gen_settings(data_path,['col_name'], sel_data_path, prover_model,prover_model_path, [6], \"resources\", settings_path)" + "prover_gen_settings(data_path, selected_columns, sel_data_path, prover_model,prover_model_path, scales, \"resources\", settings_path)" ] }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 9, "metadata": {}, "outputs": [ { @@ -216,11 +228,9 @@ "name": "stdout", "output_type": "stream", "text": [ - "Time setup: 25.3074848651886 seconds\n", + "Time setup: 24.54654574394226 seconds\n", "=======================================\n", "Theory output: tensor(45.2144)\n", - "!@# compiled_model exists? True\n", - "!@# compiled_model exists? True\n", "==== Generating Witness ====\n", "witness boolean: 1.0\n", "witness result 1 : 45.21875\n", @@ -239,15 +249,15 @@ "name": "stdout", "output_type": "stream", "text": [ - "proof: {'instances': [[[11712583131456230033, 7998639690917952521, 17628064685104548320, 3364894255067083796], [12436184717236109307, 3962172157175319849, 7381016538464732718, 1011752739694698287], [10409296726488761395, 15557203226960814343, 16692342436085548322, 2420882828764455196]]], 'proof': '0af983272a8d7e74670c9f61ca2a843dad7178344f1159ef191a64a622c7ef3f2d4b9b8d4d13ef5ce7cad3db4cc7e301c6ecdd9d8903f2489a29d8da5e34a6101d48950e0c189951eb37525c2044c82300ec36180e9ffac28998db4556d3d7a2213dc39c4dbf2100424a7891d32df702c841937906a28b571e689b27596c43ea0aadc4f53d7e99b7e0664fd5572041e92380ed0b42dbe1e020155d5daab4b21f20dbd314fff8f11ceaf4982b9f9fbef6a2f98d74e449c06ed2ba051651899d2a1ba41382d68df1a45d43724130a62ef80a98e93001bb03ce4ee25170f23dfea420cd3c798df287a7037bfb48bbde807719c66c4cf3fcfc14116dc9eeb4f4725209c1e79961322ee1ff5f281cf621eb8aaec333d710f3298fdf5a68f557cc815d0a4997b66c075bfc61423a53d26d2f4abdeb075983d1ffdbf8df196b7cba04061409531fb1566fcd6e7266884bb14df45f8fd9c7f866b9d3c601a569d72599860fde6f4fe6e2eacc5c19d3a9c4a2fb88896efe27b7a1192aed435044cd2718592505a7eadcd83ceb7e38446dd77d4d5bb7a13b872881b3998384688f6b7e87a608e2b2cfe12e9ead3691dbb3b18704a97bb477de2cdd02953e4c9fc9970f7f1d1df17fd2fddfcb9ae9dc2a88f0cf968cf660d08d42d2a9b6a167c545e19068dc2e973c9926a44d4bd2611f7c34daa776ae983081286e95c2a4bb3791fe3e29630b0e2021cd4f5b28398ef989e38284552a9d493988bedc7e82c34d4b7acfedd8145ceb7dad6ff60f968f35e0d42968b82232e16253cf66138c94b5397b352f2e2e4a925ac8b888bda477f1a0bec17c60f7fd9deff90ef5b5da42cd19e5242dd02994f7111e94254d0fb69ca7112f8df35093369740610ec3f3ffa0c4df7206700cbe6555dd663344a4cc8e9b21dc734a78f6b239dcb1390b9aa9f246023b23110b1772e571d06ef1fb46273007ff93f1ca51e2332cbb9838a1e5f1040fe9ee9112163c42b0dd51bedce73f85af391ae3f0b1009bb1f1068005f7d6b2d3336c4d11681f239fff806f28f7963123414727b5ea6eee5891263e73d16afe74af381502013e1d1f540e44d404230c3fc863f04db52683e5c3e5b46132f6269d29ba382c61bcef4397f1cc9304199f71408b068fef11763af91d203049893d984010b326a2ff9adc91c0cd928e6304a2519792034df055833af03767bb2944e410d8f01d5d36d43d7876918cacb5f1f07c75f06490b47b6e07631f727574444e064e540cbe6555dd663344a4cc8e9b21dc734a78f6b239dcb1390b9aa9f246023b23110b1772e571d06ef1fb46273007ff93f1ca51e2332cbb9838a1e5f1040fe9ee910171d4bbc379a8d7674e2c9699312f12d9348e18f65f217328230d8a18150af3157fd6117f07d8f74ae1563c676a19c9fd9eb86baf03eaf205265159254db37821ee56644a2038e1fe901afe6cdbdb771e4ee17994bbb47af0a85c6a31c186401df83d3426078b05f5c1f2b55a1c7af7c013bff746d74c4cac7d5536d781070405b544bf4e3f881dce0fce3310424c774306d97119e8677cd56e778db9b5bd0c2eab1dd9ec9cdc332e6d202defc89cd24e143d8a7259a471690dfb06d591435920e2a2324a669c517818aa333b02a7b07e972d8fc9a85136c73a88b6a2e085cb0e0abb9962187bc9aa56d6e0f111528c39f52bc504e75354de6551ca9c1967d1136333485c824f102fce39d9863eeb41d2614a45dc246c5941eb4fa73e8e025115ad0a3d8d21d519cc8190472fd1dd0367b8e9d6a5501b6395fe270be0f9b7cc174f53f2a7a5cdb78a6b6465dbbd4671e46f37244409a5b12e55cf4fa68d75592776e61d12b9ae5765d0afeedde4df58b077cb4d579cace093dcb4e7e95bff1c016974df76524711c521559891fe4c0a57c6a3104848aef67f281225504924cd009937a95db6a53b9f449d6fd0c94a7991a0f38ab5ded54b488a19760464cade2117e72bd8c418dbd61c8b4cc83c0f80c8357a3feba39c946447f6c9f635e4ea03a4e550c3737f11f0278e7eae09317d920efb23ef4348d55a0cf701b60f9d7a07ebadefeddf82bd82f583e14db7b283f39345caa1df5e3744f00e56e7026813230a83f44b07d7e3dfa96d3a9a3a671c9c864ce07dd109f28a8f8c92e61ce5e01356c0e05d0306373ec45e865dc118a2854830b4065384b8e4aef2bd54152e2b04e251c9079065e279c1ad92c319d3fef6a8cbd378bcd4616c613aa9b3bb5b330c220b0db7ef2d7c92f30126d9d15fd1b26e09f61d7744b105845619904f947f0f01b2e4099c3974a48eecc34ab295d4cc5425115c31307c2f56a16084b7ba9411824d341857e1cfecd2f2786ba0aa0c3a5275d6ac64c5990a76d9d973a7c46e000f87e48818fc28ea96a2a0ddd2df21688495d65d3f4e3ca310c2bca43ae5731f272fe31762054bdc788365eccaa5298454930da8fe6480ec172ca80489df72257ff16ddc34b6342586fac652eae9994fdd97fa4cae065e55757a79cec496eb17c69e2e0680782ac957a67307f31b33b16b1e845dd7ceaf5137ccc5ab2e6b7d18852fafee924d375b6670a024a8c7b207ebfd0a3f2cf812615df4c68d85f7cf02ff743e723fb00125dfff8ff0d00eb8693e86148e9361f6b9e29d6d7b94801124f2731be83c148e372ff5d1db6bfaace559fa25a587d3461b482592a4af8626199937642782be8ab40c1f350fb97e1b33fcf32fa0e6c7d3f50f3bbf8c1db7ba1875547733fe502f2a5ed4ee1ea174fb2ca3852a9500800dfc4cc9eb469936a422e51e47724f5be781fd61f36ed0fb742001e5a2e6d25dd3040ff258e5fdfd871bee69e3ea7943aa97be353ece02bbdf9658567f4331dafd7c7975487cbea8d111e4491e2c88eb11d971f2dc2c03bd4e5741306c23687ac6d0eb7a1a263f12ad0f667a4968c01dba54843d85a4ebb821578b1f0055382c6b565d4dbdd94392d8216f4e4115e75b7e5cd55fc3063b4a66c06984d07a0016fdc67e1650101e2c931455fd38ebae1489c9a49f9183989b1abe9ddc6bbc6574fb133529c98a5abfb62272b18ebf6f37f52da89215d97134b35a728af0e68a8d558c0961591bc6eda9031eceac17a810d8c2b1e74e8b2ee57c09f9afaad7497e95cdbd7661d7c2dd8d0c92b54d27d11309b71a39d521aab16fcd91e2f66a57b981e030e247c7b890c40746fe86077ed095cce655e77dbbf44d8b0daaf548bfe700a1b0bffc4ca027f300f9eed40d700923633d6f9ca122d6ea52cafddf53007d03718737a0c10ff51d28ae6aa338e35d60a2c32daf43853b863ad6666d0d886c8e706667aa310cb1fc1e2904ac71073113eeeb787e95c263b631dfc60bb8050335539547a239fcd60c239aef3b758f2efe4f7a0f2e01808197ae393a8c3df9fd29f6b2d023ba7e910a12643a0a235c4bf06b06849f73ae2197aaef2313c5ab808f9474388af611ec861adea055441e6699c8c3835287db8b8dc6913ce3bec98920961c41eb735eed550b91eabf0199b3d5a5e23af9d224388af4ec61327f3483ffee8ef71205ff725f2dfd0986d583942a64be596f1ed126d606cbca163b95fd5c08625fb7c3d8db4b0f93bb671b9aadbbfab5e8e8471ab79637c70aa1e0cc5552ffde56b39ad3318a16ec531d4849dfdfd47500eecf72495e7b47518d9a7e4bdc288dd067f29dddbb23345ab55575ec41966bcf4412d898ea537224606362ee41a9ec3e06ad7a726a2e18cbbeaa7fc797df046a0473af812c9d3c280d71f6a86d5002ff9f77f12fb4000000000000000000000000000000000000000000000000000000000000000014d991a95e0331ef64a5c3a87fff5c0b67cb2ca43cc3aabe16c9beda60da01ff14d991a95e0331ef64a5c3a87fff5c0b67cb2ca43cc3aabe16c9beda60da01ff16c413d336035b8fc671a8fc5b345659b71354ac1919762adf1b5e1961544a66000000000000000000000000000000000000000000000000000000000000000018366ac2c960356f0924416aab1e7ddf80178960b54d3ced0315af53a325d6df037ddcd3dbe8e66d22c86e27aa096e33d1ef804f0039e6ab6feca7b6b49c8052213b7dddefc68e852e2ee1752d9775aae9a3bcefc32b1b1cb49d035a175e41c2271cf7dababfa96275a9aa038826ef660ff279ae116b9bb1656f31f2ab95b24c298f74c61ae81b52e9aa5ffc005bb84c780c8002301387a950cae6a28a118d1200000000000000000000000000000000000000000000000000000000000000000489a7db62232ed9ddb2879ff58c5cbb01054320d1d201d3fbc28112bba6f2230111e7162f2c5039b8a86e34850ef7e109db5a75d08a8fb54d75f500894ebf110db0057af1b31ffb2609be64fecbb29428f792dc5f0b7ca6edde57a7cbdd84fa15eb32a19e7f99ae8b18a3200ba234d268f8622c394786406ebac3560f30f12b061d19bf824d842cd5d5b3727e1498a44bea09bb2be81482c216f0773b63f2842476c1751700683c2bb2102ce9e98aeedd94b7251d0d0479b589e743109860dd055af9a1a6191ebd4954f0e5633d7f6732593a253b4707b22e139303d59bbadb2830d43c6590a77f4c0394bf9dcd444ba36b20ecd645f6cfda95baf9c36d6710057a2acd0a7b69f93f0b68f82eaf02f7d49b7caecbcec279cee6fd91119b064a2f31cbd19fb63e71cddb176f22d9de8a3974310fbcc6e1f27138c7aff50d0ead1baa8099a26176d8cdad9b5380e488ae3ae22f0ed4e98f93528bec796858368e177171ef717bb4a439130354bf8e20494ea45b69d422846dc80f23dc7606fa5611cdcfc148dd273a079520c0fa0b508cddfa7b888641cdf65a8c25e14378773110724ad2e7595f8c9560e82f09776c82a7472d953a16ed76a0074f3c6ac2db8e026922cac0d0e954bea80e8d702a0c62266c80592912fb7d9aca1ff9b29944fc2de7266108e5e7ac7958422d76d84468f8441d728256c395d9fb53cbab523c6b04cc449fc75552a3c6ebddf61b316364823fa9df9e36a6e7c2b3927e0d5326ef2d4fad71443259b4d285f838539f4005e811999a7e96a039438de6006bed9e022a9dac7bf78fa62584b7565fdd648e352032117cb816d034dc1c4102a7ad732e0a89be58e1b58387f904353e5af3cdba30413cf94c4183dce24246e1cd02f4f500bd0d2b87e773b80442b18f46569cc59b0b19836bffc422a07ef871cbf99f870f04aa8d5dfae319f680a948c127229935c5b0719d230e7eda46140ede78696d2a722fa96481ac815d5d479c2fdfffb7f29a2d6663264a7b304b4db3fc2f888324cc11c936410b3a217801d80159f89c77081d03e186f26bc8edea85bda5e610134822e23f89ccb94a226b55216b20bf0ce501820c2fa19ea9a30bfbefb49d8819100c3a0914137dea74b5491f46037e37e0fa6e1b4b77e83f662da4659b1d37043ba6d5bbf1d2a2d519f9d0087787e7e8c42358a62908ecdba60a53d44523ac30438bf217d50322faf7ce58d713695935888108d3a22093900aac7d2ccbf5a302a1be817aea5d265d20dfc985b11200fbb16e36478d96d9a87e9b7906f964eb21d857a155634fc2b6f5ae070f07527e8b5f8fc47fe14119cf63a41e795aca251eb1b39e7c2c52d567e6d8c79e96b16380ae0875c731298cecf272ef7974a73626d566af69f796fbf715a4fb6065d90e7264b90fc1476743c70e3900e76089432bce8f03333ac406f46f7e92048c0449439d2e1a14d649f0dad13abdb975eec22b416d6e52c9fb73598f9128b84e4af5090eb4983360ddd94e1a598404ceafc81d05053276c7771a9793bcf8975864ed9a94ecbd7ddc42685f6ad44daa42c7fe0a07530c293e9d0cc00b83b582f4b5890eede018d9a7005911344437ddde7b3d206b00e3bdb48707e31c851e130123df08043c1fc93b95bf45968efd1b48d4b51e37c9437e9c731c707c1a4ee8dff7597f9a01bf6b9ddf4e2282e3e0dd70cad32649b3ab004840c47a1bec4dbe05039a693e2c8433a94918d0d9bb27a738c29d27285dd017fdff55a168a44dfec409a3adc819650e3ab066683c851b62e57cb102a1be817aea5d265d20dfc985b11200fbb16e36478d96d9a87e9b7906f964eb221f1ce9567a11be28b6e8422b12f2399146c3c9ef80728bdaefd2bb99226dcb0129131145b637b97b6dec4b0bc6b789d101ffb77bc4a95f4a65c01913b55c491a97fe75799c1697f4aa88dcfd300e30b3e20cea4656fceacf046a79f8b38d1c1bc25f487ede85f7fe94198c25654106044791667100ad9b1770383e767f8223', 'transcript_type': 'EVM'}\n", - "Time gen prf: 35.82340693473816 seconds\n" + "proof: {'instances': [[[11712583131456230033, 7998639690917952521, 17628064685104548320, 3364894255067083796], [12436184717236109307, 3962172157175319849, 7381016538464732718, 1011752739694698287], [10409296726488761395, 15557203226960814343, 16692342436085548322, 2420882828764455196]]], 'proof': '05fb9004921a98327ee109bfafeda1fc0bf8273671f5358643a354019659693715c59afbd03dd94738a4d6671ac5513c68407779323622113abbab8ef405b8691f935bfde2e6812b4aa603d72fbd003be662e2003e575df155e231a0a380862b2242d7067bda04b5ed7ac58670f9af1e13bf7139cb5cecd780c88de90f7f0dc50c4b2693cf63f39e67eeff28ae2fd9e86f6a985ae815cc659716c4bf3c15abd626320383f4cfbcb37b22dcaa94ed35ec3bb4c66ff75f5aff2fd3f753450a346c268183a0e162e2b38d2a864fa503df1c201b6ccec0390d69cf7627f79fb60feb03467c186a0ccb639bb800a08db6ceae215db8d1bf1176262693e170caa362cc1eacae3599bc1efe545f8d804f8cd55a8aea39fc725b2da37aa3f6944dac3ea22d020b294232a38abedd5af487e8c952f0cb9050e0ca14488d6ef1982eb97a33280da1615d6cfacc7fdf69a4557020abbed91d69b2c343801a62efd00b60110d18a1bc7270ab9dcdd2d015321d23ca0ecf507ba563c7d5ee7a92af20c9d3805c19d732ca1799f923886de3eaff1eb00dd7ec109b4ae42ffa44dfe3e785d3e0d52251a439751e04e81391bae909180966b82f42603ae08e2772122ac42f22059a02188d155ce98f88335b8f9544dcf0e50fcb46b7ad517ac5f94ceaa6d7afab51123a913dd3eccad3fbe01195ad4aae3f85d92b2ce16f7f11fd008e04903bf1c30fcf95be935a5c41d52bf330c03f3dbb55b5595f368fc469ecfd7330335841760358e933c3f81434bd74441130aeb76a1baaefc8cab26819002e4b10383ca7f42e4a925ac8b888bda477f1a0bec17c60f7fd9deff90ef5b5da42cd19e5242dd02994f7111e94254d0fb69ca7112f8df35093369740610ec3f3ffa0c4df7206700cbe6555dd663344a4cc8e9b21dc734a78f6b239dcb1390b9aa9f246023b23110b1772e571d06ef1fb46273007ff93f1ca51e2332cbb9838a1e5f1040fe9ee9112163c42b0dd51bedce73f85af391ae3f0b1009bb1f1068005f7d6b2d3336c4d11681f239fff806f28f7963123414727b5ea6eee5891263e73d16afe74af381502013e1d1f540e44d404230c3fc863f04db52683e5c3e5b46132f6269d29ba382c61bcef4397f1cc9304199f71408b068fef11763af91d203049893d984010b326a2ff9adc91c0cd928e6304a2519792034df055833af03767bb2944e410d8f01d5d36d43d7876918cacb5f1f07c75f06490b47b6e07631f727574444e064e540cbe6555dd663344a4cc8e9b21dc734a78f6b239dcb1390b9aa9f246023b23110b1772e571d06ef1fb46273007ff93f1ca51e2332cbb9838a1e5f1040fe9ee910f11c5e96ae255f6a59998bfd19169612eb66d4d17ab20b82e3e84e3702bd0ac086616beacc3aed4640d91a051d747f7bed2f0f3f4c6d6c5e00e9298f3d20fa91ded1b48bc127b99654e066ec23145fbbdfde42a9d0afe34e8a6bdaab53f736b19a7c8b02b31356f477a1119cfaf18050803b5904a1b4d53c87a940244e73cd0208403327f890feb82325bd210cb95d85700a4a9f4308342464f58ed081180e21887190574e70805916e98f8b77e3981c391994219b2e49d16a9eba7ba29e72723413d26e633700268de5e009e74fcfa326548a01cf0bf09db8dd2f955b3cd2c02153ef7dcb2165319e718dac7f9e27ed647a57a42761410ee168c815f6c4924003310d8d0e29b16ae2e248afb19eabaf68e9a33a7ffb747254477efd77c597600283d6c1fa40ef0da29454af40ac71445fd0ee4d5d6db1aa13dfd5530b0606d0277a64f3a119ca52e21a31abeb40e2814de9a39de318ef987d7684e6cbf00ae0240159b6ac041ebbd44d6417a0a97bf2f318817ed10b96fa5759b906be4cc64220274148cd710937d2101d7a836882b77bbfcb3abfd22726ea35204e9632d06023042e8da77edf695d7740a06439f4821401bf851bcfdede6156779acb8bfd4030b9cde94e25732ad7bc4b5c8e815b34627bf83c57d352bbcd12443dbcabeae1fb208e4d9a6c2e240fddf55b935a32b185a7713847cb9dd347f98c474a744d61983aabe1d0752e28d0e3510232b7dadbeab020c8b9e424b239ed534b86c01131bd291bf1ff4937a43bb2ec8c02e50174867b7271d6da90dfed7e7a71b8fd1042e9491e7555e8d765a1b3ec0ed2dcbca634e5c68ef6baa449470674a1acd18f02e3ef38b3e15969b2a83a77c773e2fd921e65439da82550f6914739a6f42f27315b40026b8cf67da186448747aaf73ed22f40a54c7451cec0c51b735aa7a27960581bfa946f0945022cf3d3f90788c3c250afa60299a1d50f57c1bf3595f045e17129f38606c377a6bc8a25c052207dedcd6c58b452f2c80ef9fcde3b9dd129403bc31161e6dccd34bd7fc750248f80ab2a0ab5837a89e3611a46230328ac42529039057681b108e3efbb67670fff0e8de539a2e7645e251ce3fdbfb52234ce52f5cf0b5e65b708f595d60e5063c42326de8d14e96a53784bce7eafe567c931c1eb8f8aa76abf6f79e91bb550bee0c48095a3d5e28a8c0a9c8a200bc616b569c2634bf613e2b0f5d80740cd456842d9c50c63b41ec3c83de65db06da3aca8cd022fc164e41eb03ae735a99aea58093d1bce251a8b3a34a1d8a7fa6d14f365ff21c758add61e95c432d650abb4cc17b9a47f0ca5ec3dd2342951c5008de070a5e19b125c61d2e1d900c18090381a4c8be5ff66ac7d2716c904ceb3a2916c574f11a451e20aec85880a109df0e98e52871cde26e58e785dbdcf9fb2e46b4d73f5f25ea3e6a7cfb15e71d680ece5ef63e903afbf1a6b589d230a3dd92849cedc0ca23466f12d8d192987d395d9d08aab966821d7e761342b4018cfdcf6f1b9894c90f63502bed3110c94104a158f18cb91f3ec42563484515b353397b4c17a2c4ef0eca38a7ec870743db6ee3d966e77d546844cbf0af3156eeb547430932da7c131ff5a85dccfb57e170eb038fd18c7e3fd63b62e4ee94e76f05ae32f5f2999b76118d09d152195830e5bd1d41f187394b80ffbf7617d64c11904d8d8d1d706dee1e9ae9cc76cbe9b8b98ade3487605162b7879234ce2d8c06dd0b09bc615510db1b5e02fc62d606f312b97ebd1918dfcae4734f31978ffccca522b045dd4fdcee2ea26312a5da2218fcbff53ae7a4c4bb1f7e227364e19acd794d374b0c2d512c2f8d6c3dfcfc7457635b906b59fc00c4fbf9073111a25cd2e1b538fe250266071fb63baa0545b65a88fe2f5f7454b50ea6ca54cfd7df8f02d11dfc279f37c49b113ddf3e48ad163927a7f4e8d2034daff6ddb9665356d3dbc93f9d42a212b5e128b566a20a3622df56cf75fdfefc1d0a1339de9ebe662e2c0f9cf77aeb54d3f1247bc2e4c1817fb102aee9940fc99cabe0250b11db656117b8ee89242d2bad7b1d3b429f5f9cb029335199321a07bf727601ec37e8d84c28cb3758a4169fc5142d6d76c8b3347f18202f8d2747afdeabc08d576cbed01511dfe7c962fff359110d261af7fced55ffb80e5818922bea47ff35fc59ca5a9917245bd00aa6015f8a1b6c46b5d5b138796ade8398bfe18408541fb03e0a443e2ae6b43a9a681d50dd0a3555d6c6602e77e6eb73815e3b180848606ddd22fba9ca9415d1c30ba14a5017bbad917cffebaefb6caa7cc2670b47e667fb06387d759d6e72b742dff232450e1b016197861e8cc10058324333abf68c72b55061f2dfeede252aca2af191712b0eda5bead60dab6f74c48f2aa582e91e0590d9dac4b0c3dddbb03f7f28926a00000000000000000000000000000000000000000000000000000000000000000361d86e9cfd01760bdd5c83a9e7ed2701631f059ccbac7977ea856d8bff92390361d86e9cfd01760bdd5c83a9e7ed2701631f059ccbac7977ea856d8bff92391da001b34db03a0e3be258bad2d4c9054b9d51fc4c2dbe519addaff48c7e6593000000000000000000000000000000000000000000000000000000000000000028c098b867c126ebd298e1600775156ec875588232e509a5f6e89fdf6b1aa5f41f91c2057efa4a206f41f8cb323ba23d1f8ce94ee8301b56f09b82a7799a4b9f1385032eccf83ad53141fd67638c319e306a7123f036be28cfbc5b46905dd3b208ef4e02f9985dc8aa43c9d7a1e1f2f34ecc8926fe7659be629dd5e469684cd12e98391448b04e547e620b01749e077e91bad51a38d4836dd136c189f14f6c9c0000000000000000000000000000000000000000000000000000000000000000045da8694c3ff16229710f8ed344b982f71d72a3c363c1291d64f643c659a87904696265a9af61c1325026e68cecaf0720ef1aed7780ad2a707c3813d372fb471853a479251795b3919299130df40cb014b60887454c4b2e808aa11f9e809c911e49ff19b8409f93ae74585568ce03f7982c7c06d34e815219fa42a9472ad9930a6c7bca46f0d673731763970e0247c23fa31957c4b0f1c3944aa35aa0f101f70649f0066d607c6a84d4f0c8932b0d2cd007c71ad54936ccb2bfbba110c1fd2325b3be9ea1cbbd6319fa620d9e7e30c6abce6fecc5ebe6917dc1d7e0253c06d0201596fe287a61698e04406f876c0fcb8818a63b4f6950beefc6c08c73e800772c6b05006e82a3c72538568e21ca656d99d330dcdf66dc66e1ee5e2679a1b4b9075abf176de175cd0ae36e2b20ffbc944c90356942d32b62b0cc549fe7b9f3b40f2014c95288dd806f84f0f9eaa75fd34f95344bf36b0e1bbc0cfbfbb52168941c724f538d9c145daeeb98c4cdc08bb7d3af929007887a7ff3c55b6838fdf41e094ce893fe632b57a18f8695e56d2a5e6b4695f77199285f82b11dec68d1e8b6131e0be446b917cc9808b337776b2b01c5848b5f4cc3586d8018420c7e2b2ac70451be78e9e9ceda09761b2f38215db5b7f60f1988bb597de29deff4a29297cc0f14b8f4eec06a05e237e38feb806fb6b2f11126543d59ce5b51c9c7fa9eb9d015c5aa4219603591a6f5042ff4a4a80a392bbbbb040473add9692f2d6072472a0ce29027e31e72f13dd1bfbdb6d9a0e3ffb8cd8e7dfeca7453707f877dfa69d90cdf7bbd8c93db9330d6de85047e53eae07fa0c8f817029bbe22c907e28454ed14e0bca845d8e541afa75d0da0976d6851958b38397905af1c28d27ee2539b660a72563d48441098972c60f45be65f718c3173a339d745f4fb90f168806565f426dd573f3f151757cb5cb235dfa1ba8d6dc031c617a4642a16bc6c2862502b2914a3e3d5b641e4f49601b9509d99293c5ab85059d295206c0de4f0bae6dcb6c2016aa151aeae6a913d119d025f757c41b7b912ec64d4d83d6adeea68af2bd6e82ba9cd18e8a11bd82a53eadc2975b6a0a332c44cec8aa254ef39fb939e9b337a02c4f262af0cc534c27903509db6c045b0bdce9950034e89cd839d706ac82e5417c1dacaea292454bb0a400afb2b28d8f709aef9217c0e080f71b9cdf08c312810bcb3643051e126370be9f056bfb7ef41058b41d4319cb745072882976ba51c0f17e1904ec8002b6ca848aac2398297f97fb6fa314da73a5efefcf7bc6a7c8621f594f2562e6aafa74e296470c7e9701d58eb2fbd4f9fe6e0aa90bdb0673d3f1d21eff76db1485337caba0050885f32eec477650b84a85ae0d3c240cf19d2b31d62c39861a7883a535efe2eb736f74eea4c06af2274636bb65f41c59181c1132e0852fa03f179009be097c7c0b0615753d638ba2bd1cb068db2ddce0bdd4f2d0526d05a8c4143a8a6333f28e23a8b6d2d76e8cb4664d5db6cf5897788681f610b01dd4c0e9a08aa2d9e758dc8af7f9e0ba6a4f73eec12c2a53929a24d2b34951642e439e67a8d915d3bbc5af9a1d8ea25b3496d1174be8df575f5460acd768e285d63cfc1162412361d2584793351d2edf44c469a82fe59fd89907ea5952ec01ca1f385b812a466a037da72f17b01e64dcc06536f729ecc31a75d6fb49c5955176b67b05077863f965ccdbdd07817697d78e1c8832837454bc9ac1d46661ac90ffcf2ed2d99833f12cc404743fd46c5ec6a2cd527f1a783251fe068fd461fd40f17e1904ec8002b6ca848aac2398297f97fb6fa314da73a5efefcf7bc6a7c8620468d49b9ac2bcf72e4a09ebd470b91833ab8e90293620ddaed53a75b37a51e092de5a7d8728a17a218c40c08a1cd63c560c3743619e1558ba0c4cc2bc17dd210521c2380e2104d689041671b6d2b62e7e75b4c000086442a7bbdea57e864682806b028d3a51ad954d9f4785d4ac30791b20c4550ee506405d3b3c77eb9f9cf', 'transcript_type': 'EVM'}\n", + "Time gen prf: 34.77906394004822 seconds\n" ] } ], "source": [ - "# Here verifier & prover can concurrently call setup since all params are public to get pk. \n", + "# Here verifier & prover can concurrently call setup since all params are public to get pk.\n", "# Here write as verifier function to emphasize that verifier must calculate its own vk to be sure\n", - "verifier_setup(verifier_model_path, verifier_compiled_model_path, settings_path,vk_path, pk_path )\n", + "setup(verifier_model_path, verifier_compiled_model_path, settings_path,vk_path, pk_path )\n", "\n", "print(\"=======================================\")\n", "# Prover generates proof\n", @@ -257,24 +267,23 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 10, "metadata": {}, "outputs": [ { - "name": "stdout", - "output_type": "stream", - "text": [ - "num_inputs: 1\n", - "prf instances: [[[11712583131456230033, 7998639690917952521, 17628064685104548320, 3364894255067083796], [12436184717236109307, 3962172157175319849, 7381016538464732718, 1011752739694698287], [10409296726488761395, 15557203226960814343, 16692342436085548322, 2420882828764455196]]]\n", - "proof boolean: 1.0\n", - "proof result 1 : 45.21875\n", - "verified\n" - ] + "data": { + "text/plain": [ + "45.21875" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" } ], "source": [ "# Verifier verifies\n", - "verifier_verify(proof_path, settings_path, vk_path)" + "verifier_verify(proof_path, settings_path, vk_path, selected_columns, commitment_maps)" ] }, { @@ -308,7 +317,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.0" + "version": "3.11.4" }, "orig_nbformat": 4 }, diff --git a/examples/mean+median/mean+median.ipynb b/examples/mean+median/mean+median.ipynb index b8a4e66..ce528c7 100644 --- a/examples/mean+median/mean+median.ipynb +++ b/examples/mean+median/mean+median.ipynb @@ -2,46 +2,47 @@ "cells": [ { "cell_type": "code", - "execution_count": 5, + "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Requirement already satisfied: ezkl==7.0.0 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 1)) (7.0.0)\n", - "Requirement already satisfied: torch in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 2)) (2.1.1)\n", - "Requirement already satisfied: requests in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 3)) (2.31.0)\n", - "Requirement already satisfied: scipy in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 4)) (1.11.4)\n", - "Requirement already satisfied: numpy in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 5)) (1.26.2)\n", - "Requirement already satisfied: matplotlib in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 6)) (3.8.2)\n", - "Requirement already satisfied: statistics in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 7)) (1.0.3.5)\n", - "Requirement already satisfied: onnx in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 8)) (1.15.0)\n", - "Requirement already satisfied: typing-extensions in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (4.8.0)\n", - "Requirement already satisfied: networkx in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.2.1)\n", - "Requirement already satisfied: filelock in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.13.1)\n", - "Requirement already satisfied: sympy in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (1.12)\n", - "Requirement already satisfied: fsspec in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (2023.10.0)\n", - "Requirement already satisfied: jinja2 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.1.2)\n", - "Requirement already satisfied: charset-normalizer<4,>=2 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.3.2)\n", - "Requirement already satisfied: idna<4,>=2.5 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.6)\n", - "Requirement already satisfied: certifi>=2017.4.17 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->-r ../../requirements.txt (line 3)) (2023.11.17)\n", - "Requirement already satisfied: urllib3<3,>=1.21.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->-r ../../requirements.txt (line 3)) (2.1.0)\n", - "Requirement already satisfied: fonttools>=4.22.0 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (4.45.1)\n", - "Requirement already satisfied: kiwisolver>=1.3.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.4.5)\n", - "Requirement already satisfied: pillow>=8 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (10.1.0)\n", - "Requirement already satisfied: pyparsing>=2.3.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (3.1.1)\n", - "Requirement already satisfied: python-dateutil>=2.7 in /Users/jernkun/Library/Python/3.10/lib/python/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (2.8.2)\n", - "Requirement already satisfied: contourpy>=1.0.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.2.0)\n", - "Requirement already satisfied: packaging>=20.0 in /Users/jernkun/Library/Python/3.10/lib/python/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (23.2)\n", - "Requirement already satisfied: cycler>=0.10 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (0.12.1)\n", - "Requirement already satisfied: docutils>=0.3 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from statistics->-r ../../requirements.txt (line 7)) (0.20.1)\n", - "Requirement already satisfied: protobuf>=3.20.2 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from onnx->-r ../../requirements.txt (line 8)) (4.25.1)\n", - "Requirement already satisfied: six>=1.5 in /Users/jernkun/Library/Python/3.10/lib/python/site-packages (from python-dateutil>=2.7->matplotlib->-r ../../requirements.txt (line 6)) (1.16.0)\n", - "Requirement already satisfied: MarkupSafe>=2.0 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from jinja2->torch->-r ../../requirements.txt (line 2)) (2.1.3)\n", - "Requirement already satisfied: mpmath>=0.19 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from sympy->torch->-r ../../requirements.txt (line 2)) (1.3.0)\n", - "\u001b[33mWARNING: You are using pip version 21.2.3; however, version 23.3.2 is available.\n", - "You should consider upgrading via the '/usr/local/bin/python3 -m pip install --upgrade pip' command.\u001b[0m\n", + "Requirement already satisfied: ezkl==7.0.0 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 1)) (7.0.0)\n", + "Requirement already satisfied: torch in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 2)) (2.2.0)\n", + "Requirement already satisfied: requests in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 3)) (2.31.0)\n", + "Requirement already satisfied: scipy in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 4)) (1.12.0)\n", + "Requirement already satisfied: numpy in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 5)) (1.26.3)\n", + "Requirement already satisfied: matplotlib in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 6)) (3.8.2)\n", + "Requirement already satisfied: statistics in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 7)) (1.0.3.5)\n", + "Requirement already satisfied: onnx in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 8)) (1.15.0)\n", + "Requirement already satisfied: filelock in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.13.1)\n", + "Requirement already satisfied: typing-extensions>=4.8.0 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (4.9.0)\n", + "Requirement already satisfied: sympy in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (1.12)\n", + "Requirement already satisfied: networkx in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.2.1)\n", + "Requirement already satisfied: jinja2 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.1.3)\n", + "Requirement already satisfied: fsspec in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (2023.12.2)\n", + "Requirement already satisfied: charset-normalizer<4,>=2 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.3.2)\n", + "Requirement already satisfied: idna<4,>=2.5 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.6)\n", + "Requirement already satisfied: urllib3<3,>=1.21.1 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from requests->-r ../../requirements.txt (line 3)) (2.2.0)\n", + "Requirement already satisfied: certifi>=2017.4.17 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from requests->-r ../../requirements.txt (line 3)) (2024.2.2)\n", + "Requirement already satisfied: contourpy>=1.0.1 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.2.0)\n", + "Requirement already satisfied: cycler>=0.10 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (0.12.1)\n", + "Requirement already satisfied: fonttools>=4.22.0 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (4.47.2)\n", + "Requirement already satisfied: kiwisolver>=1.3.1 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.4.5)\n", + "Requirement already satisfied: packaging>=20.0 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (23.2)\n", + "Requirement already satisfied: pillow>=8 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (10.2.0)\n", + "Requirement already satisfied: pyparsing>=2.3.1 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (3.1.1)\n", + "Requirement already satisfied: python-dateutil>=2.7 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (2.8.2)\n", + "Requirement already satisfied: docutils>=0.3 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from statistics->-r ../../requirements.txt (line 7)) (0.20.1)\n", + "Requirement already satisfied: protobuf>=3.20.2 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from onnx->-r ../../requirements.txt (line 8)) (4.25.2)\n", + "Requirement already satisfied: six>=1.5 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from python-dateutil>=2.7->matplotlib->-r ../../requirements.txt (line 6)) (1.16.0)\n", + "Requirement already satisfied: MarkupSafe>=2.0 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from jinja2->torch->-r ../../requirements.txt (line 2)) (2.1.4)\n", + "Requirement already satisfied: mpmath>=0.19 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from sympy->torch->-r ../../requirements.txt (line 2)) (1.3.0)\n", + "\n", + "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m23.2.1\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m24.0\u001b[0m\n", + "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n", "Note: you may need to restart the kernel to use updated packages.\n" ] } @@ -52,7 +53,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 2, "metadata": {}, "outputs": [], "source": [ @@ -71,7 +72,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 3, "metadata": {}, "outputs": [], "source": [ @@ -86,7 +87,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 4, "metadata": {}, "outputs": [], "source": [ @@ -127,7 +128,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 5, "metadata": {}, "outputs": [], "source": [ @@ -172,7 +173,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 6, "metadata": {}, "outputs": [], "source": [ @@ -182,7 +183,7 @@ " count_equal = torch.sum((torch.abs(X-median)<=torch.abs(0.01*median)).double())\n", " len = X.size()[1]\n", " half_len = torch.floor(torch.div(len, 2))\n", - " \n", + "\n", " # not support modulo yet\n", " less_cons = count_lesshalf_len\n", @@ -192,19 +193,19 @@ " lower_cons = torch.sum((X>1.01*lower).double())==half_len\n", " upper_exist = torch.sum((torch.abs(X-upper)<=torch.abs(0.01*upper)).double())>0\n", " upper_cons = torch.sum((X<0.99*upper).double())==half_len\n", - " bound = count_less==half_len\n", + " bound = 2*count_less==2*half_len\n", " # 0.02 since 2*0.01\n", " bound_avg = (torch.abs(lower+upper-2*median)<=torch.abs(0.02*median))\n", "\n", " median_in_cons = torch.logical_and(less_cons, more_cons)\n", " median_out_cons = torch.logical_and(torch.logical_and(bound, bound_avg), torch.logical_and(torch.logical_and(lower_cons, upper_cons), torch.logical_and(lower_exist, upper_exist)))\n", - " \n", + "\n", " return(torch.where(count_equal==0, median_out_cons, median_in_cons), median)\n" ] }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 7, "metadata": {}, "outputs": [], "source": [ @@ -214,26 +215,35 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 8, + "metadata": {}, + "outputs": [], + "source": [ + "scales = [8]\n", + "selected_columns = ['col_1', 'col_2']\n", + "commitment_maps = get_data_commitment_maps(data_path, scales)" + ] + }, + { + "cell_type": "code", + "execution_count": 13, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "dummy output: tensor(5.3750, dtype=torch.float64)\n" + "dummy output: tensor(14.7750, dtype=torch.float64)\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "/var/folders/89/y9dw12v976ngdmqz4l7wbsnr0000gn/T/ipykernel_4875/3449897344.py:17: TracerWarning: torch.tensor results are registered as constants in the trace. You can safely ignore this warning if you use this function to create tensors out of constant variables that would be the same every time you call this function. In any other case, this might cause the trace to be incorrect.\n", + "/var/folders/89/y9dw12v976ngdmqz4l7wbsnr0000gn/T/ipykernel_93769/4247284567.py:17: TracerWarning: torch.tensor results are registered as constants in the trace. You can safely ignore this warning if you use this function to create tensors out of constant variables that would be the same every time you call this function. In any other case, this might cause the trace to be incorrect.\n", " bool3, output_mean = mean(torch.tensor([median1, median2]).reshape(1,-1,1), self.mean)\n", - "/var/folders/89/y9dw12v976ngdmqz4l7wbsnr0000gn/T/ipykernel_4875/3449897344.py:17: TracerWarning: Converting a tensor to a Python float might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!\n", - " bool3, output_mean = mean(torch.tensor([median1, median2]).reshape(1,-1,1), self.mean)\n", - "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/torch/onnx/symbolic_opset9.py:2174: FutureWarning: 'torch.onnx.symbolic_opset9._cast_Bool' is deprecated in version 2.0 and will be removed in the future. Please Avoid using this function and create a Cast node instead.\n", - " return fn(g, to_cast_func(g, input, False), to_cast_func(g, other, False))\n" + "/var/folders/89/y9dw12v976ngdmqz4l7wbsnr0000gn/T/ipykernel_93769/4247284567.py:17: TracerWarning: Converting a tensor to a Python float might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!\n", + " bool3, output_mean = mean(torch.tensor([median1, median2]).reshape(1,-1,1), self.mean)\n" ] } ], @@ -257,30 +267,31 @@ " bool3, output_mean = mean(torch.tensor([median1, median2]).reshape(1,-1,1), self.mean)\n", " return (torch.logical_and(torch.logical_and(bool1, bool2),bool3), output_mean )\n", "\n", - " \n", "\n", - "verifier_define_calculation(dummy_data_path, ['col_1', 'col_2'],sel_dummy_data_path,verifier_model, verifier_model_path)" + "\n", + "verifier_define_calculation(dummy_data_path, selected_columns,sel_dummy_data_path,verifier_model, verifier_model_path)" ] }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 14, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "theory mean output: tensor(49.3500, dtype=torch.float64)\n" + "theory mean output: tensor(49.3500, dtype=torch.float64)\n", + "median 1: tensor(49.5500, dtype=torch.float64)\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "/var/folders/89/y9dw12v976ngdmqz4l7wbsnr0000gn/T/ipykernel_4875/3663195370.py:18: TracerWarning: torch.tensor results are registered as constants in the trace. You can safely ignore this warning if you use this function to create tensors out of constant variables that would be the same every time you call this function. In any other case, this might cause the trace to be incorrect.\n", + "/var/folders/89/y9dw12v976ngdmqz4l7wbsnr0000gn/T/ipykernel_93769/2138577108.py:19: TracerWarning: torch.tensor results are registered as constants in the trace. You can safely ignore this warning if you use this function to create tensors out of constant variables that would be the same every time you call this function. In any other case, this might cause the trace to be incorrect.\n", " bool3, output_mean = mean(torch.tensor([median1, median2]).reshape(1,-1,1), self.mean)\n", - "/var/folders/89/y9dw12v976ngdmqz4l7wbsnr0000gn/T/ipykernel_4875/3663195370.py:18: TracerWarning: Converting a tensor to a Python float might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!\n", + "/var/folders/89/y9dw12v976ngdmqz4l7wbsnr0000gn/T/ipykernel_93769/2138577108.py:19: TracerWarning: Converting a tensor to a Python float might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!\n", " bool3, output_mean = mean(torch.tensor([median1, median2]).reshape(1,-1,1), self.mean)\n" ] }, @@ -289,14 +300,15 @@ "output_type": "stream", "text": [ "==== Generate & Calibrate Setting ====\n", - "scale: default\n", - "setting: {\"run_args\":{\"tolerance\":{\"val\":0.0,\"scale\":1.0},\"input_scale\":8,\"param_scale\":8,\"scale_rebase_multiplier\":10,\"lookup_range\":[-25518,25754],\"logrows\":16,\"num_inner_cols\":2,\"variables\":[[\"batch_size\",1]],\"input_visibility\":{\"Hashed\":{\"hash_is_public\":true,\"outlets\":[]}},\"output_visibility\":\"Public\",\"param_visibility\":\"Private\"},\"num_rows\":20992,\"total_assignments\":16092,\"total_const_size\":2432,\"model_instance_shapes\":[[1],[1]],\"model_output_scales\":[0,8],\"model_input_scales\":[8,8],\"module_sizes\":{\"kzg\":[],\"poseidon\":[20992,[2]],\"elgamal\":[0,[0]]},\"required_lookups\":[\"Abs\",{\"GreaterThan\":{\"a\":0.0}},\"KroneckerDelta\"],\"check_mode\":\"UNSAFE\",\"version\":\"7.0.0\",\"num_blinding_factors\":null}\n" + "scale: [8]\n", + "setting: {\"run_args\":{\"tolerance\":{\"val\":0.0,\"scale\":1.0},\"input_scale\":8,\"param_scale\":8,\"scale_rebase_multiplier\":10,\"lookup_range\":[-25518,25754],\"logrows\":16,\"num_inner_cols\":2,\"variables\":[[\"batch_size\",1]],\"input_visibility\":{\"Hashed\":{\"hash_is_public\":true,\"outlets\":[]}},\"output_visibility\":\"Public\",\"param_visibility\":\"Private\"},\"num_rows\":20992,\"total_assignments\":16104,\"total_const_size\":2430,\"model_instance_shapes\":[[1],[1]],\"model_output_scales\":[0,8],\"model_input_scales\":[8,8],\"module_sizes\":{\"kzg\":[],\"poseidon\":[20992,[2]],\"elgamal\":[0,[0]]},\"required_lookups\":[\"Abs\",{\"GreaterThan\":{\"a\":0.0}},\"KroneckerDelta\"],\"check_mode\":\"UNSAFE\",\"version\":\"7.0.0\",\"num_blinding_factors\":null}\n" ] } ], "source": [ "# prover calculates settings, send to verifier\n", "print(\"theory mean output: \", theory_output_mean)\n", + "print(\"median 1: \", theory_output_median1)\n", "\n", "class prover_model(nn.Module):\n", " def __init__(self):\n", @@ -315,14 +327,14 @@ " bool3, output_mean = mean(torch.tensor([median1, median2]).reshape(1,-1,1), self.mean)\n", " return (torch.logical_and(torch.logical_and(bool1, bool2),bool3), output_mean )\n", "\n", - " \n", - " \n", - "prover_gen_settings(data_path,['col_1', 'col_2'], sel_data_path, prover_model,prover_model_path, 'default', \"resources\", settings_path)" + "\n", + "\n", + "prover_gen_settings(data_path,selected_columns, sel_data_path, prover_model,prover_model_path, scales, \"resources\", settings_path)" ] }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 15, "metadata": {}, "outputs": [ { @@ -330,7 +342,8 @@ "output_type": "stream", "text": [ "spawning module 0\n", - "spawning module 2\n" + "spawning module 2\n", + "spawning module 0\n" ] }, { @@ -344,7 +357,6 @@ "name": "stderr", "output_type": "stream", "text": [ - "spawning module 0\n", "spawning module 2\n" ] }, @@ -352,11 +364,9 @@ "name": "stdout", "output_type": "stream", "text": [ - "Time setup: 7.0805840492248535 seconds\n", + "Time setup: 7.375061988830566 seconds\n", "=======================================\n", "Theory output: tensor(49.3500, dtype=torch.float64)\n", - "!@# compiled_model exists? False\n", - "!@# compiled_model exists? True\n", "==== Generating Witness ====\n", "witness boolean: 1.0\n", "witness result 1 : 49.3515625\n", @@ -375,15 +385,15 @@ "name": "stdout", "output_type": "stream", "text": [ - "proof: {'instances': [[[3042937791208075219, 8157070662846698822, 3804781648660056856, 172406108020799675], [15295097400487804665, 12861486368330479023, 3350118022201779210, 343142782800691716], [12436184717236109307, 3962172157175319849, 7381016538464732718, 1011752739694698287], [10870267098303494893, 1752989342377741058, 8860763459400202009, 2635465469930673149]]], 'proof': '0e3222fa11e74d161cd51f4540cd7a494135a6a788cb50d4521ebf8db1b6902c1b78cd8e835c5894509ec43782e7986b298e39da3472abc05b6e8ec99a72912820de18faac76af5ea1fbdf9ef42208e23ae3df609703852819f84bf61a0f4ebe068f0beca18a03d279df65e523f93cad9c4daf91364d960b89e090beb21e8678191848ea81b0c2f526679d896d1e7bade846ce29146641b20f3645e06cf80f6504a13efcec9c4628d5cba04795076aa66723d2c0888181a986fe2206f3104cdf12836e21f04b2d3397576ba73fd681137f3960b502f4f37ebda42795eb0bb5bd02336d46124deb41756ccb4704a96cf421cb39285812d588ff7e9c766a1343642789f2610f2700c52a8768742c47e5a45df7fd0972f908aa5b4f11892ecb77050c946690db2a2164043335c31275c83c616c8aa69c36868194fe5bd0628c1b7c05ba4f36884728240ef9c18ad4874a013d33d311b42fec0b5d4ce990de6a9040053a97bfd0266c36464368ef9663e407e1efa2425e4be8b6aaa3ebb38597ec9507f1511f9d7b200e2495406cc3b37a9bb6623b757a6744cfc2f9075c75c54c54043f94e31278246cba863e29b2eeb46b0852e6d887c694303f255acca3ad526415b3eb361d2aaa215ec1bba9b7bd5b4ed2ad4f7a64a0dbb5250c7ca07a28ea1522d0354cce72260fee9334ef270d6f0dfce23d33e2669e01ca8f0495541eba9313fcb6efb41c380bf9e9253477a758f131d9cf024b9f793083dc6e7fd64b7fda2713df35f84ce176591d8c5a443b3601e637eef1fcb57e7186893204add793ee16106d6ac79a80e9e086ac9621555ae313b0ddf72e5131bf09c7055b9f7cb26119edf190cc64c591cd557b16e3a353424aff8e12c5fbea7e717ebcf47d60d0ee1e9b54c3a85ea4aa59b302fa734013722a2d0aa0cf0c9305f3dfb81e670948ad04c41205ff90ec021629c52e56333c4476742bdc5ae7c5c5d6598be315ee54a902b594af2929bda751435d28412591ca90c4572ef3cba1487ebb8097ddd001b90b8537869b2f22e36cdd5d7a5ba04581a47c0b700ea8f2c5d0481af8f3fa5777206bd25e02316f6cded1af1ab369c47ff73b5798406418bc3d4a14aa7403452710d4b01b30623126563dcb7898a0c4487aea77b3891421be68e35a97b9c795fe294579456778234d51f50d1ab738fac88be086275f9c073e4fbd8c19a0dc8f0506474fda7c9f2542f0787235918c4162cf109e8e0382fa4935e33248860669f010923fc17f250f67ea7d803fbab9e04874f72097b6846c22a3c3f63e8991af6e29fc13f6d413264d51b687e311ca85a42d45c84aa11ae401a823f20ff9c6ec4100342c087d213198a1f8273deb07a5861071de2b28f127ddf2e97e47e480f2b60e1e979501a8252663c3c3b6845ec5cfe36512fd8b902bae5a71b7a030d9b65c1925c08264add157c3750fa8e2444639e20c235f8d2210a4aa14d314ece09f3301d0ea551f7312b5c9ef914243a3f18dc926114313c14e694a22fcfbb1894c220ad21f6ccc990c522c8d85e8b370b5b28079f62bf5bce1f7217df796ba16499b294e48ba13edf9c00c68f865b5a3e70a79b00991039501eacb50f17ad91f83a424c5eecb5f606f688a123a31f40edbc1c17faebd0f2a698f41965d42e6eb14ea0d0a902d95cb3c3a83706e4d1dd5fd9cc2353242ed47c736e36f7c5e5d276b9b1a380133444b15e94ac8f9b41209fccbf269db38d95eef99f6dde97b9b00e12b1e67ba1091e22bedc07a459bf015a25cfcac89bdec0368361a80a546860011fa11139fea50a8dc7846e93f203802e2da1362e55b28ed5c000e93a78e1261669e1448bdb086f1b6e41764961bab7fa49ecbfdd7e670ca6bdaeb5165fa7a3574b412e07caa3f775c3e8ecbd58ef3e7a9826b0cb6857394e14c1358a0a8419926f3058c92a98a33c81ed68f104714f3db6604a5f27dbd18dd2af8912831ea74dff52b5ce1555c7184fe1ecdee2f41cb5d2930d3e24f7a121c03368cd755a5b6528a29234c8f01d7ffdea871ece4973a6c6a27a07c32006585fe5642b55aff9e4aa10ea40d116f2f6219c0c1b991b748e560004abaa375f9c0b6dff0d649426437a412c7c410604f162826cc585821daf26d8252d8a37d793dc63a11f152ae02541f1f3b46e02519c7dac15c2cfbf2993e91f63e52c454b6f81fdfe575928fd9111801648759d6aef9a2b1eed236749f0c3d8f7fc1ae9f187f800f519c8aa3d2a2bc20c81c8383e576f8486c356b4c5fe3890144e090fb67d7c68fd343363994e13300d384224754a21630d26acea94685fb7620f16fab626d3f5d038f4d1cff0aa904599d0454ab379b1884e18bc5a37bb38209457f8177bb9c30a53e9ecd19c37f15cfab40327eeed3957e173b28c4c3f673c53121e1d63aa22f9b7ea6d2bcfa4026fd2d558747ed02a630a5a0f0d8fd3b1a36b13cea5e9c05cc46c9346e0855bb054399480e22dd81f0131ee1f615ca124115df86ac2019414fddc871ab1b33002bcc095e2c73281749d2bef1d16ac93e417ebb952bc5b8cdcf3545632681520123673cdcffcf1b7a512946285113e2750095cf50f59047fc56284cf2e3a25e5b065ada24367014ee244cba2a3c65d1fcaf8fbc6bc6e352334fa3a0641bc6bafd07078ae3a72755723ad05445d27aec8990c8718bcb6e0bcc3cb627003f1b89aa1ccc679ed550a5f2b4618dc8d715e5f2cc0b33471d8d1981759c83edcee21b361e4beba12ccc990332ae218ff697f1a991ea3a264a21521ba0279afe32d2a68711ffd32f6c2030c9be9a700ad970aaf6ecb009abd00807170bb9f1ee88c46d8e0f6846d7842ae9e36a1f4ee03080d4ee083c91be93b806b054c124cfdf7f1f20215aef07d4ff140f454ba985bc7d2a8eb5e30e8b5ad5cdf0391ad04790efe8ed1c0a2e3aca2ae5e8392552ca880e2e7037a50d8ca4daa3a2a88d0793f2e7c848065f296b1885ba6bbb3cf9f61aea117d60baa4923548a6a0f9c15cc2d75b54392c9fb1e46d3810644238f82528bf8ac4121976973e69048e73b0f45d2e580d0501e616029dcf1a318127739fdda799d2ab9fcbab178a5be66b9d117be9f5fb56107a06e3941be6ad878d29360c77105ec1975a240af1b325ac822884993ecd5301f411887b5eb3f623dde4fb8376fda968a08ee24a06f7cbce77b1275c23e2221c7fad27e89c7a5d3ae62dea03642e1da027636775efd4e395189a78a2bcae530533bcb39dc04d509299305b5c3fce7c76e64d498e4fe300452ae016f8f1c5240f483cb1a642ee3f36d221fdee80323b0d361efc0124400aa829e80dbacb47561c2bbd57d4fc82d6034d2cd64ba43b5b277c1525871f3819253a4123a0ebf3081c8376340ce6b3446b82a704851fe77829ed88688ad28e3bf8d69e1538dcd9590b3da6584a7a9621929b4e9de291000b3a1bb283248f1e9c850af914496adfae03e89d2a84fbe4e973744cb987c3f9a668bf16649950c54cae2359593235c393082f4de55a9caad48912b229677c94d7796c09f5f4908728ed5120417d92bfaa2604af8520ee24dd68859258c3d5e07debde07a686f866f7f61a07a01d2db53a21fbe5f89f0968fa94f344bde9282d15c86bcd6c41d8be567ab7bcdc829ab7931f26424888428f806fba73ebbdaab7c60b4fed0224d22601ef1bdaeda9d19a921b54c410d887bfc4ddad59eefa7829396a522bff38b6908904ce5dd133ba78e626d381da2b6f54f19f02727c5a249af6b2ee9aad0ff0f9896fafe1472b27dd7811a404e17348d66b1b653e52b93df3f3eb2cd83f9a354b6f976a3e1eedfc8408122845102e40b55e5c49b098255b7127f61cc714b6be541fca27908a5ec0ed4b2a4988c3222c02e019b9cf9f4a0558055c3617ef185397c1181fadf48f3fb288074c60cd78bdf9578a27021f9b0d1ca8ad120dcb638401f5859d14b6e14453710000000000000000000000000000000000000000000000000000000000000000085548f528b524c6cc9f58737ee8a1c58fe88b570ba37ec3d52574950097789e27aaf69b56db1bdb674ba5f104fa33d74de03f10906b6d2f0b93c70cc82933f7182b17d0deedee462a2605fd0890e29f0e73670a364918b49adbb512409c0c3123157ec3bbc4de06bbc003e2d265bd046cfbcf6c5481172bae95e72c80e8ca8e0f8c309aa9166e54521a49009eeb0cc0639aa6795797f4d3794549892b8eef4e101c41f4a0e414afb7ae70afe9b4e31e53969568473877b608954d3a704a12271a40429f9a25c462a880dcbb8652fd33f39dc19172d1d4010a74043591c231a02ebabb781061bb055afad7c0bc3d117cb090acc58dfe840f0532cd77d62a7bd3153dc51f6ec91460864032a8394368248cce37fb3b7e80989bb31e52b744783b250a592de65c4411b69858280c3977fbc858e2f3836218af189fecf18c46ad2a0cda2e63918b5b68d0749fd20ce1f6b9462a020447589be93d5a6d60215421e51f90b81b6d7dbb187020afee0a535e1d7fd53b486e74d6c2b7ee94ab8cbbff10016c66fa5f92dc04fa2adb5a07020d58ae766b56bc646d6a2104e0755a081e930f54a23a0690a4d1e5e5696dc80896f508200c28d4db5366b7a92fdefef865032be86fd24b00e04eb97aaaf03c86b9acc0407065fa760e3581b78610fc069d3f2040aa0a3e62af521e53ac07b2fdc3bbdc5ba64d7ebb4ef48a840e72fb6b5492237e4cd4c5fdd1ca8f79d52753951cc2cd18097bda429be1ebc23118dfc8b329148f66bd7f6533e6eefee36cb89dcc135ef59142006f64509d66f6cbbca60b8e0667f8429922689728aa993bd1f202ebd44dca5d75f1ddbc521e2ee0e5e0b2312e99af9b90c0978f2349fe16057891462be891e07b2e083f01375ce67b0304b7196a3b8b856a4141f99eeacd7dc0195c7a90ca3a4ef87f0084eff703b988b04b125c0be698151fc59f7ab2a850b819291dad9cc5d235c6dbfa27add8300019bb137ea7e764f44c2cbd081bb098b3f9726ac6eebc0f287f747560edb6beb2e98e1b93e7d94dc3ed2ebed7525fd211d0864402499aec51e4ae5e966bf72c7725132285e0d9fdd1c379a901a0e4c8bf686bc874c1e7cfc7a3c6ac2ba679f4d925b522ebbaabd603061d5574d78e4ab057c0c3acaf289c4b5f97b19c54f3f436f7c11f1b30e159e9bd1f7c77633a1b6076594a1b985ff2eb3b69d7fe5c5edfe180562860b62d66d205a6d296cf9c091beef4ee88cd23388b00a537bfe33f1308cf7a23a7993948c933581e9b1ac2f85e8a2befea6c6e899f3cebb1a3804865d5a63d27d49dcc8880deeb0e9c2cadb883c58a00edbe3c2ce65203726303505920451b2cd26e35c95cbb3abaf674f14e0fc555a392a89a3a93aa2a456f55b62f917c5202f2335cb7fe94118a0550434aa5e9b22c04ea141a1bb0ab874d8406592ce5971f76bc8c0fe8b7defbe7cf688badc2e1f0f73a8be1693ae5ae9770d58c083bd5196567a497d4bfd52fd4bc938e4fc0922b740076731583f8d3938f2a76738c3027b0cc3ac6af078a5bdbdecdd6c7ddf22586e3a1eb8fd61853036056aa9233d21ba78f3d9996c76490a95540e3a5d37000e7f2f690425452b0ccd10726090b170c99ac5173a655407780bc357ec42fed30da4f3b3319367e51706ac76356e7f510c1ecd3bfbfb6eace3203e475c0753a29a42329d96c1ff0a6d582e15c5f96692e2128de7a19a0f92dd136e3e4eedcfcd3813ada48c2fbb40f4377ca715898cc2fc071069e5967cb28dbb62c9ddc29b85796f50cbcb10b876b8bd3fd7601d8b3084542bc2ac376275bc41e007a84033d8e194833a60e7f7c82f4addc19eafa2121f98c17fbb5b8473157cf333febc84288a8e78e2d94b504867cbfbc55d1711328e5440a39c97707953bf006afdf8fd92f79f36786196671bd015e66d0133d431aa1f76efa82fa66739b294b4c93267e3f9549175ce07b9aa54f62662b3f4c25148555e6bffbe94e69fb17539cc5ebe39683f0a47f29dfb7b6498959bcfc60c80f970cc8eb1bb3325c0a182e44a741ed5f69a3b0eefbb0f09da1c6ede47f39a519e2e832b23e44658a409f172a8ec36240e69f994e7643621e53b1e65e7bada8025b812c94a28353a19b68e161d831e0255b1047fdeb4c9bed5610f6b865a42b2eb8a3eabf92717c3da83b3ee563cfd8423d3a9be5e9bb86b8c4d1a1ac87ea491b8777865f2378d0da5b163db8cc9fa02b98e9bf4c4bd5cda55d69d8ecd54a302d5cd727fe504a2fcb50c0dca9fc48bb76f44f07c5eeaccd9d21c348685111e2', 'transcript_type': 'EVM'}\n", - "Time gen prf: 9.810823917388916 seconds\n" + "proof: {'instances': [[[3042937791208075219, 8157070662846698822, 3804781648660056856, 172406108020799675], [15295097400487804665, 12861486368330479023, 3350118022201779210, 343142782800691716], [12436184717236109307, 3962172157175319849, 7381016538464732718, 1011752739694698287], [10870267098303494893, 1752989342377741058, 8860763459400202009, 2635465469930673149]]], 'proof': '0a2ee65fcbed7baeb871d532a9e0e15e0c326f0a9abe5ad62bc6e30ce775491f27d93b0c383439cb780cde03407fdb37df0dc05b2b6b819849e8856656a88d331a600e7cec11e10a3f5590d1820d2274310ff340e1d8c5a9883034ba654884db11d7bcc45f60ee10ec6a6b1d0bf68ad5389ddb02af0e426bbf1cfec4923aa4d32a4f7c6c8e2944258eb4c0a964fb364f163958c86f3759e2a71a4ec2ef62516c2bfaf8f80f93d60e0f5545df395e7f891d486fab3490c47d1cfee1699fce4446265697461c2fd84596312dbd69d8b070fb2dffeda829531ab6585ef927f0a16f1682ee2e9a793237f5392981563a2a936473749df1854c97c5c4964ae0388b1003f07c0de3ecef7ef0b1d61c9168a9ac15274b3c0f6b0b4eeee45c175a9dc6862432ccb1f71283832d607c3b39fed958a22ada4810a7bbd3b2f9cc3dca391b040e84ac59f953cbcd8441bea9d26300f775be51a07bf4aee643d71c101a62cd7c20bfdb7ba929f97dfaf9f9725ec1b60fcb5770ee1f396df8c712533118471e4e1cd7ddf5d34f0575d60461a1f5756eac0c7fd1c7fa2724d6ed549a9db637a4022917d319fa59c564012a6bd06ba9ec74480e7c356866806bfc955fc224029a39095c67b62052675a0f9614c496c7da319ccdc5d3ad2235c82445c98d196fdf2e202f9b5fb969ea69eff6894c5d738518b442f1d53e06da06da0c25fb0d1b47060cd1cf4d55521b7dcb5deb8cdf1caf255d91a4af0e767be5fa6f161a6fdef5401ce9a4c08f24e20bc70909622e9ab90367625b18277827acea62ff401cf04d3616106d6ac79a80e9e086ac9621555ae313b0ddf72e5131bf09c7055b9f7cb26119edf190cc64c591cd557b16e3a353424aff8e12c5fbea7e717ebcf47d60d0ee1e9b54c3a85ea4aa59b302fa734013722a2d0aa0cf0c9305f3dfb81e670948ad04c41205ff90ec021629c52e56333c4476742bdc5ae7c5c5d6598be315ee54a902b594af2929bda751435d28412591ca90c4572ef3cba1487ebb8097ddd001b90b8537869b2f22e36cdd5d7a5ba04581a47c0b700ea8f2c5d0481af8f3fa5777206bd25e02316f6cded1af1ab369c47ff73b5798406418bc3d4a14aa7403452710d4b01b30623126563dcb7898a0c4487aea77b3891421be68e35a97b9c795fe1333f993e61efa5a3bb75507e36be031b8fab0c8941133ff32b6da5c153fc0a005b65d9e2801e1f77d734f57708a4dd434e8e4bde39daf3916a652e6da4bf7cf10923fc17f250f67ea7d803fbab9e04874f72097b6846c22a3c3f63e8991af6e29fc13f6d413264d51b687e311ca85a42d45c84aa11ae401a823f20ff9c6ec411bd65d418cd7836f0517d1bd7cf9c50e685ee996c5ad9e6847b6fb684f0859232285368b559d3fca25df0292989fc59f1e8901dc16a49024a36efc5396368ec52e3b649eb5232248fff71bfde817a5988c570a6fd90d33ece16445224017f9240e0ffc8d452be41febe60c16f9510591ced9b9d3498a8a44a2fe92e7492b16962a638868285b3796b12a32f00eaa9ee58617e79a8acf9910be84443011d1fcc707467d34135ecab4d047d3513d0ec5e641850dbd2364bb9918f9cc8ab87654ff305e77eea666ee9683ad3bf4cd83f819fa47e78f5ee39a14bb328cb1d109ec682ea82cc6de053b7422b72d85e7e5aaa14b8bc00d600ad0a8849056435ba7c55d1b34e17d4c07e1bde74ecae52089a1f73cd3cff1ebe1acb7c6220633e68d1e5f0c9bb98bab8d593f1c0e68db5d7c40848fbc385cb400f76c334e6d535a3abbcd24d1b29efe91762983285e8a37428d01ca365a71651520609c142830a2c7a03005facd1e92925d47c4f482bc00bd1851eb18a509111d657d1986aac074f01edd12185a34668b815968acbc8dc68d8a177cb61d953239970450d91885ffd3aa1202eab0c4062ffb432eae7275b4926547e37888ebd9e91989a79d4235f399842e1e486ed7d64419ec6ed8b1be5bfd81a65fc990987b854f19f4b82e2d11ee468e013e0bbbf0b98d5740401ed368c3fdda0deea35b539aa8cdd22da2d7d59ce3921b2baea6ff8f1d4f7c3bb44e7f605d729c0fdfb1bb69cdf58cbd5d53e1f1afd3167d92f83d72d8b8fba1d8e35e03a879ff800d3e1d4e62f43d93118baef8ebaa0417f047cc9d4d28fe2d5b4d00b5a65b3acf542b121edd6d55c235266b7a8fa308bb062eb2b7acf619d3d2aac41de9610ae79d054a6896174120c515b60dd71d11e35f6234915f56b31af41b7d36ba5a634fdd5ec0139cf5ea2dd987237265371bb05cddf56464e1da86a27ccac8f57a2fc96c37b0f83656ea065a38e8f8787a20ad34e2eb0dafdb7688924251020156ccb5183fbcb0ed14f6b1495905ac03e2303487b1e6bf8d8696abf9cc8d4e8d07926126b4de6fddea63846f52a856c9fc062de37d71d9012fac06c0211601517ddc9c3c752b6b1cdf566f24250160aeab1b91ebc0540ff5f4d79f8a2df67b09bb14488c75d24a255d9d64ebe5eb52992f03d28d1db93a1177e3218c52311cf12cdc28d9fe5b9bc95513429ee93f7dcf4a26d0e560909984ed44782ac65bbd3ff3e6eb02aae9897c0168d8d25e435a11a6105599bbb383373aa60e5f1536444e3c530a7821d6c0ae955571124eff904006120f010fafc4ac032ea7fdedd93bbd8857842e7aabe3090d8048f8539fcc9d4a0dd178a1d9acee334806b5f17e7a93f30e6fb49297aca5a274a3eff15900424d214062a99a213dc5ef0ca52091fae82d1cd7e0fbebbe0bfae9f4fa0534a0610a0b97899c76d1f23a92c9e90ae50a48f74dfe0c3dbd8f176d7604afd67089e51c22a080466578b1b1de95a50f8aa39cc9c482f1839ed1320726785d49247ac2da272b99fc2dc843c038a33dc1a062a04b01f26a29474d55fd7b69b7714d1bb87c0f95d2fc8abe9697b1a311e0d1684611c46503a6c9eb0fe888204fd86c9ffeef203248d40a520e47213ca0029a1689ac7c64681e0225908a33852b3a48c88d171195d05cbfa987295ca01fdbcf81ccf214c1f4594a182ebda461276215a5a3d3073d84da9f780a5088d11c37f29b43e583f6ecfd4cac8e7e4ae98e082d976e22300d3b5d4ca20c83a4e16761407b088091303e94aed0283116dc7f58b2dbaa460184041cb78e153157711b042df5a7e0ecab275474297d0f09defd3a94bd6b5f15553877e8b16960b3589eb7f33b887e5c757feaab66a612aaa1961e271812ce154d47b262cacf843e1a3378472374ccb50be427ec4b98f3b7b03a9d27b691c020d41a8a4c8ec87ef5bde195645e7ffd373d8349c5a97f4f8f2cc30befba328310fb300ed778a4cafa21826d463be7a7e9a7d9e021075846908a1713cf82756c0861f839e8599bce26560818b5a7589b18520d5bed6443a3786de7a714cad25a22bab20c08858098d9fd5137316198becd015d3543e44ff20802d87142ecdc4d2fb63d3b28a61e23571f781d7a8e9a27385a6733ab685f3d4a63ae5192c8597c2608b58d0c752fc7cb53333085f556aab3df3cf355578891701ea7ca2362231017b0c16989bab09b74d25fe4d42c333e8ebc563e68b0a43380aec1a1999bb7ee0a1c3a8c60fbbc1ed592380eacb66158047084d27dd620a3e65492001207227b076da400689dc960370fc9a04dd3edfcb1dc1b243c1f8aa24460a5104b6b17281e5a5929c901bb3044eeb004af3a22229bce755217b6a22e221d32b535b63b8d0f487640d217eb08e3f735a265f58111b4dd1667f461f98ba6d2b540c390d6df1ccadc98b13880b6fa2083a846b326292f260a0a3e539a7b7932b6f2ca1e67102fa5013193c9be2b775685e54a67b5851992cae650c67f9d0981e5d7fabd195e05c617ee53a6713a5276801f7a6a223b0a203728aeb9d2e6594424c0ba02630d21118b444d17153eab501b7e64689af9408adc698d1a8925dd707fc5eaaeb555000000000000000000000000000000000000000000000000000000000000000023b3c72e2fba36fa53682f5bf537bbe6dba4469c3a3c724ca01343e8d25b5d23272379d926ee173b6ccc007655a5d511e6025ee1bd9acd08f3c24221c9d6d9c71a707f334a64ca48537a5beedb52616f5ab0cae3dac370e667b3663b04d459fb1f7843040ccdd1321da8bcb7215c573e97b0d98705131bbe6e1cfbb7068906720c246a9ae29a694a85d09ecdde8321cb32b384f91f0b9e8901d25509a0f1a36b1b238b804220a480ef3e3c439e8f2849af1e6654c150192fa0392b9277db4911158c5e4c7fc28cfebf5f84569ba44a7a0b55ae54397b4ef1e1109369fdf92a251f5c7e6e4ad17c7cd836377ea4d346b6e864dfb59df0837bca04def7aa38281d242d95bbad4a56b574582e341dd87cb9c548c72e400d97c68a2abe81ec6fab59190548fdec37e3409b09f8576f3dd1a387c6dd050662ffa0445312e1a952aed52d025ca3b33fc35e5eef1590189ea50766b55ca6cd26872015decc17ba5c67fb2ec53e62742e9d4791f25baefb3b779ec1526756ff1a899df06f3d8e8b8bfc2a1f767ea89e219f6900388d95b99e110a63435ba4739e6b0ed54cd21dac3cedfe19e35677d9bd1c5fb4b5ff3712058b46e9253b586fc62bef7aac0421cdad30bb052c48ebd29d0471117811d3e90d7af470d26a80ef566d224bee804f0d1e495f1ea6c6a2f14d2718ceafbd369f9933bc28d59d23767f74cb7aed85dbeb8f74711e2a8704dc55f1dd83171527e0f46c846db8520d92388f3dd97c12bca31a643e292781060f1ee946bcca73b989ee3f6b86a09344a973e85a93219f5006d90ad503e74ede6504bd142db3158f5b587beec56a691263a38b1b3b1247faa1589df61e3c6a4889b0c033602f193ac7d6b93337354be223ebbd68ce585e1d7b49a8d2063bf7121a3f7865d91c30cbb57d261f59be64432a099ac4b4c5060ce0b384c20990a92e5b4e5a740eee546a1bb1077266a450f6101c0ecc7726c32fda4329251d70ab57011ea3bd80c9823046a7c87ca388569c56db3e05a0822ac17616e4721a4b7a816c736f120c9c9cae0ddb5995df4c73b92618664690c6bd924e7a215c2d9809852bd2cc33e002702d8ae006010f8be0b12f145a38c2c03661431755870d2be698e2b4ff08f8989ba7a4577cd22b34d3928a594d99109e8beb94a986291831299ed8422f3254c5d9482f16768ce1c6d3c296f244493c3e401232238b7e0a8512e3440cd8b3b75c1a8629576619d237dd4b7961c3b1fe2e72c15ad68ece0e046910ba38915e19126301a4f24bdb0a63b3f9ff18da9a81ce6b528e80a7f20d823b7b805262868d2a206246cce24ac2d9570ad7f1c09c3ac0d204bfe516f612038d93552491a1183dc9772c506a05875fc1884be4889d01414d31c53a501c0e3ca272ebc141035c49e02350d3ba66a8ac153655eeb17ffd167a3eb7d50e8a174a5e4508f680207cc480c5ab27da0e1fc80585d52376b2308c2014021353751d7ab317e27c9da398e928975f366632128a158daf2c22f0d6d4c7fc9dceb5220982fd92d2ca0eb0f9b02efa1ab89d660b1357a6b85130dadac30722d087ba721c379dfe465623b516fee14c36c47da5b07707ca436815f0785b389219db15222bee28d09cec05e3225ad572eeb744ab21418e6fc7c4ed858cec3d26c54719c713846349f960c46b29e76b2772d28645775a53807c45be17b62b941e27f908800a9f687cfc99f88f964187ab491669058c76100843cf778c96ecdf5ac5cf77d700b7263a086e46b5a08970302275a394041f6cb6b745e5aa0feb05cae02854122d156e247ef8561c6b1c153206214ad3aa8b26c5bd6a2889f5ccc2aea65b4c7b2ce8a509389707d805c1882a25a30d66114d693f98f209496655159cc40ee4a8080b85a496a3980774f5f30e95d6dacd94475244e38543b0c7be789a1a5856801ff6f94aac41a0a2c9fc3b71c48256225f910d8ee6763569d818848194081b0221f7afdc3c26009d43c38a1eee1971cc3ee847294c8033395f5de56637c21da7024654f06a396fcfe3b851a5574b9b990dd1e21c659a85af11e0351d79fe6d45101fe3e91e7f4beccc52634da43f0199a61ec2cee68403a1105fb7b22ca04e5d1b68340c53bb39ce883c779c4ba16576f5487b8baa755be877cf99cad8cecace0ee6ff3beeaa7abdc38bce9368211ff4c72048ab5575ce35e1aa3dc7296c1c981321639e8ff382b54821d6145e1bd284c9f51d993ea6bfd9ac460d3ca864aa162b78dfaa19cb9fc1ae16da78596871cc8f0a72d50199d5274aad70403eebb975', 'transcript_type': 'EVM'}\n", + "Time gen prf: 9.826660871505737 seconds\n" ] } ], "source": [ - "# Here verifier & prover can concurrently call setup since all params are public to get pk. \n", + "# Here verifier & prover can concurrently call setup since all params are public to get pk.\n", "# Here write as verifier function to emphasize that verifier must calculate its own vk to be sure\n", - "verifier_setup(verifier_model_path, verifier_compiled_model_path, settings_path,vk_path, pk_path )\n", + "setup(verifier_model_path, verifier_compiled_model_path, settings_path,vk_path, pk_path )\n", "\n", "print(\"=======================================\")\n", "# Prover generates proof\n", @@ -393,32 +403,24 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 16, "metadata": {}, "outputs": [ { - "name": "stdout", - "output_type": "stream", - "text": [ - "num_inputs: 2\n", - "prf instances: [[[3042937791208075219, 8157070662846698822, 3804781648660056856, 172406108020799675], [15295097400487804665, 12861486368330479023, 3350118022201779210, 343142782800691716], [12436184717236109307, 3962172157175319849, 7381016538464732718, 1011752739694698287], [10870267098303494893, 1752989342377741058, 8860763459400202009, 2635465469930673149]]]\n", - "proof boolean: 1.0\n", - "proof result 1 : 49.3515625\n", - "verified\n" - ] + "data": { + "text/plain": [ + "49.3515625" + ] + }, + "execution_count": 16, + "metadata": {}, + "output_type": "execute_result" } ], "source": [ "# Verifier verifies\n", - "verifier_verify(proof_path, settings_path, vk_path)" + "verifier_verify(proof_path, settings_path, vk_path, selected_columns, commitment_maps)" ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { @@ -437,7 +439,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.0" + "version": "3.11.4" }, "orig_nbformat": 4 }, diff --git a/examples/mean/mean.ipynb b/examples/mean/mean.ipynb index 71832a4..1d3f4fb 100644 --- a/examples/mean/mean.ipynb +++ b/examples/mean/mean.ipynb @@ -2,46 +2,47 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": 11, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Requirement already satisfied: ezkl==7.0.0 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 1)) (7.0.0)\n", - "Requirement already satisfied: torch in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 2)) (2.1.1)\n", - "Requirement already satisfied: requests in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 3)) (2.31.0)\n", - "Requirement already satisfied: scipy in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 4)) (1.11.4)\n", - "Requirement already satisfied: numpy in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 5)) (1.26.2)\n", - "Requirement already satisfied: matplotlib in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 6)) (3.8.2)\n", - "Requirement already satisfied: statistics in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 7)) (1.0.3.5)\n", - "Requirement already satisfied: onnx in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 8)) (1.15.0)\n", - "Requirement already satisfied: filelock in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.13.1)\n", - "Requirement already satisfied: fsspec in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (2023.10.0)\n", - "Requirement already satisfied: typing-extensions in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (4.8.0)\n", - "Requirement already satisfied: jinja2 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.1.2)\n", - "Requirement already satisfied: sympy in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (1.12)\n", - "Requirement already satisfied: networkx in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.2.1)\n", - "Requirement already satisfied: idna<4,>=2.5 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.6)\n", - "Requirement already satisfied: urllib3<3,>=1.21.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->-r ../../requirements.txt (line 3)) (2.1.0)\n", - "Requirement already satisfied: charset-normalizer<4,>=2 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.3.2)\n", - "Requirement already satisfied: certifi>=2017.4.17 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->-r ../../requirements.txt (line 3)) (2023.11.17)\n", - "Requirement already satisfied: pillow>=8 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (10.1.0)\n", - "Requirement already satisfied: python-dateutil>=2.7 in /Users/jernkun/Library/Python/3.10/lib/python/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (2.8.2)\n", - "Requirement already satisfied: cycler>=0.10 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (0.12.1)\n", - "Requirement already satisfied: kiwisolver>=1.3.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.4.5)\n", - "Requirement already satisfied: packaging>=20.0 in /Users/jernkun/Library/Python/3.10/lib/python/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (23.2)\n", - "Requirement already satisfied: fonttools>=4.22.0 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (4.45.1)\n", - "Requirement already satisfied: contourpy>=1.0.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.2.0)\n", - "Requirement already satisfied: pyparsing>=2.3.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (3.1.1)\n", - "Requirement already satisfied: docutils>=0.3 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from statistics->-r ../../requirements.txt (line 7)) (0.20.1)\n", - "Requirement already satisfied: protobuf>=3.20.2 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from onnx->-r ../../requirements.txt (line 8)) (4.25.1)\n", - "Requirement already satisfied: six>=1.5 in /Users/jernkun/Library/Python/3.10/lib/python/site-packages (from python-dateutil>=2.7->matplotlib->-r ../../requirements.txt (line 6)) (1.16.0)\n", - "Requirement already satisfied: MarkupSafe>=2.0 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from jinja2->torch->-r ../../requirements.txt (line 2)) (2.1.3)\n", - "Requirement already satisfied: mpmath>=0.19 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from sympy->torch->-r ../../requirements.txt (line 2)) (1.3.0)\n", - "\u001b[33mWARNING: You are using pip version 21.2.3; however, version 23.3.2 is available.\n", - "You should consider upgrading via the '/usr/local/bin/python3 -m pip install --upgrade pip' command.\u001b[0m\n", + "Requirement already satisfied: ezkl==7.0.0 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 1)) (7.0.0)\n", + "Requirement already satisfied: torch in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 2)) (2.2.0)\n", + "Requirement already satisfied: requests in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 3)) (2.31.0)\n", + "Requirement already satisfied: scipy in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 4)) (1.12.0)\n", + "Requirement already satisfied: numpy in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 5)) (1.26.3)\n", + "Requirement already satisfied: matplotlib in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 6)) (3.8.2)\n", + "Requirement already satisfied: statistics in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 7)) (1.0.3.5)\n", + "Requirement already satisfied: onnx in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 8)) (1.15.0)\n", + "Requirement already satisfied: filelock in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.13.1)\n", + "Requirement already satisfied: typing-extensions>=4.8.0 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (4.9.0)\n", + "Requirement already satisfied: sympy in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (1.12)\n", + "Requirement already satisfied: networkx in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.2.1)\n", + "Requirement already satisfied: jinja2 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.1.3)\n", + "Requirement already satisfied: fsspec in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (2023.12.2)\n", + "Requirement already satisfied: charset-normalizer<4,>=2 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.3.2)\n", + "Requirement already satisfied: idna<4,>=2.5 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.6)\n", + "Requirement already satisfied: urllib3<3,>=1.21.1 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from requests->-r ../../requirements.txt (line 3)) (2.2.0)\n", + "Requirement already satisfied: certifi>=2017.4.17 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from requests->-r ../../requirements.txt (line 3)) (2024.2.2)\n", + "Requirement already satisfied: contourpy>=1.0.1 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.2.0)\n", + "Requirement already satisfied: cycler>=0.10 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (0.12.1)\n", + "Requirement already satisfied: fonttools>=4.22.0 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (4.47.2)\n", + "Requirement already satisfied: kiwisolver>=1.3.1 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.4.5)\n", + "Requirement already satisfied: packaging>=20.0 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (23.2)\n", + "Requirement already satisfied: pillow>=8 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (10.2.0)\n", + "Requirement already satisfied: pyparsing>=2.3.1 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (3.1.1)\n", + "Requirement already satisfied: python-dateutil>=2.7 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (2.8.2)\n", + "Requirement already satisfied: docutils>=0.3 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from statistics->-r ../../requirements.txt (line 7)) (0.20.1)\n", + "Requirement already satisfied: protobuf>=3.20.2 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from onnx->-r ../../requirements.txt (line 8)) (4.25.2)\n", + "Requirement already satisfied: six>=1.5 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from python-dateutil>=2.7->matplotlib->-r ../../requirements.txt (line 6)) (1.16.0)\n", + "Requirement already satisfied: MarkupSafe>=2.0 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from jinja2->torch->-r ../../requirements.txt (line 2)) (2.1.4)\n", + "Requirement already satisfied: mpmath>=0.19 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from sympy->torch->-r ../../requirements.txt (line 2)) (1.3.0)\n", + "\n", + "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m23.2.1\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m24.0\u001b[0m\n", + "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n", "Note: you may need to restart the kernel to use updated packages.\n" ] } @@ -52,7 +53,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 12, "metadata": {}, "outputs": [], "source": [ @@ -71,7 +72,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 13, "metadata": {}, "outputs": [], "source": [ @@ -86,7 +87,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 14, "metadata": {}, "outputs": [], "source": [ @@ -154,6 +155,17 @@ "execution_count": 16, "metadata": {}, "outputs": [], + "source": [ + "scales = [5]\n", + "selected_columns = ['col_name']\n", + "commitment_maps = get_data_commitment_maps(data_path, scales)" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": {}, + "outputs": [], "source": [ "# Verifier/ data consumer side: send desired calculation\n", "class verifier_model(nn.Module):\n", @@ -165,7 +177,7 @@ " return (torch.abs(torch.sum(X)-X.size()[1]*(self.w))<=torch.abs(0.01*X.size()[1]*self.w), self.w)\n", "\n", "\n", - "verifier_define_calculation(dummy_data_path, ['col_name'],sel_dummy_data_path,verifier_model, verifier_model_path)" + "verifier_define_calculation(dummy_data_path, selected_columns,sel_dummy_data_path,verifier_model, verifier_model_path)" ] }, { @@ -181,7 +193,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 18, "metadata": {}, "outputs": [ { @@ -205,8 +217,8 @@ "\n", " def forward(self,X):\n", " return (torch.abs(torch.sum(X)-X.size()[1]*(self.w))<=torch.abs(0.01*X.size()[1]*self.w), self.w)\n", - " \n", - "prover_gen_settings(data_path,['col_name'], sel_data_path, prover_model,prover_model_path, [5], \"resources\", settings_path)" + "\n", + "prover_gen_settings(data_path, selected_columns, sel_data_path, prover_model,prover_model_path, scales, \"resources\", settings_path)" ] }, { @@ -225,7 +237,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 19, "metadata": {}, "outputs": [ { @@ -257,24 +269,22 @@ "name": "stdout", "output_type": "stream", "text": [ - "Time setup: 0.6005728244781494 seconds\n", + "Time setup: 0.5520792007446289 seconds\n", "=======================================\n", "Theory output: tensor(42.1340)\n", - "!@# compiled_model exists? True\n", - "!@# compiled_model exists? True\n", "==== Generating Witness ====\n", "witness boolean: 1.0\n", "witness result 1 : 42.125\n", "==== Generating Proof ====\n", - "proof: {'instances': [[[13487293430113784910, 12778393823498462323, 6887806571578554205, 1244238496825937973], [12436184717236109307, 3962172157175319849, 7381016538464732718, 1011752739694698287], [1786891257776170021, 2456895193576464786, 15851013958699291921, 426370788491761118]]], 'proof': '06b296115bc16153f83c1abf72d135579e2e3258920c3f0143f21791e7974a8d293d1d8f40195a65c38d77e682149265e0f64863b074c43d8b665b34a80b37a01a41fbc8fc568577e6b2b55b1e4437e304ab3e1f05a33ea33a9bba498d89f55b2c8e8d8e2559627d01d64a0ad6aa9efaead82101382420e3f3c39e8cbf4b2e601d8f64443aab3d4a313f72c0665533afa29951797239deaa63b5fcba442fa37a16dfef6266b7e65087fa08400150fb85c2bf75dc33b247ab7a59848501752ee30e1e4979934e7d2c4c0cc81946c7689c32870efd627984070ec9b152fd72e73d1721e5f9628e7d66be7f5b6746c9a4220e242ed3e5700ac509d344da032f445813600e204a226d2316bbeb0b46eefea4569cadf6a3e4dca1e78fce93fba9851d0e8e29d4909bc701b1696186e9c8f0bbae2710a1c94cc2b284b958ae365c8ebe1c0dd09c3d261657b22b1c1362f786a7545f312a2cd8c0a0ef93d1e4fb3726b812bbfbb2ea2b1f45df98968ab52abdcb6ea3073e349ee4e9dd859425969c73822dbe33a12c4c8b8132168efc3bfbff74e1f1aeb3399cb2d3094cf8487c9eee61246691af4016f0aad81725d921bbce355935e55479f1b9a759ce5e3d9cc85d3c218605e0bf305e864bd4d8f1fccf3434f923f37ede5bc160ee33dcf48e3dfee82e25409fb9f9868e5a7cea49e341acba11a40bf8f35fec0191d1dbdffb6ef9b12736024efad47677e13db7e631818c3fbc25383bc1beb79138de9b1307a02dc02fd70df70fdf944f544e5d52ae5450534957bfa6ed06b2a9fcf3ca71e9c62b6b161377416d8cbb451075147c682ef3ceb7dd50cb874f4d3cecd973e4434b60d512106651494e9a0f64c81b849c2dba84b44cd19fb74299d861c8ff68c2fbbcd5067a76319d9c91e9cbfc89409c37b04a851a5c5eebd3563cd9a0e168a0227e6f20c899f5d46a69e47ee0a8b6f06bfd9dc411ab1030a9bb2872c67ed10d9cfdee161377416d8cbb451075147c682ef3ceb7dd50cb874f4d3cecd973e4434b60d512106651494e9a0f64c81b849c2dba84b44cd19fb74299d861c8ff68c2fbbcd52d0564bc3f875b2e3b2b0e738f56212f7adba7b3870f32c27a083d08b449b9372b6a03a885603559343df78a5c40f3d82edc90082b6055ba2f420a8137d129aa01c655f74886a55488e11a5123a983c1cceb68ddb19492045a0f9c74f2bc4d21288a1a43636dec1e9066f269473a76fc17d1a1675f956e088c583f32b9d8f9132fc55adbe31fbadb1f9be6b90cee651b4e5f4299a9f6d34530dc6dd5ba2d06781de30bddd211e4f8f1fa937e2d6746a7869d022fe5f5e9b91f4168a59060777c24fa5d1673ec9c79a2c092b3336a8b4a661326ed4c85c1605fb4d8e7cbc2859f2a87ba454b6aac7ee0b7b4e7bf39ae933145fff40364715e01aa8e8321f174cd25982dfd6052a67e44e12b15bd25af9901a0156fd3f45580ad674e2765c9205626428ea8e215a95865d9df44aefdd87c9482c578044dbe7b3c5e9cd137b8572e1f66d3425ee75205d38de1979afd838a8e98395165433207f72becb694f6940c29eb59594fa4644344d4600fb4d0f855209f263d3fafeff061f75ffd19b96bcf0b9e75e7df50291a26d802806bd3bd96c28d35a24dbdcda35a7bf42125df929f10071dedfe53710ef11f8559c6243d825bfe47229e89b88fdd621b4774931c102e25417beff8253519ca15f86c5bf19d133937ac5ba75786f181b7eabd40edac0e043a5e943c61a0a55fd42515b81809a2dab4b424e33dd3d63b39931060fd942d3b6dd7cdb24ec02339dbac240d4e15767c92c4fa3f3c3ee6d51094ebd288e42de54c6a117d66fd3d3dc2a50294ef673222d51a19c32328dc03432c4e4e2849082c383f8bc9bd7d92c7068a0c4f8fe15d5c9c278926742f9ff5c1a1a7dbae0128e229b8eb5aae4e52e90af11c56fb425bcac776066428eb5057c5f4aec3829c055799afdf0401c7c6317b26b0215c5a43e1963fb9692475afd98ab8d808f5d9156d051f69df515ba0a3ae6d64bd133a2fe5512bbd99939767ab26fe69d8fab61cb6625a113bd9a81af691a1cfe26424860fb78fa15d51d683e28b1da67d03bc0b4a60ac7d2db55d6f564092d9caf12c6beed3e9540b38cb20dc02f4a9f20a8200b8507f7629e871c42cf29086dda8c8e71d638a0b3429d6bb01b56544cbc8072263d7e6d832ab443e4bce4caf924a0e90ae4510ce112cef99642fde0bc76678231ff0b4dd16b21ee8f1dd26c39c527f81ab2ef12b32a9432f4cb9f0b1314dfe0a94b647605c0f1ebf18a200f106a9d1c8a4c3ad2c0c8bdedb330793c9dd447a07aa52745e2af87217077ad76507d8364fb2c394596218ba91b628ce65b9826c230ff9d9825280f801a15e5254e0947cf42bf45c07218fe5670e314e0d6b84f817dd8c872ab281b26b50c9d4860cf9faf0c76625544a50bf4bcceb55b17af3a3138da0855c9093acfbb9652a53885a502ebb11586c606b56a61e736a5ad637371ace5c73d5dd2cb96d015956157a06ed707ca54434d72674c9fe44f8fbdd8e4d2320cac8f42c310b52708e2de30acdc48b8ea108f3d667b2c8847c5ded02152d0b17ac727ba8740f4bd93ade85778b226b13d3e099cb10b8dbe1e496b2c3ca49200a7907fba08c8221b68540ca448340a1022568ffdae0f7213d4402e21c80c10b3a26b205d5482c0c69812c2bb056c1fe8b769beae0bb3ece4ceb187b9ee1fc07b2a52efa9e6e2da9ba4f3b71ac2274dc2b2affa8e737e7abd59f4b4aa246f202675caccad84c6ffee6b2b65a6a2acb9c9c183cb4faac34786cbf1b9cd3c1b42ae8cdce808526a4278213029156a1ff92c9216005de422240a27ed8286fbe65191cb0a1548ff952f6feef9a96b1ddb3fb04743b6e6532115ab3a25482fe99a001fa87e6c6ef37e14b2658bfe7e6e4d3e067a79ca6bef887390345aeb78cde1d0e2118f7abf19ea6f78abb402fc777cbeddb58a302cbb5082026ad74e4f60ef40e845172c9c8a176194f08d0a0aad7a7139728d480b64f245c9e0d55e4eaa10408644bd4ccd304af0be4e9e5dffddfb0027f0858cd75209643cac11ec52c78b41ae43f10f068bd45f146d06c71162c12e9d5e5063ffa60f4bdac2fddc5841d821b9a6825c4cf690692afdbfd40afc4936a67957aa2d785f29d010d5cd496bc8d25fe5d3ade331d784a63012e85430f7d153426792b2181f874d0f3f2e1f8e4b60a65f13802fe82b16ded4487fc3e48e012ffc1cf4e97ee98cf1101a10e071b4b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001dcabf30d9c504be4a182e9668e3792301980d6ee54ee02b8a6dc8e81fade6c00000000000000000000000000000000000000000000000000000000000000001264476c6798b0a40a5d1ee994997d0259318e26114b6c2e81d64e1c9f67d495184f124f783174c76051fd6d25b5a3f8531741b401a5d65f75b0630b31ed43f200724164fc68e51307949104abd8e22cc54e71bc642e50a35c3f5679660fc25303b6b08948a048ff574cf54fbb8ff5e142a8c2d18bcd4b5118f5cba98dc95d5d000000000000000000000000000000000000000000000000000000000000000014d6431fd982396c85ab5bcc31c3d593a4fdad3281da23917a8452c6a81ced3d130053e0751de7ebde9f57723c8d2aa4a8932c2be08293df3a2deecd932a3b8a0fa3953aa807a1552525c4544ab2defab77e6654ff719b99b027ebe0cc1da7eb0bbdc77c98e971543c088ee43df75583432f1fe8d374dec6013f3df64bac015d056c5a62342517763d60374c620839a700c0165b61a89769324ff7094ce9e17901f5f1bde46913ded8689265e26d0d8b9a82fa46b7d053bfcdf5685a5facec6304eecf6e1b8d7535ea3f65797257dd81b6a97f05c5a64e9aa51d878c4d4e3606154e64c18360bfb51d5bf1c10c5816cc1829cf604b03f3960f7af8e589f6383c097ecf8f118adbd1cb13fb0e8774eedd9429383aa34cb3e4ac10801bdebb5b92248a1f16ad89738e28d5eff351069a6c0fdeb72714beec696cdb1b88a9a5a5ee25856afe6025800053ed6adb88e38c5f1ba0fe59b59628e8afc3b978f1e1e8da0b532aae14fd1a568bb17e514e94f77b5bc94f2216c126907875b88dcda982350d9b6a9d464d0807ec1914c050ed9e900876fd05c067f9f4ec990433f07415c824780ded7718d557d2cb1ff1a1d96a61c4b3151ab40b1a1bb1733c7481e27b2e0f45728de0bbe6c855f85b762d1c99f39104b99bfca18a2e57f202114f378c060c5dccc3c16e4f11b43d6a1081e4262768143b7231ff64170f5f1e579bd02a6128e0dcefe4b07210f8e4e9fc497c9a39607293ed0e1b5025dc6dd1524f49960c0bf37b1f9a933d0fcbaab094bbb2746e325a5851ce9fb9f3afc5fd52b6647ad22ac7b1663d2631e77d587e4adaaa669c1c5bb013229f76ff551d00dff81a55b41a63b96d9f05c634a0d2bd048b4b053c74997956720fee7437c251ef220dd88327eb49e3616861158af34c9ebc44ac7040d9ec77185c51bceb1c35e78c9e80aa18895a5c6320f930a35b7b966777ffff474894d49b7f2833f1095e2faacbe0a0213db7a9aaa05833f9e70ca00afef3e85eebc40fa895504141e9202b986478d90e2455141cc6a0e99865111ce40939eb138b76ec9e5c4b5b16929ab331f7172e1e8d894c7aca61c7242e3f69951340e1e098ad1e95b7b578a1f0d15eccd3469a1fe58396bae659298bcbd4d5fc681775df25abb7bc399189d5e58d50b8cb9435124003195dac8fc07099af229107fdf24668913828820e5bf9913649e5d3d65a173cccf512ab83369dbcca422c7ee6cba4a73ce74f554f9f9118cc34bbeba500119c441d12ec0deae286bde95f4270729c6043f5c901003cfbe0bbcd5d498b1e26444e91b254021d43ad6bd6ce6eb713d442104490f1c87af2af9ec1699e52ac19f7522fd2c0574f1c546f49aa5ca90f313e50b21dd577a4599643bd0e25e7cf053fe4c8f514b607eded1fbbd1a5deb771007137f7b7e6366d05587797cc30e225f34ffcff0459ca51858d7cdc50d79735d5c53896fe66e60b409bd94ee002a9173cccf512ab83369dbcca422c7ee6cba4a73ce74f554f9f9118cc34bbeba5002cd1e7fa154efaab258a88be5265d3b2abdaf89ae774bfce8191b8b7f04970c22d82352bdba038ab90ae110cd7d4f1da0dc02b87cceb452cce373a01342a604b0faaa11cb8bcae2a6dc1bd088a1382e98ae53506a000e7536e95768cfc00999c1a53a29ebb26486550f8ab3b0f7ee297707e20b60c0dc3b48fd6bcbd5c5d1c0a008e6995c3cac14fdbe8b21d5b85da9d74989e09b44cd99e521ab4ce55a53ed51aacf841bec5e7077552aecced6cb6e1c171850a848848004d679cf3c03c2b5405a152dff5dc88b2b1e04c543825e437fe3f0528a01c152ddb2e2bf5f4801742', 'transcript_type': 'EVM'}\n", - "Time gen prf: 0.8041813373565674 seconds\n" + "proof: {'instances': [[[13487293430113784910, 12778393823498462323, 6887806571578554205, 1244238496825937973], [12436184717236109307, 3962172157175319849, 7381016538464732718, 1011752739694698287], [1786891257776170021, 2456895193576464786, 15851013958699291921, 426370788491761118]]], 'proof': '08efd7a1fda2afc01ff5d0ed49afb01925f8cb02bb776686f3d7a4c6658781f5297eca58838bd1475976e1ee6e5a5b2274a02946be1e85df4810bfc892ce1366273cacfe9461c95e1982eb90579e1bb6b1a29eebd4995016d927c0587bf19a2205964b01ff6b4338a603b72208d16865a5c0b8e2cd93fe75c11fbec8c38e863206cf9dcd5d765ed1d9e6547d3d7557a38531c9111c97d5ffa8ec7b4b2f66191116eea5b1ada76820f0c36f3ae1e9165bcc7855f8626fdeadc789f4f133efb8d60da3cbd23ff0d9c56a2b00481e850d668106ccb78831035bab253fb786d3861309ffbde5f426272562fce0d20ed2f343702890c5fbf4d722e5ae58dc2a53a7c70e4b3c091ce01dfa5bceeab25cec51d7872919bea8f885ca7792494fd26e8ff817afa7a9402b8b04832aaca1ffb441935fc0fd12cc43f275a0970237f986cb511cfa5b8f2d511648e21493b8c2e502bcc2c943854f5a5be40382cc2bfa5a64392b24ced36c471db650412ced82807257fde7fc9a0b539d58b3f8e3354494b5a109b33059b0e7817f461b0770ebe16f9216523ddf53aa3bf71bee02383605df082d606de609df029deec080e508e192176f4fdd9a27db676153e5c513afcafa011a460c108ad7967d1477950543fc5a20fc21ba292fdbc0d7f9c7fea59e9260fc2e7e95191a0ac236f363d6da602bcd9841fc2748365d695312b38e66188baa5b27cd56b5588da135dc837e7e347c1f4feb84898073fa0250c0ad2d979a2a53b72eab730158091193745751572e6729e125eb06ae00d953d8bb0824978932cc7c161377416d8cbb451075147c682ef3ceb7dd50cb874f4d3cecd973e4434b60d512106651494e9a0f64c81b849c2dba84b44cd19fb74299d861c8ff68c2fbbcd5067a76319d9c91e9cbfc89409c37b04a851a5c5eebd3563cd9a0e168a0227e6f20c899f5d46a69e47ee0a8b6f06bfd9dc411ab1030a9bb2872c67ed10d9cfdee161377416d8cbb451075147c682ef3ceb7dd50cb874f4d3cecd973e4434b60d512106651494e9a0f64c81b849c2dba84b44cd19fb74299d861c8ff68c2fbbcd52d0564bc3f875b2e3b2b0e738f56212f7adba7b3870f32c27a083d08b449b9372b6a03a885603559343df78a5c40f3d82edc90082b6055ba2f420a8137d129aa0854e4faed97678cd109988f468da43b6e1900360485ab96db41a762a8176f0024731159b9e2994a2ae8b96b08da94cf79d93fdb2f21674d40f0121cc487e9f62ed7d0013e8452c619088a2dadc8038e05fcdf7ccd23f94b0bd943dfd1a97a73106f47bb64ccd988ea6abb04096dfe7098fd9747acc6295d48baca47fa20d0fb22538304b4ed067fd686d47f2a647501e8f96bd5f420c1f2ba09cf41d2a015090f8026a5c822fad5ef1fa91748df3e31b1735138fadd8307e2f658543e8fb9612d8b5c967cdb9991e55f7c7d3d5b024a5200577f117f1615e511c0cd8098908503109538ab70e67f9ff15a4eb5572bf7c2adccc02923c5796dc90f8523df23d52edd7906ab3f804245363b6af99b367d4e12cb0f9a180e42ec09037dc9842dd12a4237883eb490f140f34b02ce5820b751bff33a9665d85f28aa03c0b32be6cc2aaafb67af4ae7a37e4eead35e893d2a5d7a01d894ee05a15f072c4d540dd9f3003d35dd525cbff23ada47b7ec1a5bf63dfc33b984ac9cd09ff0f5c5b3b90f94038d9840e4951677e410b5c9cf5beb057fdd938c908b9c5c11d26257327bc0d20ec14695db87ee70f4d2d6c6a58621ea93e66b9a7c354bcd125791112f13f8081bdab6e26f6661e528defb983d6d15d2635200102abccc1f935c960fd4be610629453465fcd8e630265e14e83bc282a50485e6d97cd935bea3e40c1526d1ac01257a533b89d8c8ac8ce452b741f9f63c732a2fd8fb7b224caa0789cc83fe4ec7056147d1aadbed40ca5c4b26eed39392771bf327a60aebac215ac04e480541440ecb6f0739ab193a4f66baa73631836817b1db13d9194deedea0f09e626877931a491051aaae8c90bd5011ec55e54b50665dc8c717ff2103fe7fd8156d57a67a2d9aff6e0dd7dfe7d152b9ad575b123ec1e6222b63ddd0fa7d42e0286774f5bd0b6bfbd3a1e855e0caa67994109e0998768bc791506403795aa21f4bdc2b0fdd2c8be9dae91a488921c87a7bdfcead2c5bd431e1642d6431413f09c148acf54003167c50d12fbf0c792067271c327918f209a5bdaff4b3c86006026a5d63270d1e15901a83b26f733464dec07d5fa65c5bf7594b9821d6bf13690db45157e8ab1e099e9ea32663acca414fe7d7ab0b80e97f4cb118d30bc6c485246c3a16e00f05352308c65017096835a1d17a334954430d78e0c57ffd69a7d17d68e43252d3295105b5edb089af547d0d3954f85e03b66ea20c792097b4a5a1fc79e0558217058c589e4988c24019c29c8f510250de99ab13df601b2f686498814ab9db62122b577166e51e60ab6ab86a6237c046a3c6553730c351453233055cbc1b408c001e68e9f559c7fd23b0b17de3b3daf3f3f310ca13e1c729a299060833e1f779270cef4d90c17cb28eb4ed73473c6adbe25fcb1a385547af7a1d1351e6babdd39d1d5c034970a1c5de82fcda4e11d9177da8c9fb2ed1df4657146c1785cb42dcc11c9d6ddc95947ffb1444657fa1a6411a9be2a65e3e6916e7cc160fca077e80cb0b41d1772035caad9e0bb722e3d0a7a22fcb48f52f0f342b18d0ca58fb6241dc2677e78fae6d77b7c5337e7f850d5e52cda96ca348072180372cdb03442f056319641ffa7eccef90ee2ed749eaaa0ed89b692245a1d3026e9e5749d4ff761a5d2aaa8bd28b889dd018712cc03750ec89ce4e79576b3e1069f9bf925325abc82a2cc309985191c61aa467b5d7c3bb44de02faf5698e1cee0acd644c0820b65d232f7dda9b9c8ae28b032e69dfea35cfa456428cec6a3cdd813ae47781bb3a8d0315eef811632509e4c5cdd1c4ed0e196c389f1e7e3e1877204c351867bea10ad515523bf733b4d8c41b5c018a8185293bb2f36ddcbdad4a2a8441de7d623f17b7256608599c456c51523ec37157b4de392ecfe9fce11e8497d6c556f2cd81d76429b7d1d6bd0c6f9d2a75430d17cfcb4376e56f83192177e15a54ac1f7f9481c62bac5b7ef5f2201a2392469c30ce6b5dc400a20d416ccb526fb76396a5c19c6c1a4f05dd4d6b2b4e7d74a73197d76bf7af233fbc770ad5d14576b8d36a1c79d41615489593c674db3adb9e84e9a9ec657910a88c02ae9abffe6b3cc085e3862d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011d67145ae267c06757f7c53d978230d903929c1f8b8d646a68515ea18458c7400000000000000000000000000000000000000000000000000000000000000001d8360f3bb72a35c07bbc1db5e73eb667327836b3dd99fc46cffb57f8ef98e5b2a906c9b8252d74b29210768f31ced8dbb4bc3b340cee47bf9811eea0a0fca9128e22a8d248ce436cabd9b3584293bb618582c7a20deb80f6ffda0ffbeaf79072821b1cc587befe159cb17ef20752b01d4fbb8cf6081bc8a866200a3373c763d000000000000000000000000000000000000000000000000000000000000000018078dae74cf20c3f4bbc7179e56bab0c263f2f2f461443b566b862a6e549033272a68a89d23ab9a4db45ae8ae7af80976daa9c5c296d243f732f8de7fee402713c58e4c4d1ff8cae2907be4cef67e6f8998c54450277c140981504cff2a10902ac7b35bbcefb663cf8f2ac37ed4f6f687bb5777955b3c8f671fcea3e6fbbd2613e5070fd1e6ac5f8de9ee1e106ef6e29ca5cbe6610d06d219284b033dcaaa35157e00ad248b17f11d4acca301fd6430445c01eefc4139e6b6d3969b8ef5cd8b023903854efcd640cc26cf959fb40d1806043738acabea6f68de994fb8c2f66402e650ba674cc8533775d558346050f50f44241adf2081bb079a0e635fa020742423204a8ee45ef847856771202e9466576446dea4b015befbf3fe4ad35991c22c369723cb182699e7e04a5dc9cf65381e24bda146a29bc5d8ef07b94365dfaa2cb14ba7b0c73dd5ecee90509a68a6baa272eebaa8c5dc391f034ed0dd714ca20840014ba6a0f03a3f97074b75b7adda0076de554c75aceacf00f173add20190225ce925553057cb3de756f741bbc363c08f165ae2936fafbbb32bac5c465d5b1d44eed467fc79e725adfcb39eb649101e1d0ce7a0375daad998cd15405649210ec51e5a33ca666eb9b3a91c45d50644759f549426ecaab073364199690fcbb31c3303d00b05368fc159dc33aff3d26fd972024ecc3b28caab3a8a144e80fa361372996256173e343b2e20bb99164a2a2095dbf9ffe232b98fe4d228b6c8a0db1145a4465dc325d674a6cd8a7fcc4af6f8860cc5ada689f81cdd36d1397e422920d6c89e69b14c729dd72e53e2c2d1e5d1a1bf428232be94ef9a43c2c89dcc250466e1ec3d536af8b9ea9491f269891c43ee170299d4f1bda2d2a239ad2226c81ff39fc7969c0dda6f483389d09c32b1b59c4bbf06a7984fc1122bfff7b6bf3a01a273327da8bd46dd6874d096065b61dbd7b9dec0ade0f85c1fdcb85df2728f2a9ad41a44bc1020a9918cffcbcb3ecf5500779500140db58955f9e3e1c2830c162d51972b1ab6e12264232b2f60aa8af38b506e0a2aa8c087813f3fe600e2e61d222d6b44fba1fc7eacb057b8fd80a0bd3955a6a5e9f66709b4a0ca6339c5d20085de71cbbbec3e36fc84fd85526514e476608fb483fbabd3be6f4138e5e18627ef103466b63cdecb9fc9508ec07b86199fbdaa1e25aecaf2ee44ae0a6f1abf04d7e20e2b1d16fc9846c40712f327c76cc961f6337413084193288ffdd9a7dc1749ea5ad156779cc1b1c434ee42668fe8b175be145f5cc627d65d3511db422d18c8e557fd96db29cae54e92df157d782484690c29449bc68876ff91f2c68d5d0790f248aafa54201cf96679578a6a8562d9a0a183c2e9a8f618e104d0ea5a8011453915735af39a1a841e7d2a870eb5d65d924ccd2709d18546589681ff491114c3600c33d0cf4dead9f0a6aefc4b590b8b42bc9129645c490a0608c4faac3904d7e20e2b1d16fc9846c40712f327c76cc961f6337413084193288ffdd9a7dc04b174f80c5c35811173ea6b474422c5b162c02322cb1e066ec1681cc7bd29b10bd84205b85b5a935553a7a858872522a6f9b3c779c51f382666503e0a7a4c242fd8027b92b2ee097b8c80799873bcd02e346bbabf1e2d4828cb9c115771e7be155eca74cccf6766964b431dd9aaf1e0aa78fe1d5ba86c5411e9f80ca2f9335c25fe0d558b7c5a58f4f8867d98b98a0e980b68dedce0e6fa3f49ae0b325b92a42ceb800ea4962d5b519259610bab1761e9c7782e6429b03251086998a118e8d41845bf31bdfaa26c2195701027bbe914126d7f91050128988a7dcec69d52ced6', 'transcript_type': 'EVM'}\n", + "Time gen prf: 0.7556688785552979 seconds\n" ] } ], "source": [ "# Here verifier & prover can concurrently call setup since all params are public to get pk.\n", "# Here write as verifier function to emphasize that verifier must calculate its own vk to be sure\n", - "verifier_setup(verifier_model_path, verifier_compiled_model_path, settings_path,vk_path, pk_path )\n", + "setup(verifier_model_path, verifier_compiled_model_path, settings_path,vk_path, pk_path )\n", "\n", "print(\"=======================================\")\n", "# Prover generates proof\n", @@ -284,25 +294,31 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 20, "metadata": {}, "outputs": [ { - "name": "stdout", - "output_type": "stream", - "text": [ - "num_inputs: 1\n", - "prf instances: [[[13487293430113784910, 12778393823498462323, 6887806571578554205, 1244238496825937973], [12436184717236109307, 3962172157175319849, 7381016538464732718, 1011752739694698287], [1786891257776170021, 2456895193576464786, 15851013958699291921, 426370788491761118]]]\n", - "proof boolean: 1.0\n", - "proof result 1 : 42.125\n", - "verified\n" - ] + "data": { + "text/plain": [ + "42.125" + ] + }, + "execution_count": 20, + "metadata": {}, + "output_type": "execute_result" } ], "source": [ "# Verifier verifies\n", - "verifier_verify(proof_path, settings_path, vk_path)" + "verifier_verify(proof_path, settings_path, vk_path, selected_columns, commitment_maps)" ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { @@ -321,7 +337,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.0" + "version": "3.12.1" }, "orig_nbformat": 4 }, diff --git a/examples/mean/mean_OG.ipynb b/examples/mean/mean_OG.ipynb index 84cd309..eff0451 100644 --- a/examples/mean/mean_OG.ipynb +++ b/examples/mean/mean_OG.ipynb @@ -137,6 +137,17 @@ "theory_output = torch.mean(data_tensor)" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "scales = [15]\n", + "selected_columns = ['col_name']\n", + "commitment_maps = get_data_commitment_maps(data_path, scales)" + ] + }, { "cell_type": "code", "execution_count": 7, @@ -161,8 +172,8 @@ " def forward(self,X):\n", " return (torch.tensor(1), torch.mean(X))\n", " # return (torch.abs(torch.sum(X)-X.size()[1]*(self.w))<=torch.abs(0.01*X.size()[1]*self.w), self.w)\n", - " \n", - "verifier_define_calculation(dummy_data_path, ['col_name'],sel_dummy_data_path,verifier_model, verifier_model_path)" + "\n", + "verifier_define_calculation(dummy_data_path, selected_columns,sel_dummy_data_path,verifier_model, verifier_model_path)" ] }, { @@ -201,7 +212,7 @@ " def forward(self,X):\n", " return (torch.tensor(1),torch.mean(X))\n", " # return (torch.abs(torch.sum(X)-X.size()[1]*(self.w))<=torch.abs(0.01*X.size()[1]*self.w), self.w)\n", - "prover_gen_settings(data_path,['col_name'], sel_data_path, prover_model,prover_model_path, [15], \"resources\", settings_path)" + "prover_gen_settings(data_path, selected_columns, sel_data_path, prover_model,prover_model_path, scales, \"resources\", settings_path)" ] }, { @@ -253,9 +264,9 @@ } ], "source": [ - "# Here verifier & prover can concurrently call setup since all params are public to get pk. \n", + "# Here verifier & prover can concurrently call setup since all params are public to get pk.\n", "# Here write as verifier function to emphasize that verifier must calculate its own vk to be sure\n", - "verifier_setup(verifier_model_path, verifier_compiled_model_path, settings_path,vk_path, pk_path )\n", + "setup(verifier_model_path, verifier_compiled_model_path, settings_path,vk_path, pk_path )\n", "\n", "print(\"=======================================\")\n", "# Prover generates proof\n", @@ -282,7 +293,7 @@ ], "source": [ "# Verifier verifies\n", - "verifier_verify(proof_path, settings_path, vk_path)" + "verifier_verify(proof_path, settings_path, vk_path, selected_columns, commitment_maps)" ] }, { @@ -309,7 +320,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.0" + "version": "3.11.4" }, "orig_nbformat": 4 }, diff --git a/examples/median/median.ipynb b/examples/median/median.ipynb index abb76c7..25d0a02 100644 --- a/examples/median/median.ipynb +++ b/examples/median/median.ipynb @@ -9,39 +9,40 @@ "name": "stdout", "output_type": "stream", "text": [ - "Requirement already satisfied: ezkl==7.0.0 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 1)) (7.0.0)\n", - "Requirement already satisfied: torch in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 2)) (2.1.1)\n", - "Requirement already satisfied: requests in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 3)) (2.31.0)\n", - "Requirement already satisfied: scipy in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 4)) (1.11.4)\n", - "Requirement already satisfied: numpy in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 5)) (1.26.2)\n", - "Requirement already satisfied: matplotlib in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 6)) (3.8.2)\n", - "Requirement already satisfied: statistics in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 7)) (1.0.3.5)\n", - "Requirement already satisfied: onnx in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 8)) (1.15.0)\n", - "Requirement already satisfied: filelock in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.13.1)\n", - "Requirement already satisfied: fsspec in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (2023.10.0)\n", - "Requirement already satisfied: sympy in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (1.12)\n", - "Requirement already satisfied: jinja2 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.1.2)\n", - "Requirement already satisfied: typing-extensions in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (4.8.0)\n", - "Requirement already satisfied: networkx in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.2.1)\n", - "Requirement already satisfied: idna<4,>=2.5 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.6)\n", - "Requirement already satisfied: charset-normalizer<4,>=2 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.3.2)\n", - "Requirement already satisfied: certifi>=2017.4.17 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->-r ../../requirements.txt (line 3)) (2023.11.17)\n", - "Requirement already satisfied: urllib3<3,>=1.21.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->-r ../../requirements.txt (line 3)) (2.1.0)\n", - "Requirement already satisfied: packaging>=20.0 in /Users/jernkun/Library/Python/3.10/lib/python/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (23.2)\n", - "Requirement already satisfied: pyparsing>=2.3.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (3.1.1)\n", - "Requirement already satisfied: fonttools>=4.22.0 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (4.45.1)\n", - "Requirement already satisfied: contourpy>=1.0.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.2.0)\n", - "Requirement already satisfied: kiwisolver>=1.3.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.4.5)\n", - "Requirement already satisfied: python-dateutil>=2.7 in /Users/jernkun/Library/Python/3.10/lib/python/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (2.8.2)\n", - "Requirement already satisfied: cycler>=0.10 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (0.12.1)\n", - "Requirement already satisfied: pillow>=8 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (10.1.0)\n", - "Requirement already satisfied: docutils>=0.3 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from statistics->-r ../../requirements.txt (line 7)) (0.20.1)\n", - "Requirement already satisfied: protobuf>=3.20.2 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from onnx->-r ../../requirements.txt (line 8)) (4.25.1)\n", - "Requirement already satisfied: six>=1.5 in /Users/jernkun/Library/Python/3.10/lib/python/site-packages (from python-dateutil>=2.7->matplotlib->-r ../../requirements.txt (line 6)) (1.16.0)\n", - "Requirement already satisfied: MarkupSafe>=2.0 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from jinja2->torch->-r ../../requirements.txt (line 2)) (2.1.3)\n", - "Requirement already satisfied: mpmath>=0.19 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from sympy->torch->-r ../../requirements.txt (line 2)) (1.3.0)\n", - "\u001b[33mWARNING: You are using pip version 21.2.3; however, version 23.3.2 is available.\n", - "You should consider upgrading via the '/usr/local/bin/python3 -m pip install --upgrade pip' command.\u001b[0m\n", + "Requirement already satisfied: ezkl==7.0.0 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 1)) (7.0.0)\n", + "Requirement already satisfied: torch in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 2)) (2.2.0)\n", + "Requirement already satisfied: requests in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 3)) (2.31.0)\n", + "Requirement already satisfied: scipy in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 4)) (1.12.0)\n", + "Requirement already satisfied: numpy in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 5)) (1.26.3)\n", + "Requirement already satisfied: matplotlib in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 6)) (3.8.2)\n", + "Requirement already satisfied: statistics in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 7)) (1.0.3.5)\n", + "Requirement already satisfied: onnx in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 8)) (1.15.0)\n", + "Requirement already satisfied: filelock in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.13.1)\n", + "Requirement already satisfied: typing-extensions>=4.8.0 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (4.9.0)\n", + "Requirement already satisfied: sympy in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (1.12)\n", + "Requirement already satisfied: networkx in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.2.1)\n", + "Requirement already satisfied: jinja2 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.1.3)\n", + "Requirement already satisfied: fsspec in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (2023.12.2)\n", + "Requirement already satisfied: charset-normalizer<4,>=2 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.3.2)\n", + "Requirement already satisfied: idna<4,>=2.5 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.6)\n", + "Requirement already satisfied: urllib3<3,>=1.21.1 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from requests->-r ../../requirements.txt (line 3)) (2.2.0)\n", + "Requirement already satisfied: certifi>=2017.4.17 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from requests->-r ../../requirements.txt (line 3)) (2024.2.2)\n", + "Requirement already satisfied: contourpy>=1.0.1 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.2.0)\n", + "Requirement already satisfied: cycler>=0.10 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (0.12.1)\n", + "Requirement already satisfied: fonttools>=4.22.0 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (4.47.2)\n", + "Requirement already satisfied: kiwisolver>=1.3.1 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.4.5)\n", + "Requirement already satisfied: packaging>=20.0 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (23.2)\n", + "Requirement already satisfied: pillow>=8 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (10.2.0)\n", + "Requirement already satisfied: pyparsing>=2.3.1 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (3.1.1)\n", + "Requirement already satisfied: python-dateutil>=2.7 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (2.8.2)\n", + "Requirement already satisfied: docutils>=0.3 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from statistics->-r ../../requirements.txt (line 7)) (0.20.1)\n", + "Requirement already satisfied: protobuf>=3.20.2 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from onnx->-r ../../requirements.txt (line 8)) (4.25.2)\n", + "Requirement already satisfied: six>=1.5 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from python-dateutil>=2.7->matplotlib->-r ../../requirements.txt (line 6)) (1.16.0)\n", + "Requirement already satisfied: MarkupSafe>=2.0 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from jinja2->torch->-r ../../requirements.txt (line 2)) (2.1.4)\n", + "Requirement already satisfied: mpmath>=0.19 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from sympy->torch->-r ../../requirements.txt (line 2)) (1.3.0)\n", + "\n", + "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m23.2.1\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m24.0\u001b[0m\n", + "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n", "Note: you may need to restart the kernel to use updated packages.\n" ] } @@ -119,7 +120,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 5, "metadata": {}, "outputs": [], "source": [ @@ -140,6 +141,17 @@ "upper_to_median = torch.tensor(np.sort(data)[int(len(data)/2)])" ] }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [], + "source": [ + "scales = [8]\n", + "selected_columns = ['col_name']\n", + "commitment_maps = get_data_commitment_maps(data_path, scales)" + ] + }, { "cell_type": "code", "execution_count": 7, @@ -149,14 +161,14 @@ "name": "stdout", "output_type": "stream", "text": [ - "dummy output: tensor(5.4000, dtype=torch.float64)\n" + "dummy output: tensor(15.8000, dtype=torch.float64)\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/torch/onnx/symbolic_opset9.py:2174: FutureWarning: 'torch.onnx.symbolic_opset9._cast_Bool' is deprecated in version 2.0 and will be removed in the future. Please Avoid using this function and create a Cast node instead.\n", + "/Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages/torch/onnx/symbolic_opset9.py:2174: FutureWarning: 'torch.onnx.symbolic_opset9._cast_Bool' is deprecated in version 2.0 and will be removed in the future. Please Avoid using this function and create a Cast node instead.\n", " return fn(g, to_cast_func(g, input, False), to_cast_func(g, other, False))\n" ] } @@ -187,17 +199,17 @@ " lower_cons = torch.sum((X>1.01*self.lower).double())==half_len\n", " upper_exist = torch.sum((torch.abs(X-self.upper)<=torch.abs(0.01*self.upper)).double())>0\n", " upper_cons = torch.sum((X<0.99*self.upper).double())==half_len\n", - " bound = count_less==half_len\n", + " bound = 2*count_less== 2*half_len\n", " # 0.02 since 2*0.01\n", " bound_avg = (torch.abs(self.lower+self.upper-2*self.w)<=torch.abs(0.02*self.w))\n", "\n", " median_in_cons = torch.logical_and(less_cons, more_cons)\n", " median_out_cons = torch.logical_and(torch.logical_and(bound, bound_avg), torch.logical_and(torch.logical_and(lower_cons, upper_cons), torch.logical_and(lower_exist, upper_exist)))\n", - " \n", + "\n", " return(torch.where(count_equal==0, median_out_cons, median_in_cons), self.w)\n", "\n", " \n", - "verifier_define_calculation(dummy_data_path, ['col_name'],sel_dummy_data_path,verifier_model, verifier_model_path)" + "verifier_define_calculation(dummy_data_path, selected_columns,sel_dummy_data_path,verifier_model, verifier_model_path)" ] }, { @@ -212,23 +224,9 @@ "Theory_output: tensor(49.5500, dtype=torch.float64)\n", "lower: tensor(49.3000, dtype=torch.float64)\n", "upper: tensor(49.8000, dtype=torch.float64)\n", - "==== Generate & Calibrate Setting ====\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/torch/onnx/symbolic_opset9.py:2174: FutureWarning: 'torch.onnx.symbolic_opset9._cast_Bool' is deprecated in version 2.0 and will be removed in the future. Please Avoid using this function and create a Cast node instead.\n", - " return fn(g, to_cast_func(g, input, False), to_cast_func(g, other, False))\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "scale: default\n", - "setting: {\"run_args\":{\"tolerance\":{\"val\":0.0,\"scale\":1.0},\"input_scale\":8,\"param_scale\":8,\"scale_rebase_multiplier\":10,\"lookup_range\":[-25112,24986],\"logrows\":16,\"num_inner_cols\":2,\"variables\":[[\"batch_size\",1]],\"input_visibility\":{\"Hashed\":{\"hash_is_public\":true,\"outlets\":[]}},\"output_visibility\":\"Public\",\"param_visibility\":\"Private\"},\"num_rows\":14432,\"total_assignments\":12046,\"total_const_size\":1816,\"model_instance_shapes\":[[1],[1]],\"model_output_scales\":[0,8],\"model_input_scales\":[8],\"module_sizes\":{\"kzg\":[],\"poseidon\":[14432,[1]],\"elgamal\":[0,[0]]},\"required_lookups\":[\"Abs\",{\"GreaterThan\":{\"a\":0.0}},\"KroneckerDelta\"],\"check_mode\":\"UNSAFE\",\"version\":\"7.0.0\",\"num_blinding_factors\":null}\n" + "==== Generate & Calibrate Setting ====\n", + "scale: [8]\n", + "setting: {\"run_args\":{\"tolerance\":{\"val\":0.0,\"scale\":1.0},\"input_scale\":8,\"param_scale\":8,\"scale_rebase_multiplier\":10,\"lookup_range\":[-25112,24986],\"logrows\":16,\"num_inner_cols\":2,\"variables\":[[\"batch_size\",1]],\"input_visibility\":{\"Hashed\":{\"hash_is_public\":true,\"outlets\":[]}},\"output_visibility\":\"Public\",\"param_visibility\":\"Private\"},\"num_rows\":14432,\"total_assignments\":12052,\"total_const_size\":1815,\"model_instance_shapes\":[[1],[1]],\"model_output_scales\":[0,8],\"model_input_scales\":[8],\"module_sizes\":{\"kzg\":[],\"poseidon\":[14432,[1]],\"elgamal\":[0,[0]]},\"required_lookups\":[\"Abs\",{\"GreaterThan\":{\"a\":0.0}},\"KroneckerDelta\"],\"check_mode\":\"UNSAFE\",\"version\":\"7.0.0\",\"num_blinding_factors\":null}\n" ] } ], @@ -260,18 +258,17 @@ " lower_cons = torch.sum((X>1.01*self.lower).double())==half_len\n", " upper_exist = torch.sum((torch.abs(X-self.upper)<=torch.abs(0.01*self.upper)).double())>0\n", " upper_cons = torch.sum((X<0.99*self.upper).double())==half_len\n", - " bound = count_less==half_len\n", + " bound = 2*count_less == 2*half_len\n", " # 0.02 since 2*0.01\n", " bound_avg = (torch.abs(self.lower+self.upper-2*self.w)<=torch.abs(0.02*self.w))\n", "\n", " median_in_cons = torch.logical_and(less_cons, more_cons)\n", " median_out_cons = torch.logical_and(torch.logical_and(bound, bound_avg), torch.logical_and(torch.logical_and(lower_cons, upper_cons), torch.logical_and(lower_exist, upper_exist)))\n", - " \n", " return(torch.where(count_equal==0, median_out_cons, median_in_cons), self.w)\n", "\n", "\n", " \n", - "prover_gen_settings(data_path,['col_name'], sel_data_path, prover_model,prover_model_path, 'default', \"resources\", settings_path)" + "prover_gen_settings(data_path, selected_columns, sel_data_path, prover_model,prover_model_path, scales, \"resources\", settings_path)" ] }, { @@ -306,11 +303,9 @@ "name": "stdout", "output_type": "stream", "text": [ - "Time setup: 6.924681186676025 seconds\n", + "Time setup: 6.857371807098389 seconds\n", "=======================================\n", "Theory output: tensor(49.5500, dtype=torch.float64)\n", - "!@# compiled_model exists? True\n", - "!@# compiled_model exists? True\n", "==== Generating Witness ====\n", "witness boolean: 1.0\n", "witness result 1 : 49.55078125\n", @@ -329,15 +324,15 @@ "name": "stdout", "output_type": "stream", "text": [ - "proof: {'instances': [[[3042937791208075219, 8157070662846698822, 3804781648660056856, 172406108020799675], [12436184717236109307, 3962172157175319849, 7381016538464732718, 1011752739694698287], [18341455175509539295, 12796101019039945164, 1607286914885633240, 1929881192315725821]]], 'proof': '0fdf764a01db698f01e159113a82cc1094af766d032ece813fff28cc383124420a58a83e24c3e55b458807aed6336b160f1cf438b63204d68ddbb42da277014d030f3d026c19149aec065203cde665660612683a6b0a1d44db944e3c816f6ec90e84a97761357711466dbb463d988f79debe08e54b6db1ecf1eb230be6e48fba1126b1b95bef600f8f088ac19ea820840e8e8c40ef9e9dad9cf9957c249a4f091c584c52cb72144f53aabde00019a324de36747fb296be88c9eac7f2ceb587a116ecb908bde274d4951c05df39516b77e6a539113337b8f70a6a15a1c4250f8e2c3305cff24f9ede9d2edb24c266e86e3ceba7b6d291fda84eae834cf4abee30280fff28bf91dede0df0ad07b188010491d01279c21ceeb38b429e16dc5c28372d0136da4df2926029db314c9bae83fe58f7236bf2a01b35444f43d075d6e0c20399efded4ed35dc67c12f4927423e4509a849cc06a10d4f2c6a11b0b48924f403ea7e7bce901ccb2d25607d0364757e83ff2b84cb8b78585d0a2fcde9b61b0125a6497bdea0e1d61794bed501f3b9c4d588cd8228b157931a1a3b48a7fcc9951ecc828b355197c8d960f449968a7b13fe5662dc56f3c557a7ca5c397d4984841dddeacc58139d7cf30f0ef1c7ca6debc5f141d6f8015dd27bce9034cdc8f08b13d492952fe6b4a4beb2cfef64bf168d4608824af90f074adbf12aa64e88bb5a2e44f4ddba71ee2b1fe0cf2a16cdd8ab10d27a2dbdde9a4ea5b1e0732eee9a6d1925c2b00778e0005e8c7bacb9e6c0eb6ef245f962a0b1f16479816ec49bb35e0bd4a25023bdc8ef5a969ca1c34d9be11a35bc1d48476bedaec4f0e798b8310013d0a0f699c8a5c654055b7d4a8fb219159650f52c7074cb8ccde6cb1a9f30cd2990f8b6126138656ef3b88f173e4dbf67d8d25fe2f4f4144e9737a6d27dd28c25249e0474681e7a64b861ea6641c04fb4c025744a17bdc443d8e1ec8c15da8417e8b2b254854fbed70a1c27057309925c74754d269cb136055db07a20fa930d111850770ec674aff132d600bcb4551c49359c06a02ee1312338620891856e4e1cda7159c1123918406f96df8d384fc07f26c0a4dedba490a713a4f8b8c11b9207427114eb97b638a5996484c1944770c3235e4d80b147801e42416a0ae28f30106e2dc75299499c0da0597a0e3f4871bb519061466a8667457b756f60735d8320fd67c09764871cdab5e843eeda1d2575f464be0d1e6ff7cf0186efa63c572810923fc17f250f67ea7d803fbab9e04874f72097b6846c22a3c3f63e8991af6e29fc13f6d413264d51b687e311ca85a42d45c84aa11ae401a823f20ff9c6ec410eb68287c0324ac32d87ef284e0e1dc3346226004c06f7d29a7ef2307f0e1e7c22d5e75dd06de71de63a667c2aa35c216f5ebf1a83b68fc7c2a916ca9791484011975989ebae0337b0b2a63a74dfab803cbc8d020ae44fa6a0d61adb321e84e01a743efe045ea4b2a2e4e07d1d7aecf709b35db35dc21c3c5cc46459093833c62608480d09094de8860a0eec02a66b38555eb7c5c86785f0676ed9d806b26e72215f8c96179ad795b9eabfc2fe53336554e70009c019a093fe9f426bf47bab7c143fdcd72f542d826078a5122a4a74b46d86070c179e9ef5ad16079eda887c5e020059e30f7b06a2a011516f62161b2f95079a96a51f149f397887868e282f040791a356e0ca81c6c0236de18613f74e4d5d40d24090fc3082e0afc9603662bd0c6cac01de82c1de2a4e5dd8db5154d7a45c8025533a9b05001840ab862957b61eea6506015a2c0c6238f6ef04ae0a00b7199d0111a5ee55c5d5db1665f8c8122f2849fe6dbc081bd2ceaf7188ecf2f8d531b84eb88da2213b4466c495def64806a568837d21dfcc94a8eb79fcb827ca9ca01b0757bf07baaca1a7ed328c32c624c40bbf89396d2dcc9c9ca0c1210fc2eae31b85fd6a40e3138b82b3566aaf402470ea627fbd9327a9e8e8cbb23f459b5a5dcc87400476c0999bb904b7750be90e303d0c39166206d16c664e8f27b58ba350353555531ce4045e9fd3187073bf2c6b2dfebe9f2c02c4494ebe732b63280b16baf9c46dde5d33f8ac046a9ccacb06d67cc6e69156c7d69ade755d90be12bc564c99be7460a2dfe881a013820b0d08bc9a16f468c4800e49ff9062744bad1bd65fc4678835313bf2b4c3343974ad017e82632f2dc0daec33f231a24243d6354f13876c20f26f16561c99fa99b6ff0071af9774447942eccba2a73fc3c01ca3af7e95a476e0256561b67d20102eff235f51dce18e22a6803c08bbe4d67ae9d2e01461f03b33e916e674c2bf3f307a0d3b9b350af1dc496ba719cb1fac95a59872bbd073b46593b6e9e1c4595463251b556d1435fa9d410ab96aacd7d58da7d77f827bfbb5c9d7769532d58c00099512f9c892b7e23c9621126fbf45334ffc4653b1025168c30594cf2207961e85dd1e015594178e2c1c22dde25e885755a8b4339b3ea1e27d1b1bdad31620b1ea8e0f284e0815e40bbcc30fde350a24620a28bdef3e57e5d14a3bb4d7e297edd5d60ad347e322dea7719e8202429a1d7936effb0b99bc9edb027823ec3f4aed44e82336ee9a885c9102332b191f8edb2e383afee6e189934e65093cfd778b73b3302d6eece8301cd1a6ed9dfcbc659e825ccbec594022b82a142c9b515094862ef2196cfc0b6f6bb24f09f0f1dea0d1bfcec0b779e5584361bdcb114b3ba2037f8514652a43301c1a5e2ad9235efaf4b3275dfa611909e859b1b182816b7e054a0b067e40489f01a387a86d0df8cec28ddce36fcd2d970e2f7bbd29e5623861f3651b184b99324caea58a98e012b2444595c23530f6676d004eef6f3f86175c30451f8577f3e3fb960164c34c2a2c72588bc5b9a66f6e58c7b04a6d73f381a52ec3305849acfd6be5e7db9ebc18084ced37641a79130bd5ac16c754492cc3761f490998460f5146378b7e1edf8c84f02863cc8f767ccdc780555826f025b2bc4c5d18007d7c5ef156a2a587d20aeebd25ea51f8c6ab9540f20887adfe123e19ef6b0a6f5141e57efa0b8ab3a5ea81a2bb4d139fda8230ad8e45aa6c3a7903b3f7ed21ff042a2ae6e17819c3e9914b85835d8c7958b086907c8a259afa7b6f5a08a50d5ca443ee3b57cbf681ea4d2381f5e5d8e37537a5f534d89476492ab85d183610ff25aff274f7b54f2df81d8b20623ba9dc65e9d2f631044cd462c75bc1af4c2c47718a812bf9f18cae91bb66f7e2639968a3a9871e53e3e748f03e711a6cf02b1fab7fdc11c64f7d6f3c89be6efcad315c78a0d9d81806de2a932cdf2f9e8d24035b1aa88c5822371d4b542ac677d18a36d1c58ca1485d7b032f6afb23910a20b29a3e8b860b648b9b7d74e579213d5d1d2ac580f6e159a22c62ec9da27ee22a4baa1f68c94ffcbad5e268f6bffdb013ef12bb25db5ec0ff57205cecd14478304d2608f9d74973637aa711c0cce6fa258e34616c2d4eda5089b98face74909047644a7aa0d4c8f0882413bd8c5fca72a86d448ffed2e6e1f7fc2a2d71830ad1fab8ae6eff6ad776246301bcac0068364bbf94ab6fb5baa0227c71de01b8896269004cc7083d9da6e1ac6b416b8061226833535827cc9e5ee9ad2ca50e0340d030e0a0fe3f43fa80be9d61ae060f0b67b660416cde65aab32dff30bdb77cc2116be4881a809530b26ba0ff829ded328f726c57c101c023ef163d8a4d34c6d4316593503e74e0f784c7ae0464284f8a7fdbed7fe8002676bb597f21241cadc490e7271a554b1b626ad21b51081f16e39ca32d79cce3ca4fb3c70ca26d510a2dc0b13c0b50b8a2a367e851d5bc57ebc9196de14bff65d9f6796fa46f53644cae91d84203f0ec3164e01f90ac9041ab9ce52e7d052b8da2ff67e36ef35cedcdad2219e3b5fabe809875e7b369afa8e2c5f93ef6b0ba7118d8fadfd3ca081c0650a0000000000000000000000000000000000000000000000000000000000000000069bd823c158bc8ef5e4c0af44d046bd21f59852a755bcc99649663b629071e817109e7acbc50c2610bda1b9ce8265fc51469518a08f61f9d5ca3c2e520ffdb723af744b4499d9c04da50e5f99be8fecca0cf7f6a9e051cb764787002db915151245d09ba864d634153cd0909d00f5e0c31be9ebe07dc276730db8d1b6e329481c412d6145115ce1e94e7b1ebb6799f4d67a24bb96a52d2138ea10e4112aa2bc1dca780b1ac42222408d7d683a7a25b1e52b899d1b8462f0f55997cea2f2c295242a612347b7413151dbac266635f9974c6039ae0317f68b3107ffacf95bab8a0c0a8547a1e296e1448bc593dc9326aac039db85a29d9e86b0d5d7597e2c509c11299fcb9604141ea27f86e3f88b389e65311916d4726367f80666c48e30f03719f003478fa0641ba6e15c169e59f751976a2d38e151eb50a23bee14539d4ad725dfa95dd0b56ae78077e8907187fda194eadfc9617f6e23d37755b38f11f05a06ea26bf606b30b5b97d7508ba7d3f5b608f33e779964e80282ccf1bb2c5f09c0a67797fb0e823c182dfecb912b5ed02320c87831388c221abebe433bbd5aa411dbac23c1d402139a53246ee1caeb7a07228d90a41c82b335b7c6e782eea3a09239bbab743c3230c783cdac1cc6fbb395121593a5e17cec028ec59ddb5c8a941098fce2cb4c36bbc847c86e0a55a7b2ee5edb1953ef3d1f4fa8b47e51d8c59571f1bb86c58a5f7d757a9295762686c8be90aa263ad13b3b6d60ec11ed18652a6073b957e75068af6d6157b7eecc748566944e2e0ea8642edcf4a45bbdc5e693427a5952b682990633e964dd43010489a735bf1678206ae275ec8c89a5a9bf8012fe39408f8babdeec0e010a1302f2a149dd6ece072854802ae9a93e5b5beefdb13d2bcc86f456d70b5e406a543c158fa4925fb06f04e0c05d1bdd915f7833e6c1c25325d58ecb3caae0d353c676c057c7d8bdfcd3f9f051b6d02bdf4cf53fd130222759abcf8d2d6e2c54d7d742d609a3bd3e5afebc468529cc39abb4e8106b616eef833e340b224abff7234f00ac748a167087b79c6aa8264c45f10f915e0de054d9716bee30c32bb22c6441d7a1ef8f735ea2e3a461bd1666671c72cc713182ea0241f62f3f09b0300eb9c7fdcc0b689f01db259c10fb4bb488bfb3d97b0522884c17a592fac7587859af18ac4945eac752046a5b4491fd5d0b657bc30679026ff66996f9c16011d7e0570a03c98bf19ef6a05310f2b8852555f7b7e03637a108352e5e1aad6373ec6043f8956ea2340e5e44272eb8b760e290b9264ce43fa0c35da09a8ee14aa021af16b710361ce4953d44015ce80b4ef854e39ad43a15a1a12e81fbf1ce03c72d93aca229a9ea9f8f2de8e2a64f01666a23f0abc802b43228435f8f213dcaf9be7af6d45b0dd693018bd8f0c04fecacf913af7a18f4d681d222f71a900f1aaf9d30ca0daf470c36ad39e1d91743164323ef8548b24df1c0ae8bd1ca8a921b20e21dd1c5d60cd1873f20fcc38c16cb0ccc9f96adf6bae6f2957dbe1286499e00e59a4453c7e93666d25ac81f61642041d778fd698c1b03a0530935236b54604ba121653cb0284ec74b116922deb4b3866fde9955c5d0c6622c97f193504a4600cfec30665e09857c760a49861c18c544b4ef4acc1f9f18d1810357e584555b5eea4f1f46ac22ae7ebf788833b3ed64e34d33b414b6a94022906cc55062d9f778c1268af7c362afaff883b9a6abad98eb3af16bfeb659576238bd54e6ba75608bccd9195a89d866a6b0a679fbaa9741787420548996279bf0f503665d2cf0e60078f31a3e75e611c21440c98d397c4c9fd9b011016811f270dec6870b50fa545e952cbc5e5222493feba5709615d77643a9407b9d2c027c6069e70a84d453e373651d5659b8ab5f8b77a15dbe19c48d4429c29a84444ff1d1a9b9e19e6ca9c979e8f1613840bd4890f0e73e3bddfb797cea0b3dcd1e78f370d2f13a5111472f036f0e09fd4fac64e86f484663f50f48774be8654f4aa19cd1ba018618182f45901c92f24bf62cbc3444d0dcd5aeaa96c678c410c0c37322c1406f4b75fb27754608dc8f574784e22375d8dca4ee4a0b9b33de68b717923961772d14f1e6d8ce49807b1e1ede805e5389557cb9e07b9cf2b88d41a76cdadb313c182338222976e19b2c710c8e159aee3e23ddea82e0202461a6beebdeb09470370ad5b64108271700dd73dbad33b20bc784f1efc8cca0964bd1cefff233b39277d37240482ca2505d5e7685bb7f00979b6df8da2ff6ba2d709997c1acec167', 'transcript_type': 'EVM'}\n", - "Time gen prf: 9.689649105072021 seconds\n" + "proof: {'instances': [[[3042937791208075219, 8157070662846698822, 3804781648660056856, 172406108020799675], [12436184717236109307, 3962172157175319849, 7381016538464732718, 1011752739694698287], [18341455175509539295, 12796101019039945164, 1607286914885633240, 1929881192315725821]]], 'proof': '25cc712d6d34992fbead930e1e840a614b218f926129ecb7dadee79bf121f7d82d1a8de3b0e152d216a55a3e7a5bc6f5d7ece6e6917c7c29cc18ffd92f1df8db227f121c52ef77da33ed879fbc571ef6f26a50487695bdfbad32a239228869261b857ec74a2479102488d68f846b42b7f21f72ca9e5ffffadba545925f85fc89110867600929d17ca8d7cb962a4b13617cd27ef90b6ceed6e5f9fc42c4b7362a19f746c6e0d9eae85c892a22669a84fcb4532dde9f55b7060e6ff659ff7e349612183b4f220cdbe93468409fcbce06d10bed6c50ea22478618d9e8d5f9f6615c2272df2ea708fe6ef50f4048e8544b9a8cb7c395457a6381aad3a24dfdba21bd121efafedfdb00cf89d02c732e9e66cc22d202be49dabf6ff6d9f4018619d57218034f2a80e9639f3fea01826ec551aa3b705994e907b366cdbd6de2a3a26c1514c7143013a3eb4531d82d21f1ced6af190d4dc6b54cb26ffbe96ecde578dd44154fa5b6445caaaeda6e22601b802bd1d0d5d2a08922095cf82d528b72dc6b7e05674ff1db3ff3bac819b77ab8f85f32958f2dd2c057a9c4d4170bfb99278ae3202a1e031e55a208aec89f49e5d7dd0669dd3ac1162fae682a11b766f290eda3160183f6bf678dc48cbe1ee5413cdffcc70e37ddb055351be91afdc9ad5e342611897b249f55a9fdaeb41c71ab9d105998a6d8cf685e4c233bf52d3755845a382e814e5c386f5fa08be407cf74a85de6686b26cefbacbb85d8f46755659bbc4f28ae6be75c62ab88f3d5260014324e44841892fbd6ad05e1175500ef381605c10bd4a25023bdc8ef5a969ca1c34d9be11a35bc1d48476bedaec4f0e798b8310013d0a0f699c8a5c654055b7d4a8fb219159650f52c7074cb8ccde6cb1a9f30cd2990f8b6126138656ef3b88f173e4dbf67d8d25fe2f4f4144e9737a6d27dd28c25249e0474681e7a64b861ea6641c04fb4c025744a17bdc443d8e1ec8c15da8417e8b2b254854fbed70a1c27057309925c74754d269cb136055db07a20fa930d111850770ec674aff132d600bcb4551c49359c06a02ee1312338620891856e4e1cda7159c1123918406f96df8d384fc07f26c0a4dedba490a713a4f8b8c11b9207427114eb97b638a5996484c1944770c3235e4d80b147801e42416a0ae28f300c73379122017a19ea25a88b4d6bb9119c5063df1821962dfe7291c890e244d52092ad3464c8e0d92267e5d6c173738d136e5b8ad0976d379ce258884c10bda410923fc17f250f67ea7d803fbab9e04874f72097b6846c22a3c3f63e8991af6e29fc13f6d413264d51b687e311ca85a42d45c84aa11ae401a823f20ff9c6ec411244362ea1f033566caddc308c1e9d77d7b63624f5898a72a52551e5f31cb5081e7277b1c7f52d9b077fdf688c5cfd2d1ed963319ffc11162f6bcf69809e2cb40475c6af2a65ac9be6aae612edb487fc501d6e17dba5547e43d65e8468ce0c6120aaddcae739062b1e2169d2d5db47c6e657d03b78a9d0dddd5017d259d8527d00a0e72cf24c70af38323dffb5c4f55984ab4a6798a7f7bd1eb2e44bfdce02392419a132aef8d913810f6ca56b8cb3bc879d7564eaab982b4c89aa82c98919d9245eb22614a24ad7ab4fa19c2e7fc62e0ac31a2dcb4d853859f688a3c37bbf760a2c42c0551099a07b2350a4670e855dde648f4cef2c4ca551c44fff64284bbd0c04df7b32f6419c9e0014cd84edc8291521039d3634a770a936d20b29ac740a278f8bf3f7cc576b6fbb77504df799c553b8c6d3f915fb597534366af1ed493513745cc84c966b156220c5a927169267137fcfa3df1f30a4970edd868973651b236562d71ccdbe41207b6bd9a3d330d11c028e98130c2447a33e64f5d618d69709598c8cc4ac76b6934aa1acdad53d62c79edd6e8d543bacb35c3cdb5fd8d2192d185ceca552f849f9ad991fa61d57ecbaccea7a4d12bf5a9125f92894a8a5860777f671c5f329fd7d6573a8b5d2d0b2b088797d00bd793c406e293356e5a90305b6a028b8c2916d769496fb5f2a62e7894da0bd78959c3d653bfc49d4f6b9852afa768aa9d4c7e3cfb0cd38c13961448f6438f3590960ebd9d4335d26959cc709bfb72d8786ca406ef8b51c28943cf1d98e284f249a7d5d4a68c6923d47c27b019f3326993687fef90f69260bba0f3b8f6111bec5b8816f2cf7f79da9a67add2b09b1d661954bfccf20e67b9a270c813bcb3ded1eeea3f4990dacd05a72f94a1c8bcf1e8dcca83873b2eed8bca5f36e25bc34cd8c9357c0d91804732beb65be08dd11e73ab098be6733b58ddc69e72ad384fdb925b4c601a8fe5e1faee1bd110d0f571bb4c7f6864a5a2ea635a7b99826dbd1bdf9dec28a5e202178676b94822d7f8310f8cc5ff00a214fc065193063b42b70bd7148dbda0e258e76c39be52313dbfc4dc33a4b9dfd4f49e8a1a7fb21a20514aadcea67e26500b20358459ab608a798b5a9725b7289575b4c9b8bd441b13aee010a50c4540bc9e42a12e3d641218f04bc912c5aba0f9bc133181536edb535c991255192f79638c13ac574624e0b63693284dbe2072b2f34dd80b87d744b01385fc2ff50b689e7947617e607ce00a2f80769180195be25f36472710e7acb769d573fe78ca573ffa4bd54330c2525d9d48799b56a558976131ee5cb59680c23bfe6fe3c5cfe1e5fab3431634c681639c84e1cbb2c35a93b87a66f45847bc5dd30a502557ec617b927b1ad63b37e0e0e8b1a00c396d2ea23067956560d360d76c4fb69acae6be743b3e9108fba972a2c18cfaca44152e8c2dca0d5fc99442abd1c2356159454e3242948c6c4c0aa0ddb5438ab093012f970a2b341345e4204e6c3ac1dec1684d3ab39d97204936804bf8200293ee766df0e372bd2d902cde3a64fa879c36747184dee2897b0b7b61257ae2286e08df2db907e6ca66426e227c837c104688d9be3f5cd2f18ed6d261343fa0887d1fa73b694cd52c50967c36ecfd53b650b2d273b7c5147211561cf072f7fe1599c04d23c60f64b490b8ba98a95f813f37cea0f6e17ec23e0b5b3c80d1accd7d6b242a76394a97f10b0f6b9210f2dc341678796f0adfc84fbe48d421d07119d137f3874ce067f01000900808c62fe11a94023fd17a2b8267152a545222c81ca51e3fde4a2926ac4caf5f939935c28864c4864a8cb16a1fe8e69a9ea019105ce1d9a9388600b53b2378f2dd873e91e2b8c27bcfe40ccf58ad8904a5e2de7c9c23ff3ab9ce3dd15b14a867cff727d18370329dbf8ef34d7faf3461b1c0a1896f80912618d3ea8f6c22cb9647450e2d6883316016167122555f013fce314dca3de2e6999553ee973017be28292236f3ca8d53e36c3d21c0bda78d142cf032c67ca5f3b544f8ed21e16e777325f1d2a507273db730b781b61453610d3b50526563cf75fc641bd209773234a56f91e9769a35ea6a2b145af8be96ad56c3b16c2a74a846d3e60cba7f729a1aed6946e281851070e2900958e0f0c10b45ab9251cdca85fc099074ab3a8ddd9b7722b3a2d82aaecd450ffe1ee735e6bbe4174055a589c1c6eb7e03d7a31972f72f1f9f002707ab659bec8b0bd9fa7553a2b091acc646042d76c231825312d84d9db29171e80673eb92551238dfc49c958a8f025f8910565477df8b031f57568047e36c74895477cdce4095ff8b7693660fc6c0375f954f7a3afbb2a9f1ed6c68989ec50eaad3f9f3ad47274eee62ef5aafabb289513f99ea79c33bae317ba98018fa63ee0f5eb786c2e4a4cce507632afc0252830b8c491c57e5c673eac18b21bec271dbd5689d1bb1d3029c80205d60a2bf802d40b6f2092bd2e721dae9a54030953ded5d3aa0af11a9ab6eb6cab02be13f0136947f0a2dec98e91627e6f568f64f8db9fa133aae9cabf08e335896f28a97200fb6322935c4c848a9e5077f48093051349da44b4ec4434b0aee22d674cb71900000000000000000000000000000000000000000000000000000000000000000dd97277754dd3fac952c9aa9ce86f21fe482e464384f3eec2ff27bf814dbf9e1454cd093d615c9e73d862b69cc38ea51a6094d7cf1ebc790f75053c6351528e04dae904e0a06a7cc9d0f142d32e6282e483a7fb0a16357eceaa0e81300758b62c02fed8e0d3967dc285303c4133bac5b0cd4eedddd6ab54c304bf49908209420566bfaf9a247cabea3c0b34310be68f5b8bcdb9c41be1c9483574235fcbc91e00aba19f9f1b36615001053ed85594627a4b39b9753b92439953744f48dad48f1c5617d638d375b552ee523fe5d21324851c63f79398a94668634146339c227020c20e3a6162db2ae6f4bf190b678af1c5706b46cac3d02726db4c5f139e913e28dc26f218ac5ec7f05586fbe42c09fa8665f4e9229f4aa7717d831786abdbfe1c8f22a90f875b284e71a93b3dfdc18fc923aa4650b901a850ae0344ec0ccccd2f361042e289b7f68ddecce1d54d4462405881c557aa444e1715a8707271e855108b6639003a3a18a4afd5632d85876fda9b836bb6ed55de4a84c2322281a7ef2c1a2a05a033d7f3c52fab465ee69ffa7e7e28b1a67642baf3291e9ac214cbc029af1c8bfd8c808b65f360747d9c055748ada9c780806778e803d41f5bacc0f717480e3b597c88da9e62c057f021568d59c086a0e88d0ab9452a00de0f7079c81149ebb5717bfe51ae985952b97aab012f53f6d70486fd11e57325f357381c722f0d7bcdf157a462591df68fdeae451c1652d41d0b7c7cee6bbb7aa79359c4920afeea98407342f4f9504dfe598ba868c66943822779d7d8b401cc1ee7a8227316a91b4fe9ef6e73ce6eaf975c2a22b69cec9971bd00191e290999076e2b262924a2696c21d3ba38582f3c05443d94be3311d17ea15364bbd917e661d99b4cd71b3b1373d14f8cdbb2d51a1d9388f7e661f069b46739f44c997c4134c62356bb092ee3decf8aed3a24a75ffe7c28627b6c70a8459856a0d493c701b047d3902f1036731ac250350774d783046a5fb5bcabdfa74cdae558ba5849e7d01b56ea9916b474e81f5f823222c409cc10a3f62e4739b805af1a92d26ca1e5158767b3ea16405e7b8e8f064b61f7804a279a8cdf70576dc3ba5889e85022b500616e7b6b1cd2bbfb408cdc7b6770029c3b8501e29c975f7aa18f6d170a66a84465c9c64c2b19f2f47c08d6f1052bdef1d3ca857a6c6a2f6e95791a8891948c63eed7ee0725aa9d1657302ff56a424e49bf580380499120f772d662ae2e417392549b19bc126186f5ad9d3ede7692bbbe7bd511b51835627ec895cb6515ddcb5b7e22465b0145abc9d0efab80bfef3485f08267e1755bd704170d782064061f492f257e0a2c40825aaffc98e974548b963541a16889f6bbb80695be2ac7d1cbff3a698f9d136b6ee4e4514e7b3d1e5580ffa59694a7a0596695abdec3e0b1018c0fef7b6c028feef6763f51ae7c5baea23ff430b3266ca45eab3921e69b072b0d4fd4f9010c1c85cb41125700220276e2e92b4de32bf474949c2a126e7eb7076866c80e7012667ccf009831fa5eaea3d7e67b9a82359b1c80cdc4482ef3775da6b713bdbf1a9c11209f7b996b6d4765e980db3cd066c35a48ee614cd57a90c4e3744a62712c16c9c53f7065cff5fae5a4fb97ebf174f75f7c5cbb5cc44dfcd694be50d66b034a2a187a44b16740b5b7f126dbe50d256501e9b59b390dacd4dd32a4bf1c8017a08de9afcb96d398859ff8c8c5931f3e418ef57986790022a6e1dec0b5b8102c0a0ab442b84147a24149d5f4b6eef67228fb0f379b827fe04b7afdc3c07f4c240736a0c26fdcda516953914a20f5eba0e61f3dfe1e9a6840eff97729e21bfa2c503aaae8045069967f109f7f4bbd2edc7ab21ff88d93ccb2d2224f3ef28a9f19fe4ba7a1b2d9606d361bb619427f3ff4778ae954db1915b7386a320a3c322306e01f92e040c0da253197ee4ba1bbc5a7d7fa71e6c48d66315bba03a3a81a961d1e5c4778e989d653c3a7d8a78ccc7c70a7bf9df111a21645500b840be1accd07eba22e695c27b4944f9829e789ae5d4e770728318ef077e1ecf83a4d7d22b21812f0f19dadc48209615429238be915256263f7d2cb1fc39b535a746229439d1865e6d16c4d7f2945fd5b29ea90c4254f3dcc0bded66261c0215e32a77d01e03049c16fe89564103ac64870f29e0e18d310bf1bf7905601c3930c67cea36e802b414aa2367f95c4cdc70f905fcbbd1dc7acf286e7f5a0c0a559ae0525eff05d0feb54d81251aa4f46088ef97dd72ef39c1d87bceaa194c9478066c9ba78e07c', 'transcript_type': 'EVM'}\n", + "Time gen prf: 9.461018085479736 seconds\n" ] } ], "source": [ - "# Here verifier & prover can concurrently call setup since all params are public to get pk. \n", + "# Here verifier & prover can concurrently call setup since all params are public to get pk.\n", "# Here write as verifier function to emphasize that verifier must calculate its own vk to be sure\n", - "verifier_setup(verifier_model_path, verifier_compiled_model_path, settings_path,vk_path, pk_path )\n", + "setup(verifier_model_path, verifier_compiled_model_path, settings_path,vk_path, pk_path )\n", "\n", "print(\"=======================================\")\n", "# Prover generates proof\n", @@ -347,24 +342,23 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 11, "metadata": {}, "outputs": [ { - "name": "stdout", - "output_type": "stream", - "text": [ - "num_inputs: 1\n", - "prf instances: [[[3042937791208075219, 8157070662846698822, 3804781648660056856, 172406108020799675], [12436184717236109307, 3962172157175319849, 7381016538464732718, 1011752739694698287], [18341455175509539295, 12796101019039945164, 1607286914885633240, 1929881192315725821]]]\n", - "proof boolean: 1.0\n", - "proof result 1 : 49.55078125\n", - "verified\n" - ] + "data": { + "text/plain": [ + "49.55078125" + ] + }, + "execution_count": 11, + "metadata": {}, + "output_type": "execute_result" } ], "source": [ "# Verifier verifies\n", - "verifier_verify(proof_path, settings_path, vk_path)" + "verifier_verify(proof_path, settings_path, vk_path, selected_columns, commitment_maps)" ] }, { @@ -398,7 +392,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.0" + "version": "3.11.4" }, "orig_nbformat": 4 }, diff --git a/examples/mode/mode.ipynb b/examples/mode/mode.ipynb index fe3e284..39cd599 100644 --- a/examples/mode/mode.ipynb +++ b/examples/mode/mode.ipynb @@ -2,46 +2,47 @@ "cells": [ { "cell_type": "code", - "execution_count": 13, + "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Requirement already satisfied: ezkl==7.0.0 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 1)) (7.0.0)\n", - "Requirement already satisfied: torch in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 2)) (2.1.1)\n", - "Requirement already satisfied: requests in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 3)) (2.31.0)\n", - "Requirement already satisfied: scipy in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 4)) (1.11.4)\n", - "Requirement already satisfied: numpy in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 5)) (1.26.2)\n", - "Requirement already satisfied: matplotlib in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 6)) (3.8.2)\n", - "Requirement already satisfied: statistics in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 7)) (1.0.3.5)\n", - "Requirement already satisfied: onnx in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 8)) (1.15.0)\n", - "Requirement already satisfied: networkx in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.2.1)\n", - "Requirement already satisfied: filelock in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.13.1)\n", - "Requirement already satisfied: fsspec in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (2023.10.0)\n", - "Requirement already satisfied: jinja2 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.1.2)\n", - "Requirement already satisfied: typing-extensions in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (4.8.0)\n", - "Requirement already satisfied: sympy in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (1.12)\n", - "Requirement already satisfied: charset-normalizer<4,>=2 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.3.2)\n", - "Requirement already satisfied: certifi>=2017.4.17 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->-r ../../requirements.txt (line 3)) (2023.11.17)\n", - "Requirement already satisfied: urllib3<3,>=1.21.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->-r ../../requirements.txt (line 3)) (2.1.0)\n", - "Requirement already satisfied: idna<4,>=2.5 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.6)\n", - "Requirement already satisfied: cycler>=0.10 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (0.12.1)\n", - "Requirement already satisfied: python-dateutil>=2.7 in /Users/jernkun/Library/Python/3.10/lib/python/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (2.8.2)\n", - "Requirement already satisfied: kiwisolver>=1.3.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.4.5)\n", - "Requirement already satisfied: fonttools>=4.22.0 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (4.45.1)\n", - "Requirement already satisfied: pillow>=8 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (10.1.0)\n", - "Requirement already satisfied: packaging>=20.0 in /Users/jernkun/Library/Python/3.10/lib/python/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (23.2)\n", - "Requirement already satisfied: pyparsing>=2.3.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (3.1.1)\n", - "Requirement already satisfied: contourpy>=1.0.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.2.0)\n", - "Requirement already satisfied: docutils>=0.3 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from statistics->-r ../../requirements.txt (line 7)) (0.20.1)\n", - "Requirement already satisfied: protobuf>=3.20.2 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from onnx->-r ../../requirements.txt (line 8)) (4.25.1)\n", - "Requirement already satisfied: six>=1.5 in /Users/jernkun/Library/Python/3.10/lib/python/site-packages (from python-dateutil>=2.7->matplotlib->-r ../../requirements.txt (line 6)) (1.16.0)\n", - "Requirement already satisfied: MarkupSafe>=2.0 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from jinja2->torch->-r ../../requirements.txt (line 2)) (2.1.3)\n", - "Requirement already satisfied: mpmath>=0.19 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from sympy->torch->-r ../../requirements.txt (line 2)) (1.3.0)\n", - "\u001b[33mWARNING: You are using pip version 21.2.3; however, version 23.3.2 is available.\n", - "You should consider upgrading via the '/usr/local/bin/python3 -m pip install --upgrade pip' command.\u001b[0m\n", + "Requirement already satisfied: ezkl==7.0.0 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 1)) (7.0.0)\n", + "Requirement already satisfied: torch in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 2)) (2.2.0)\n", + "Requirement already satisfied: requests in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 3)) (2.31.0)\n", + "Requirement already satisfied: scipy in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 4)) (1.12.0)\n", + "Requirement already satisfied: numpy in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 5)) (1.26.3)\n", + "Requirement already satisfied: matplotlib in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 6)) (3.8.2)\n", + "Requirement already satisfied: statistics in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 7)) (1.0.3.5)\n", + "Requirement already satisfied: onnx in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 8)) (1.15.0)\n", + "Requirement already satisfied: filelock in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.13.1)\n", + "Requirement already satisfied: typing-extensions>=4.8.0 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (4.9.0)\n", + "Requirement already satisfied: sympy in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (1.12)\n", + "Requirement already satisfied: networkx in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.2.1)\n", + "Requirement already satisfied: jinja2 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.1.3)\n", + "Requirement already satisfied: fsspec in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (2023.12.2)\n", + "Requirement already satisfied: charset-normalizer<4,>=2 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.3.2)\n", + "Requirement already satisfied: idna<4,>=2.5 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.6)\n", + "Requirement already satisfied: urllib3<3,>=1.21.1 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from requests->-r ../../requirements.txt (line 3)) (2.2.0)\n", + "Requirement already satisfied: certifi>=2017.4.17 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from requests->-r ../../requirements.txt (line 3)) (2024.2.2)\n", + "Requirement already satisfied: contourpy>=1.0.1 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.2.0)\n", + "Requirement already satisfied: cycler>=0.10 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (0.12.1)\n", + "Requirement already satisfied: fonttools>=4.22.0 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (4.47.2)\n", + "Requirement already satisfied: kiwisolver>=1.3.1 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.4.5)\n", + "Requirement already satisfied: packaging>=20.0 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (23.2)\n", + "Requirement already satisfied: pillow>=8 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (10.2.0)\n", + "Requirement already satisfied: pyparsing>=2.3.1 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (3.1.1)\n", + "Requirement already satisfied: python-dateutil>=2.7 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (2.8.2)\n", + "Requirement already satisfied: docutils>=0.3 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from statistics->-r ../../requirements.txt (line 7)) (0.20.1)\n", + "Requirement already satisfied: protobuf>=3.20.2 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from onnx->-r ../../requirements.txt (line 8)) (4.25.2)\n", + "Requirement already satisfied: six>=1.5 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from python-dateutil>=2.7->matplotlib->-r ../../requirements.txt (line 6)) (1.16.0)\n", + "Requirement already satisfied: MarkupSafe>=2.0 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from jinja2->torch->-r ../../requirements.txt (line 2)) (2.1.4)\n", + "Requirement already satisfied: mpmath>=0.19 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from sympy->torch->-r ../../requirements.txt (line 2)) (1.3.0)\n", + "\n", + "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m23.2.1\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m24.0\u001b[0m\n", + "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n", "Note: you may need to restart the kernel to use updated packages.\n" ] } @@ -52,7 +53,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 2, "metadata": {}, "outputs": [], "source": [ @@ -71,7 +72,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 3, "metadata": {}, "outputs": [], "source": [ @@ -86,7 +87,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 4, "metadata": {}, "outputs": [], "source": [ @@ -119,7 +120,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 5, "metadata": {}, "outputs": [], "source": [ @@ -139,7 +140,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 6, "metadata": {}, "outputs": [], "source": [ @@ -162,23 +163,34 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 7, + "metadata": {}, + "outputs": [], + "source": [ + "scales = [1]\n", + "selected_columns = ['col_name']\n", + "commitment_maps = get_data_commitment_maps(data_path, scales)" + ] + }, + { + "cell_type": "code", + "execution_count": 8, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "dummy output: tensor(1.2000)\n" + "dummy output: tensor(26.2000)\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "/var/folders/89/y9dw12v976ngdmqz4l7wbsnr0000gn/T/ipykernel_1914/3973307746.py:10: TracerWarning: Iterating over a tensor might cause the trace to be incorrect. Passing a tensor of different shape won't change the number of iterations executed (and might lead to errors or silently give incorrect results).\n", + "/var/folders/89/y9dw12v976ngdmqz4l7wbsnr0000gn/T/ipykernel_91066/449633495.py:10: TracerWarning: Iterating over a tensor might cause the trace to be incorrect. Passing a tensor of different shape won't change the number of iterations executed (and might lead to errors or silently give incorrect results).\n", " result = torch.tensor([torch.sum((torch.abs(X-ele[0])<=torch.abs(0.01*ele[0])).double())<=count_equal for ele in X[0]])\n", - "/var/folders/89/y9dw12v976ngdmqz4l7wbsnr0000gn/T/ipykernel_1914/3973307746.py:10: TracerWarning: torch.tensor results are registered as constants in the trace. You can safely ignore this warning if you use this function to create tensors out of constant variables that would be the same every time you call this function. In any other case, this might cause the trace to be incorrect.\n", + "/var/folders/89/y9dw12v976ngdmqz4l7wbsnr0000gn/T/ipykernel_91066/449633495.py:10: TracerWarning: torch.tensor results are registered as constants in the trace. You can safely ignore this warning if you use this function to create tensors out of constant variables that would be the same every time you call this function. In any other case, this might cause the trace to be incorrect.\n", " result = torch.tensor([torch.sum((torch.abs(X-ele[0])<=torch.abs(0.01*ele[0])).double())<=count_equal for ele in X[0]])\n" ] } @@ -195,20 +207,27 @@ " count_equal = torch.sum((torch.abs(X-self.w)<=torch.abs(0.01*self.w)).double())\n", " result = torch.tensor([torch.sum((torch.abs(X-ele[0])<=torch.abs(0.01*ele[0])).double())<=count_equal for ele in X[0]])\n", " return (torch.sum(result) == X.size()[1], self.w)\n", - " \n", - "verifier_define_calculation(dummy_data_path, ['col_name'],sel_dummy_data_path,verifier_model, verifier_model_path)" + "\n", + "verifier_define_calculation(dummy_data_path, selected_columns,sel_dummy_data_path,verifier_model, verifier_model_path)" ] }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 9, "metadata": {}, "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Theory_output: tensor(77.)\n" + ] + }, { "name": "stderr", "output_type": "stream", "text": [ - "/var/folders/89/y9dw12v976ngdmqz4l7wbsnr0000gn/T/ipykernel_1914/4275092354.py:11: TracerWarning: Iterating over a tensor might cause the trace to be incorrect. Passing a tensor of different shape won't change the number of iterations executed (and might lead to errors or silently give incorrect results).\n", + "/var/folders/89/y9dw12v976ngdmqz4l7wbsnr0000gn/T/ipykernel_91066/1437681360.py:11: TracerWarning: Iterating over a tensor might cause the trace to be incorrect. Passing a tensor of different shape won't change the number of iterations executed (and might lead to errors or silently give incorrect results).\n", " result = torch.tensor([torch.sum((torch.abs(X-ele[0])<=torch.abs(0.01*ele[0])).double())<=count_equal for ele in X[0]])\n" ] }, @@ -216,17 +235,16 @@ "name": "stdout", "output_type": "stream", "text": [ - "Theory_output: tensor(77.)\n", "==== Generate & Calibrate Setting ====\n", - "scale: default\n", - "setting: {\"run_args\":{\"tolerance\":{\"val\":0.0,\"scale\":1.0},\"input_scale\":9,\"param_scale\":9,\"scale_rebase_multiplier\":10,\"lookup_range\":[0,0],\"logrows\":14,\"num_inner_cols\":2,\"variables\":[[\"batch_size\",1]],\"input_visibility\":{\"Hashed\":{\"hash_is_public\":true,\"outlets\":[]}},\"output_visibility\":\"Public\",\"param_visibility\":\"Private\"},\"num_rows\":14432,\"total_assignments\":300,\"total_const_size\":0,\"model_instance_shapes\":[[1],[1]],\"model_output_scales\":[0,9],\"model_input_scales\":[9],\"module_sizes\":{\"kzg\":[],\"poseidon\":[14432,[1]],\"elgamal\":[0,[0]]},\"required_lookups\":[],\"check_mode\":\"UNSAFE\",\"version\":\"7.0.0\",\"num_blinding_factors\":null}\n" + "scale: [1]\n", + "setting: {\"run_args\":{\"tolerance\":{\"val\":0.0,\"scale\":1.0},\"input_scale\":1,\"param_scale\":1,\"scale_rebase_multiplier\":10,\"lookup_range\":[0,0],\"logrows\":14,\"num_inner_cols\":2,\"variables\":[[\"batch_size\",1]],\"input_visibility\":{\"Hashed\":{\"hash_is_public\":true,\"outlets\":[]}},\"output_visibility\":\"Public\",\"param_visibility\":\"Private\"},\"num_rows\":14432,\"total_assignments\":300,\"total_const_size\":0,\"model_instance_shapes\":[[1],[1]],\"model_output_scales\":[0,1],\"model_input_scales\":[1],\"module_sizes\":{\"kzg\":[],\"poseidon\":[14432,[1]],\"elgamal\":[0,[0]]},\"required_lookups\":[],\"check_mode\":\"UNSAFE\",\"version\":\"7.0.0\",\"num_blinding_factors\":null}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "/var/folders/89/y9dw12v976ngdmqz4l7wbsnr0000gn/T/ipykernel_1914/4275092354.py:11: TracerWarning: torch.tensor results are registered as constants in the trace. You can safely ignore this warning if you use this function to create tensors out of constant variables that would be the same every time you call this function. In any other case, this might cause the trace to be incorrect.\n", + "/var/folders/89/y9dw12v976ngdmqz4l7wbsnr0000gn/T/ipykernel_91066/1437681360.py:11: TracerWarning: torch.tensor results are registered as constants in the trace. You can safely ignore this warning if you use this function to create tensors out of constant variables that would be the same every time you call this function. In any other case, this might cause the trace to be incorrect.\n", " result = torch.tensor([torch.sum((torch.abs(X-ele[0])<=torch.abs(0.01*ele[0])).double())<=count_equal for ele in X[0]])\n" ] } @@ -245,19 +263,25 @@ " result = torch.tensor([torch.sum((torch.abs(X-ele[0])<=torch.abs(0.01*ele[0])).double())<=count_equal for ele in X[0]])\n", " return (torch.sum(result) == X.size()[1], self.w)\n", "\n", - "prover_gen_settings(data_path,['col_name'], sel_data_path, prover_model,prover_model_path, 'default', \"resources\", settings_path)" + "prover_gen_settings(data_path, selected_columns, sel_data_path, prover_model,prover_model_path, scales, \"resources\", settings_path)" ] }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 10, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ - "spawning module 0\n", + "spawning module 0\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ "spawning module 2\n" ] }, @@ -281,11 +305,9 @@ "name": "stdout", "output_type": "stream", "text": [ - "Time setup: 1.4515161514282227 seconds\n", + "Time setup: 1.646347999572754 seconds\n", "=======================================\n", "Theory output: tensor(77.)\n", - "!@# compiled_model exists? False\n", - "!@# compiled_model exists? True\n", "==== Generating Witness ====\n", "witness boolean: 1.0\n", "witness result 1 : 77.0\n", @@ -303,15 +325,15 @@ "name": "stdout", "output_type": "stream", "text": [ - "proof: {'instances': [[[8148670344449872040, 3850172417927569887, 9386325907200828332, 1904490596485556704], [12436184717236109307, 3962172157175319849, 7381016538464732718, 1011752739694698287], [7029749938363617618, 11538692499682334571, 8918902057354509017, 3053834031406807957]]], 'proof': '2b4da5fa8dd677f83be0f52255a34e9922f9a066497840548ab0b99178012f70036dbdf7a27d6f852359a2c8c6cbd9142a5c3ac3fb4b0af97a2823feffe67de8080dc52abcfb6d4223f793b1fe0073d29fd6d65fd5d8e399cca97cd8b3652eb323fd7ee4ac45b721ba7a3f1322c74cfcea86f4f7ea09243cc339e44285e5f6e51f622b97fd8e09e215f5c66dc5b64ab47b8f5562a0a64219a53e558f2ecbd3160b6be4209d13a8f5d3b71cc05f9265934a0b75ffe8cf5842ee05f4ebaff1d86c09d34d0505d9b012e88020ee7103261ed6485e687f0ac2d16d58e34d685135bd1e8b0fede9726ba27d570d6cebcb5b34802a2fa8262fe05fa702ed4c6878d7eb183ce71e9f284208c432211481a9ce524bb598cab76cdc5df059e2cd1fd1cd5406174b369bd4b7dc7d3df215c9511fe2ced1f514eba5434a13b2e89505aee5741a4413b2b60759ff93110a3999c98e03dc355edce324a24429417e88a9b9f6be238a1e9742691686e1e6f342c962194bc23ddc855f0c1effe34b0c29fa264f392157eff5f3d446f76ba1bdc4918fad22179f3b3925e60174c0bd62b5cf13e3ff1f7264d1791199ec2b0e1799232af23db70079dac053963d0cef52c468fc54361d281aba0f153c21eb70dc90e62e27f88ef7615c4dc07d69bf7716cb1c8554d91cc57304c03233372e50a65e910ac978eebff85b653f83c3cc77e7845fd6fc11287758d2125ad7f4450c76b084b9abe8e4de1d2b42935ea0d6e0030666a5f22721bf479ce7e5b76347fd87e68de0613349f1f19e0010c2c15445c415adb1d2491226d8ba7f2d72048308e691c5778e8034f3e918df708a21d6eb491fa2cf3f70137cd94e7181d8dbbf32cbaf8bac0a2a01d08e88d49a0acaf26d3997c471c81f1bb6690f246a0e8c7598520bd8ef6537ffda42e36878f9f76a15cc13a1cab2e3036b83288f63f2553adfd17876f9f54908f68238b515289dc4607f08c554a10524cd50f10b9e67a3d03003f9fcd4c24fd5bbb824bec8eb079e3e6bc7da3b54d12945cc8c35b9bdd30a5ce2085d8c7dcf7f3fd63daf7b7e46b9fb492f0cccf12c085a2b1c033d80fc13b7231d34c5cac3df1cfde95554c8d8c4f78cfe33861c861fbfc9c81f61ee7f5be3d516b888cb024269171c7435259af960abb5592fa90104303614a01e3be9d556ee5d2a0a38069d8eb2ef9fb302ee3b0a664d0a5790e41ef39d31160a24726fd7469d24bf7c50814596e46be24e6e658535be56faa87f092f6c2906debaeeb9841f3ee2179aae5d47aef2b025bdc63585bc36984700951f0bc21fd5ea07d199a1c139650dfaf87223472363b8c2c3523d91c31becfa090e532b5785d9bc3e2063681f0182e41b9f654461acf0b919e1ad94150401abeb0702467a74ca906926f82f89d6cff9439db06342d25856f64ad027f20b549f5a0813974294c50f1901e3618f3d1c1f244c35b230d7a56d00cf559b0e8aee2ed928b5fc4b637fe93a55f376efbe6d1ca3c8c5c5300229c539f38f59faaf8110d6084aa7bee52b1402bc4e930cc80ad7889e77af276467854af699de97f0d5ecd2211cee35297bd127b173773431b2b5150d829cfbf69df20adb49237b4fa7d0221ddcd1215b543f44c5a74c1b04850728b9a6d47f9acf72b02463f47749d77f471ce46b3e9dc6ae139b19830909c4a42c1d438c73cadb3c7a273d7737d1e80ebf1d1070d668c65dda853a964bef13c1e803ba4283fffbf393966430303efc3acf1ea5b1df1a1da87d995c5b2ea68606aa1dacf3db1e1aa19558f0dde0780647022551405c553f2930ad08829b0f0a5f9dfeaf00cf83580e1d7fc1bdb6386697111f57c6d9e72033c05b58b19980a5782e86d02a54f6c730cd8a439251acf476b300e0cb69e72294436e66ff11be5f81953807fa398b2fac046622bece168cae7d1c576950ba271019a9aaa154ad1897e50416851c592616a42b4efd4b19ee70150e0507c5edf8e4097a60a37d2ad3e3a29a01a6a8c5c8fc241fb5719cabcd775415e87710a0a5b22a27a6bb26e19348bb0fa8b91d0fadc6439fa4106c6fe3867b1b0aace429a86c9e7e20ff61ddf7e63f41daf8c4cae619f091a25c6fd0eeac051d1d9c2e8b3b901fb5a9e1d5fc922ccc758822fd269c6177c40f25222e48bd3d0bb67b6088895b73ad4379fa75243ea5e6757937d73847ef0ef2ed3f3ad43b3f1e86e676723af6fdf21ff282d5713434e7efcb42d84023c9d675570546183a4c202f3be738b33c8167beb467278d92072878f4e687b44410826754f7fbd803cd1022ec50dbedba70ea11a0b4089ea75120fd5a2f82f871b2d61183259b5117e00fe65d62ba7330c31c3b69af4d09aa37bfcf41893c8bf19d39ddbe68b57f84c7237b5e8fbabea88d957b9198d3c4ae48517359263c7975ba8b6f7c968d15072604032ceace2e9f105957d187b44c1f432450878b6cde44d5f8b3e08879dd88b603d46b73edc880a804cc4183dd0e2d72e41167f8e75e98d819a47a41b81c40211c155e66ea4b71ec252b550115ffee01df67eadc0e4a30960ad68dcc67de6ca22a4c94d17e505b04c28df1bdbfd216be95c6c02ae8b16cd204b86f60a0882591000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002d3e07d390b77999255d4b6d09ef414eb377c0deaf67d3feb8447f3b5146f0322e8255b0e51ea38b37309a8fb3c30040b1c3748b9afd9c606a73098d765fca4604c53d0f5b93b39167fb4d444d22af64f070d3ee57627487fbf15a818cf9973508f932a208bf4afbee7f9ab0e4451e2d8e0b0e2590b2f9760d33813c7f70a0201ba5746a45df59dba16a723e73283e93e4063182189e6fb3745d45caa5f44d131af676cb460bae6461e566b3ea6686d043f29e9f3e678ea359ae8c5bac6bbd722bacf80651e64adac6cfa3574203477267cce2d4952e80883972d4e56fbb2c2722653ea9ce99976af46475aeb4fea3218cc7f4872e801c0204a1187e85a03b7c2a9354a88bed41668dea789973000c45550fb40ba55943b9859f971a06d7df1c268683fe57b613f890a977aa018fcc8e92f67aa6972c4b29eadb41292c1389d4099cc9970aac034a0bd118a6bc6fe69788a5b5361edf93e88a300f7026f70a591106b38d64dd1782fbcae367356b28b666f47ff99c904e7195fd01d5359548ec117908f8b48d13a09fc28fd83bc65b1e3bac4d7652fd4f093cb91f3def583e692e4cc369116c63761d456e93e5b1a046054602188eeff45f138665d1fe6d5e8506baff2b954c796b86acfdb1777a266be77b0481199ad9fd23de8931c2ab3ef202782920fe94536330e6aaa5cad3dd73e7d91086af364f6740a8ebfa59081d9d1dde025b188e28f54c21d4765bd27b4b4ca6f3e715bbc547e0a89e9c50fa3b2017087643e218d204c076b381a864e8bc51d21d4af7d117eb6c91eafc623a341918ebe227b8bd3084eef1eeb6dd8bc375db62566b8a162194385efb12b20c60b82822401dbd1e646d62d6c4ba771630fe4cfa47cdbada4c7884ebbd3d629c2d191db76fb2efba05e46c6820ba0e7388ff9f8592805d1198eee2e9da748419ae1120fe4da130d8fd623fab11c2c1f0e75f4c33423351ba5b08c97297f1ece06790176268d448f5cb39a575789691affe0721738c44c9a79267c72dc17265e1203e1e2541345e10c068bb6d63faedd3a69f487dbaff397c747b9f127f73b7af152605f49adc6e93a63a96af5689f81205e07e5f20a4e810102bc8b8368d75b0575f', 'transcript_type': 'EVM'}\n", - "Time gen prf: 1.7317252159118652 seconds\n" + "proof: {'instances': [[[8983262245034475985, 4321099455052339947, 15405541267776549565, 129283864358809647], [12436184717236109307, 3962172157175319849, 7381016538464732718, 1011752739694698287], [2847721487471738066, 3094933423049675290, 17348522929905272778, 2381998173652826967]]], 'proof': '15744568d7e37b03a18cf8ca3d4a54528e996c0f1ba86a2819c2852307b55aff2dd8d04937c824d0f6e8a8d6e5fd80309cf3f4bc2e01e8a37e7f2a2ba24c6f89071774da94324f2e70283d40ccd1d7e39a1f3fa2f8afaa60191573f62c43e5df1d39bed9e2fafea08db8be6664916ffaf4a74090e2fedabb8ab54c8b7b5053422096a5666d6a57b1afa1ad89802c2318ad2c83668210ce3ac79b743cc36f7f0b18943bcaa58a3da35b69e61267f7e3c9e24aa8f88c1dc33676d54e579454c1cf04579fce0aa8e885329de739c5ee2629a6d2d769e30582f95004fe69596b9bb81bc105d07d26aed722da4096bc8d4dc242c05758addde4de5a3b8612023c50211971e4b3389df3926edd3d7d6673d245e289a0cd70e0def40d8e56cda6ed1d2102d67d589edd3510b783e6ce2d5b9f20c14334c2980c024a8401992661f6976e1449a8a541f60a141f63d787830e9697e1aab251d4b4cbada976cd03dd6c02820a0b3743b9c588334bbb65875b5469915df2633e3226ed9a1df4bca5bcc4d82c2d991a7e9028b02367f00f8ade143f989b241229c8f217d20983668b5ae660e1188b250377d4c167ba91a07750d7043574d8e93f0bbf78c57354648369b0fcae07e64e34e8e5ffbe27515b086d1cf1b83c97aea1e1e9242f36a7489ebfdb4450225666710f7797c44d9e077a7d1f8623eb300d0f6d01c763b74994da93d5bd1e2a3efab0f147514ecc29bd11f9ca8bf6d272b72c3ae83a7e25dbb252f159d0cc1c8c64538a9dad75864a9e3b2b5f533edac6cd344eeb56f8e0b5a29000c2911f1d9decb455fa1a5eb5b329362692f7c3b71f32507ff5656b9793ad78982782d513ea1ce70be0cbdc3860c2db16a3492828d90208a73b16859b432e32f697bcbe02223be1f3c0f008699363ab6d5a23b348fb36a94e9f07775851c70c30f771220d165f2b9c2837af4dcf6660d5afa0dc229b36d2f104e993d44baab025d507422486131ae6dab40f4ba91727fcdced5a1b817bcb34e14c347ac9535f894da78a0a7a65aaa5d2f506d4f43558af8e27b6adeca95db8dc90f6a8c21ed22fefc247131ed1b4890ef7cfa5c5db8d64e5148f4bae0cba46e885f7e2a9f3c5fc7e22c32604e1d7d2527faec3b43dab80536ee1545f78b15d1ecdcc1552a390806f07552eee9d1dee526ca9691f9c1a885eb7b31000592aa106eb630091644efc024cf51d1bfe7846043e7c52d7acc7acb6f5ee4ef76f72198da22b271261079c47db032fae51e2bf7dd0f542335dfb6ca54c200f4d1956dab101a68ec019fff81d61210b60a6f9521a5fd019f8ed80bdbac2d53934b87a2bef2f4c5c945738a65f11180da62db00a54b64cffe23160c519aa319b5d26f0ff7d8e888fb09c8e35aae6162fb3b71f99a15a0a33ab090578e9599d3e84f7bf5c0dd03e95b70c37a73dfa3720ba6ab74c952ef9cced6fc1904e290f177f16ee5ea37e742e5cfbc507d6a36120e05afef69f6bbbe34feb710b91bb359d7bdbd7bd2c622c94c00d988c5601a52e00ca610e166c606d65b6b4a4a3d592dce12672472c5cc4f8d3b0a581cbaa9d0a61bffbe86689573d3fc406cf555f36cc6acfae63427160a859096c3b818e06091462c8c291a47e3783c0f668feadbcb67649c1a030402cf917ed19fa6c064129766f96fa504642ad43685f974783fdf65ea0948f50c434a1273bc536038d2026b82abba076637ecf63e78bb6f0487c2713d87346f5c3290d897d6f1b6c0a621e1d1457d1bddc3f21a9f8dfc2f7639936f081eaa31854f1f495e81f1de703252d08934a0d3cc68e7f1cf6628e61135e69524d0343ea1715a41a4b225e6d83dc142d18a187bf5b00a3bf0b37317c18c5b404ad11d90bc29c207a69fa97b0bf9a21c1b4327f01c0897ff49ac8918775a257924393c3bff9a8cdefb2ea4fed863c27965f553517d6ba2e5e9b5c13e2434790c9940a073465e9729e518d2f8fb73f186c326ae144f2df95e32097330eb6fa701bf968428831c9a2f9f2f86beeff351cc992f67f91771ada490572866c1e0310d86eca1b2b74c80972c69027e8cc6f0d203e65b8a604d8fabf511bdbbe86fcab0ee4b4e68ec3c627286b50e4d0c11a23e8c21408182486b0d20ba0ca72059bf457fbccade01ace92b35799c430904023bce15ae43a76813201d62fb5988865030f15a28e49178e2c58bd6770718adb07647dd38e7b4a987f39a52e4f9c22c77c488fe95960980c30b08b20152a48fa2c7d976dd24baf3606bb4e12fa2b1372b25849635fd937f696a63665bc9025e3118ea91dd3bd5ddd0f2ba794c2d0dc59a71d1c07de0d315fb647eb4b1fd012d62211b5fcc8de93988efc49a06e4d7ed6e38b5e229636d380784f9d9c364a5294015f7f3e6e2c00727e4c92a3b559640c3cb7a06435acbc1bdf7c172056a6f6d81468fcb497a46fa13fce2643a5880259e9a7dc49fab2710bf2705327b789d3332440e105f7272b38952405886a27ada71e98e1752697e6c1c633b3d61c50c38a18f5699d287f7015dce9f29937de0a4de83a516c5c2e2265a0ac79941e7b8e7a0cb4858fd1916c0102b7a9ac374eebba3184dc5c5fe4fb31fc5857c9862d116a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001df399d3d79f5ee95be0b82c06594f101ad8bf75692e1c9c2d711d2fa7b03fda01afb01295e083651db7ce1be597a24ff5f2c1c07c3ad973e65581cfa587ab1c287a0dbc92438a83894def6a50e2fcaca7209c6dbbe9dc30197aa96d05378e3102c52bbf7772dbf9ce17a265794d588b397fd25bb66434ec17d71eb9565ce30b28790d09a1269c6735b01c2fd93515e2a3d159b043c52a6c1749f3d17ebba85e16f629b0a36076646204cb463c5a3ff4d097eea89dd4d944f70ed4aaeac71ef21147605fbde04cc8f0f58d031e7aeea5caec0e93b60505109824f755ac80e254048b4b72204ca96c0979e65de7a987ca98ce6bd4d7bd75b608d2ef438350756b0f06c8fb152a288f0ab554705fb8a76532d531576627da9541c602b0d337e9f11f2c7b1b9a6e0116a9438d6ea293a6bab4cc12486cb6c75e5dadfaf45ef715e520a58bb43cc7ef975f51ce33a2ff7befa89c41d27c0ef2c7c4def84a8451f0be0825de6209498bedf11ada9c27b385f2ad93f704214a1e0532a6325b0c47374f0ab8d40a5ee5ff6deeb98ca66785cba4ca39b09e9605f733ae5121bd976fded517be03263b76236ee3bccaf837c657369643abdd1b325b26ff9a7dc24c0bd6232ac3fa45b24b7cc68405fb40bf1de003bbd85d800b7cc7f3d48a06d77d5af7d92d0d2adf85560d6245fe5d879af473e4c7660efcbc24a813826ba8af9b7aa1e5248f2c15191a254f41e361d9f29c963a261f3b1052d507dc2b0cf16e1e90c5702099a1236d2ce2c2002db1fdf77a6dd92a392ae13d572234056debcddf3718161557f4b5d254f7e7f79840a856e4e35357602654868f6beb29896bc034aa3b0c0fe73993bf9a52495ceee1a28e4b9413c4012cc95a187c4972364da08370417f14fe7c84440a2e2721e9c3d38e59ebca7c98ffb6946d300999fba0311a877634171d3c1e22f96d0d706a6ee0043338683bf9d09cf408f39f890dd1d8578fb68604cef99c992f4d13ea20d26134f1d67e301a17492229fd62bbae19288a6d45c71ae3eb63b2577a5ff21c765d17257ea5c6b84322a2fe762ddd0310f910b7d24f1c0447ec1e12f53e046e2d772004f3ed4ddfe7055683ecabd89755334cfec438', 'transcript_type': 'EVM'}\n", + "Time gen prf: 1.740041971206665 seconds\n" ] } ], "source": [ - "# Here verifier & prover can concurrently call setup since all params are public to get pk. \n", + "# Here verifier & prover can concurrently call setup since all params are public to get pk.\n", "# Here write as verifier function to emphasize that verifier must calculate its own vk to be sure\n", - "verifier_setup(verifier_model_path, verifier_compiled_model_path, settings_path,vk_path, pk_path )\n", + "setup(verifier_model_path, verifier_compiled_model_path, settings_path,vk_path, pk_path )\n", "\n", "print(\"=======================================\")\n", "# Prover generates proof\n", @@ -321,24 +343,23 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 11, "metadata": {}, "outputs": [ { - "name": "stdout", - "output_type": "stream", - "text": [ - "num_inputs: 1\n", - "prf instances: [[[8148670344449872040, 3850172417927569887, 9386325907200828332, 1904490596485556704], [12436184717236109307, 3962172157175319849, 7381016538464732718, 1011752739694698287], [7029749938363617618, 11538692499682334571, 8918902057354509017, 3053834031406807957]]]\n", - "proof boolean: 1.0\n", - "proof result 1 : 77.0\n", - "verified\n" - ] + "data": { + "text/plain": [ + "77.0" + ] + }, + "execution_count": 11, + "metadata": {}, + "output_type": "execute_result" } ], "source": [ "# Verifier verifies\n", - "verifier_verify(proof_path, settings_path, vk_path)" + "verifier_verify(proof_path, settings_path, vk_path, selected_columns, commitment_maps)" ] }, { @@ -365,7 +386,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.0" + "version": "3.11.4" }, "orig_nbformat": 4 }, diff --git a/examples/pstdev/pstdev.ipynb b/examples/pstdev/pstdev.ipynb index 32c1f6a..f0a8c1e 100644 --- a/examples/pstdev/pstdev.ipynb +++ b/examples/pstdev/pstdev.ipynb @@ -9,39 +9,40 @@ "name": "stdout", "output_type": "stream", "text": [ - "Requirement already satisfied: ezkl==7.0.0 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 1)) (7.0.0)\n", - "Requirement already satisfied: torch in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 2)) (2.1.1)\n", - "Requirement already satisfied: requests in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 3)) (2.31.0)\n", - "Requirement already satisfied: scipy in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 4)) (1.11.4)\n", - "Requirement already satisfied: numpy in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 5)) (1.26.2)\n", - "Requirement already satisfied: matplotlib in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 6)) (3.8.2)\n", - "Requirement already satisfied: statistics in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 7)) (1.0.3.5)\n", - "Requirement already satisfied: onnx in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 8)) (1.15.0)\n", - "Requirement already satisfied: networkx in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.2.1)\n", - "Requirement already satisfied: fsspec in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (2023.10.0)\n", - "Requirement already satisfied: typing-extensions in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (4.8.0)\n", - "Requirement already satisfied: jinja2 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.1.2)\n", - "Requirement already satisfied: filelock in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.13.1)\n", - "Requirement already satisfied: sympy in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (1.12)\n", - "Requirement already satisfied: idna<4,>=2.5 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.6)\n", - "Requirement already satisfied: urllib3<3,>=1.21.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->-r ../../requirements.txt (line 3)) (2.1.0)\n", - "Requirement already satisfied: certifi>=2017.4.17 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->-r ../../requirements.txt (line 3)) (2023.11.17)\n", - "Requirement already satisfied: charset-normalizer<4,>=2 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.3.2)\n", - "Requirement already satisfied: cycler>=0.10 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (0.12.1)\n", - "Requirement already satisfied: pillow>=8 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (10.1.0)\n", - "Requirement already satisfied: python-dateutil>=2.7 in /Users/jernkun/Library/Python/3.10/lib/python/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (2.8.2)\n", - "Requirement already satisfied: packaging>=20.0 in /Users/jernkun/Library/Python/3.10/lib/python/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (23.2)\n", - "Requirement already satisfied: fonttools>=4.22.0 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (4.45.1)\n", - "Requirement already satisfied: kiwisolver>=1.3.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.4.5)\n", - "Requirement already satisfied: contourpy>=1.0.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.2.0)\n", - "Requirement already satisfied: pyparsing>=2.3.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (3.1.1)\n", - "Requirement already satisfied: docutils>=0.3 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from statistics->-r ../../requirements.txt (line 7)) (0.20.1)\n", - "Requirement already satisfied: protobuf>=3.20.2 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from onnx->-r ../../requirements.txt (line 8)) (4.25.1)\n", - "Requirement already satisfied: six>=1.5 in /Users/jernkun/Library/Python/3.10/lib/python/site-packages (from python-dateutil>=2.7->matplotlib->-r ../../requirements.txt (line 6)) (1.16.0)\n", - "Requirement already satisfied: MarkupSafe>=2.0 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from jinja2->torch->-r ../../requirements.txt (line 2)) (2.1.3)\n", - "Requirement already satisfied: mpmath>=0.19 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from sympy->torch->-r ../../requirements.txt (line 2)) (1.3.0)\n", - "\u001b[33mWARNING: You are using pip version 21.2.3; however, version 23.3.2 is available.\n", - "You should consider upgrading via the '/usr/local/bin/python3 -m pip install --upgrade pip' command.\u001b[0m\n", + "Requirement already satisfied: ezkl==7.0.0 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 1)) (7.0.0)\n", + "Requirement already satisfied: torch in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 2)) (2.2.0)\n", + "Requirement already satisfied: requests in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 3)) (2.31.0)\n", + "Requirement already satisfied: scipy in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 4)) (1.12.0)\n", + "Requirement already satisfied: numpy in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 5)) (1.26.3)\n", + "Requirement already satisfied: matplotlib in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 6)) (3.8.2)\n", + "Requirement already satisfied: statistics in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 7)) (1.0.3.5)\n", + "Requirement already satisfied: onnx in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 8)) (1.15.0)\n", + "Requirement already satisfied: filelock in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.13.1)\n", + "Requirement already satisfied: typing-extensions>=4.8.0 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (4.9.0)\n", + "Requirement already satisfied: sympy in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (1.12)\n", + "Requirement already satisfied: networkx in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.2.1)\n", + "Requirement already satisfied: jinja2 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.1.3)\n", + "Requirement already satisfied: fsspec in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (2023.12.2)\n", + "Requirement already satisfied: charset-normalizer<4,>=2 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.3.2)\n", + "Requirement already satisfied: idna<4,>=2.5 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.6)\n", + "Requirement already satisfied: urllib3<3,>=1.21.1 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from requests->-r ../../requirements.txt (line 3)) (2.2.0)\n", + "Requirement already satisfied: certifi>=2017.4.17 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from requests->-r ../../requirements.txt (line 3)) (2024.2.2)\n", + "Requirement already satisfied: contourpy>=1.0.1 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.2.0)\n", + "Requirement already satisfied: cycler>=0.10 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (0.12.1)\n", + "Requirement already satisfied: fonttools>=4.22.0 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (4.47.2)\n", + "Requirement already satisfied: kiwisolver>=1.3.1 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.4.5)\n", + "Requirement already satisfied: packaging>=20.0 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (23.2)\n", + "Requirement already satisfied: pillow>=8 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (10.2.0)\n", + "Requirement already satisfied: pyparsing>=2.3.1 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (3.1.1)\n", + "Requirement already satisfied: python-dateutil>=2.7 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (2.8.2)\n", + "Requirement already satisfied: docutils>=0.3 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from statistics->-r ../../requirements.txt (line 7)) (0.20.1)\n", + "Requirement already satisfied: protobuf>=3.20.2 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from onnx->-r ../../requirements.txt (line 8)) (4.25.2)\n", + "Requirement already satisfied: six>=1.5 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from python-dateutil>=2.7->matplotlib->-r ../../requirements.txt (line 6)) (1.16.0)\n", + "Requirement already satisfied: MarkupSafe>=2.0 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from jinja2->torch->-r ../../requirements.txt (line 2)) (2.1.4)\n", + "Requirement already satisfied: mpmath>=0.19 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from sympy->torch->-r ../../requirements.txt (line 2)) (1.3.0)\n", + "\n", + "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m23.2.1\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m24.0\u001b[0m\n", + "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n", "Note: you may need to restart the kernel to use updated packages.\n" ] } @@ -137,12 +138,23 @@ "cell_type": "code", "execution_count": 6, "metadata": {}, + "outputs": [], + "source": [ + "scales = [2]\n", + "selected_columns = ['col_name']\n", + "commitment_maps = get_data_commitment_maps(data_path, scales)" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ - "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/torch/onnx/symbolic_opset9.py:2174: FutureWarning: 'torch.onnx.symbolic_opset9._cast_Bool' is deprecated in version 2.0 and will be removed in the future. Please Avoid using this function and create a Cast node instead.\n", + "/Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages/torch/onnx/symbolic_opset9.py:2174: FutureWarning: 'torch.onnx.symbolic_opset9._cast_Bool' is deprecated in version 2.0 and will be removed in the future. Please Avoid using this function and create a Cast node instead.\n", " return fn(g, to_cast_func(g, input, False), to_cast_func(g, other, False))\n" ] } @@ -160,13 +172,13 @@ " # since we square\n", " return (torch.logical_and(torch.abs(torch.sum((X-self.data_mean)*(X-self.data_mean))-self.w*self.w*X.size()[1])<=torch.abs(0.02*self.w*self.w*X.size()[1]),x_mean_cons ),self.w)\n", "\n", - " \n", - "verifier_define_calculation(dummy_data_path, ['col_name'],sel_dummy_data_path,verifier_model, verifier_model_path)" + "\n", + "verifier_define_calculation(dummy_data_path, selected_columns,sel_dummy_data_path,verifier_model, verifier_model_path)" ] }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 8, "metadata": {}, "outputs": [ { @@ -193,12 +205,12 @@ " # since we square\n", " return (torch.logical_and(torch.abs(torch.sum((X-self.data_mean)*(X-self.data_mean))-self.w*self.w*X.size()[1])<=torch.abs(0.02*self.w*self.w*X.size()[1]),x_mean_cons ),self.w)\n", "\n", - "prover_gen_settings(data_path,['col_name'], sel_data_path, prover_model,prover_model_path, [2], \"resources\", settings_path)" + "prover_gen_settings(data_path, selected_columns, sel_data_path, prover_model,prover_model_path, scales, \"resources\", settings_path)" ] }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 9, "metadata": {}, "outputs": [ { @@ -228,11 +240,9 @@ "name": "stdout", "output_type": "stream", "text": [ - "Time setup: 6.110619068145752 seconds\n", + "Time setup: 6.7214109897613525 seconds\n", "=======================================\n", "Theory output: tensor(14.5557)\n", - "!@# compiled_model exists? True\n", - "!@# compiled_model exists? True\n", "==== Generating Witness ====\n", "witness boolean: 1.0\n", "witness result 1 : 14.5\n", @@ -251,15 +261,15 @@ "name": "stdout", "output_type": "stream", "text": [ - "proof: {'instances': [[[12907834141446617622, 16863260785082668294, 2215826187815521673, 2191547160659437828], [12436184717236109307, 3962172157175319849, 7381016538464732718, 1011752739694698287], [15846044116984004302, 17434658319873045084, 12685703199754313893, 2889686633444970017]]], 'proof': '01578017fe50c728797545bf25b4f2c7fbe051d16c5a0a555d8631f3238bc7e424e850aebe9e29dec8644bb540f95182bdc0eafe80511875a451c359cfebe78c27320798e152607ed040f0dcc27d2e7e987e78d6fd7a82aa8fceda0f49d08dbb170a6d35dd0440a1031b794bcb05b39311c32060a21406e131dc6fc91e58fa4730394a5d81310a89ee9af906e741f428d85a7b8606b7e7fd087817d14e804efc06306ffc5f739e6ee0a0f437cd33d512e1b1ccfcb320ca9605a63230224cb83d2695aa1bea3fbcf7ddcba4081dd0a5bab5fa07da31cc8797534e1d00964ad14627d7db7342e080cc2e618c563d350f4f36c2a450859bf6ef8f78aec5d57a951619ab87e7cfae8078c143c70d7771cf629edd394c6931c192601c27404a25aac90fcd324245ba62ed288b5e4909315eb3a2274ed99dfd9439c7be788941f8b66a266f6a8935e452bc6cdb60c096193b0ed6f4a2764c33d1238e51a6e699245dfc0612f4691aed21a33db39f342a9f8d60ce99848232f0645621ebe413f122f9c617246de2e2a60cd646c61b7c54470e5c5d40eb927b7c3a4f72df80794b3f724428005f053a56507ac08aeb8bf499ce797d979a8cfc849a96da0faf4a87032c8e30168c98b9e328d4e2b2603c23b58c2fa2a76256c9e6822dd1fe911319b1043c20de8e7eefbd2deca496732d182b9247c008896712c716e9b94088d1b718989b236e287384966040c2b87a07d8fb6988e983f8d7da3a8f1117ec13aa561cd3e208b98406dd666b5c1a47ba9d37056e026aba4a2f7702232e6451e2dd5e82c26f10923fc17f250f67ea7d803fbab9e04874f72097b6846c22a3c3f63e8991af6e29fc13f6d413264d51b687e311ca85a42d45c84aa11ae401a823f20ff9c6ec412d2e783f88185bd88d8b3ec10dc2c87863b3660329a92e97638548d3edd3094016dad837f0a742b82b8da3d508a022bf9e0a35715bf136007b961f411d53389a10923fc17f250f67ea7d803fbab9e04874f72097b6846c22a3c3f63e8991af6e29fc13f6d413264d51b687e311ca85a42d45c84aa11ae401a823f20ff9c6ec4126608ba68ed7076c715b64d10b4430ecf5741f90f3659882916f93aabec2c90e15ca733c0be416d43597c731118a9b31ee5d57030018b499580eb29675dc71a61312700e5a96b84098c4155e8146cbf4414e81c2e7c72df017cc78372e4c061f28b11cff1cb4bd204ef1472eba800d519f7065f6fdd2934f801f5bb687cd819b261cf51456e48b3a5c139050d69f09700fd499fd4659294215309c8a8693431e11e885af5b7b1defce3abd199261d7bc51b5519effec4cd34b6aeba1d156c7d905b6d9b505681440a9c406ceb8b90413f0cd3d13dc104a18faa8cb4cb1ff18291f4f55c6ca8ea036dd0923bbf78ca22c2f1dd3e711adc58cd7485a15735be9fc14affbe030f9aa62a0443284d27475e483caca5b5894e38b1f8bf1d4ee0b92e72949065fa7fe2921d08d509519a7161c5989357613a31e7c483248df37c4fb2a13192082b99552310c86abe685f16741f9ccd963434ed197b47a561da25c76bf26415984d9a3c3cd7200bd8b0889e935581bec8768c6c7b7d77ae469f8ab0c441bcb374fd04450e457862d8a188905a8066d8eab971e2881069fc27208340c7f1c04b2a1fb10ed477400c7c42c3af60c82e1b0d8025afc2f729d30a41b60e8fa1db78dcac3333da8c49b7ea0b2a6117570ba5b3422f7bef59593abed44d628340158cb245adc5e4b02613dfb20bcf573609c353859c68d46bbf330b661e82512150cb892ff92952cb6f31b2dfe267247c01106b064531f0b7b58d9869fa8d612024d9ff12fd8caa72111ed6d7db98ac1ec21596737898f421a025f16b5c177cc1a9870d17b213c818e9f68cef6c5ab216247902badfebd2981c5cd85ce8e32dc212c002ddb3727fd22bbe2c998fb5a1deb209e3cf0490d3523467581a8547acf28625474569b044e68046eee3193b19ac34ab40ca9ac1e65050d8683a36530460e8109c49ff90fc087c7ef4082576e207c441773ee4af5f0267d5a98ab72261a071f47ad9cb75af794f2112cb45eff0b22f6110bc3d72872aa4fc39b59ff3d0d0f735bcc3ebfe5b04234ed314811582e4ab15bf1eaba9c9bb666396b57e0d36a1b732348f3a31e93ebd495f0c0031f6e5690cf86d903476bace821bcc216e00c17bedc4f302f5508bc024a83ceeda61a761db57c80651ff2230ac1bebf93ba8d1815e14dd47c8ab41c96767e4c525ebb69d3eca052beb840cce3e54aedf39ef8159f32031cea0613b7e3ccaa1cf31d3fe2963992f902dafc7ee408247423738d2bdde29a8c89813132c6cfa4e711b6e3bd281c372e3a0a81278a2d6c4d7cfeec15bff66935cdef312ca15df1437b8ef2da2c7e400fcaf64dc9e224468f52b59e01c03109dc9764d8f6b6a9e348954a52c931f587160ec91c09da497af673150216885c1c5c935440b6c88d786a4d554e8f83fca1b38dc22922ab34a35a02c738112b9202a9769f43dccbaf371cb00ec0d8e56eeba957a31b23deb017fac43b7e179f96b2dd8568ff9fe7656c72b82ef568525f7f70627acbcccc9119cc5e88c4123b5f74a642af43fa146e28dec9a8f5563396acc68453f51f02957445817a510ce3e28b2ab72c6b8f982d7e8e1e8d0b0520a6b6fdf6058f72f2c53f17195ed30f64dd263d9ec2cc4331204ac2b7bc4d080987af9930d216428afee794207f102c8f1d171c1822b0ff9c4d5a09fe984531252c1a69b5eb1a61c30e19cdf3ef4328cd2d656065a27eaa286f5cf8688ef38bfd36889ca816681a0bd3af888950a8029d608cd7857fb1f72f0ac3cad8135463e4bb3475fc62911432a0e7b60d5d35055e2ce7f1282437f24949036c2df7f34d95a66ad5dfc8cd0512d077691ed19505bbd51c785a3e691e81d7622f99a4717c28496e4e1494b3039a3f554359afc70cb4a08eeccbec842a1c14f6b4f26a35fbf8dda0a765857c54688fbe812eed0401239bf1c33cf80ad9f25d588b97326ee5e4824860040d866ea4835c7067c39827702d291cd481f7e6ca3927bc3d3ad86e2731c94914c34777db94a05a047ee724b6fe87033958dbc286c36d3ad673ee602987942aac15ae6b7d83596f19b5d32be36b3540215b8bceded2a2ec4022272d1e05f46469b0c19dd3df3357089df80c7e6119bb18bcc20e381564c7aeb8a7c3295b78dd5580e8481b0394d1160f8b1b4bfeefdd82d3cd6a1dccf5b2fb422e2e7e4de7c25bf2a28ed039b9dc13ab0f154a06060a153510c8683d94557301ee6fd694608f0d95ea49a48bc1eedef79c000000000000000000000000000000000000000000000000000000000000000015904e62d98c8745b69366eb128996a361854c4241421bd37118397b70ae9cae00000000000000000000000000000000000000000000000000000000000000001f90b35644679e63d139fc2278d5618dbd74e79948e7d09f7b756a86cb7d5f1d22de42b97da27313c8ca32137e618e8107fcf50f6080dd7fa94423733454a7e204e90b1ced7d6b20e125e6bf4d700dada1990db96b1c68687a01d73d06f83c0f0f30f8572dc9ecd45c2e1b83dc1d5a3110aa3c1b7886fbaf7be78e1eab814da9201f5fa40ed5b9bf71578dbc0f420e93e2d2ac2b099ff7962190557e603c4ecb1914d79fe098d4edfa345553a6f8d40d97a9dcd176192d5f1989429d7ad14cd31a5454f3f719c4871838f44649e2cf56e89fd73b821d3b3ba5b464963876c28512ca29c520a04415f4ef70eaf75428c457eff4825e30f130c4485cc52cc7a88716cb5a1a8987b9459c866ff7c0ce391920df7677f3e4e64cb31c82ce7040ed8026867fd219e86b0f5ccd75e2c26af0617d18df0e4877ee6a83a9c942f50b88fc01e2cf62d83220a158161f7f8e061b325fd3857047b9bae4cba1fa78b59622fa1778486efb80f292453e5de2b246d80a163739ae07bf1cb64d926f80937274f50078718b08918b697774fdefd910540c017f5d21436a8547c842ae35456407b70a231c9bdd08f42660a0b436479f39ef76b297578b564b31138c9e9442c92b3916b62fae2069f24c9cf0702042dcae94a1662077f10343b721bb12b1bb23d44f12dc0e1c402a8104d091d23a8d73e45b715812522112827805261ede5eed1943260d6d5de93aa8431861b8353172ea201677d9abfdf5511a731a23bdefa45b822ffd6236503568c3660ed4afd1bf503a1d0eb054d0d71a59436953268c3cc42e1b5ec664ffd05d830d547a2469de8dc58ff6720dbba34816508decbc123554bf11dc1c84988ad4b69aa997c13ce1547a41194efd02993fec44170f16d74013d31c877bd5308f1f270237fd56cfb9e66b36c48e00b5198914d0b3e4e9539cfc752205b6e496de10c7a68c285fd1db38d791f7c6d6f3ac3a1150107e170b899a17045cdcc8d7a7c297623a89360e7d339641edfbde303484519068f496d3ccad751ea3162372b24790162a2b652b27e67751b5862649883d035dac322afafb9842069f736b87aeaf5cd0eafb18d92989eb5b815fe149ded872781573d7b3868d2c28d5705e120bda12117fcf3de5c093976932b52962c314c82beac5b59279e0141f4f05b3d14e85c3d5969fdeaca17d25ccdad2bc97bb9a17ca1e67c0785f88b61582b30c7c4bc5be9b8b45d48adb0a33fe4bff7a99a3db21adfa66448eab49b406522225f4efd7d90d16be9cac9ba6df0728335b70ddcb567c4b6467dda131621f9fa009bccd038e63a9eb1ec5e4488d5ed0e944aaa43b1392fa4f3fe33de6510c371879c6a15723fc97db66f816a064245a758066e0163ca1afd77d0396d6301047cdff10cd02e5654ae84a23b52b19c81ccb2666364deb2bc2ccc982ddc93d0e856bd7270eb9b08a5ad0efefcd5ec6f30d4ec338820746f3d07b0d8e9983c11d7162d8c4845afe860a15a9ec2e895f631999c399a41594b326e51c2ad63376238907345a96aaaff6727f5917b06ffb52010d05ae206ad8d7628538ecc7031601bd25938a3f9fdf168d91c0fec293c8f03e013cfa48790df35bb9bf3141b6bd2f1345560be64b745ae0b7468486e0663e1c190fcb9146e568f97f9ca01707ce0320a30e628aaa68bf8a77803b8ef1cb8240992d6fc93ed81cf831b724f47f040e856bd7270eb9b08a5ad0efefcd5ec6f30d4ec338820746f3d07b0d8e9983c11446c90299d9b55ea0dba5dc59e24391f60474f7272e74231fd1a83723e0d0271c0d068c1082a1ef51ec4f998b544ca5cc21cee86f9980d9052c2e582fc22b1907b9c950e8973f97e6b6548dff12cb940d9cc681705deaa27fc783ffe265078c1e30774bd6df2ebbe435ec42df9b3d18a318afc00be6a7c5e5d56a99800f78b0287ea23c3eb68e75e2cdc1a5b79dbcf29d63298f426327fd76b4436436462d1b097807945fcbd4ed4343e918603b5ad5163c50612ed7d978fab41bd245d8cf54281c818e2c02ef2c99c05f9c7aa4afe2d0fbc95714f4ee408655c41b8964419d', 'transcript_type': 'EVM'}\n", - "Time gen prf: 7.914047956466675 seconds\n" + "proof: {'instances': [[[12907834141446617622, 16863260785082668294, 2215826187815521673, 2191547160659437828], [12436184717236109307, 3962172157175319849, 7381016538464732718, 1011752739694698287], [15846044116984004302, 17434658319873045084, 12685703199754313893, 2889686633444970017]]], 'proof': '1d228f3a6465192abe2e43777fc0ae41e0d309c3934336e6233b30d1007b7af307e6521d40dc611e4445cc380f5c695ad1eefe604440deca2c8975c32423127e043315736eb068a11eed3ca64fd57921ebbcd7b2e73c837b76fad7266b70185c0bc7b88431f5c76b34bb88f446aec0e46de76739b1108d059cacca5e4af1fa2f1164b434015826c5dc0fb589643d48720f9e50d960468d469542e4f8a59a3ea030032ebc3160ef9a09b6f880bed1b1530957b3be7ebd0a3872191b03dcac37ca10b12dbbaadb1ed9bf6400aa1cf7020b57a7c4f4cac7912a082f946c49257d871e46abbad2347ddcd3172edd8613d21bc758db434f8a7f0c2876a4205adac6c6251b2bb1985344ed931196da8a2ba0fb4ef25a35a42cfd1cb8e676aaae3295dd08c705f7517185b216cd719c71f8f2aa1b48b2af989a63aad995ec2015f19bab02c453749ce9c5885756b4626bed5c2eee3aab8b2a76769d48d875e370f6488a08914338188463736b8d07a1e99f6de9df6a38798a9656d3fa93a4f4d61382cc0a974e11ff7f9d7afcb549cd2f843c13db9901f1de4441a2d691b19aea4b47610a8377b10dac6ed91214ff559cb0a63f1c082081910347a85861e3dac6b6657a228ea76a913d323e3a2e191feda439ccd743b9adadf88e2562548782771f6b190afd0721667029a664a898cd957a5d0370b972e929d651d67b0d54fb5dc291cf0c023de0c1326b14aa4a127661dc5716ad7856fa6be58a6b6bb3b4f92fa5755700356ecb0de1c0aa1effbe87ff75b4c2e7f7d677fb39c9cd3e304ec4b8b3c52310923fc17f250f67ea7d803fbab9e04874f72097b6846c22a3c3f63e8991af6e29fc13f6d413264d51b687e311ca85a42d45c84aa11ae401a823f20ff9c6ec412d2e783f88185bd88d8b3ec10dc2c87863b3660329a92e97638548d3edd3094016dad837f0a742b82b8da3d508a022bf9e0a35715bf136007b961f411d53389a10923fc17f250f67ea7d803fbab9e04874f72097b6846c22a3c3f63e8991af6e29fc13f6d413264d51b687e311ca85a42d45c84aa11ae401a823f20ff9c6ec4126608ba68ed7076c715b64d10b4430ecf5741f90f3659882916f93aabec2c90e15ca733c0be416d43597c731118a9b31ee5d57030018b499580eb29675dc71a60f9fdb414fccee239901d04657b1594f4d493329394a86c757c6797ad26ffe7f2a3c87171e68d706d5cda749229ac119359fe192ad72b2c4b6f499e9e74aa62a0a04896395bcf6b0524c25a53ab6868bf9c078b97a4aec720e936cb0bc57e07f2ebc937645fc4574e511c394d41a8ceeba732e4284c7e78bd3252702be88b36512ec8bc796364a45e0f432995a459213d33658df3189770b450813f4b775c9191e1772c1496509b9da0ee0199afcd30b02e0e3332c570e2f06c266d43d620f3a05a0da3ede38f2d9de5d051b94b2f43959b51345e7cfbf505a29b9b17051014c09960a67bb44545b1fadac84f9df4387554817dab9f69775d2174f7d7ce47a8225fc785c2c54b79b226d30b6b2f0ce84d4a3d81545fa1780b5426c357d5e203f0100c42d01fc9ae7f9f3d278a25855499f446785cfbc42cfc46a905cb72e5e062d1599c6078a121fbec390f4540f185bb3685444d73deb005b147fd3e40bee560cb6376947567446d4c7edfe19364ea9af3951695418cb4f43442efe3706fe841c1a495cf620d4ceff834f7aef01139361dccb70af1788b6e91313fc63ecf54e26e04958a936abe65ccf9c856faf2911dd7fcca43a6556e3cdcb28393e8ba7582137d757620fd8b39e9ad9db23d8aff21d5e7d6544ccd57ca4804ea6104927aa2dfac952348a1e974e4ae36279a68ef760b5eeb03111be4fd6538500411a92d512f46c220f33cd4a2ab3c0a7be2df25f8500c229887bbbcbc9078e04102e70160a315938acd6edcbee894a72ae98c4e880220058b861337790e50d0c4a78acdb08d1a40873efb3d94aef3dec26bf9369ca87579a267d874f08c76ac68f4174560e5746758804cdcaba8c4d570a2271e48f2e1d3ff6e6c415263b35f28e6d1cf41d01654b45f848add26c1ae810d72d15867793093c917ec9f2918df0ac010d4313bdd508480a4ca58b2e10bcf8c5b0f926d65d09f5393e7e21ef9d756b05748d05bc3f0c255c567b888bea68f5cba531330c53a520788b8d1adaac7efef9c3622a3dd4e8eecc3f7a5b25f390c7eae5ac0c8389aa7cb3bfdfd4a3fd8acd147c402ea5bea6b149725d784265543e3a505746fc4cabb39d6179eb96aa4645bdca0111a8c04bd85f012fa2df5c589e61e2afc416a43ea196755c71f5c46ecd04c90c1282fc1bff41cfc1027e6fe5b177d0ff171f38133cbabc8f04214f97dd3a34d416d75f5cf6b340cfb4616cb6785566eec281188d669f187e032636039ca7b0981ed3acfc219dc6573fbc74123587c37c1c29a050104881c94f5d81d27747061c167a23a611261e21fed34772b06082ffb815cf96b34c5d9737d0e7fc362306d225088b3e38ccec5c96ed85c3790f1dc17febc7ba9a821ed5e4429db8dbe67e2e2c28c96a7daa75c055d6a8d6678645fe312a295f7df6f3c61c58b13a3c6666182f6662a992e4d232e71c75e36d9ffffdd36ce918f35b05398f18ecc206f38d540629ae6ed924caa46dbd283ad10bd2dd1db198c7336692ae663338e1bafb249a150f4c9a66b978fbf849fbe562fbabd8dbbabbce6c5cbec2a81cfd297cc3ab190b58949df4a42d2803eea4e2c85c82aa1e9cf7b5555ce0653f0e7e18f1788f6a272c940b1fa31934194b4520fc2039760f16c5ad7573755c52d6d25ea60b544c1a42623ff9e0b39ef1d6aefbbb86be66b0dcd7e8376895ba7b14e03cfb6f800825ae2f97a0515886aa9dfb1824a990fe2054051801554378ff42c49bbc7d550e2097b1f68a3e4cc69b33751c275832149365734aa86eaf18bf07f532ede162f810c2ea7ead20932a6663deb4765ab085d46e1b7eaca283ef080103401379b56305837cb074a16cca5e7e6f90ad436a7ec3cf464c0c03f3c4b0260a6dcc5cc6660c5f099e1df3123e9b716a88f1c23d1dded00889fec3f207b721b9bbf1d168932530394381ae20474324f819eb7979effbeae9f948adc74cdacfd691160c98361675c034340a9543bb476467d277bdfc686e2fb0b0dd65062aef2bd2f6becde1205c132ea52ba2443b4e5da8137fae1807d62383e20b54bfa889a695c56ed9971826abdd0c483db890ba468c3a910586e777e036ce6c615247abee3918f155c32bd4dccb21c3609150c91636f8f2adaf3b3fc84de044b5a61de9abd1ca7d726400000000000000000000000000000000000000000000000000000000000000001dcd9062d092285b46aa02f806f73a27f8e860fa459578206c0ca50ecf2c464000000000000000000000000000000000000000000000000000000000000000001a1af53ec7e72c85c8ed80b0ba1eaa3f104f08e5ebe14525e298071a6c5d1c240b58878200416016ec267d1e9bfa13a032f356b8b3292269959f93260223abc02cf767754fe808a84928304ce32b1fe873f1b5f3b9bbf0e334fdbab930d86acf1f1dc8c5d29f42ff6173bdf6aaacccd895f3a0fdd136209d64e5a4333d1b80ec29e11f11ed0e1e9b5158d468be31096abad6d77fbf1638a687fcad12db99607028e363d00e1aa46804cc1c6f45a10b6b962e7d31968a912fb2145c91a6b5a7c5034895297b67132ecaa43069e46e94783b4ceaa1eecec9d125fffdfa9cb81c9a0878b6452da1899e6f62f256e5c899b055e4a29751b59c5cfaf4c4b3521fde8b053cd60043731b18e7bc80c205d6e39c472246795e7d6eaa4f2ff2ca597cded525f135aa36c5a784ca7d43f20a3fceee9cb5164cbf5ce28367bf50ee8576c369026645fe4e2861ff86a2dc60832fcc68fcff4613c6d880a9344e562071e7eefe26557cd5902623e8944af7848088e90aa6fbf48728cb8823bc7e0fa9ce7744d42c866a26d9a1243f17150614a281f71270c5d38d6e55aa4d24a04cd268cae71e09314b30fc51cc871efab0b35ff059498a0b7ca03bd601aef14401cf4b7d46bd052d5456ef1502e6e8d2add4733e0979a0de9f3ee2cb9c54f49573d3d0e2a26d2dd009bf6a1170f5aa43d0edc5bb0934b31bc764440030ea67cab328850d32400170f7ff31a6ea502a38de90b12a207ca6c16cce5afc92e1062067c965c05f25243ec02b4dd3a37d06a93b9d54fceb456c21efc41c1c2c707bd74530185d06c122d38f92856f6a629b51cd747fb151ecf9c968d02059f8fa813ece862ff756b6184341e7c22266dfd5ffd2739e4dd99135960bd47acf09e309318d062d6d7c261fa1049a0c31e89f007bf33e673c2e32ab98393a9f13036a0885e459ab9975da14fc28d187f30fefceb15f92ad32c338eb6fecf0335c21e80484ae4600eac15c18d8df7664b83ddeadb42cfd3daaf5697255ef9a0cc18d852d6715b1666dff13121bd0f7baedee0ee792cf3ba39e0d50693eaac3c626204dbdca4cebf1da5ca32c336790b1cbabe9f739fe2885874d614e9f10901c9e3a8ecb25b7a5e566f58514cce863bb7738feae95cf38658ef9ce588d7e9b7fe90a3fef839a70ae86656701f4999f6b93bf3c34f838b7e64f56c1a81139684913fa3b83932b49a38c5b282f1fd381c0bc818bf5575d03ff583f3cc1a75a956a6fbeb58d7963c5ef071ce526ae82b7a93d27f7b915da0e2165c85bf9330cce22d18b5889c327c3093df56b099ce751511d0d628c9882dada3d33e8f6a273f25aafe923fd5a7b419700e3011e75e6cbc29d4207dd647c35bd93cbf8f9b91689c3fe92285a7d93ef15782a131f019c8963645ddec951494019d286eb1fee7429efcfd789e259cdb578af22d21bdbc89ee82ab56377b1d4856d462015be0f87b1ecaed1f15d4b24e97b6f4a1f1c7514a6391c8db99ad12cbd384be19c05eb6de9b8f7bf5229b2f93af9bba1b606fe5ebd211f40137a31c67d5aa6f2d446811a698f347bd9255d3ed128376b130f27934a06909625a5f23902a861b89151590dc7f4c6ad94db8052063f78fc4e019b59a82b8acaaffb44c9c5f9bceb8d9bb02f74740ceff3c7975b12a517ba470ad1e896243e5716d94dcc6500eccbf0f0e5593848ffb1e7470f93be130ae01b1bdbc89ee82ab56377b1d4856d462015be0f87b1ecaed1f15d4b24e97b6f4a1f2341f9753f9a6a207d128d064cb27874dec5f961b14539930aa10dea348334340680344c8aca7caede36cf9145f2afb6df8c781a61b850c89aacbb025ffba97728c059b0f970b23d7c152dc149378ae2c6fa13dc4e7c49c268e44f41a7a2b56d005fb9efcb56909273de73d621a54b57e98b584a7d297b0fca343dce145be02708ae714f372dfdd244883a31ab6ca7b4d1bc6e82e097d6e7b95803cd6238b40b2ec7046164645bf4c45d75414438e81277114ab7e3b3dd4e609950e0dc797e8b2c1d1571766bdef773597ac5fa12c505e3580a96b600cc8346adad5ef61cc105', 'transcript_type': 'EVM'}\n", + "Time gen prf: 8.515859842300415 seconds\n" ] } ], "source": [ - "# Here verifier & prover can concurrently call setup since all params are public to get pk. \n", + "# Here verifier & prover can concurrently call setup since all params are public to get pk.\n", "# Here write as verifier function to emphasize that verifier must calculate its own vk to be sure\n", - "verifier_setup(verifier_model_path, verifier_compiled_model_path, settings_path,vk_path, pk_path )\n", + "setup(verifier_model_path, verifier_compiled_model_path, settings_path,vk_path, pk_path )\n", "\n", "print(\"=======================================\")\n", "# Prover generates proof\n", @@ -273,20 +283,19 @@ "metadata": {}, "outputs": [ { - "name": "stdout", - "output_type": "stream", - "text": [ - "num_inputs: 1\n", - "prf instances: [[[12907834141446617622, 16863260785082668294, 2215826187815521673, 2191547160659437828], [12436184717236109307, 3962172157175319849, 7381016538464732718, 1011752739694698287], [15846044116984004302, 17434658319873045084, 12685703199754313893, 2889686633444970017]]]\n", - "proof boolean: 1.0\n", - "proof result 1 : 14.5\n", - "verified\n" - ] + "data": { + "text/plain": [ + "14.5" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" } ], "source": [ "# Verifier verifies\n", - "verifier_verify(proof_path, settings_path, vk_path)" + "verifier_verify(proof_path, settings_path, vk_path, selected_columns, commitment_maps)" ] }, { @@ -313,7 +322,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.0" + "version": "3.11.4" }, "orig_nbformat": 4 }, diff --git a/examples/pvariance/pvariance.ipynb b/examples/pvariance/pvariance.ipynb index c7a8068..0c64f59 100644 --- a/examples/pvariance/pvariance.ipynb +++ b/examples/pvariance/pvariance.ipynb @@ -9,39 +9,40 @@ "name": "stdout", "output_type": "stream", "text": [ - "Requirement already satisfied: ezkl==7.0.0 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 1)) (7.0.0)\n", - "Requirement already satisfied: torch in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 2)) (2.1.1)\n", - "Requirement already satisfied: requests in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 3)) (2.31.0)\n", - "Requirement already satisfied: scipy in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 4)) (1.11.4)\n", - "Requirement already satisfied: numpy in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 5)) (1.26.2)\n", - "Requirement already satisfied: matplotlib in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 6)) (3.8.2)\n", - "Requirement already satisfied: statistics in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 7)) (1.0.3.5)\n", - "Requirement already satisfied: onnx in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from -r ../../requirements.txt (line 8)) (1.15.0)\n", - "Requirement already satisfied: filelock in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.13.1)\n", - "Requirement already satisfied: typing-extensions in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (4.8.0)\n", - "Requirement already satisfied: fsspec in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (2023.10.0)\n", - "Requirement already satisfied: sympy in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (1.12)\n", - "Requirement already satisfied: jinja2 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.1.2)\n", - "Requirement already satisfied: networkx in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.2.1)\n", - "Requirement already satisfied: idna<4,>=2.5 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.6)\n", - "Requirement already satisfied: certifi>=2017.4.17 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->-r ../../requirements.txt (line 3)) (2023.11.17)\n", - "Requirement already satisfied: urllib3<3,>=1.21.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->-r ../../requirements.txt (line 3)) (2.1.0)\n", - "Requirement already satisfied: charset-normalizer<4,>=2 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.3.2)\n", - "Requirement already satisfied: packaging>=20.0 in /Users/jernkun/Library/Python/3.10/lib/python/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (23.2)\n", - "Requirement already satisfied: fonttools>=4.22.0 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (4.45.1)\n", - "Requirement already satisfied: pillow>=8 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (10.1.0)\n", - "Requirement already satisfied: cycler>=0.10 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (0.12.1)\n", - "Requirement already satisfied: kiwisolver>=1.3.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.4.5)\n", - "Requirement already satisfied: pyparsing>=2.3.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (3.1.1)\n", - "Requirement already satisfied: contourpy>=1.0.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.2.0)\n", - "Requirement already satisfied: python-dateutil>=2.7 in /Users/jernkun/Library/Python/3.10/lib/python/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (2.8.2)\n", - "Requirement already satisfied: docutils>=0.3 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from statistics->-r ../../requirements.txt (line 7)) (0.20.1)\n", - "Requirement already satisfied: protobuf>=3.20.2 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from onnx->-r ../../requirements.txt (line 8)) (4.25.1)\n", - "Requirement already satisfied: six>=1.5 in /Users/jernkun/Library/Python/3.10/lib/python/site-packages (from python-dateutil>=2.7->matplotlib->-r ../../requirements.txt (line 6)) (1.16.0)\n", - "Requirement already satisfied: MarkupSafe>=2.0 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from jinja2->torch->-r ../../requirements.txt (line 2)) (2.1.3)\n", - "Requirement already satisfied: mpmath>=0.19 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from sympy->torch->-r ../../requirements.txt (line 2)) (1.3.0)\n", - "\u001b[33mWARNING: You are using pip version 21.2.3; however, version 23.3.2 is available.\n", - "You should consider upgrading via the '/usr/local/bin/python3 -m pip install --upgrade pip' command.\u001b[0m\n", + "Requirement already satisfied: ezkl==7.0.0 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 1)) (7.0.0)\n", + "Requirement already satisfied: torch in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 2)) (2.2.0)\n", + "Requirement already satisfied: requests in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 3)) (2.31.0)\n", + "Requirement already satisfied: scipy in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 4)) (1.12.0)\n", + "Requirement already satisfied: numpy in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 5)) (1.26.3)\n", + "Requirement already satisfied: matplotlib in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 6)) (3.8.2)\n", + "Requirement already satisfied: statistics in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 7)) (1.0.3.5)\n", + "Requirement already satisfied: onnx in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from -r ../../requirements.txt (line 8)) (1.15.0)\n", + "Requirement already satisfied: filelock in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.13.1)\n", + "Requirement already satisfied: typing-extensions>=4.8.0 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (4.9.0)\n", + "Requirement already satisfied: sympy in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (1.12)\n", + "Requirement already satisfied: networkx in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.2.1)\n", + "Requirement already satisfied: jinja2 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (3.1.3)\n", + "Requirement already satisfied: fsspec in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from torch->-r ../../requirements.txt (line 2)) (2023.12.2)\n", + "Requirement already satisfied: charset-normalizer<4,>=2 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.3.2)\n", + "Requirement already satisfied: idna<4,>=2.5 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from requests->-r ../../requirements.txt (line 3)) (3.6)\n", + "Requirement already satisfied: urllib3<3,>=1.21.1 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from requests->-r ../../requirements.txt (line 3)) (2.2.0)\n", + "Requirement already satisfied: certifi>=2017.4.17 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from requests->-r ../../requirements.txt (line 3)) (2024.2.2)\n", + "Requirement already satisfied: contourpy>=1.0.1 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.2.0)\n", + "Requirement already satisfied: cycler>=0.10 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (0.12.1)\n", + "Requirement already satisfied: fonttools>=4.22.0 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (4.47.2)\n", + "Requirement already satisfied: kiwisolver>=1.3.1 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (1.4.5)\n", + "Requirement already satisfied: packaging>=20.0 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (23.2)\n", + "Requirement already satisfied: pillow>=8 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (10.2.0)\n", + "Requirement already satisfied: pyparsing>=2.3.1 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (3.1.1)\n", + "Requirement already satisfied: python-dateutil>=2.7 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from matplotlib->-r ../../requirements.txt (line 6)) (2.8.2)\n", + "Requirement already satisfied: docutils>=0.3 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from statistics->-r ../../requirements.txt (line 7)) (0.20.1)\n", + "Requirement already satisfied: protobuf>=3.20.2 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from onnx->-r ../../requirements.txt (line 8)) (4.25.2)\n", + "Requirement already satisfied: six>=1.5 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from python-dateutil>=2.7->matplotlib->-r ../../requirements.txt (line 6)) (1.16.0)\n", + "Requirement already satisfied: MarkupSafe>=2.0 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from jinja2->torch->-r ../../requirements.txt (line 2)) (2.1.4)\n", + "Requirement already satisfied: mpmath>=0.19 in /Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages (from sympy->torch->-r ../../requirements.txt (line 2)) (1.3.0)\n", + "\n", + "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m23.2.1\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m24.0\u001b[0m\n", + "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n", "Note: you may need to restart the kernel to use updated packages.\n" ] } @@ -137,12 +138,23 @@ "cell_type": "code", "execution_count": 6, "metadata": {}, + "outputs": [], + "source": [ + "scales = [2]\n", + "selected_columns = ['col_name']\n", + "commitment_maps = get_data_commitment_maps(data_path, scales)" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ - "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/torch/onnx/symbolic_opset9.py:2174: FutureWarning: 'torch.onnx.symbolic_opset9._cast_Bool' is deprecated in version 2.0 and will be removed in the future. Please Avoid using this function and create a Cast node instead.\n", + "/Users/jernkun/Library/Caches/pypoetry/virtualenvs/zkstats-OJpceffF-py3.11/lib/python3.11/site-packages/torch/onnx/symbolic_opset9.py:2174: FutureWarning: 'torch.onnx.symbolic_opset9._cast_Bool' is deprecated in version 2.0 and will be removed in the future. Please Avoid using this function and create a Cast node instead.\n", " return fn(g, to_cast_func(g, input, False), to_cast_func(g, other, False))\n" ] } @@ -160,12 +172,12 @@ " x_mean_cons = torch.abs(torch.sum(X)-X.size()[1]*(self.data_mean))<=torch.abs(0.01*X.size()[1]*self.data_mean)\n", " return (torch.logical_and(torch.abs(torch.sum((X-self.data_mean)*(X-self.data_mean))-self.w*X.size()[1])<=torch.abs(0.01*self.w*X.size()[1]),x_mean_cons ),self.w)\n", "\n", - "verifier_define_calculation(dummy_data_path, ['col_name'],sel_dummy_data_path,verifier_model, verifier_model_path)" + "verifier_define_calculation(dummy_data_path, selected_columns,sel_dummy_data_path,verifier_model, verifier_model_path)" ] }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 8, "metadata": {}, "outputs": [ { @@ -191,7 +203,7 @@ " x_mean_cons = torch.abs(torch.sum(X)-X.size()[1]*(self.data_mean))<=torch.abs(0.01*X.size()[1]*self.data_mean)\n", " return (torch.logical_and(torch.abs(torch.sum((X-self.data_mean)*(X-self.data_mean))-self.w*X.size()[1])<=torch.abs(0.01*self.w*X.size()[1]),x_mean_cons ),self.w)\n", "\n", - "prover_gen_settings(data_path,['col_name'], sel_data_path, prover_model,prover_model_path, [2], \"resources\", settings_path)" + "prover_gen_settings(data_path, selected_columns, sel_data_path, prover_model,prover_model_path, scales, \"resources\", settings_path)" ] }, { @@ -226,11 +238,9 @@ "name": "stdout", "output_type": "stream", "text": [ - "Time setup: 3.282626152038574 seconds\n", + "Time setup: 3.5368781089782715 seconds\n", "=======================================\n", "Theory output: tensor(211.8691)\n", - "!@# compiled_model exists? True\n", - "!@# compiled_model exists? True\n", "==== Generating Witness ====\n", "witness boolean: 1.0\n", "witness result 1 : 211.75\n", @@ -249,15 +259,15 @@ "name": "stdout", "output_type": "stream", "text": [ - "proof: {'instances': [[[12907834141446617622, 16863260785082668294, 2215826187815521673, 2191547160659437828], [12436184717236109307, 3962172157175319849, 7381016538464732718, 1011752739694698287], [988086122984763008, 8331390676852675036, 9456440076381036992, 2639995154681636326]]], 'proof': '1d4fa8926fffb5c7f298ac276503a8d8f918410c16bdd6b437b36445ee3010d30896f81f27339a8deef44437a503786f37ee302b01e51d2548298a13b75909dd1924cf88f5a3cb20da2a2b2d0f317b5d23eb2c4b021709f8ad6463de202402620dc9f9619c9d000998ea80413bc7082b16be8eb6746a5f790ff5fc2af565af6b1b40ea1e79d4167793703ad2761faab1762bd467baefe7ecc62e036a628c0c0d02b818682117aad8d742ab18d08a10aa1378133a93a11ebaaf13e36cd43e41c92aba2d26e19a264221b31fb5161b9ad4281cd9072447686371cae948c0efe5541b7c401139567be5f277256c42d30163e9daaadf3d4a354d865e0d596a81d41b2446cf954df522433b22f0c94d1dab8ae13bfb4f183082d9af298e481018ee453034d2d50300b766b67c584d74475b1fb0d5794d9c211ecd9b100014683d4d0b202ef6f762cff95f874eaed3e56c2cb61a52f44c2e9e44c61c7842b4c34ae8b1192776f25cf7e05675c4964b5bd9c4bfd706cc88b59ba79475e3271138c4621f1001408c21ec0e5efa92b2dba4b357e48cdb6a02fb2205fc6a7e98db4ba355651283b31924b5ce00e8c6391d1082c95a3503c962bd6b426b9564e6e93ea323ee1f1e5276b1fa787014181464371ebebef77e614aa0ba473749c7e5848e32573115a579727c5465de9de092f1cdb82aec6439dafb82e397b5063018aeb5686a84121079bfb759e093c34acbccb0fa485a12a1e6268f42e8e2a108bf8a9e2362a30cc352acddd8faa6b6b68c519559c2ddd1aeb6ad0f61c6b096b7105b392637d200577c5dc7510b687fd03b40c8718ca1b8a1330daa170d56349c5a79de6d10f90593096b71407e34ff579ee7b86792ea873f58f24933247328a34c3e0d1f9118281d6bf0c4f7413fe786410bd96d5eb27b4eebd12a00163fb19e3cc763f6af1012b5c71136c79acde2997608774ea110d86bce04e23a5c06259bc055726a49f500577c5dc7510b687fd03b40c8718ca1b8a1330daa170d56349c5a79de6d10f90593096b71407e34ff579ee7b86792ea873f58f24933247328a34c3e0d1f91180ebaf320c6e4cb0349ecc6f755cc4d09e29dd54ff3b3d5acc6dc046e25f2e30a215d3405ad6dcab3e31140e93dcc2d2ecc1c81fa8e1a59dafc94d4a8a2ba51a606f12a4fb54f3452a30a095ecb58c97c5f739269eb18020428e847306eb5239f15ef5ae3bd3336985bb904efb73a3ca7f6f789032fedd491ba89785c65403d2f262cce4c794630d800a4a2cc2881063df70b62dbcb7b0f9aea58851f6d9295dc2ada36502d237f99acfe9da5ea7322e9083aa9d9a46be9b91ed9b885a49846102492f92cd6f2c18495bfe0a774387c3166db1307b4bb831cc3040ddaad3a89f218b5f11685d4c3a406ddc90b173b7a65747f6231b81356ba207ff736fa5f1cd80722d4c04bd8e9d59bd565b476325008e415ffffbab2f525f057a90d0345527e27d24b9dc6fa07167c9b5d60f55b2f73ce8a1e93d0d0a6ef9b1b97ef40cd913d258329ff24ce56a248a5779137ac13ea727717d281eaa96707f238a6be9fb9402b513c8db374778c6baa8cd32a009dfa245855e2c7f97c98049c8bef8378e52317106841ec7126035e167c08ea48036289b6e5d0fe447dfaefc57e7ecd8fa72d12901293bbc878736fec310d1db6443f5409ffd1f6c7cd613788bccb116ad7ad0fae6a34bf33f7ee27f1e6e1d79c04c5313315202eb217b8d3a3e0e9f1459fb10f0a75599816673a81cb69e0cac9a5d040434163e1b58758b7697f2218e782c7209289947b382fa11e00a9963005823df7a9749f1d09d1dc90fcdeb78a51ec3c10dc04c662a3ed0c142f241b52f82b9bdeebd77e1f5c30a8ceaa8a1df4cc2ec91ea5234fd1f8597f3918e132a99da16da786a6d365b6db809f224ea64384f58e1e3a9b9ad61ddf1e0568be6f567b01de69d4ab281fd549c626bc565adee6d7bc19918a33cab27bf631781e36a99e5983f4c5529c2462244cb59587080f19477009f5cf51e2f38fafe0451767717515e3dea1e639a1de41d7d5a87a97290581932ab3f06a0c90e74229db98ff3d0c8d4262862dd8d79f9c922a89ddf5a398eead0d4c37a8176e3a91201e8ea01752821ae083bb9a262f56a057ffa1f3f98a232627f906d8cf6c7e1b652a4d003c2ddd6dfc5d69641eca768d3e93bb050bfeae741045af8e8cd2a4dc7f0fe82d124a003c62e47853bd62fcd3c6c29caac6cec216097c8ef9fdd4a25cac606ebb3cf413c79c225caeebf5d2562c0e93a70c93074013c565ef02302c99c568e82e8110e22aa095be0071ee7e6cc1983b5168e986162c7baf42963710721d373ccfa38e12dd3c22e75552578ddb9c6d073b49f4e9a92c8b5dfe62e619360625d05938709ba0e9823ff27fed00d318437bc0b7e5fe0f131dcfaa2ba4a84ccd1ef2ed61adcc6858499582743eaaf2d089f0528ae9fcd316d888e45096956470ee246ea52f76ab431c7f95566d659d18f2feac49010df9258da84b15da98f5ee94f5cee8defc4c2b5108636e611277bcb09ab6e6408472253ae5e8e7a21bacab3ef9cea740b1545ae833fd862825cb4763c1e4f7a6a6ce16e4305b83fa36de2a9a8f7fb482c181e30513c0c1b27492b53d6f0d8a7e228d044d6d9b3c77895946dd58d7bf242663d911e1d9ce09c6d62faefc6881b7ed6929b4dd983bf8b87513f09c85608c614f472b491fb700027325cbb7b113aa698503a05c6ecf6a4dad1c9fbc0812e4c30b37e6a468f7eda4ec05b9311635b2d03710acb2d134d43b63d1ee50183e1d4450c85a047239a7e5018047563ed9d6ddd502f6d943f4dcdb02dd4db5a16a4d65b543ae67ed84b0b05e386d57dd976fe6682eb1b26779db7f5f248702e213b108e58d6982ec355d4dcb775adcd23fb18ae32337410520857a2ad64f725c928b20dc094b5b2a978e65e8719f619e299c2e771064596ea6778520f1c7173c75e3364212a6612d678edd07441f2cc051a218c7087efc9114f47439e7b5f5dbb1ecac5d2b23d7a7bdd1803ad26f42e3bc1c451a2dde43befb3b317adaf24e0eaa225e872635d769ca607fc5a6095a5bfea18fb50db108a6fdfe4d3059d281cd760dbe87cd768aa143db7415c78167363fd5c9fe174640aedd77d8166bc255fff444e9a982510e2f01b290730268e608edca83d4303adad3b167a9a28ec65a07fa3d27d309923db8ca9b58379d870bbe367c145304a82dee0fdcb935783e32f4a3178427bb5f83de6edc7f062bd26ff473288d3e182f6bbf4f43e62c4fd32cdf8611cdb12754981925fc4209c8ab8ab2b9d0320100000000000000000000000000000000000000000000000000000000000000001ebe79ff83c383a9427cd9f51e1eca05ac26e8552fd9e970aac17ff036f3ed83000000000000000000000000000000000000000000000000000000000000000024e33b7c1f5e0116c87637a9bac61ba5eb570267a4e413bf128dbdd04d4428b20a84ec5935fb634a7e607de79216c241b53f28b64ac925c6a1a792c3417abdd129140daf92109a58486ac1100b3e349327a4e1d8c8045b869960d91dbe09bad321674f8e17dae7e46ca22c9002bb3c4bdb91a5bcd6b34bab6b2d3e6ae8a91c922f74b30afe86fbfa8fcfc751a4dd3d56b919faf99fa8a6218d3094455bc389fb235ee113b319eec6349558d15773d3d3836e57cbe7fac0838865e5514118336210169cdbd5c649611affe829e94d4db31be79be8a263cb86d2ec9c59703da6d721e38040a8df1fe7eea5e5ed82d87eb83a685531d82529f3b8be3e60f67a604a25a0e5f1754c5ba8d40d476c9a143ccb4e75d85418f9828c5496197eca1bf53902c3c9214e91373843c1fb0b22e2f1496e17b9d04867729a5d389b92c9d294ab0e3babfc7e503ff57f523cceba5b44c27a66a23143c4f80a8ca9645ad6ac90bc08dc4fa395b4dfbd0ae1b116539eb332b2a9fbd468141ce26e66f01d72badcdf1b4b465c7a4feee5d2c40adc003af3c22576a4eb7c7c8db217fb1f723db725bd0cf902a6402d2179b924927182f2e13d81787cdb4878221a13e16dc085b0168d073b218ec77a94dd03d6d484f4adb870523701a14285ff34d50a17472170c8351028e88c543620139fa1b02bd0c8e4d1f4e2d8830636bfa79c23e9edda61294d1fc36b50f22a3a758cfd379c4dcf5fe7c5d95a2ca110e8f5de1a2cfccc66c5500bbd95115d3df4e9f5ef8512c00ad8e96a4cd36621712a9d9bd813d6f5f71e0c2d2e26e0a26890b2a0a9749ca7a2917c2b006fd5d30d36a7ff791b63a666d1f2301b595bb4d0d2b9c09b6a5857eb9dca27fab4d3f05e86eaee07b70fd1942e03241f3ae154816570ce88ae33c1dfadb9691bfce291c6e6f79e2d0a4d265098632d4dd930b0f23f08e67ee1c5028b40147ba5a838f0b252ef063d64f6966b3a4d277341b6224d7eaa2aad48736c007cb63182241e96d7710483d3503fbcd2e7eb043c98b282a34d55756aa83ab8889931a0119b11b9af29b2e0d82ce914c3fa7705dfcaaf4adf5f920071bfdb0a7e56778d677a2ab12ae32b94b6c073ae8c501e1cb89483207078363cc3366b12b50ca32582e37312b66ad08329c0b9f6e7b55e10557489dd2431af5b4824f29e381dbf21723d3ea13bf6fc079fa12a02499eb50793d23b43a14c4f8c45cb65d49ddc632fd4669c00fb48048274b786a5b5cec019c75fa9ccbcb161406d11976cc2ead5e35f02081ecb8c1b6331cff7aab46d172b1d073586b27db7f7eec590a60657a0a1abb7a52b85e13b67658c90fdfa2186142e121776c8824f622ba4d29fa99d7b8ec3f4a42b96727e311172dc8f5a7f1b282d991d72b3b07d60fc525917bc85b1d7f54bf66682f5da103d9320b088126109dace3980cbf97b180e46597a9609345effc65fdb827f43cb2f3ffce78e60811f80a4293e7660f0db6f135723983b5df2092b8ad5cf0bb269dcb6c890cde49a08be7c094b13f48330a687a49514f9192bdc30d147e2b8fbd96cb26d6d15a780222bc02743fcaad8833d3b1e3d4ad71ac6388255c5d315472a9e7197fb818e8121a81bfe6b0cf118d3bbc1d9ea2ec8a0ca963af6aee0c590dd7e2f8fe6d4f36f2d24e4c25d0ae3226bd0e31d821d2ab9d433c0d3c94e0cc5ace55b7c2dc4538a09dace3980cbf97b180e46597a9609345effc65fdb827f43cb2f3ffce78e608100a0bfff529404e8c983f802c35baae1cf72a66ea941f024ab560b3c832de1711f92c30d93e755e857164e7268fc766c60a923d0e3e9eb9d2d14ad67ad50bf7908294ea37b423c1ab8c148fb532ac7fb2a87f7fe4fab3dd9fe0b9d6a3267daca15074fa4045fc16a8715891378c7b7132151f9f34f192de395dd9c96a4953edd081cc65c20f52028354edda1c46ee513bafc20a24c55be1e64d786c63d575ad4073b761e57dfa5e7792e4dc182a0d5b817bc700ac8b5ef7018275f95cec7c74629d3b2cd3bed98b08d487530c4ada2ddf3edefa81868ae398152b8b9a033d7d8', 'transcript_type': 'EVM'}\n", - "Time gen prf: 4.563145399093628 seconds\n" + "proof: {'instances': [[[12907834141446617622, 16863260785082668294, 2215826187815521673, 2191547160659437828], [12436184717236109307, 3962172157175319849, 7381016538464732718, 1011752739694698287], [988086122984763008, 8331390676852675036, 9456440076381036992, 2639995154681636326]]], 'proof': '0b5e0a12a514c47ca624727e98e75a0ca6ca425f69573dc1530aad1cf6c9dad90a894f1bab872236fee193740a577721ec98e336c83c603097e9f3d33f98699f0edea6b0c9fd255fd3fa4765e264f68a612dc7aef3fc27bd1f09904cce3a84c9149269a3e36ed3804ec41fa096ef1a35095aa994e07ab9c93b8a896e16822f890b202500404a04d0a843c31f98974c518df45ab72b3e82ec9b34296ee4b50778112b24bbd973027f66bc2036bf3f8b110957005a58097eb021e888f1fa63e7d008724bd26167ee49989564f80d5ad1c46ce8b0836a1441cc4b128625f96ee417093cfc4296ae646a1bdbdb6b85afc1ba15b5bf1be708330190a4b5bebf6997ed1092ba01cf5d189349a2e482492575a7728858c604ba9382ef71cbcfdf4b655a2fb500f6c074e46f58ee9e250c578144eb7335f6669544cb62a468b8d5d5a62e166350ae9eee3ebbc602bedcd064c797d91a77d5749d4af834386456f3f01f0e0e3ebe7309ea3c0e18c225d5e729206850746d389e6af97b87a8ddd5056e2681120470cb76e4d08f74a27cfdac6b9e549113ce76d8c461c3d824b971a016cf0b0e635b2db27c20a27756525d37f613ed73bf4cf688a6f5074c2514e9a12c9c062695b7a17f313824dd6894ae4a603293b18a248d32c2d8e213ba51e40051cef42340f1a47d48b34b67acf8d782e3c069b597fc6932de5f35b4472fc547b69e0e272a40711b0737ca5f54de0fa8ccefd1ae308f1ad3dc04aabe8c7623ae3e99d22640e977bd6b21ded4b16bc1e6f98f6a2016a8a7e71428ea983f9c597a20ee1800577c5dc7510b687fd03b40c8718ca1b8a1330daa170d56349c5a79de6d10f90593096b71407e34ff579ee7b86792ea873f58f24933247328a34c3e0d1f9118281d6bf0c4f7413fe786410bd96d5eb27b4eebd12a00163fb19e3cc763f6af1012b5c71136c79acde2997608774ea110d86bce04e23a5c06259bc055726a49f500577c5dc7510b687fd03b40c8718ca1b8a1330daa170d56349c5a79de6d10f90593096b71407e34ff579ee7b86792ea873f58f24933247328a34c3e0d1f91180ebaf320c6e4cb0349ecc6f755cc4d09e29dd54ff3b3d5acc6dc046e25f2e30a215d3405ad6dcab3e31140e93dcc2d2ecc1c81fa8e1a59dafc94d4a8a2ba51a612a5dd249fd1bcdcc5187dad2ed56bc9f813e67c69bac87e0c3359824c59a3061eadb80baac7a55d0522313fca8e38331877f120255c392657b1819e9589c27d2bc413c94a844646a87b39531113a6424fdecf868b284c345cf4080f317cb7a00bca42e97382f8218a00010cb854c8aaa31c8bc4e8cc08fda7eaa118d076dd0906f1f1d3ffb8a947b3d3299126ce65bbfe0beb3077f343fc932018883532b97f1a5a514918e40f778b7119d3a86b4f4b588c20d5b0ec63263ced4f024cb14a392b67420d99baddb89d9bca63528a39d3eb3ba285804e3925b75874cf7f68571f135beb414b40d70376fcaa2a1d71779615272e937b15d8c0d41f10cab079dc9211e9913bc3a003806d2628f16725c82ee7a2ed820f098704c6c0d307557fbace013478fb8c45017513cc0c1fa7d3b9fe5cc6fb28980347b5ce71cfc562e844d40ef0db7c5679ad1fb3d489c7b791eeccb890d89093b3696892d8a43b80f0e7e722cceb48c40fcc78c57d1f6b990ce460d0bef445bac9f090139248a3fc2d57952517a114bb14a45c2b1792ce1cb2cfc8dfe24a6308b31ad9072aa21e4e1a2aaa2e8b6782f479ae27307f79af0328616d412dfbd70a195506d50443978f5146050472951c3c25a5d10fc17a386bcccc20ae0e1c33c80e62446fad270d7f0721ae1e8a676023767f57860f952c672f80c4ce3196ae12d29d00be97a64dc26036650447e9a3e71150189b21f944d45109e2d854709e6f757be5ced2c9c32dd11b5f21215ceebd3d1db8cb5cf06eaaa3009925db8afb42de46fc9195a89be57c6fc119573117c23fd9a808ce39a646c50988ddec022ffac831eee5977feb378629120e2da53dad201e37166c06b25ee2776a6f672a1aec617888962b14220118b83128f5af5ad69938608de56280e917616bc49e4f391bf3f1d601fdb9b7d795d5c11f4be845581803a77c85bf3053e70555265ff48c4519730b8a47e743d77f36c7035e34c4e6e182f89a7bc491b5678454c095423523c3dfd300e8125c9be25590003fc73a2f74aadf96927ebd2ce6837856d09a974d6bc1635a1ce79af84cf94407ba65a8e215291bb060146ec0a18ca49383506f83c31b22e218f3bd7ac90cd12444145bffb0f5393f90272f5be530de74806191bc9ee94d1811052dc3f55abc10664126fa64d31d98d0b93e143830e42e0114030b4b61e229c93ae9f8c503c622b115fa8567a108721c0b984c04a80c304edbad511b617c5603e883fd68c9cd25b9ec9e272a136b8b5e558ef8ef413964f9bf71e418c76df29d20c4998bef8b0758ae00747c0bd03a6f9efd2b1c94c69252f2b44b53ffe52ea90ded93c5386e24a6e1e39003b655d2b84990aef05e9e375acd35c0c958c25fa68b4c98f372cf1515e342c530740e501d32f29a734c33206ff45018f79fbb5c520874ee30d83525a3dfba2790cc6ba74dc88d5f4a603fa438e83bc03484017b1d21529551d7850040d13c9f150c3c62079cbcd6ab8a9c9b85ce475d60fe0cfba6bd18a23e2a3a1ca4d2affb9ec850d17c25885c447445fd2f7a0faff8ebbf9287799d5ec54d532d051dc60bc32370c1c959c7055f45f1b9ecc7b9803c03847705fa549d1912d5092c5ed086982d67e59bddd2f1621f98dcfed74a1b085c63675e3ab67b4393e01f7f513767288887ca7b00996c34f3cbc4e745d1d1ddac52f84e75d5008575912e83fac442417e0bf16c497ebd4f179bfc863b00240df84d43347672b10e91e70cc8ae000571390604c297de74b5b059f7cb4b30ac906c22f238c4515c18147d0a9a57b01027b3934f568645b2db9474dff6c2aa0f75140d1d248e2eb7ebef5b138c94818b111c36a7a4a813a700c953c16ea9df557e483d66fd0ab284946f1b13ca2151821473ea9d8800bfdf026fce3206ca684d57e263269be90cb320de142e12b7755733717be6ea3b0f43ab3ae0f162d13e0528159141be9c27ccf64a4c148c7969e722a69909de9eb5224ea117ead8aef06d738490d0fe086151df04f3171ce4b90bc927a6c7822183378c22edf9092e69d01a2077ac8b5a749202d2990981624705510ede497e5e0d7b49ba9a1be0a00531dc591fc71d9ca983fb3101087757e3234fe6f0f8e8329606ab5dfc1e9ab28eafee44a5d1ce607d2c2aeee900000000000000000000000000000000000000000000000000000000000000001557406b4c6f3991ac6f551c3b7030ba59fcc892f294af6bea70f20af6281d870000000000000000000000000000000000000000000000000000000000000000115dd36f55a60449c94f8253f52ca700aee8e7a2b601adc6fc33b819e939faa52f04011d9cf9c1364b4d4ed1968e1d747c8fe6a536cf147db21a21c7050453d202b13b741b6cfe047212487e0aac035e64f391768eadae178ee7b7c742d8256026222ece58fa102cc188a9e4a7db4c525d71394a6efe45ec142cb585a9389ba32ef03ec65e862d7f0c1051db3e2c99d98d3eb66031828046d0e2c2ff8f22013a26006c29ab6336f3a7d99f5bcdcfe64c7f4acfcf28aa656c74707b29215bbd4f172aef1e5226be896935ef19415c5819160d2c420c7cb9ed4a4adb911bf50f1716462dd482ba987f629b5568780f53443c194c0c8f1c0d77112cf0134a016c251c7b3d583c0db2fe048fa6e6864b42553d450ab8c49f374bcbc4d0adf88fff78146f2045542390ad3c3e464cc8873d21805ac82382bfde2c3b56a5b4a85d21e803208bdf7f35596a0475aac65fb826aa21bfa7fbffa68d64e003bf6ba5eb3ccf0f304044fe93fc4403f9d1808da4f997e4fe17221da4fb558278207c73e5e9171f4beb920d9c8e93b3a0c27800cfd719c832a3867210fe93a16a710a8a90a5640975f9f8fb0a58cfb46b1bd8979badb9de902712cd32e4b1f293eb26c93b9f5a0d25da0a93b33fb7ce447d0bab238983601ed1bee6ca4e879dbe818a83b0c44828a2ca1732fc06155f57bd464a95a57a8c90fff20d93f5a888c0212d0a019342114995aa9a3cb6217d246bc98faeec3d0e1da754fd7e997cf7b71fa7afe5cd4a2193f02576d7d5154237e1e99df6984039acbd6cfa3ee4a50d0b560b5c5ecebb2134760779592c5981d90556e5af9e28553e7776b705272a61dbe9dadb1c8b70174aec71d4083f6ced0a4eab263bb9ddfcd02e72343fe645c240ee84454d8cef142acd673f19998cd5dcf8f29134cdc27596e125124252fdfa789322679847b811b8188ac87a9764a2155327ed4e2416196e613745b3f32346908f4dd26c7af40cd96e1f59743b0d9ed201b9451c8738ae4a3e87937b1ea0a3526f926e1b2f100b35792493c4119421eb5a92e9b4569af7bd185a986346ef9c2f465decb9863e2a07214cd8d9ef429d640827489bb85313e1f2c1b088edd6becd9d8c18d9482d2d8c429a5832cf75b5d84b558ffbbc4da56b2d1fb846c6979fed0b90567eb0f519b46c6d846eb9a41aab98a080186c171ba4449322f7ef2f88594d43870f4b3a03de2ef2becd551fba01f47b0e401c143d852e36583ff8a5840f25600a22258629a5aa218809e2efda76356867c9fcb203378e36c77a98136add28afadc18e8c267580b4cb36403d83199ab3a6b9ae0522a7f7534bfa630db31d5d949283470322a0cb091d435d06ec3d5106d4cc582176f6967895179c699e390f7af583d743055099a696a36c757d3789a3cd1ac3518bc094bdc024562a6b73acc18a44403d21d3f4061ecef250a514e826d105c9e3e1a9e9c6939eb86288a76b354706ead1049db5e821dfcdba2e6f98519f4a97297c4d1d983ce201d345bb2c1f62fe555f13485fe01fe0b428d582fe3150c5c3a6824426ea9c93e35ec21128a5fd9e751e01d3f658c304546359e53caae08eb49cf1e45ec96c9283d1b661e49a5c99c2ff1317e67fea5c60b393236e97ec064130c4d6a5ae48339a54f52a1549a3bda1fc06c5f17b8ba6c246f4ce07833991dd4e3396e76d39a23b38c01d355468057bed21d3f4061ecef250a514e826d105c9e3e1a9e9c6939eb86288a76b354706ead105ae53840b9806c97d4363c6be15d267eedbdfebcf3a807cffaade314b7605fc0607a3e41154b15d83d2f1148dcd9243d74ba339cfe25a7fcfc43bcf1ec25e171030621a355600ead588590c3f6bf52ca14cc74f349902a2e9aec99801c79913116ec6cc82016424f4d23967cc0aa323c64ed89378068f5c126625f820a17e9f1c61b580eeaace7e4c234ba0a2c7544869eadd43449fa1642e44b5d293cbb8e71839b28e9ccadd2b9d878fa64e63e888991d07e8a79dc69f7cbdb10b1c82138929b5e550cb55e3922917b222a612114fc647764cc018d995af240c14baaa637d', 'transcript_type': 'EVM'}\n", + "Time gen prf: 4.350332260131836 seconds\n" ] } ], "source": [ - "# Here verifier & prover can concurrently call setup since all params are public to get pk. \n", + "# Here verifier & prover can concurrently call setup since all params are public to get pk.\n", "# Here write as verifier function to emphasize that verifier must calculate its own vk to be sure\n", - "verifier_setup(verifier_model_path, verifier_compiled_model_path, settings_path,vk_path, pk_path )\n", + "setup(verifier_model_path, verifier_compiled_model_path, settings_path,vk_path, pk_path )\n", "\n", "print(\"=======================================\")\n", "# Prover generates proof\n", @@ -271,20 +281,19 @@ "metadata": {}, "outputs": [ { - "name": "stdout", - "output_type": "stream", - "text": [ - "num_inputs: 1\n", - "prf instances: [[[12907834141446617622, 16863260785082668294, 2215826187815521673, 2191547160659437828], [12436184717236109307, 3962172157175319849, 7381016538464732718, 1011752739694698287], [988086122984763008, 8331390676852675036, 9456440076381036992, 2639995154681636326]]]\n", - "proof boolean: 1.0\n", - "proof result 1 : 211.75\n", - "verified\n" - ] + "data": { + "text/plain": [ + "211.75" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" } ], "source": [ "# Verifier verifies\n", - "verifier_verify(proof_path, settings_path, vk_path)" + "verifier_verify(proof_path, settings_path, vk_path, selected_columns, commitment_maps)" ] }, { @@ -311,7 +320,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.0" + "version": "3.11.4" }, "orig_nbformat": 4 }, diff --git a/examples/regression/regression.ipynb b/examples/regression/regression.ipynb index 0856f0c..51055b8 100644 --- a/examples/regression/regression.ipynb +++ b/examples/regression/regression.ipynb @@ -155,6 +155,17 @@ "dummy_w_tensor = torch.tensor(dummy_w_vals).reshape(1,-1,1)\n" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "scales = [0]\n", + "selected_columns = ['x1', 'x2', 'y']\n", + "commitment_maps = get_data_commitment_maps(data_path, scales)" + ] + }, { "cell_type": "code", "execution_count": 9, @@ -176,9 +187,9 @@ " torch.sum(torch.abs(X_T @ X_one @ self.w - X_T @ Y)) <= 0.01 * torch.sum(torch.abs(X_T @ Y)),\n", " self.w\n", " )\n", - " \n", "\n", - "verifier_define_calculation(dummy_data_path, ['x1','x2','y'],sel_dummy_data_path,verifier_model, verifier_model_path)" + "\n", + "verifier_define_calculation(dummy_data_path, selected_columns, sel_dummy_data_path,verifier_model, verifier_model_path)" ] }, { @@ -219,7 +230,7 @@ " self.w\n", " )\n", "# try scale = [3] for more accuracy\n", - "prover_gen_settings(data_path,['x1','x2','y'], sel_data_path, prover_model,prover_model_path, [0], \"resources\", settings_path)" + "prover_gen_settings(data_path, selected_columns, sel_data_path, prover_model,prover_model_path, scales, \"resources\", settings_path)" ] }, { @@ -287,9 +298,9 @@ } ], "source": [ - "# Here verifier & prover can concurrently call setup since all params are public to get pk. \n", + "# Here verifier & prover can concurrently call setup since all params are public to get pk.\n", "# Here write as verifier function to emphasize that verifier must calculate its own vk to be sure\n", - "verifier_setup(verifier_model_path, verifier_compiled_model_path, settings_path,vk_path, pk_path )\n", + "setup(verifier_model_path, verifier_compiled_model_path, settings_path,vk_path, pk_path )\n", "\n", "print(\"=======================================\")\n", "# Prover generates proof\n", @@ -317,7 +328,7 @@ } ], "source": [ - "verifier_verify(proof_path, settings_path, vk_path)" + "verifier_verify(proof_path, settings_path, vk_path, selected_columns, commitment_maps)" ] }, { @@ -344,7 +355,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.0" + "version": "3.12.1" }, "orig_nbformat": 4 }, diff --git a/examples/stdev/stdev.ipynb b/examples/stdev/stdev.ipynb index e57fae4..fdc04c8 100644 --- a/examples/stdev/stdev.ipynb +++ b/examples/stdev/stdev.ipynb @@ -142,6 +142,17 @@ "print(dummy_theory_output)" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "scales = [2]\n", + "selected_columns = ['col_name']\n", + "commitment_maps = get_data_commitment_maps(data_path, scales)" + ] + }, { "cell_type": "code", "execution_count": 14, @@ -160,7 +171,7 @@ " x_mean_cons = torch.abs(torch.sum(X)-X.size()[1]*(self.data_mean))<=torch.abs(0.01*X.size()[1]*self.data_mean)\n", " return (torch.logical_and(torch.abs(torch.sum((X-self.data_mean)*(X-self.data_mean))-self.w*self.w*(X.size()[1]-1))<=torch.abs(0.02*self.w*self.w*(X.size()[1]-1)),x_mean_cons),self.w)\n", "\n", - "verifier_define_calculation(dummy_data_path, ['col_name'],sel_dummy_data_path,verifier_model, verifier_model_path)" + "verifier_define_calculation(dummy_data_path, selected_columns, sel_dummy_data_path,verifier_model, verifier_model_path)" ] }, { @@ -192,7 +203,7 @@ " x_mean_cons = torch.abs(torch.sum(X)-X.size()[1]*(self.data_mean))<=torch.abs(0.01*X.size()[1]*self.data_mean)\n", " return (torch.logical_and(torch.abs(torch.sum((X-self.data_mean)*(X-self.data_mean))-self.w*self.w*(X.size()[1]-1))<=torch.abs(0.02*self.w*self.w*(X.size()[1]-1)),x_mean_cons),self.w)\n", "\n", - "prover_gen_settings(data_path,['col_name'], sel_data_path, prover_model,prover_model_path, [2], \"resources\", settings_path)" + "prover_gen_settings(data_path, selected_columns, sel_data_path, prover_model,prover_model_path, scales, \"resources\", settings_path)" ] }, { @@ -262,9 +273,9 @@ } ], "source": [ - "# Here verifier & prover can concurrently call setup since all params are public to get pk. \n", + "# Here verifier & prover can concurrently call setup since all params are public to get pk.\n", "# Here write as verifier function to emphasize that verifier must calculate its own vk to be sure\n", - "verifier_setup(verifier_model_path, verifier_compiled_model_path, settings_path,vk_path, pk_path )\n", + "setup(verifier_model_path, verifier_compiled_model_path, settings_path,vk_path, pk_path )\n", "\n", "print(\"=======================================\")\n", "# Prover generates proof\n", @@ -291,7 +302,7 @@ ], "source": [ "# Verifier verifies\n", - "verifier_verify(proof_path, settings_path, vk_path)" + "verifier_verify(proof_path, settings_path, vk_path, selected_columns, commitment_maps)" ] }, { @@ -318,7 +329,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.0" + "version": "3.12.1" }, "orig_nbformat": 4 }, diff --git a/examples/variance/variance.ipynb b/examples/variance/variance.ipynb index 06acf9e..ce22b70 100644 --- a/examples/variance/variance.ipynb +++ b/examples/variance/variance.ipynb @@ -133,6 +133,17 @@ "data_mean = torch.mean(data_tensor)" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "scales = [2]\n", + "selected_columns = ['col_name']\n", + "commitment_maps = get_data_commitment_maps(data_path, scales)" + ] + }, { "cell_type": "code", "execution_count": 7, @@ -160,7 +171,7 @@ " x_mean_cons = torch.abs(torch.sum(X)-X.size()[1]*(self.data_mean))<=torch.abs(0.01*X.size()[1]*self.data_mean)\n", " return (torch.logical_and(torch.abs(torch.sum((X-self.data_mean)*(X-self.data_mean))-self.w*(X.size()[1]-1))<=torch.abs(0.01*self.w*(X.size()[1]-1)),x_mean_cons ),self.w)\n", "\n", - "verifier_define_calculation(dummy_data_path, ['col_name'],sel_dummy_data_path,verifier_model, verifier_model_path)" + "verifier_define_calculation(dummy_data_path, selected_columns,sel_dummy_data_path,verifier_model, verifier_model_path)" ] }, { @@ -193,7 +204,7 @@ " return (torch.logical_and(torch.abs(torch.sum((X-self.data_mean)*(X-self.data_mean))-self.w*(X.size()[1]-1))<=torch.abs(0.01*self.w*(X.size()[1]-1)),x_mean_cons ),self.w)\n", "\n", "\n", - "prover_gen_settings(data_path,['col_name'], sel_data_path, prover_model,prover_model_path, [2], \"resources\", settings_path)" + "prover_gen_settings(data_path, selected_columns, sel_data_path, prover_model,prover_model_path, scales, \"resources\", settings_path)" ] }, { @@ -257,9 +268,9 @@ } ], "source": [ - "# Here verifier & prover can concurrently call setup since all params are public to get pk. \n", + "# Here verifier & prover can concurrently call setup since all params are public to get pk.\n", "# Here write as verifier function to emphasize that verifier must calculate its own vk to be sure\n", - "verifier_setup(verifier_model_path, verifier_compiled_model_path, settings_path,vk_path, pk_path )\n", + "setup(verifier_model_path, verifier_compiled_model_path, settings_path,vk_path, pk_path )\n", "\n", "print(\"=======================================\")\n", "# Prover generates proof\n", @@ -286,7 +297,7 @@ ], "source": [ "# Verifier verifies\n", - "verifier_verify(proof_path, settings_path, vk_path)" + "verifier_verify(proof_path, settings_path, vk_path, selected_columns, commitment_maps)" ] }, { diff --git a/examples/where+geomean/where+geomean.ipynb b/examples/where+geomean/where+geomean.ipynb index a891b21..4b32076 100644 --- a/examples/where+geomean/where+geomean.ipynb +++ b/examples/where+geomean/where+geomean.ipynb @@ -139,6 +139,17 @@ "theory_output = torch.exp(torch.mean(torch.log(gt20_data_tensor)))\n" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "scales = [8]\n", + "selected_columns = ['col_name']\n", + "commitment_maps = get_data_commitment_maps(data_path, scales)" + ] + }, { "cell_type": "code", "execution_count": 18, @@ -167,8 +178,8 @@ " num_fil_X = torch.sum(filter.double())\n", " fil_X = torch.where(filter, X, 1.0)\n", " return (torch.abs((torch.log(self.w)*num_fil_X)-torch.sum(torch.log(fil_X)))<=num_fil_X*torch.log(torch.tensor(1.01)), self.w)\n", - " \n", - "verifier_define_calculation(dummy_data_path, ['col_name'],sel_dummy_data_path,verifier_model, verifier_model_path)" + "\n", + "verifier_define_calculation(dummy_data_path, selected_columns, sel_dummy_data_path,verifier_model, verifier_model_path)" ] }, { @@ -205,7 +216,7 @@ " super(prover_model, self).__init__()\n", " # w represents mean in this case\n", " self.w = nn.Parameter(data = theory_output, requires_grad = False)\n", - " \n", + "\n", " def forward(self,X):\n", " # where part\n", " filter = (X>20)\n", @@ -214,8 +225,8 @@ " print('self w: ', self.w)\n", " return (torch.abs((torch.log(self.w)*num_fil_X)-torch.sum(torch.log(fil_X)))<=num_fil_X*torch.log(torch.tensor(1.01)), self.w)\n", "\n", - " \n", - "prover_gen_settings(data_path,['col_name'], sel_data_path, prover_model,prover_model_path, [8], \"resources\", settings_path)" + "\n", + "prover_gen_settings(data_path, selected_columns, sel_data_path, prover_model,prover_model_path, scales, \"resources\", settings_path)" ] }, { @@ -279,9 +290,9 @@ } ], "source": [ - "# Here verifier & prover can concurrently call setup since all params are public to get pk. \n", + "# Here verifier & prover can concurrently call setup since all params are public to get pk.\n", "# Here write as verifier function to emphasize that verifier must calculate its own vk to be sure\n", - "verifier_setup(verifier_model_path, verifier_compiled_model_path, settings_path,vk_path, pk_path )\n", + "setup(verifier_model_path, verifier_compiled_model_path, settings_path,vk_path, pk_path )\n", "\n", "print(\"=======================================\")\n", "# Prover generates proof\n", @@ -314,7 +325,7 @@ ], "source": [ "# Verifier verifies\n", - "verifier_verify(proof_path, settings_path, vk_path)" + "verifier_verify(proof_path, settings_path, vk_path, selected_columns, commitment_maps)" ] }, { diff --git a/examples/where+mean/where+mean.ipynb b/examples/where+mean/where+mean.ipynb index 9bc151a..01386ac 100644 --- a/examples/where+mean/where+mean.ipynb +++ b/examples/where+mean/where+mean.ipynb @@ -128,7 +128,7 @@ "\n", "data = np.array(json.loads(open(data_path, \"r\").read())['col_name'])\n", "data_tensor = torch.reshape(torch.tensor(data),(1,-1, 1))\n", - "# remember that our create_dummy creates random numbers in range 1 - 30, so need to make sure this example the filter doesnt \n", + "# remember that our create_dummy creates random numbers in range 1 - 30, so need to make sure this example the filter doesnt\n", "# get filter out all data\n", "create_dummy(data_path, dummy_data_path)\n", "dummy_data = np.array(json.loads(open(dummy_data_path, \"r\").read())['col_name'])\n", @@ -142,6 +142,17 @@ "theory_output = torch.mean(gt20_data_tensor)\n" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "scales = [2]\n", + "selected_columns = ['col_name']\n", + "commitment_maps = get_data_commitment_maps(data_path, scales)" + ] + }, { "cell_type": "code", "execution_count": 36, @@ -161,9 +172,9 @@ " num_fil_X = torch.sum(filter.double())\n", " fil_X = torch.where(filter, X, 0.0)\n", " return (torch.abs(torch.sum(fil_X)-num_fil_X*self.w)<=torch.abs(0.01*num_fil_X*self.w), self.w)\n", - " \n", "\n", - "verifier_define_calculation(dummy_data_path, ['col_name'],sel_dummy_data_path,verifier_model, verifier_model_path)" + "\n", + "verifier_define_calculation(dummy_data_path, selected_columns,sel_dummy_data_path,verifier_model, verifier_model_path)" ] }, { @@ -192,7 +203,7 @@ " super(prover_model, self).__init__()\n", " # w represents mean in this case\n", " self.w = nn.Parameter(data = theory_output, requires_grad = False)\n", - " \n", + "\n", " def forward(self,X):\n", " # where part\n", " filter = (X>20)\n", @@ -200,9 +211,9 @@ " fil_X = torch.where(filter, X, 0.0)\n", "\n", " return (torch.abs(torch.sum(fil_X)-num_fil_X*self.w)<=torch.abs(0.01*num_fil_X*self.w), self.w)\n", - " \n", "\n", - "prover_gen_settings(data_path,['col_name'], sel_data_path, prover_model,prover_model_path, [2], \"resources\", settings_path)" + "\n", + "prover_gen_settings(data_path, selected_columns, sel_data_path, prover_model,prover_model_path, scales, \"resources\", settings_path)" ] }, { @@ -266,9 +277,9 @@ } ], "source": [ - "# Here verifier & prover can concurrently call setup since all params are public to get pk. \n", + "# Here verifier & prover can concurrently call setup since all params are public to get pk.\n", "# Here write as verifier function to emphasize that verifier must calculate its own vk to be sure\n", - "verifier_setup(verifier_model_path, verifier_compiled_model_path, settings_path,vk_path, pk_path )\n", + "setup(verifier_model_path, verifier_compiled_model_path, settings_path,vk_path, pk_path )\n", "\n", "print(\"=======================================\")\n", "# Prover generates proof\n", @@ -295,7 +306,7 @@ ], "source": [ "# Verifier verifies\n", - "verifier_verify(proof_path, settings_path, vk_path)" + "verifier_verify(proof_path, settings_path, vk_path, selected_columns, commitment_maps)" ] }, { diff --git a/examples/where+median/where+median.ipynb b/examples/where+median/where+median.ipynb index 0e34266..c514fe0 100644 --- a/examples/where+median/where+median.ipynb +++ b/examples/where+median/where+median.ipynb @@ -140,6 +140,17 @@ "upper_to_median = torch.tensor(np.sort(data[data<50])[int(len(data[data<50])/2)])\n" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "scales = [2]\n", + "selected_columns = ['col_name']\n", + "commitment_maps = get_data_commitment_maps(data_path, scales)" + ] + }, { "cell_type": "code", "execution_count": 39, @@ -173,7 +184,7 @@ " num_fil_X = X.size()[1]-num_lowest\n", " min_X = torch.min(X)\n", " fil_X = torch.where(filter, X, min_X-1)\n", - " \n", + "\n", " count_less = torch.sum((fil_X < 0.99*self.w).double()) - num_lowest\n", " count_equal = torch.sum((torch.abs(fil_X-self.w)<=torch.abs(0.01*self.w)).double())\n", " half_len = torch.floor(torch.div(num_fil_X, 2))\n", @@ -193,11 +204,11 @@ "\n", " median_in_cons = torch.logical_and(less_cons, more_cons)\n", " median_out_cons = torch.logical_and(torch.logical_and(bound, bound_avg), torch.logical_and(torch.logical_and(lower_cons, upper_cons), torch.logical_and(lower_exist, upper_exist)))\n", - " \n", + "\n", " return(torch.where(count_equal==0, median_out_cons, median_in_cons), self.w)\n", "\n", "\n", - "verifier_define_calculation(dummy_data_path, ['col_name'],sel_dummy_data_path,verifier_model, verifier_model_path)" + "verifier_define_calculation(dummy_data_path, selected_columns,sel_dummy_data_path,verifier_model, verifier_model_path)" ] }, { @@ -234,7 +245,7 @@ " num_fil_X = X.size()[1]-num_lowest\n", " min_X = torch.min(X)\n", " fil_X = torch.where(filter, X, min_X-1)\n", - " \n", + "\n", " count_less = torch.sum((fil_X < 0.99*self.w).double()) - num_lowest\n", " count_equal = torch.sum((torch.abs(fil_X-self.w)<=torch.abs(0.01*self.w)).double())\n", " half_len = torch.floor(torch.div(num_fil_X, 2))\n", @@ -258,7 +269,7 @@ " return(torch.where(count_equal==0, median_out_cons, median_in_cons), self.w)\n", "\n", "\n", - "prover_gen_settings(data_path,['col_name'], sel_data_path, prover_model,prover_model_path, [2], \"resources\", settings_path)" + "prover_gen_settings(data_path,selected_columns, sel_data_path, prover_model,prover_model_path, scales, \"resources\", settings_path)" ] }, { @@ -322,9 +333,9 @@ } ], "source": [ - "# Here verifier & prover can concurrently call setup since all params are public to get pk. \n", + "# Here verifier & prover can concurrently call setup since all params are public to get pk.\n", "# Here write as verifier function to emphasize that verifier must calculate its own vk to be sure\n", - "verifier_setup(verifier_model_path, verifier_compiled_model_path, settings_path,vk_path, pk_path )\n", + "setup(verifier_model_path, verifier_compiled_model_path, settings_path,vk_path, pk_path )\n", "\n", "print(\"=======================================\")\n", "# Prover generates proof\n", @@ -351,7 +362,7 @@ ], "source": [ "# Verifier verifies\n", - "verifier_verify(proof_path, settings_path, vk_path)" + "verifier_verify(proof_path, settings_path, vk_path, selected_columns, commitment_maps)" ] }, { diff --git a/examples/where+mode/where+mode.ipynb b/examples/where+mode/where+mode.ipynb index d3cfab2..f57ec75 100644 --- a/examples/where+mode/where+mode.ipynb +++ b/examples/where+mode/where+mode.ipynb @@ -155,6 +155,17 @@ "theory_output = torch.tensor(mode_within(data[data>20],1))" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "scales = [2]\n", + "selected_columns = ['col_name']\n", + "commitment_maps = get_data_commitment_maps(data_path, scales)" + ] + }, { "cell_type": "code", "execution_count": 7, @@ -189,7 +200,7 @@ " return (torch.sum(result) == X.size()[1], self.w)\n", "\n", "\n", - "verifier_define_calculation(dummy_data_path, ['col_name'],sel_dummy_data_path,verifier_model, verifier_model_path)" + "verifier_define_calculation(dummy_data_path, selected_columns,sel_dummy_data_path,verifier_model, verifier_model_path)" ] }, { @@ -242,7 +253,7 @@ " result = torch.tensor([torch.logical_or(torch.sum((torch.abs(X-ele[0])<=torch.abs(0.01*ele[0])).double())<=count_equal, torch.abs(min_X-1-ele[0])<=torch.abs(0.01*ele[0])) for ele in X[0]])\n", " return (torch.sum(result) == X.size()[1], self.w)\n", "\n", - "prover_gen_settings(data_path,['col_name'], sel_data_path, prover_model,prover_model_path, [2], \"resources\", settings_path)" + "prover_gen_settings(data_path,selected_columns, sel_data_path, prover_model,prover_model_path, scales, \"resources\", settings_path)" ] }, { @@ -306,9 +317,9 @@ } ], "source": [ - "# Here verifier & prover can concurrently call setup since all params are public to get pk. \n", + "# Here verifier & prover can concurrently call setup since all params are public to get pk.\n", "# Here write as verifier function to emphasize that verifier must calculate its own vk to be sure\n", - "verifier_setup(verifier_model_path, verifier_compiled_model_path, settings_path,vk_path, pk_path )\n", + "setup(verifier_model_path, verifier_compiled_model_path, settings_path,vk_path, pk_path )\n", "\n", "print(\"=======================================\")\n", "# Prover generates proof\n", @@ -335,7 +346,7 @@ ], "source": [ "# Verifier verifies\n", - "verifier_verify(proof_path, settings_path, vk_path)" + "verifier_verify(proof_path, settings_path, vk_path, selected_columns, commitment_maps)" ] }, { diff --git a/examples/where+regression/where+regression.ipynb b/examples/where+regression/where+regression.ipynb index 09ed341..8684a31 100644 --- a/examples/where+regression/where+regression.ipynb +++ b/examples/where+regression/where+regression.ipynb @@ -168,6 +168,17 @@ "\n" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "scales = [0]\n", + "selected_columns = ['x1', 'x2', 'y']\n", + "commitment_maps = get_data_commitment_maps(data_path, scales)" + ] + }, { "cell_type": "code", "execution_count": 9, @@ -186,12 +197,12 @@ ], "source": [ "# Verifier/ data consumer side:\n", - "# Want to calculate regression of y over \n", + "# Want to calculate regression of y over\n", "class verifier_model(nn.Module):\n", " def __init__(self):\n", " super(verifier_model, self).__init__()\n", " self.w = nn.Parameter(data = lt20_dummy_w_tensor, requires_grad = False)\n", - " \n", + "\n", " def forward(self, *args):\n", " # infer Y from the last parameter\n", " Y = args[-1]\n", @@ -206,7 +217,7 @@ " self.w\n", " )\n", "\n", - "verifier_define_calculation(dummy_data_path, ['x1','x2','y'],sel_dummy_data_path,verifier_model, verifier_model_path)" + "verifier_define_calculation(dummy_data_path, selected_columns,sel_dummy_data_path,verifier_model, verifier_model_path)" ] }, { @@ -258,8 +269,8 @@ " torch.sum(torch.abs(fil_X_T @ fil_X_one @ self.w - fil_X_T @ fil_Y)) <= 0.01 * torch.sum(torch.abs(fil_X_T @ fil_Y)),\n", " self.w\n", " )\n", - " \n", - "prover_gen_settings(data_path,['x1','x2','y'], sel_data_path, prover_model,prover_model_path, [0], \"resources\", settings_path)" + "\n", + "prover_gen_settings(data_path,selected_columns, sel_data_path, prover_model,prover_model_path, scales, \"resources\", settings_path)" ] }, { @@ -333,9 +344,9 @@ } ], "source": [ - "# Here verifier & prover can concurrently call setup since all params are public to get pk. \n", + "# Here verifier & prover can concurrently call setup since all params are public to get pk.\n", "# Here write as verifier function to emphasize that verifier must calculate its own vk to be sure\n", - "verifier_setup(verifier_model_path, verifier_compiled_model_path, settings_path,vk_path, pk_path )\n", + "setup(verifier_model_path, verifier_compiled_model_path, settings_path,vk_path, pk_path )\n", "\n", "print(\"=======================================\")\n", "# Prover generates proof\n", @@ -363,7 +374,7 @@ } ], "source": [ - "verifier_verify(proof_path, settings_path, vk_path)" + "verifier_verify(proof_path, settings_path, vk_path, selected_columns, commitment_maps)" ] }, { @@ -390,7 +401,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.0" + "version": "3.12.1" }, "orig_nbformat": 4 }, diff --git a/examples/where+stdev/where+stdev.ipynb b/examples/where+stdev/where+stdev.ipynb index 6f1364e..1ee95cd 100644 --- a/examples/where+stdev/where+stdev.ipynb +++ b/examples/where+stdev/where+stdev.ipynb @@ -136,7 +136,7 @@ "# Note, here we make\n", "gt5_data_tensor = data_tensor[data_tensor > 5].reshape(1,-1,1)\n", "\n", - "create_dummy(data_path, dummy_data_path) \n", + "create_dummy(data_path, dummy_data_path)\n", "dummy_data = np.array(json.loads(open(dummy_data_path, \"r\").read())['col_name'])\n", "\n", "dummy_data_tensor = torch.reshape(torch.tensor(dummy_data), (1,-1,1))\n", @@ -152,6 +152,17 @@ "print(data_mean)" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "scales = [2]\n", + "selected_columns = ['col_name']\n", + "commitment_maps = get_data_commitment_maps(data_path, scales)" + ] + }, { "cell_type": "code", "execution_count": 82, @@ -186,8 +197,8 @@ " fil_std_X = torch.where(filter, X, self.data_mean)\n", " print(\"bool: \",torch.logical_and(torch.abs(torch.sum((fil_std_X-self.data_mean)*(fil_std_X-self.data_mean))-self.w*self.w*(num_fil_X-1))<=torch.abs(0.02*self.w*self.w*(num_fil_X-1)),x_mean_cons) )\n", " return (torch.logical_and(torch.abs(torch.sum((fil_std_X-self.data_mean)*(fil_std_X-self.data_mean))-self.w*self.w*(num_fil_X-1))<=torch.abs(0.02*self.w*self.w*(num_fil_X-1)),x_mean_cons),self.w)\n", - " \n", - "verifier_define_calculation(dummy_data_path, ['col_name'],sel_dummy_data_path,verifier_model, verifier_model_path)" + "\n", + "verifier_define_calculation(dummy_data_path, selected_columns,sel_dummy_data_path,verifier_model, verifier_model_path)" ] }, { @@ -216,7 +227,7 @@ " # w represents mean in this case\n", " self.w = nn.Parameter(data = theory_output, requires_grad = False)\n", " self.data_mean = nn.Parameter(data = data_mean, requires_grad = False)\n", - " \n", + "\n", " def forward(self,X):\n", " filter = (X>5)\n", " num_fil_X = torch.sum(filter.double())\n", @@ -227,7 +238,7 @@ " return (torch.logical_and(torch.abs(torch.sum((fil_std_X-self.data_mean)*(fil_std_X-self.data_mean))-self.w*self.w*(num_fil_X-1))<=torch.abs(0.02*self.w*self.w*(num_fil_X-1)),x_mean_cons),self.w)\n", "\n", "\n", - "prover_gen_settings(data_path,['col_name'], sel_data_path, prover_model,prover_model_path, [2], \"resources\", settings_path)" + "prover_gen_settings(data_path, selected_columns, sel_data_path, prover_model,prover_model_path, scales, \"resources\", settings_path)" ] }, { @@ -291,9 +302,9 @@ } ], "source": [ - "# Here verifier & prover can concurrently call setup since all params are public to get pk. \n", + "# Here verifier & prover can concurrently call setup since all params are public to get pk.\n", "# Here write as verifier function to emphasize that verifier must calculate its own vk to be sure\n", - "verifier_setup(verifier_model_path, verifier_compiled_model_path, settings_path,vk_path, pk_path )\n", + "setup(verifier_model_path, verifier_compiled_model_path, settings_path,vk_path, pk_path )\n", "\n", "print(\"=======================================\")\n", "# Prover generates proof\n", @@ -320,7 +331,7 @@ ], "source": [ "# Verifier verifies\n", - "verifier_verify(proof_path, settings_path, vk_path)" + "verifier_verify(proof_path, settings_path, vk_path, selected_columns, commitment_maps)" ] }, { diff --git a/poetry.lock b/poetry.lock index 9284cda..7c43790 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,41 +1,105 @@ +# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. + [[package]] name = "appnope" version = "0.1.3" description = "Disable App Nap on macOS >= 10.9" -category = "dev" optional = false python-versions = "*" +files = [ + {file = "appnope-0.1.3-py2.py3-none-any.whl", hash = "sha256:265a455292d0bd8a72453494fa24df5a11eb18373a60c7c0430889f22548605e"}, + {file = "appnope-0.1.3.tar.gz", hash = "sha256:02bd91c4de869fbb1e1c50aafc4098827a7a54ab2f39d9dcba6c9547ed920e24"}, +] [[package]] name = "asttokens" version = "2.4.1" description = "Annotate AST trees with source code positions" -category = "dev" optional = false python-versions = "*" +files = [ + {file = "asttokens-2.4.1-py2.py3-none-any.whl", hash = "sha256:051ed49c3dcae8913ea7cd08e46a606dba30b79993209636c4875bc1d637bc24"}, + {file = "asttokens-2.4.1.tar.gz", hash = "sha256:b03869718ba9a6eb027e134bfdf69f38a236d681c83c160d510768af11254ba0"}, +] [package.dependencies] six = ">=1.12.0" [package.extras] astroid = ["astroid (>=1,<2)", "astroid (>=2,<4)"] -test = ["pytest", "astroid (>=1,<2)", "astroid (>=2,<4)"] +test = ["astroid (>=1,<2)", "astroid (>=2,<4)", "pytest"] [[package]] name = "certifi" -version = "2023.11.17" +version = "2024.2.2" description = "Python package for providing Mozilla's CA Bundle." -category = "main" optional = false python-versions = ">=3.6" +files = [ + {file = "certifi-2024.2.2-py3-none-any.whl", hash = "sha256:dc383c07b76109f368f6106eee2b593b04a011ea4d55f652c6ca24a754d1cdd1"}, + {file = "certifi-2024.2.2.tar.gz", hash = "sha256:0569859f95fc761b18b45ef421b1290a0f65f147e92a1e5eb3e635f9a5e4e66f"}, +] [[package]] name = "cffi" version = "1.16.0" description = "Foreign Function Interface for Python calling C code." -category = "dev" optional = false python-versions = ">=3.8" +files = [ + {file = "cffi-1.16.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:6b3d6606d369fc1da4fd8c357d026317fbb9c9b75d36dc16e90e84c26854b088"}, + {file = "cffi-1.16.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ac0f5edd2360eea2f1daa9e26a41db02dd4b0451b48f7c318e217ee092a213e9"}, + {file = "cffi-1.16.0-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7e61e3e4fa664a8588aa25c883eab612a188c725755afff6289454d6362b9673"}, + {file = "cffi-1.16.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a72e8961a86d19bdb45851d8f1f08b041ea37d2bd8d4fd19903bc3083d80c896"}, + {file = "cffi-1.16.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5b50bf3f55561dac5438f8e70bfcdfd74543fd60df5fa5f62d94e5867deca684"}, + {file = "cffi-1.16.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7651c50c8c5ef7bdb41108b7b8c5a83013bfaa8a935590c5d74627c047a583c7"}, + {file = "cffi-1.16.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e4108df7fe9b707191e55f33efbcb2d81928e10cea45527879a4749cbe472614"}, + {file = "cffi-1.16.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:32c68ef735dbe5857c810328cb2481e24722a59a2003018885514d4c09af9743"}, + {file = "cffi-1.16.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:673739cb539f8cdaa07d92d02efa93c9ccf87e345b9a0b556e3ecc666718468d"}, + {file = "cffi-1.16.0-cp310-cp310-win32.whl", hash = "sha256:9f90389693731ff1f659e55c7d1640e2ec43ff725cc61b04b2f9c6d8d017df6a"}, + {file = "cffi-1.16.0-cp310-cp310-win_amd64.whl", hash = "sha256:e6024675e67af929088fda399b2094574609396b1decb609c55fa58b028a32a1"}, + {file = "cffi-1.16.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b84834d0cf97e7d27dd5b7f3aca7b6e9263c56308ab9dc8aae9784abb774d404"}, + {file = "cffi-1.16.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1b8ebc27c014c59692bb2664c7d13ce7a6e9a629be20e54e7271fa696ff2b417"}, + {file = "cffi-1.16.0-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ee07e47c12890ef248766a6e55bd38ebfb2bb8edd4142d56db91b21ea68b7627"}, + {file = "cffi-1.16.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d8a9d3ebe49f084ad71f9269834ceccbf398253c9fac910c4fd7053ff1386936"}, + {file = "cffi-1.16.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e70f54f1796669ef691ca07d046cd81a29cb4deb1e5f942003f401c0c4a2695d"}, + {file = "cffi-1.16.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5bf44d66cdf9e893637896c7faa22298baebcd18d1ddb6d2626a6e39793a1d56"}, + {file = "cffi-1.16.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7b78010e7b97fef4bee1e896df8a4bbb6712b7f05b7ef630f9d1da00f6444d2e"}, + {file = "cffi-1.16.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:c6a164aa47843fb1b01e941d385aab7215563bb8816d80ff3a363a9f8448a8dc"}, + {file = "cffi-1.16.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e09f3ff613345df5e8c3667da1d918f9149bd623cd9070c983c013792a9a62eb"}, + {file = "cffi-1.16.0-cp311-cp311-win32.whl", hash = "sha256:2c56b361916f390cd758a57f2e16233eb4f64bcbeee88a4881ea90fca14dc6ab"}, + {file = "cffi-1.16.0-cp311-cp311-win_amd64.whl", hash = "sha256:db8e577c19c0fda0beb7e0d4e09e0ba74b1e4c092e0e40bfa12fe05b6f6d75ba"}, + {file = "cffi-1.16.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:fa3a0128b152627161ce47201262d3140edb5a5c3da88d73a1b790a959126956"}, + {file = "cffi-1.16.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:68e7c44931cc171c54ccb702482e9fc723192e88d25a0e133edd7aff8fcd1f6e"}, + {file = "cffi-1.16.0-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:abd808f9c129ba2beda4cfc53bde801e5bcf9d6e0f22f095e45327c038bfe68e"}, + {file = "cffi-1.16.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:88e2b3c14bdb32e440be531ade29d3c50a1a59cd4e51b1dd8b0865c54ea5d2e2"}, + {file = "cffi-1.16.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fcc8eb6d5902bb1cf6dc4f187ee3ea80a1eba0a89aba40a5cb20a5087d961357"}, + {file = "cffi-1.16.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b7be2d771cdba2942e13215c4e340bfd76398e9227ad10402a8767ab1865d2e6"}, + {file = "cffi-1.16.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e715596e683d2ce000574bae5d07bd522c781a822866c20495e52520564f0969"}, + {file = "cffi-1.16.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:2d92b25dbf6cae33f65005baf472d2c245c050b1ce709cc4588cdcdd5495b520"}, + {file = "cffi-1.16.0-cp312-cp312-win32.whl", hash = "sha256:b2ca4e77f9f47c55c194982e10f058db063937845bb2b7a86c84a6cfe0aefa8b"}, + {file = "cffi-1.16.0-cp312-cp312-win_amd64.whl", hash = "sha256:68678abf380b42ce21a5f2abde8efee05c114c2fdb2e9eef2efdb0257fba1235"}, + {file = "cffi-1.16.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0c9ef6ff37e974b73c25eecc13952c55bceed9112be2d9d938ded8e856138bcc"}, + {file = "cffi-1.16.0-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a09582f178759ee8128d9270cd1344154fd473bb77d94ce0aeb2a93ebf0feaf0"}, + {file = "cffi-1.16.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e760191dd42581e023a68b758769e2da259b5d52e3103c6060ddc02c9edb8d7b"}, + {file = "cffi-1.16.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:80876338e19c951fdfed6198e70bc88f1c9758b94578d5a7c4c91a87af3cf31c"}, + {file = "cffi-1.16.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a6a14b17d7e17fa0d207ac08642c8820f84f25ce17a442fd15e27ea18d67c59b"}, + {file = "cffi-1.16.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6602bc8dc6f3a9e02b6c22c4fc1e47aa50f8f8e6d3f78a5e16ac33ef5fefa324"}, + {file = "cffi-1.16.0-cp38-cp38-win32.whl", hash = "sha256:131fd094d1065b19540c3d72594260f118b231090295d8c34e19a7bbcf2e860a"}, + {file = "cffi-1.16.0-cp38-cp38-win_amd64.whl", hash = "sha256:31d13b0f99e0836b7ff893d37af07366ebc90b678b6664c955b54561fc36ef36"}, + {file = "cffi-1.16.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:582215a0e9adbe0e379761260553ba11c58943e4bbe9c36430c4ca6ac74b15ed"}, + {file = "cffi-1.16.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:b29ebffcf550f9da55bec9e02ad430c992a87e5f512cd63388abb76f1036d8d2"}, + {file = "cffi-1.16.0-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:dc9b18bf40cc75f66f40a7379f6a9513244fe33c0e8aa72e2d56b0196a7ef872"}, + {file = "cffi-1.16.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9cb4a35b3642fc5c005a6755a5d17c6c8b6bcb6981baf81cea8bfbc8903e8ba8"}, + {file = "cffi-1.16.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b86851a328eedc692acf81fb05444bdf1891747c25af7529e39ddafaf68a4f3f"}, + {file = "cffi-1.16.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c0f31130ebc2d37cdd8e44605fb5fa7ad59049298b3f745c74fa74c62fbfcfc4"}, + {file = "cffi-1.16.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f8e709127c6c77446a8c0a8c8bf3c8ee706a06cd44b1e827c3e6a2ee6b8c098"}, + {file = "cffi-1.16.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:748dcd1e3d3d7cd5443ef03ce8685043294ad6bd7c02a38d1bd367cfd968e000"}, + {file = "cffi-1.16.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8895613bcc094d4a1b2dbe179d88d7fb4a15cee43c052e8885783fac397d91fe"}, + {file = "cffi-1.16.0-cp39-cp39-win32.whl", hash = "sha256:ed86a35631f7bfbb28e108dd96773b9d5a6ce4811cf6ea468bb6a359b256b1e4"}, + {file = "cffi-1.16.0-cp39-cp39-win_amd64.whl", hash = "sha256:3686dffb02459559c74dd3d81748269ffb0eb027c39a6fc99502de37d501faa8"}, + {file = "cffi-1.16.0.tar.gz", hash = "sha256:bcb3ef43e58665bbda2fb198698fcae6776483e0c4a631aa5647806c25e02cc0"}, +] [package.dependencies] pycparser = "*" @@ -44,17 +108,111 @@ pycparser = "*" name = "charset-normalizer" version = "3.3.2" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." -category = "main" optional = false python-versions = ">=3.7.0" +files = [ + {file = "charset-normalizer-3.3.2.tar.gz", hash = "sha256:f30c3cb33b24454a82faecaf01b19c18562b1e89558fb6c56de4d9118a032fd5"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:25baf083bf6f6b341f4121c2f3c548875ee6f5339300e08be3f2b2ba1721cdd3"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:06435b539f889b1f6f4ac1758871aae42dc3a8c0e24ac9e60c2384973ad73027"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9063e24fdb1e498ab71cb7419e24622516c4a04476b17a2dab57e8baa30d6e03"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6897af51655e3691ff853668779c7bad41579facacf5fd7253b0133308cf000d"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1d3193f4a680c64b4b6a9115943538edb896edc190f0b222e73761716519268e"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cd70574b12bb8a4d2aaa0094515df2463cb429d8536cfb6c7ce983246983e5a6"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8465322196c8b4d7ab6d1e049e4c5cb460d0394da4a27d23cc242fbf0034b6b5"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a9a8e9031d613fd2009c182b69c7b2c1ef8239a0efb1df3f7c8da66d5dd3d537"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:beb58fe5cdb101e3a055192ac291b7a21e3b7ef4f67fa1d74e331a7f2124341c"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:e06ed3eb3218bc64786f7db41917d4e686cc4856944f53d5bdf83a6884432e12"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:2e81c7b9c8979ce92ed306c249d46894776a909505d8f5a4ba55b14206e3222f"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:572c3763a264ba47b3cf708a44ce965d98555f618ca42c926a9c1616d8f34269"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:fd1abc0d89e30cc4e02e4064dc67fcc51bd941eb395c502aac3ec19fab46b519"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-win32.whl", hash = "sha256:3d47fa203a7bd9c5b6cee4736ee84ca03b8ef23193c0d1ca99b5089f72645c73"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-win_amd64.whl", hash = "sha256:10955842570876604d404661fbccbc9c7e684caf432c09c715ec38fbae45ae09"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:802fe99cca7457642125a8a88a084cef28ff0cf9407060f7b93dca5aa25480db"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:573f6eac48f4769d667c4442081b1794f52919e7edada77495aaed9236d13a96"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:549a3a73da901d5bc3ce8d24e0600d1fa85524c10287f6004fbab87672bf3e1e"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f27273b60488abe721a075bcca6d7f3964f9f6f067c8c4c605743023d7d3944f"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ceae2f17a9c33cb48e3263960dc5fc8005351ee19db217e9b1bb15d28c02574"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:65f6f63034100ead094b8744b3b97965785388f308a64cf8d7c34f2f2e5be0c4"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:753f10e867343b4511128c6ed8c82f7bec3bd026875576dfd88483c5c73b2fd8"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4a78b2b446bd7c934f5dcedc588903fb2f5eec172f3d29e52a9096a43722adfc"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e537484df0d8f426ce2afb2d0f8e1c3d0b114b83f8850e5f2fbea0e797bd82ae"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:eb6904c354526e758fda7167b33005998fb68c46fbc10e013ca97f21ca5c8887"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:deb6be0ac38ece9ba87dea880e438f25ca3eddfac8b002a2ec3d9183a454e8ae"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:4ab2fe47fae9e0f9dee8c04187ce5d09f48eabe611be8259444906793ab7cbce"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:80402cd6ee291dcb72644d6eac93785fe2c8b9cb30893c1af5b8fdd753b9d40f"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-win32.whl", hash = "sha256:7cd13a2e3ddeed6913a65e66e94b51d80a041145a026c27e6bb76c31a853c6ab"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-win_amd64.whl", hash = "sha256:663946639d296df6a2bb2aa51b60a2454ca1cb29835324c640dafb5ff2131a77"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:0b2b64d2bb6d3fb9112bafa732def486049e63de9618b5843bcdd081d8144cd8"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:ddbb2551d7e0102e7252db79ba445cdab71b26640817ab1e3e3648dad515003b"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:55086ee1064215781fff39a1af09518bc9255b50d6333f2e4c74ca09fac6a8f6"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8f4a014bc36d3c57402e2977dada34f9c12300af536839dc38c0beab8878f38a"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a10af20b82360ab00827f916a6058451b723b4e65030c5a18577c8b2de5b3389"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8d756e44e94489e49571086ef83b2bb8ce311e730092d2c34ca8f7d925cb20aa"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:90d558489962fd4918143277a773316e56c72da56ec7aa3dc3dbbe20fdfed15b"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6ac7ffc7ad6d040517be39eb591cac5ff87416c2537df6ba3cba3bae290c0fed"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:7ed9e526742851e8d5cc9e6cf41427dfc6068d4f5a3bb03659444b4cabf6bc26"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:8bdb58ff7ba23002a4c5808d608e4e6c687175724f54a5dade5fa8c67b604e4d"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:6b3251890fff30ee142c44144871185dbe13b11bab478a88887a639655be1068"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:b4a23f61ce87adf89be746c8a8974fe1c823c891d8f86eb218bb957c924bb143"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:efcb3f6676480691518c177e3b465bcddf57cea040302f9f4e6e191af91174d4"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-win32.whl", hash = "sha256:d965bba47ddeec8cd560687584e88cf699fd28f192ceb452d1d7ee807c5597b7"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-win_amd64.whl", hash = "sha256:96b02a3dc4381e5494fad39be677abcb5e6634bf7b4fa83a6dd3112607547001"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:95f2a5796329323b8f0512e09dbb7a1860c46a39da62ecb2324f116fa8fdc85c"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c002b4ffc0be611f0d9da932eb0f704fe2602a9a949d1f738e4c34c75b0863d5"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a981a536974bbc7a512cf44ed14938cf01030a99e9b3a06dd59578882f06f985"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3287761bc4ee9e33561a7e058c72ac0938c4f57fe49a09eae428fd88aafe7bb6"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:42cb296636fcc8b0644486d15c12376cb9fa75443e00fb25de0b8602e64c1714"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0a55554a2fa0d408816b3b5cedf0045f4b8e1a6065aec45849de2d6f3f8e9786"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:c083af607d2515612056a31f0a8d9e0fcb5876b7bfc0abad3ecd275bc4ebc2d5"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:87d1351268731db79e0f8e745d92493ee2841c974128ef629dc518b937d9194c"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:bd8f7df7d12c2db9fab40bdd87a7c09b1530128315d047a086fa3ae3435cb3a8"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:c180f51afb394e165eafe4ac2936a14bee3eb10debc9d9e4db8958fe36afe711"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:8c622a5fe39a48f78944a87d4fb8a53ee07344641b0562c540d840748571b811"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-win32.whl", hash = "sha256:db364eca23f876da6f9e16c9da0df51aa4f104a972735574842618b8c6d999d4"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-win_amd64.whl", hash = "sha256:86216b5cee4b06df986d214f664305142d9c76df9b6512be2738aa72a2048f99"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:6463effa3186ea09411d50efc7d85360b38d5f09b870c48e4600f63af490e56a"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6c4caeef8fa63d06bd437cd4bdcf3ffefe6738fb1b25951440d80dc7df8c03ac"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:37e55c8e51c236f95b033f6fb391d7d7970ba5fe7ff453dad675e88cf303377a"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fb69256e180cb6c8a894fee62b3afebae785babc1ee98b81cdf68bbca1987f33"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ae5f4161f18c61806f411a13b0310bea87f987c7d2ecdbdaad0e94eb2e404238"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b2b0a0c0517616b6869869f8c581d4eb2dd83a4d79e0ebcb7d373ef9956aeb0a"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:45485e01ff4d3630ec0d9617310448a8702f70e9c01906b0d0118bdf9d124cf2"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eb00ed941194665c332bf8e078baf037d6c35d7c4f3102ea2d4f16ca94a26dc8"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:2127566c664442652f024c837091890cb1942c30937add288223dc895793f898"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:a50aebfa173e157099939b17f18600f72f84eed3049e743b68ad15bd69b6bf99"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:4d0d1650369165a14e14e1e47b372cfcb31d6ab44e6e33cb2d4e57265290044d"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:923c0c831b7cfcb071580d3f46c4baf50f174be571576556269530f4bbd79d04"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:06a81e93cd441c56a9b65d8e1d043daeb97a3d0856d177d5c90ba85acb3db087"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-win32.whl", hash = "sha256:6ef1d82a3af9d3eecdba2321dc1b3c238245d890843e040e41e470ffa64c3e25"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-win_amd64.whl", hash = "sha256:eb8821e09e916165e160797a6c17edda0679379a4be5c716c260e836e122f54b"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:c235ebd9baae02f1b77bcea61bce332cb4331dc3617d254df3323aa01ab47bd4"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:5b4c145409bef602a690e7cfad0a15a55c13320ff7a3ad7ca59c13bb8ba4d45d"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:68d1f8a9e9e37c1223b656399be5d6b448dea850bed7d0f87a8311f1ff3dabb0"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:22afcb9f253dac0696b5a4be4a1c0f8762f8239e21b99680099abd9b2b1b2269"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e27ad930a842b4c5eb8ac0016b0a54f5aebbe679340c26101df33424142c143c"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1f79682fbe303db92bc2b1136016a38a42e835d932bab5b3b1bfcfbf0640e519"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b261ccdec7821281dade748d088bb6e9b69e6d15b30652b74cbbac25e280b796"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:122c7fa62b130ed55f8f285bfd56d5f4b4a5b503609d181f9ad85e55c89f4185"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:d0eccceffcb53201b5bfebb52600a5fb483a20b61da9dbc885f8b103cbe7598c"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:9f96df6923e21816da7e0ad3fd47dd8f94b2a5ce594e00677c0013018b813458"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:7f04c839ed0b6b98b1a7501a002144b76c18fb1c1850c8b98d458ac269e26ed2"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:34d1c8da1e78d2e001f363791c98a272bb734000fcef47a491c1e3b0505657a8"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ff8fa367d09b717b2a17a052544193ad76cd49979c805768879cb63d9ca50561"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-win32.whl", hash = "sha256:aed38f6e4fb3f5d6bf81bfa990a07806be9d83cf7bacef998ab1a9bd660a581f"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-win_amd64.whl", hash = "sha256:b01b88d45a6fcb69667cd6d2f7a9aeb4bf53760d7fc536bf679ec94fe9f3ff3d"}, + {file = "charset_normalizer-3.3.2-py3-none-any.whl", hash = "sha256:3e4d1f6587322d2788836a99c69062fbb091331ec940e02d12d179c1d53e25fc"}, +] [[package]] name = "click" version = "8.1.7" description = "Composable command line interface toolkit" -category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28"}, + {file = "click-8.1.7.tar.gz", hash = "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de"}, +] [package.dependencies] colorama = {version = "*", markers = "platform_system == \"Windows\""} @@ -63,17 +221,23 @@ colorama = {version = "*", markers = "platform_system == \"Windows\""} name = "colorama" version = "0.4.6" description = "Cross-platform colored terminal text." -category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" +files = [ + {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, + {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, +] [[package]] name = "comm" -version = "0.2.0" +version = "0.2.1" description = "Jupyter Python Comm implementation, for usage in ipykernel, xeus-python etc." -category = "dev" optional = false python-versions = ">=3.8" +files = [ + {file = "comm-0.2.1-py3-none-any.whl", hash = "sha256:87928485c0dfc0e7976fd89fc1e187023cf587e7c353e4a9b417555b44adf021"}, + {file = "comm-0.2.1.tar.gz", hash = "sha256:0bc91edae1344d39d3661dcbc36937181fdaddb304790458f8b044dbc064b89a"}, +] [package.dependencies] traitlets = ">=4" @@ -85,27 +249,75 @@ test = ["pytest"] name = "contourpy" version = "1.2.0" description = "Python library for calculating contours of 2D quadrilateral grids" -category = "main" optional = false python-versions = ">=3.9" +files = [ + {file = "contourpy-1.2.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0274c1cb63625972c0c007ab14dd9ba9e199c36ae1a231ce45d725cbcbfd10a8"}, + {file = "contourpy-1.2.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ab459a1cbbf18e8698399c595a01f6dcc5c138220ca3ea9e7e6126232d102bb4"}, + {file = "contourpy-1.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6fdd887f17c2f4572ce548461e4f96396681212d858cae7bd52ba3310bc6f00f"}, + {file = "contourpy-1.2.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5d16edfc3fc09968e09ddffada434b3bf989bf4911535e04eada58469873e28e"}, + {file = "contourpy-1.2.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1c203f617abc0dde5792beb586f827021069fb6d403d7f4d5c2b543d87edceb9"}, + {file = "contourpy-1.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b69303ceb2e4d4f146bf82fda78891ef7bcd80c41bf16bfca3d0d7eb545448aa"}, + {file = "contourpy-1.2.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:884c3f9d42d7218304bc74a8a7693d172685c84bd7ab2bab1ee567b769696df9"}, + {file = "contourpy-1.2.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:4a1b1208102be6e851f20066bf0e7a96b7d48a07c9b0cfe6d0d4545c2f6cadab"}, + {file = "contourpy-1.2.0-cp310-cp310-win32.whl", hash = "sha256:34b9071c040d6fe45d9826cbbe3727d20d83f1b6110d219b83eb0e2a01d79488"}, + {file = "contourpy-1.2.0-cp310-cp310-win_amd64.whl", hash = "sha256:bd2f1ae63998da104f16a8b788f685e55d65760cd1929518fd94cd682bf03e41"}, + {file = "contourpy-1.2.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:dd10c26b4eadae44783c45ad6655220426f971c61d9b239e6f7b16d5cdaaa727"}, + {file = "contourpy-1.2.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5c6b28956b7b232ae801406e529ad7b350d3f09a4fde958dfdf3c0520cdde0dd"}, + {file = "contourpy-1.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ebeac59e9e1eb4b84940d076d9f9a6cec0064e241818bcb6e32124cc5c3e377a"}, + {file = "contourpy-1.2.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:139d8d2e1c1dd52d78682f505e980f592ba53c9f73bd6be102233e358b401063"}, + {file = "contourpy-1.2.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1e9dc350fb4c58adc64df3e0703ab076f60aac06e67d48b3848c23647ae4310e"}, + {file = "contourpy-1.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:18fc2b4ed8e4a8fe849d18dce4bd3c7ea637758c6343a1f2bae1e9bd4c9f4686"}, + {file = "contourpy-1.2.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:16a7380e943a6d52472096cb7ad5264ecee36ed60888e2a3d3814991a0107286"}, + {file = "contourpy-1.2.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:8d8faf05be5ec8e02a4d86f616fc2a0322ff4a4ce26c0f09d9f7fb5330a35c95"}, + {file = "contourpy-1.2.0-cp311-cp311-win32.whl", hash = "sha256:67b7f17679fa62ec82b7e3e611c43a016b887bd64fb933b3ae8638583006c6d6"}, + {file = "contourpy-1.2.0-cp311-cp311-win_amd64.whl", hash = "sha256:99ad97258985328b4f207a5e777c1b44a83bfe7cf1f87b99f9c11d4ee477c4de"}, + {file = "contourpy-1.2.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:575bcaf957a25d1194903a10bc9f316c136c19f24e0985a2b9b5608bdf5dbfe0"}, + {file = "contourpy-1.2.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:9e6c93b5b2dbcedad20a2f18ec22cae47da0d705d454308063421a3b290d9ea4"}, + {file = "contourpy-1.2.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:464b423bc2a009088f19bdf1f232299e8b6917963e2b7e1d277da5041f33a779"}, + {file = "contourpy-1.2.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:68ce4788b7d93e47f84edd3f1f95acdcd142ae60bc0e5493bfd120683d2d4316"}, + {file = "contourpy-1.2.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3d7d1f8871998cdff5d2ff6a087e5e1780139abe2838e85b0b46b7ae6cc25399"}, + {file = "contourpy-1.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6e739530c662a8d6d42c37c2ed52a6f0932c2d4a3e8c1f90692ad0ce1274abe0"}, + {file = "contourpy-1.2.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:247b9d16535acaa766d03037d8e8fb20866d054d3c7fbf6fd1f993f11fc60ca0"}, + {file = "contourpy-1.2.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:461e3ae84cd90b30f8d533f07d87c00379644205b1d33a5ea03381edc4b69431"}, + {file = "contourpy-1.2.0-cp312-cp312-win32.whl", hash = "sha256:1c2559d6cffc94890b0529ea7eeecc20d6fadc1539273aa27faf503eb4656d8f"}, + {file = "contourpy-1.2.0-cp312-cp312-win_amd64.whl", hash = "sha256:491b1917afdd8638a05b611a56d46587d5a632cabead889a5440f7c638bc6ed9"}, + {file = "contourpy-1.2.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:5fd1810973a375ca0e097dee059c407913ba35723b111df75671a1976efa04bc"}, + {file = "contourpy-1.2.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:999c71939aad2780f003979b25ac5b8f2df651dac7b38fb8ce6c46ba5abe6ae9"}, + {file = "contourpy-1.2.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b7caf9b241464c404613512d5594a6e2ff0cc9cb5615c9475cc1d9b514218ae8"}, + {file = "contourpy-1.2.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:266270c6f6608340f6c9836a0fb9b367be61dde0c9a9a18d5ece97774105ff3e"}, + {file = "contourpy-1.2.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dbd50d0a0539ae2e96e537553aff6d02c10ed165ef40c65b0e27e744a0f10af8"}, + {file = "contourpy-1.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:11f8d2554e52f459918f7b8e6aa20ec2a3bce35ce95c1f0ef4ba36fbda306df5"}, + {file = "contourpy-1.2.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:ce96dd400486e80ac7d195b2d800b03e3e6a787e2a522bfb83755938465a819e"}, + {file = "contourpy-1.2.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:6d3364b999c62f539cd403f8123ae426da946e142312a514162adb2addd8d808"}, + {file = "contourpy-1.2.0-cp39-cp39-win32.whl", hash = "sha256:1c88dfb9e0c77612febebb6ac69d44a8d81e3dc60f993215425b62c1161353f4"}, + {file = "contourpy-1.2.0-cp39-cp39-win_amd64.whl", hash = "sha256:78e6ad33cf2e2e80c5dfaaa0beec3d61face0fb650557100ee36db808bfa6843"}, + {file = "contourpy-1.2.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:be16975d94c320432657ad2402f6760990cb640c161ae6da1363051805fa8108"}, + {file = "contourpy-1.2.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b95a225d4948b26a28c08307a60ac00fb8671b14f2047fc5476613252a129776"}, + {file = "contourpy-1.2.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:0d7e03c0f9a4f90dc18d4e77e9ef4ec7b7bbb437f7f675be8e530d65ae6ef956"}, + {file = "contourpy-1.2.0.tar.gz", hash = "sha256:171f311cb758de7da13fc53af221ae47a5877be5a0843a9fe150818c51ed276a"}, +] [package.dependencies] numpy = ">=1.20,<2.0" [package.extras] -docs = ["furo", "sphinx (>=7.2)", "sphinx-copybutton"] bokeh = ["bokeh", "selenium"] -mypy = ["contourpy", "docutils-stubs", "mypy (==1.6.1)", "types-pillow"] -test = ["contourpy", "matplotlib", "pillow"] +docs = ["furo", "sphinx (>=7.2)", "sphinx-copybutton"] +mypy = ["contourpy[bokeh,docs]", "docutils-stubs", "mypy (==1.6.1)", "types-Pillow"] +test = ["Pillow", "contourpy[test-no-images]", "matplotlib"] test-no-images = ["pytest", "pytest-cov", "pytest-xdist", "wurlitzer"] [[package]] name = "cycler" version = "0.12.1" description = "Composable style cycles" -category = "main" optional = false python-versions = ">=3.8" +files = [ + {file = "cycler-0.12.1-py3-none-any.whl", hash = "sha256:85cef7cff222d8644161529808465972e51340599459b8ac3ccbac5a854e0d30"}, + {file = "cycler-0.12.1.tar.gz", hash = "sha256:88bb128f02ba341da8ef447245a9e138fae777f6a23943da4540077d3601eb1c"}, +] [package.extras] docs = ["ipython", "matplotlib", "numpydoc", "sphinx"] @@ -115,33 +327,61 @@ tests = ["pytest", "pytest-cov", "pytest-xdist"] name = "debugpy" version = "1.8.0" description = "An implementation of the Debug Adapter Protocol for Python" -category = "dev" optional = false python-versions = ">=3.8" +files = [ + {file = "debugpy-1.8.0-cp310-cp310-macosx_11_0_x86_64.whl", hash = "sha256:7fb95ca78f7ac43393cd0e0f2b6deda438ec7c5e47fa5d38553340897d2fbdfb"}, + {file = "debugpy-1.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ef9ab7df0b9a42ed9c878afd3eaaff471fce3fa73df96022e1f5c9f8f8c87ada"}, + {file = "debugpy-1.8.0-cp310-cp310-win32.whl", hash = "sha256:a8b7a2fd27cd9f3553ac112f356ad4ca93338feadd8910277aff71ab24d8775f"}, + {file = "debugpy-1.8.0-cp310-cp310-win_amd64.whl", hash = "sha256:5d9de202f5d42e62f932507ee8b21e30d49aae7e46d5b1dd5c908db1d7068637"}, + {file = "debugpy-1.8.0-cp311-cp311-macosx_11_0_universal2.whl", hash = "sha256:ef54404365fae8d45cf450d0544ee40cefbcb9cb85ea7afe89a963c27028261e"}, + {file = "debugpy-1.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:60009b132c91951354f54363f8ebdf7457aeb150e84abba5ae251b8e9f29a8a6"}, + {file = "debugpy-1.8.0-cp311-cp311-win32.whl", hash = "sha256:8cd0197141eb9e8a4566794550cfdcdb8b3db0818bdf8c49a8e8f8053e56e38b"}, + {file = "debugpy-1.8.0-cp311-cp311-win_amd64.whl", hash = "sha256:a64093656c4c64dc6a438e11d59369875d200bd5abb8f9b26c1f5f723622e153"}, + {file = "debugpy-1.8.0-cp38-cp38-macosx_11_0_x86_64.whl", hash = "sha256:b05a6b503ed520ad58c8dc682749113d2fd9f41ffd45daec16e558ca884008cd"}, + {file = "debugpy-1.8.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3c6fb41c98ec51dd010d7ed650accfd07a87fe5e93eca9d5f584d0578f28f35f"}, + {file = "debugpy-1.8.0-cp38-cp38-win32.whl", hash = "sha256:46ab6780159eeabb43c1495d9c84cf85d62975e48b6ec21ee10c95767c0590aa"}, + {file = "debugpy-1.8.0-cp38-cp38-win_amd64.whl", hash = "sha256:bdc5ef99d14b9c0fcb35351b4fbfc06ac0ee576aeab6b2511702e5a648a2e595"}, + {file = "debugpy-1.8.0-cp39-cp39-macosx_11_0_x86_64.whl", hash = "sha256:61eab4a4c8b6125d41a34bad4e5fe3d2cc145caecd63c3fe953be4cc53e65bf8"}, + {file = "debugpy-1.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:125b9a637e013f9faac0a3d6a82bd17c8b5d2c875fb6b7e2772c5aba6d082332"}, + {file = "debugpy-1.8.0-cp39-cp39-win32.whl", hash = "sha256:57161629133113c97b387382045649a2b985a348f0c9366e22217c87b68b73c6"}, + {file = "debugpy-1.8.0-cp39-cp39-win_amd64.whl", hash = "sha256:e3412f9faa9ade82aa64a50b602544efcba848c91384e9f93497a458767e6926"}, + {file = "debugpy-1.8.0-py2.py3-none-any.whl", hash = "sha256:9c9b0ac1ce2a42888199df1a1906e45e6f3c9555497643a85e0bf2406e3ffbc4"}, + {file = "debugpy-1.8.0.zip", hash = "sha256:12af2c55b419521e33d5fb21bd022df0b5eb267c3e178f1d374a63a2a6bdccd0"}, +] [[package]] name = "decorator" version = "5.1.1" description = "Decorators for Humans" -category = "dev" optional = false python-versions = ">=3.5" +files = [ + {file = "decorator-5.1.1-py3-none-any.whl", hash = "sha256:b8c3f85900b9dc423225913c5aace94729fe1fa9763b38939a95226f02d37186"}, + {file = "decorator-5.1.1.tar.gz", hash = "sha256:637996211036b6385ef91435e4fae22989472f9d571faba8927ba8253acbc330"}, +] [[package]] name = "docutils" version = "0.20.1" description = "Docutils -- Python Documentation Utilities" -category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "docutils-0.20.1-py3-none-any.whl", hash = "sha256:96f387a2c5562db4476f09f13bbab2192e764cac08ebbf3a34a95d9b1e4a59d6"}, + {file = "docutils-0.20.1.tar.gz", hash = "sha256:f08a4e276c3a1583a86dce3e34aba3fe04d02bba2dd51ed16106244e8a923e3b"}, +] [[package]] name = "exceptiongroup" version = "1.2.0" description = "Backport of PEP 654 (exception groups)" -category = "dev" optional = false python-versions = ">=3.7" +files = [ + {file = "exceptiongroup-1.2.0-py3-none-any.whl", hash = "sha256:4bfd3996ac73b41e9b9628b04e079f193850720ea5945fc96a08633c66912f14"}, + {file = "exceptiongroup-1.2.0.tar.gz", hash = "sha256:91f5c769735f051a4290d52edd0858999b57e5876e9f85937691bd4c9fa3ed68"}, +] [package.extras] test = ["pytest (>=6)"] @@ -150,46 +390,105 @@ test = ["pytest (>=6)"] name = "executing" version = "2.0.1" description = "Get the currently executing AST node of a frame, and other information" -category = "dev" optional = false python-versions = ">=3.5" +files = [ + {file = "executing-2.0.1-py2.py3-none-any.whl", hash = "sha256:eac49ca94516ccc753f9fb5ce82603156e590b27525a8bc32cce8ae302eb61bc"}, + {file = "executing-2.0.1.tar.gz", hash = "sha256:35afe2ce3affba8ee97f2d69927fa823b08b472b7b994e36a52a964b93d16147"}, +] [package.extras] -tests = ["asttokens (>=2.1.0)", "ipython", "pytest", "coverage", "coverage-enable-subprocess", "littleutils", "rich"] +tests = ["asttokens (>=2.1.0)", "coverage", "coverage-enable-subprocess", "ipython", "littleutils", "pytest", "rich"] [[package]] name = "ezkl" version = "7.0.0" description = "" -category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "ezkl-7.0.0-cp37-abi3-macosx_10_7_x86_64.whl", hash = "sha256:586d4619203a9c2ef4136c7a047e130243cd377814295161b4c89ce308f07134"}, + {file = "ezkl-7.0.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:e51333624fa6aad0498c8268aa3fbccb6355b53895bd00242f06f62d3379751b"}, + {file = "ezkl-7.0.0-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f5020010737b93cccc16ac43688c510ac50b677beb7228e44e45cebc3f5db213"}, + {file = "ezkl-7.0.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3d35a2a8179a51c00032fac728c8b924029bec31fb46cde813b4ec8a6f85d8e8"}, + {file = "ezkl-7.0.0-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:87fc88587953b065f4a3c733e89c9055c63dee146cec5e19cd69fcc4e30e2dd0"}, + {file = "ezkl-7.0.0-cp37-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:7c4784d38e467e609494d95646522e477984d360ee1cb7796a84ba5ea4eb9d6e"}, + {file = "ezkl-7.0.0-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:90598bc2df171dc28d9d675ac533ed6367eda301a0413f132dfe20b149b7843c"}, + {file = "ezkl-7.0.0-cp37-abi3-win32.whl", hash = "sha256:038a112c47247629b41d52b4e2bdc97512f56c6ddf5236af51cd8afc63e56c69"}, + {file = "ezkl-7.0.0-cp37-abi3-win_amd64.whl", hash = "sha256:5f22eae0b3b7e3abf52fd38adf03361c0291adec4f53af175c82c03f901bc919"}, +] [[package]] name = "filelock" version = "3.13.1" description = "A platform independent file lock." -category = "main" optional = false python-versions = ">=3.8" +files = [ + {file = "filelock-3.13.1-py3-none-any.whl", hash = "sha256:57dbda9b35157b05fb3e58ee91448612eb674172fab98ee235ccb0b5bee19a1c"}, + {file = "filelock-3.13.1.tar.gz", hash = "sha256:521f5f56c50f8426f5e03ad3b281b490a87ef15bc6c526f168290f0c7148d44e"}, +] [package.extras] -docs = ["furo (>=2023.9.10)", "sphinx-autodoc-typehints (>=1.24)", "sphinx (>=7.2.6)"] -testing = ["covdefaults (>=2.3)", "coverage (>=7.3.2)", "diff-cover (>=8)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)", "pytest-timeout (>=2.2)", "pytest (>=7.4.3)"] +docs = ["furo (>=2023.9.10)", "sphinx (>=7.2.6)", "sphinx-autodoc-typehints (>=1.24)"] +testing = ["covdefaults (>=2.3)", "coverage (>=7.3.2)", "diff-cover (>=8)", "pytest (>=7.4.3)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)", "pytest-timeout (>=2.2)"] typing = ["typing-extensions (>=4.8)"] [[package]] name = "fonttools" -version = "4.46.0" +version = "4.47.2" description = "Tools to manipulate font files" -category = "main" optional = false python-versions = ">=3.8" +files = [ + {file = "fonttools-4.47.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:3b629108351d25512d4ea1a8393a2dba325b7b7d7308116b605ea3f8e1be88df"}, + {file = "fonttools-4.47.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:c19044256c44fe299d9a73456aabee4b4d06c6b930287be93b533b4737d70aa1"}, + {file = "fonttools-4.47.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b8be28c036b9f186e8c7eaf8a11b42373e7e4949f9e9f370202b9da4c4c3f56c"}, + {file = "fonttools-4.47.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f83a4daef6d2a202acb9bf572958f91cfde5b10c8ee7fb1d09a4c81e5d851fd8"}, + {file = "fonttools-4.47.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:4a5a5318ba5365d992666ac4fe35365f93004109d18858a3e18ae46f67907670"}, + {file = "fonttools-4.47.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:8f57ecd742545362a0f7186774b2d1c53423ed9ece67689c93a1055b236f638c"}, + {file = "fonttools-4.47.2-cp310-cp310-win32.whl", hash = "sha256:a1c154bb85dc9a4cf145250c88d112d88eb414bad81d4cb524d06258dea1bdc0"}, + {file = "fonttools-4.47.2-cp310-cp310-win_amd64.whl", hash = "sha256:3e2b95dce2ead58fb12524d0ca7d63a63459dd489e7e5838c3cd53557f8933e1"}, + {file = "fonttools-4.47.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:29495d6d109cdbabe73cfb6f419ce67080c3ef9ea1e08d5750240fd4b0c4763b"}, + {file = "fonttools-4.47.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:0a1d313a415eaaba2b35d6cd33536560deeebd2ed758b9bfb89ab5d97dc5deac"}, + {file = "fonttools-4.47.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:90f898cdd67f52f18049250a6474185ef6544c91f27a7bee70d87d77a8daf89c"}, + {file = "fonttools-4.47.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3480eeb52770ff75140fe7d9a2ec33fb67b07efea0ab5129c7e0c6a639c40c70"}, + {file = "fonttools-4.47.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:0255dbc128fee75fb9be364806b940ed450dd6838672a150d501ee86523ac61e"}, + {file = "fonttools-4.47.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:f791446ff297fd5f1e2247c188de53c1bfb9dd7f0549eba55b73a3c2087a2703"}, + {file = "fonttools-4.47.2-cp311-cp311-win32.whl", hash = "sha256:740947906590a878a4bde7dd748e85fefa4d470a268b964748403b3ab2aeed6c"}, + {file = "fonttools-4.47.2-cp311-cp311-win_amd64.whl", hash = "sha256:63fbed184979f09a65aa9c88b395ca539c94287ba3a364517698462e13e457c9"}, + {file = "fonttools-4.47.2-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:4ec558c543609e71b2275c4894e93493f65d2f41c15fe1d089080c1d0bb4d635"}, + {file = "fonttools-4.47.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:e040f905d542362e07e72e03612a6270c33d38281fd573160e1003e43718d68d"}, + {file = "fonttools-4.47.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6dd58cc03016b281bd2c74c84cdaa6bd3ce54c5a7f47478b7657b930ac3ed8eb"}, + {file = "fonttools-4.47.2-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:32ab2e9702dff0dd4510c7bb958f265a8d3dd5c0e2547e7b5f7a3df4979abb07"}, + {file = "fonttools-4.47.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:3a808f3c1d1df1f5bf39be869b6e0c263570cdafb5bdb2df66087733f566ea71"}, + {file = "fonttools-4.47.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:ac71e2e201df041a2891067dc36256755b1229ae167edbdc419b16da78732c2f"}, + {file = "fonttools-4.47.2-cp312-cp312-win32.whl", hash = "sha256:69731e8bea0578b3c28fdb43dbf95b9386e2d49a399e9a4ad736b8e479b08085"}, + {file = "fonttools-4.47.2-cp312-cp312-win_amd64.whl", hash = "sha256:b3e1304e5f19ca861d86a72218ecce68f391646d85c851742d265787f55457a4"}, + {file = "fonttools-4.47.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:254d9a6f7be00212bf0c3159e0a420eb19c63793b2c05e049eb337f3023c5ecc"}, + {file = "fonttools-4.47.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:eabae77a07c41ae0b35184894202305c3ad211a93b2eb53837c2a1143c8bc952"}, + {file = "fonttools-4.47.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a86a5ab2873ed2575d0fcdf1828143cfc6b977ac448e3dc616bb1e3d20efbafa"}, + {file = "fonttools-4.47.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:13819db8445a0cec8c3ff5f243af6418ab19175072a9a92f6cc8ca7d1452754b"}, + {file = "fonttools-4.47.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:4e743935139aa485fe3253fc33fe467eab6ea42583fa681223ea3f1a93dd01e6"}, + {file = "fonttools-4.47.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:d49ce3ea7b7173faebc5664872243b40cf88814ca3eb135c4a3cdff66af71946"}, + {file = "fonttools-4.47.2-cp38-cp38-win32.whl", hash = "sha256:94208ea750e3f96e267f394d5588579bb64cc628e321dbb1d4243ffbc291b18b"}, + {file = "fonttools-4.47.2-cp38-cp38-win_amd64.whl", hash = "sha256:0f750037e02beb8b3569fbff701a572e62a685d2a0e840d75816592280e5feae"}, + {file = "fonttools-4.47.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:3d71606c9321f6701642bd4746f99b6089e53d7e9817fc6b964e90d9c5f0ecc6"}, + {file = "fonttools-4.47.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:86e0427864c6c91cf77f16d1fb9bf1bbf7453e824589e8fb8461b6ee1144f506"}, + {file = "fonttools-4.47.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0a00bd0e68e88987dcc047ea31c26d40a3c61185153b03457956a87e39d43c37"}, + {file = "fonttools-4.47.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a5d77479fb885ef38a16a253a2f4096bc3d14e63a56d6246bfdb56365a12b20c"}, + {file = "fonttools-4.47.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:5465df494f20a7d01712b072ae3ee9ad2887004701b95cb2cc6dcb9c2c97a899"}, + {file = "fonttools-4.47.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:4c811d3c73b6abac275babb8aa439206288f56fdb2c6f8835e3d7b70de8937a7"}, + {file = "fonttools-4.47.2-cp39-cp39-win32.whl", hash = "sha256:5b60e3afa9635e3dfd3ace2757039593e3bd3cf128be0ddb7a1ff4ac45fa5a50"}, + {file = "fonttools-4.47.2-cp39-cp39-win_amd64.whl", hash = "sha256:7ee48bd9d6b7e8f66866c9090807e3a4a56cf43ffad48962725a190e0dd774c8"}, + {file = "fonttools-4.47.2-py3-none-any.whl", hash = "sha256:7eb7ad665258fba68fd22228a09f347469d95a97fb88198e133595947a20a184"}, + {file = "fonttools-4.47.2.tar.gz", hash = "sha256:7df26dd3650e98ca45f1e29883c96a0b9f5bb6af8d632a6a108bc744fa0bd9b3"}, +] [package.extras] -all = ["fs (>=2.2.0,<3)", "lxml (>=4.0,<5)", "zopfli (>=0.1.4)", "lz4 (>=1.7.4.2)", "matplotlib", "sympy", "skia-pathops (>=0.5.0)", "uharfbuzz (>=0.23.0)", "brotlicffi (>=0.8.0)", "scipy", "brotli (>=1.0.1)", "munkres", "unicodedata2 (>=15.1.0)", "xattr"] +all = ["brotli (>=1.0.1)", "brotlicffi (>=0.8.0)", "fs (>=2.2.0,<3)", "lxml (>=4.0,<5)", "lz4 (>=1.7.4.2)", "matplotlib", "munkres", "pycairo", "scipy", "skia-pathops (>=0.5.0)", "sympy", "uharfbuzz (>=0.23.0)", "unicodedata2 (>=15.1.0)", "xattr", "zopfli (>=0.1.4)"] graphite = ["lz4 (>=1.7.4.2)"] -interpolatable = ["scipy", "munkres"] +interpolatable = ["munkres", "pycairo", "scipy"] lxml = ["lxml (>=4.0,<5)"] pathops = ["skia-pathops (>=0.5.0)"] plot = ["matplotlib"] @@ -198,15 +497,18 @@ symfont = ["sympy"] type1 = ["xattr"] ufo = ["fs (>=2.2.0,<3)"] unicode = ["unicodedata2 (>=15.1.0)"] -woff = ["zopfli (>=0.1.4)", "brotlicffi (>=0.8.0)", "brotli (>=1.0.1)"] +woff = ["brotli (>=1.0.1)", "brotlicffi (>=0.8.0)", "zopfli (>=0.1.4)"] [[package]] name = "fsspec" -version = "2023.12.0" +version = "2023.12.2" description = "File-system specification" -category = "main" optional = false python-versions = ">=3.8" +files = [ + {file = "fsspec-2023.12.2-py3-none-any.whl", hash = "sha256:d800d87f72189a745fa3d6b033b9dc4a34ad069f60ca60b943a63599f5501960"}, + {file = "fsspec-2023.12.2.tar.gz", hash = "sha256:8548d39e8810b59c38014934f6b31e57f40c1b20f911f4cc2b85389c7e9bf0cb"}, +] [package.extras] abfs = ["adlfs"] @@ -214,7 +516,7 @@ adl = ["adlfs"] arrow = ["pyarrow (>=1)"] dask = ["dask", "distributed"] devel = ["pytest", "pytest-cov"] -dropbox = ["dropboxdrivefs", "requests", "dropbox"] +dropbox = ["dropbox", "dropboxdrivefs", "requests"] full = ["adlfs", "aiohttp (!=4.0.0a0,!=4.0.0a1)", "dask", "distributed", "dropbox", "dropboxdrivefs", "fusepy", "gcsfs", "libarchive-c", "ocifs", "panel", "paramiko", "pyarrow (>=1)", "pygit2", "requests", "s3fs", "smbprotocol", "tqdm"] fuse = ["fusepy"] gcs = ["gcsfs"] @@ -223,7 +525,7 @@ github = ["requests"] gs = ["gcsfs"] gui = ["panel"] hdfs = ["pyarrow (>=1)"] -http = ["requests", "aiohttp (!=4.0.0a0,!=4.0.0a1)"] +http = ["aiohttp (!=4.0.0a0,!=4.0.0a1)", "requests"] libarchive = ["libarchive-c"] oci = ["ocifs"] s3 = ["s3fs"] @@ -236,56 +538,71 @@ tqdm = ["tqdm"] name = "idna" version = "3.6" description = "Internationalized Domain Names in Applications (IDNA)" -category = "main" optional = false python-versions = ">=3.5" +files = [ + {file = "idna-3.6-py3-none-any.whl", hash = "sha256:c05567e9c24a6b9faaa835c4821bad0590fbb9d5779e7caa6e1cc4978e7eb24f"}, + {file = "idna-3.6.tar.gz", hash = "sha256:9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca"}, +] [[package]] name = "importlib-metadata" -version = "7.0.0" +version = "7.0.1" description = "Read metadata from Python packages" -category = "dev" optional = false python-versions = ">=3.8" +files = [ + {file = "importlib_metadata-7.0.1-py3-none-any.whl", hash = "sha256:4805911c3a4ec7c3966410053e9ec6a1fecd629117df5adee56dfc9432a1081e"}, + {file = "importlib_metadata-7.0.1.tar.gz", hash = "sha256:f238736bb06590ae52ac1fab06a3a9ef1d8dce2b7a35b5ab329371d6c8f5d2cc"}, +] [package.dependencies] zipp = ">=0.5" [package.extras] -docs = ["sphinx (>=3.5)", "sphinx (<7.2.5)", "jaraco.packaging (>=9.3)", "rst.linker (>=1.9)", "furo", "sphinx-lint", "jaraco.tidelift (>=1.4)"] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"] perf = ["ipython"] -testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-ruff", "packaging", "pyfakefs", "flufl.flake8", "pytest-perf (>=0.9.2)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)", "importlib-resources (>=1.3)"] +testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy (>=0.9.1)", "pytest-perf (>=0.9.2)", "pytest-ruff"] [[package]] name = "importlib-resources" version = "6.1.1" description = "Read resources from Python packages" -category = "main" optional = false python-versions = ">=3.8" +files = [ + {file = "importlib_resources-6.1.1-py3-none-any.whl", hash = "sha256:e8bf90d8213b486f428c9c39714b920041cb02c184686a3dee24905aaa8105d6"}, + {file = "importlib_resources-6.1.1.tar.gz", hash = "sha256:3893a00122eafde6894c59914446a512f728a0c1a45f9bb9b63721b6bacf0b4a"}, +] [package.dependencies] zipp = {version = ">=3.1.0", markers = "python_version < \"3.10\""} [package.extras] -docs = ["sphinx (>=3.5)", "sphinx (<7.2.5)", "jaraco.packaging (>=9.3)", "rst.linker (>=1.9)", "furo", "sphinx-lint", "jaraco.tidelift (>=1.4)"] -testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-ruff", "zipp (>=3.17)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"] +testing = ["pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy (>=0.9.1)", "pytest-ruff", "zipp (>=3.17)"] [[package]] name = "iniconfig" version = "2.0.0" description = "brain-dead simple config-ini parsing" -category = "dev" optional = false python-versions = ">=3.7" +files = [ + {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, + {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, +] [[package]] name = "ipykernel" -version = "6.27.1" +version = "6.29.0" description = "IPython Kernel for Jupyter" -category = "dev" optional = false python-versions = ">=3.8" +files = [ + {file = "ipykernel-6.29.0-py3-none-any.whl", hash = "sha256:076663ca68492576f051e4af7720d33f34383e655f2be0d544c8b1c9de915b2f"}, + {file = "ipykernel-6.29.0.tar.gz", hash = "sha256:b5dd3013cab7b330df712891c96cd1ab868c27a7159e606f762015e9bf8ceb3f"}, +] [package.dependencies] appnope = {version = "*", markers = "platform_system == \"Darwin\""} @@ -293,29 +610,32 @@ comm = ">=0.1.1" debugpy = ">=1.6.5" ipython = ">=7.23.1" jupyter-client = ">=6.1.12" -jupyter-core = ">=4.12,<5.0.0 || >=5.1.0" +jupyter-core = ">=4.12,<5.0.dev0 || >=5.1.dev0" matplotlib-inline = ">=0.1" nest-asyncio = "*" packaging = "*" psutil = "*" -pyzmq = ">=20" +pyzmq = ">=24" tornado = ">=6.1" traitlets = ">=5.4.0" [package.extras] -cov = ["coverage", "curio", "matplotlib", "pytest-cov", "trio"] +cov = ["coverage[toml]", "curio", "matplotlib", "pytest-cov", "trio"] docs = ["myst-parser", "pydata-sphinx-theme", "sphinx", "sphinx-autodoc-typehints", "sphinxcontrib-github-alt", "sphinxcontrib-spelling", "trio"] pyqt5 = ["pyqt5"] pyside6 = ["pyside6"] -test = ["flaky", "ipyparallel", "pre-commit", "pytest-asyncio", "pytest-cov", "pytest-timeout", "pytest (>=7.0)"] +test = ["flaky", "ipyparallel", "pre-commit", "pytest (>=7.0)", "pytest-asyncio (==0.23.2)", "pytest-cov", "pytest-timeout"] [[package]] name = "ipython" version = "8.18.1" description = "IPython: Productive Interactive Computing" -category = "dev" optional = false python-versions = ">=3.9" +files = [ + {file = "ipython-8.18.1-py3-none-any.whl", hash = "sha256:e8267419d72d81955ec1177f8a29aaa90ac80ad647499201119e2f05e99aa397"}, + {file = "ipython-8.18.1.tar.gz", hash = "sha256:ca6f079bb33457c66e233e4580ebfc4128855b4cf6370dddd73842a9563e8a27"}, +] [package.dependencies] colorama = {version = "*", markers = "sys_platform == \"win32\""} @@ -331,41 +651,47 @@ traitlets = ">=5" typing-extensions = {version = "*", markers = "python_version < \"3.10\""} [package.extras] -all = ["black", "ipykernel", "setuptools (>=18.5)", "sphinx (>=1.3)", "sphinx-rtd-theme", "docrepr", "matplotlib", "stack-data", "pytest (<7)", "typing-extensions", "exceptiongroup", "pytest (<7.1)", "pytest-asyncio (<0.22)", "testpath", "pickleshare", "nbconvert", "nbformat", "ipywidgets", "notebook", "ipyparallel", "qtconsole", "curio", "matplotlib (!=3.2.0)", "numpy (>=1.22)", "pandas", "trio"] +all = ["black", "curio", "docrepr", "exceptiongroup", "ipykernel", "ipyparallel", "ipywidgets", "matplotlib", "matplotlib (!=3.2.0)", "nbconvert", "nbformat", "notebook", "numpy (>=1.22)", "pandas", "pickleshare", "pytest (<7)", "pytest (<7.1)", "pytest-asyncio (<0.22)", "qtconsole", "setuptools (>=18.5)", "sphinx (>=1.3)", "sphinx-rtd-theme", "stack-data", "testpath", "trio", "typing-extensions"] black = ["black"] -doc = ["ipykernel", "setuptools (>=18.5)", "sphinx (>=1.3)", "sphinx-rtd-theme", "docrepr", "matplotlib", "stack-data", "pytest (<7)", "typing-extensions", "exceptiongroup", "pytest (<7.1)", "pytest-asyncio (<0.22)", "testpath", "pickleshare"] +doc = ["docrepr", "exceptiongroup", "ipykernel", "matplotlib", "pickleshare", "pytest (<7)", "pytest (<7.1)", "pytest-asyncio (<0.22)", "setuptools (>=18.5)", "sphinx (>=1.3)", "sphinx-rtd-theme", "stack-data", "testpath", "typing-extensions"] kernel = ["ipykernel"] nbconvert = ["nbconvert"] nbformat = ["nbformat"] notebook = ["ipywidgets", "notebook"] parallel = ["ipyparallel"] qtconsole = ["qtconsole"] -test = ["pytest (<7.1)", "pytest-asyncio (<0.22)", "testpath", "pickleshare"] -test_extra = ["pytest (<7.1)", "pytest-asyncio (<0.22)", "testpath", "pickleshare", "curio", "matplotlib (!=3.2.0)", "nbformat", "numpy (>=1.22)", "pandas", "trio"] +test = ["pickleshare", "pytest (<7.1)", "pytest-asyncio (<0.22)", "testpath"] +test-extra = ["curio", "matplotlib (!=3.2.0)", "nbformat", "numpy (>=1.22)", "pandas", "pickleshare", "pytest (<7.1)", "pytest-asyncio (<0.22)", "testpath", "trio"] [[package]] name = "jedi" version = "0.19.1" description = "An autocompletion tool for Python that can be used for text editors." -category = "dev" optional = false python-versions = ">=3.6" +files = [ + {file = "jedi-0.19.1-py2.py3-none-any.whl", hash = "sha256:e983c654fe5c02867aef4cdfce5a2fbb4a50adc0af145f70504238f18ef5e7e0"}, + {file = "jedi-0.19.1.tar.gz", hash = "sha256:cf0496f3651bc65d7174ac1b7d043eff454892c708a87d1b683e57b569927ffd"}, +] [package.dependencies] parso = ">=0.8.3,<0.9.0" [package.extras] -docs = ["Jinja2 (==2.11.3)", "MarkupSafe (==1.1.1)", "Pygments (==2.8.1)", "alabaster (==0.7.12)", "babel (==2.9.1)", "chardet (==4.0.0)", "commonmark (==0.8.1)", "docutils (==0.17.1)", "future (==0.18.2)", "idna (==2.10)", "imagesize (==1.2.0)", "mock (==1.0.1)", "packaging (==20.9)", "pyparsing (==2.4.7)", "pytz (==2021.1)", "readthedocs-sphinx-ext (==2.1.4)", "recommonmark (==0.5.0)", "requests (==2.25.1)", "six (==1.15.0)", "snowballstemmer (==2.1.0)", "sphinx-rtd-theme (==0.4.3)", "sphinx (==1.8.5)", "sphinxcontrib-serializinghtml (==1.1.4)", "sphinxcontrib-websupport (==1.2.4)", "urllib3 (==1.26.4)"] +docs = ["Jinja2 (==2.11.3)", "MarkupSafe (==1.1.1)", "Pygments (==2.8.1)", "alabaster (==0.7.12)", "babel (==2.9.1)", "chardet (==4.0.0)", "commonmark (==0.8.1)", "docutils (==0.17.1)", "future (==0.18.2)", "idna (==2.10)", "imagesize (==1.2.0)", "mock (==1.0.1)", "packaging (==20.9)", "pyparsing (==2.4.7)", "pytz (==2021.1)", "readthedocs-sphinx-ext (==2.1.4)", "recommonmark (==0.5.0)", "requests (==2.25.1)", "six (==1.15.0)", "snowballstemmer (==2.1.0)", "sphinx (==1.8.5)", "sphinx-rtd-theme (==0.4.3)", "sphinxcontrib-serializinghtml (==1.1.4)", "sphinxcontrib-websupport (==1.2.4)", "urllib3 (==1.26.4)"] qa = ["flake8 (==5.0.4)", "mypy (==0.971)", "types-setuptools (==67.2.0.1)"] -testing = ["django", "attrs", "colorama", "docopt", "pytest (<7.0.0)"] +testing = ["Django", "attrs", "colorama", "docopt", "pytest (<7.0.0)"] [[package]] name = "jinja2" -version = "3.1.2" +version = "3.1.3" description = "A very fast and expressive template engine." -category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "Jinja2-3.1.3-py3-none-any.whl", hash = "sha256:7d6d50dd97d52cbc355597bd845fabfbac3f551e1f99619e39a35ce8c370b5fa"}, + {file = "Jinja2-3.1.3.tar.gz", hash = "sha256:ac8bd6544d4bb2c9792bf3a159e80bba8fda7f07e81bc3aed565432d5925ba90"}, +] [package.dependencies] MarkupSafe = ">=2.0" @@ -377,29 +703,35 @@ i18n = ["Babel (>=2.7)"] name = "jupyter-client" version = "8.6.0" description = "Jupyter protocol implementation and client libraries" -category = "dev" optional = false python-versions = ">=3.8" +files = [ + {file = "jupyter_client-8.6.0-py3-none-any.whl", hash = "sha256:909c474dbe62582ae62b758bca86d6518c85234bdee2d908c778db6d72f39d99"}, + {file = "jupyter_client-8.6.0.tar.gz", hash = "sha256:0642244bb83b4764ae60d07e010e15f0e2d275ec4e918a8f7b80fbbef3ca60c7"}, +] [package.dependencies] importlib-metadata = {version = ">=4.8.3", markers = "python_version < \"3.10\""} -jupyter-core = ">=4.12,<5.0.0 || >=5.1.0" +jupyter-core = ">=4.12,<5.0.dev0 || >=5.1.dev0" python-dateutil = ">=2.8.2" pyzmq = ">=23.0" tornado = ">=6.2" traitlets = ">=5.3" [package.extras] -docs = ["ipykernel", "myst-parser", "pydata-sphinx-theme", "sphinx-autodoc-typehints", "sphinx (>=4)", "sphinxcontrib-github-alt", "sphinxcontrib-spelling"] +docs = ["ipykernel", "myst-parser", "pydata-sphinx-theme", "sphinx (>=4)", "sphinx-autodoc-typehints", "sphinxcontrib-github-alt", "sphinxcontrib-spelling"] test = ["coverage", "ipykernel (>=6.14)", "mypy", "paramiko", "pre-commit", "pytest", "pytest-cov", "pytest-jupyter[client] (>=0.4.1)", "pytest-timeout"] [[package]] name = "jupyter-core" -version = "5.5.0" +version = "5.7.1" description = "Jupyter core package. A base package on which Jupyter projects rely." -category = "dev" optional = false python-versions = ">=3.8" +files = [ + {file = "jupyter_core-5.7.1-py3-none-any.whl", hash = "sha256:c65c82126453a723a2804aa52409930434598fd9d35091d63dfb919d2b765bb7"}, + {file = "jupyter_core-5.7.1.tar.gz", hash = "sha256:de61a9d7fc71240f688b2fb5ab659fbb56979458dc66a71decd098e03c79e218"}, +] [package.dependencies] platformdirs = ">=2.5" @@ -414,25 +746,220 @@ test = ["ipykernel", "pre-commit", "pytest", "pytest-cov", "pytest-timeout"] name = "kiwisolver" version = "1.4.5" description = "A fast implementation of the Cassowary constraint solver" -category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "kiwisolver-1.4.5-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:05703cf211d585109fcd72207a31bb170a0f22144d68298dc5e61b3c946518af"}, + {file = "kiwisolver-1.4.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:146d14bebb7f1dc4d5fbf74f8a6cb15ac42baadee8912eb84ac0b3b2a3dc6ac3"}, + {file = "kiwisolver-1.4.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6ef7afcd2d281494c0a9101d5c571970708ad911d028137cd558f02b851c08b4"}, + {file = "kiwisolver-1.4.5-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:9eaa8b117dc8337728e834b9c6e2611f10c79e38f65157c4c38e9400286f5cb1"}, + {file = "kiwisolver-1.4.5-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:ec20916e7b4cbfb1f12380e46486ec4bcbaa91a9c448b97023fde0d5bbf9e4ff"}, + {file = "kiwisolver-1.4.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:39b42c68602539407884cf70d6a480a469b93b81b7701378ba5e2328660c847a"}, + {file = "kiwisolver-1.4.5-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:aa12042de0171fad672b6c59df69106d20d5596e4f87b5e8f76df757a7c399aa"}, + {file = "kiwisolver-1.4.5-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2a40773c71d7ccdd3798f6489aaac9eee213d566850a9533f8d26332d626b82c"}, + {file = "kiwisolver-1.4.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:19df6e621f6d8b4b9c4d45f40a66839294ff2bb235e64d2178f7522d9170ac5b"}, + {file = "kiwisolver-1.4.5-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:83d78376d0d4fd884e2c114d0621624b73d2aba4e2788182d286309ebdeed770"}, + {file = "kiwisolver-1.4.5-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:e391b1f0a8a5a10ab3b9bb6afcfd74f2175f24f8975fb87ecae700d1503cdee0"}, + {file = "kiwisolver-1.4.5-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:852542f9481f4a62dbb5dd99e8ab7aedfeb8fb6342349a181d4036877410f525"}, + {file = "kiwisolver-1.4.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:59edc41b24031bc25108e210c0def6f6c2191210492a972d585a06ff246bb79b"}, + {file = "kiwisolver-1.4.5-cp310-cp310-win32.whl", hash = "sha256:a6aa6315319a052b4ee378aa171959c898a6183f15c1e541821c5c59beaa0238"}, + {file = "kiwisolver-1.4.5-cp310-cp310-win_amd64.whl", hash = "sha256:d0ef46024e6a3d79c01ff13801cb19d0cad7fd859b15037aec74315540acc276"}, + {file = "kiwisolver-1.4.5-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:11863aa14a51fd6ec28688d76f1735f8f69ab1fabf388851a595d0721af042f5"}, + {file = "kiwisolver-1.4.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:8ab3919a9997ab7ef2fbbed0cc99bb28d3c13e6d4b1ad36e97e482558a91be90"}, + {file = "kiwisolver-1.4.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:fcc700eadbbccbf6bc1bcb9dbe0786b4b1cb91ca0dcda336eef5c2beed37b797"}, + {file = "kiwisolver-1.4.5-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:dfdd7c0b105af050eb3d64997809dc21da247cf44e63dc73ff0fd20b96be55a9"}, + {file = "kiwisolver-1.4.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:76c6a5964640638cdeaa0c359382e5703e9293030fe730018ca06bc2010c4437"}, + {file = "kiwisolver-1.4.5-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bbea0db94288e29afcc4c28afbf3a7ccaf2d7e027489c449cf7e8f83c6346eb9"}, + {file = "kiwisolver-1.4.5-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ceec1a6bc6cab1d6ff5d06592a91a692f90ec7505d6463a88a52cc0eb58545da"}, + {file = "kiwisolver-1.4.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:040c1aebeda72197ef477a906782b5ab0d387642e93bda547336b8957c61022e"}, + {file = "kiwisolver-1.4.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:f91de7223d4c7b793867797bacd1ee53bfe7359bd70d27b7b58a04efbb9436c8"}, + {file = "kiwisolver-1.4.5-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:faae4860798c31530dd184046a900e652c95513796ef51a12bc086710c2eec4d"}, + {file = "kiwisolver-1.4.5-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:b0157420efcb803e71d1b28e2c287518b8808b7cf1ab8af36718fd0a2c453eb0"}, + {file = "kiwisolver-1.4.5-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:06f54715b7737c2fecdbf140d1afb11a33d59508a47bf11bb38ecf21dc9ab79f"}, + {file = "kiwisolver-1.4.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:fdb7adb641a0d13bdcd4ef48e062363d8a9ad4a182ac7647ec88f695e719ae9f"}, + {file = "kiwisolver-1.4.5-cp311-cp311-win32.whl", hash = "sha256:bb86433b1cfe686da83ce32a9d3a8dd308e85c76b60896d58f082136f10bffac"}, + {file = "kiwisolver-1.4.5-cp311-cp311-win_amd64.whl", hash = "sha256:6c08e1312a9cf1074d17b17728d3dfce2a5125b2d791527f33ffbe805200a355"}, + {file = "kiwisolver-1.4.5-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:32d5cf40c4f7c7b3ca500f8985eb3fb3a7dfc023215e876f207956b5ea26632a"}, + {file = "kiwisolver-1.4.5-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:f846c260f483d1fd217fe5ed7c173fb109efa6b1fc8381c8b7552c5781756192"}, + {file = "kiwisolver-1.4.5-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:5ff5cf3571589b6d13bfbfd6bcd7a3f659e42f96b5fd1c4830c4cf21d4f5ef45"}, + {file = "kiwisolver-1.4.5-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7269d9e5f1084a653d575c7ec012ff57f0c042258bf5db0954bf551c158466e7"}, + {file = "kiwisolver-1.4.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:da802a19d6e15dffe4b0c24b38b3af68e6c1a68e6e1d8f30148c83864f3881db"}, + {file = "kiwisolver-1.4.5-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3aba7311af82e335dd1e36ffff68aaca609ca6290c2cb6d821a39aa075d8e3ff"}, + {file = "kiwisolver-1.4.5-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:763773d53f07244148ccac5b084da5adb90bfaee39c197554f01b286cf869228"}, + {file = "kiwisolver-1.4.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2270953c0d8cdab5d422bee7d2007f043473f9d2999631c86a223c9db56cbd16"}, + {file = "kiwisolver-1.4.5-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:d099e745a512f7e3bbe7249ca835f4d357c586d78d79ae8f1dcd4d8adeb9bda9"}, + {file = "kiwisolver-1.4.5-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:74db36e14a7d1ce0986fa104f7d5637aea5c82ca6326ed0ec5694280942d1162"}, + {file = "kiwisolver-1.4.5-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:7e5bab140c309cb3a6ce373a9e71eb7e4873c70c2dda01df6820474f9889d6d4"}, + {file = "kiwisolver-1.4.5-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:0f114aa76dc1b8f636d077979c0ac22e7cd8f3493abbab152f20eb8d3cda71f3"}, + {file = "kiwisolver-1.4.5-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:88a2df29d4724b9237fc0c6eaf2a1adae0cdc0b3e9f4d8e7dc54b16812d2d81a"}, + {file = "kiwisolver-1.4.5-cp312-cp312-win32.whl", hash = "sha256:72d40b33e834371fd330fb1472ca19d9b8327acb79a5821d4008391db8e29f20"}, + {file = "kiwisolver-1.4.5-cp312-cp312-win_amd64.whl", hash = "sha256:2c5674c4e74d939b9d91dda0fae10597ac7521768fec9e399c70a1f27e2ea2d9"}, + {file = "kiwisolver-1.4.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:3a2b053a0ab7a3960c98725cfb0bf5b48ba82f64ec95fe06f1d06c99b552e130"}, + {file = "kiwisolver-1.4.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3cd32d6c13807e5c66a7cbb79f90b553642f296ae4518a60d8d76243b0ad2898"}, + {file = "kiwisolver-1.4.5-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:59ec7b7c7e1a61061850d53aaf8e93db63dce0c936db1fda2658b70e4a1be709"}, + {file = "kiwisolver-1.4.5-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:da4cfb373035def307905d05041c1d06d8936452fe89d464743ae7fb8371078b"}, + {file = "kiwisolver-1.4.5-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2400873bccc260b6ae184b2b8a4fec0e4082d30648eadb7c3d9a13405d861e89"}, + {file = "kiwisolver-1.4.5-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:1b04139c4236a0f3aff534479b58f6f849a8b351e1314826c2d230849ed48985"}, + {file = "kiwisolver-1.4.5-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:4e66e81a5779b65ac21764c295087de82235597a2293d18d943f8e9e32746265"}, + {file = "kiwisolver-1.4.5-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:7931d8f1f67c4be9ba1dd9c451fb0eeca1a25b89e4d3f89e828fe12a519b782a"}, + {file = "kiwisolver-1.4.5-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:b3f7e75f3015df442238cca659f8baa5f42ce2a8582727981cbfa15fee0ee205"}, + {file = "kiwisolver-1.4.5-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:bbf1d63eef84b2e8c89011b7f2235b1e0bf7dacc11cac9431fc6468e99ac77fb"}, + {file = "kiwisolver-1.4.5-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:4c380469bd3f970ef677bf2bcba2b6b0b4d5c75e7a020fb863ef75084efad66f"}, + {file = "kiwisolver-1.4.5-cp37-cp37m-win32.whl", hash = "sha256:9408acf3270c4b6baad483865191e3e582b638b1654a007c62e3efe96f09a9a3"}, + {file = "kiwisolver-1.4.5-cp37-cp37m-win_amd64.whl", hash = "sha256:5b94529f9b2591b7af5f3e0e730a4e0a41ea174af35a4fd067775f9bdfeee01a"}, + {file = "kiwisolver-1.4.5-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:11c7de8f692fc99816e8ac50d1d1aef4f75126eefc33ac79aac02c099fd3db71"}, + {file = "kiwisolver-1.4.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:53abb58632235cd154176ced1ae8f0d29a6657aa1aa9decf50b899b755bc2b93"}, + {file = "kiwisolver-1.4.5-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:88b9f257ca61b838b6f8094a62418421f87ac2a1069f7e896c36a7d86b5d4c29"}, + {file = "kiwisolver-1.4.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3195782b26fc03aa9c6913d5bad5aeb864bdc372924c093b0f1cebad603dd712"}, + {file = "kiwisolver-1.4.5-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fc579bf0f502e54926519451b920e875f433aceb4624a3646b3252b5caa9e0b6"}, + {file = "kiwisolver-1.4.5-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5a580c91d686376f0f7c295357595c5a026e6cbc3d77b7c36e290201e7c11ecb"}, + {file = "kiwisolver-1.4.5-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:cfe6ab8da05c01ba6fbea630377b5da2cd9bcbc6338510116b01c1bc939a2c18"}, + {file = "kiwisolver-1.4.5-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:d2e5a98f0ec99beb3c10e13b387f8db39106d53993f498b295f0c914328b1333"}, + {file = "kiwisolver-1.4.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:a51a263952b1429e429ff236d2f5a21c5125437861baeed77f5e1cc2d2c7c6da"}, + {file = "kiwisolver-1.4.5-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:3edd2fa14e68c9be82c5b16689e8d63d89fe927e56debd6e1dbce7a26a17f81b"}, + {file = "kiwisolver-1.4.5-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:74d1b44c6cfc897df648cc9fdaa09bc3e7679926e6f96df05775d4fb3946571c"}, + {file = "kiwisolver-1.4.5-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:76d9289ed3f7501012e05abb8358bbb129149dbd173f1f57a1bf1c22d19ab7cc"}, + {file = "kiwisolver-1.4.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:92dea1ffe3714fa8eb6a314d2b3c773208d865a0e0d35e713ec54eea08a66250"}, + {file = "kiwisolver-1.4.5-cp38-cp38-win32.whl", hash = "sha256:5c90ae8c8d32e472be041e76f9d2f2dbff4d0b0be8bd4041770eddb18cf49a4e"}, + {file = "kiwisolver-1.4.5-cp38-cp38-win_amd64.whl", hash = "sha256:c7940c1dc63eb37a67721b10d703247552416f719c4188c54e04334321351ced"}, + {file = "kiwisolver-1.4.5-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:9407b6a5f0d675e8a827ad8742e1d6b49d9c1a1da5d952a67d50ef5f4170b18d"}, + {file = "kiwisolver-1.4.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:15568384086b6df3c65353820a4473575dbad192e35010f622c6ce3eebd57af9"}, + {file = "kiwisolver-1.4.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:0dc9db8e79f0036e8173c466d21ef18e1befc02de8bf8aa8dc0813a6dc8a7046"}, + {file = "kiwisolver-1.4.5-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:cdc8a402aaee9a798b50d8b827d7ecf75edc5fb35ea0f91f213ff927c15f4ff0"}, + {file = "kiwisolver-1.4.5-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:6c3bd3cde54cafb87d74d8db50b909705c62b17c2099b8f2e25b461882e544ff"}, + {file = "kiwisolver-1.4.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:955e8513d07a283056b1396e9a57ceddbd272d9252c14f154d450d227606eb54"}, + {file = "kiwisolver-1.4.5-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:346f5343b9e3f00b8db8ba359350eb124b98c99efd0b408728ac6ebf38173958"}, + {file = "kiwisolver-1.4.5-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b9098e0049e88c6a24ff64545cdfc50807818ba6c1b739cae221bbbcbc58aad3"}, + {file = "kiwisolver-1.4.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:00bd361b903dc4bbf4eb165f24d1acbee754fce22ded24c3d56eec268658a5cf"}, + {file = "kiwisolver-1.4.5-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:7b8b454bac16428b22560d0a1cf0a09875339cab69df61d7805bf48919415901"}, + {file = "kiwisolver-1.4.5-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:f1d072c2eb0ad60d4c183f3fb44ac6f73fb7a8f16a2694a91f988275cbf352f9"}, + {file = "kiwisolver-1.4.5-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:31a82d498054cac9f6d0b53d02bb85811185bcb477d4b60144f915f3b3126342"}, + {file = "kiwisolver-1.4.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:6512cb89e334e4700febbffaaa52761b65b4f5a3cf33f960213d5656cea36a77"}, + {file = "kiwisolver-1.4.5-cp39-cp39-win32.whl", hash = "sha256:9db8ea4c388fdb0f780fe91346fd438657ea602d58348753d9fb265ce1bca67f"}, + {file = "kiwisolver-1.4.5-cp39-cp39-win_amd64.whl", hash = "sha256:59415f46a37f7f2efeec758353dd2eae1b07640d8ca0f0c42548ec4125492635"}, + {file = "kiwisolver-1.4.5-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:5c7b3b3a728dc6faf3fc372ef24f21d1e3cee2ac3e9596691d746e5a536de920"}, + {file = "kiwisolver-1.4.5-pp37-pypy37_pp73-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:620ced262a86244e2be10a676b646f29c34537d0d9cc8eb26c08f53d98013390"}, + {file = "kiwisolver-1.4.5-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:378a214a1e3bbf5ac4a8708304318b4f890da88c9e6a07699c4ae7174c09a68d"}, + {file = "kiwisolver-1.4.5-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:aaf7be1207676ac608a50cd08f102f6742dbfc70e8d60c4db1c6897f62f71523"}, + {file = "kiwisolver-1.4.5-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:ba55dce0a9b8ff59495ddd050a0225d58bd0983d09f87cfe2b6aec4f2c1234e4"}, + {file = "kiwisolver-1.4.5-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:fd32ea360bcbb92d28933fc05ed09bffcb1704ba3fc7942e81db0fd4f81a7892"}, + {file = "kiwisolver-1.4.5-pp38-pypy38_pp73-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:5e7139af55d1688f8b960ee9ad5adafc4ac17c1c473fe07133ac092310d76544"}, + {file = "kiwisolver-1.4.5-pp38-pypy38_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:dced8146011d2bc2e883f9bd68618b8247387f4bbec46d7392b3c3b032640126"}, + {file = "kiwisolver-1.4.5-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c9bf3325c47b11b2e51bca0824ea217c7cd84491d8ac4eefd1e409705ef092bd"}, + {file = "kiwisolver-1.4.5-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:5794cf59533bc3f1b1c821f7206a3617999db9fbefc345360aafe2e067514929"}, + {file = "kiwisolver-1.4.5-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:e368f200bbc2e4f905b8e71eb38b3c04333bddaa6a2464a6355487b02bb7fb09"}, + {file = "kiwisolver-1.4.5-pp39-pypy39_pp73-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e5d706eba36b4c4d5bc6c6377bb6568098765e990cfc21ee16d13963fab7b3e7"}, + {file = "kiwisolver-1.4.5-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:85267bd1aa8880a9c88a8cb71e18d3d64d2751a790e6ca6c27b8ccc724bcd5ad"}, + {file = "kiwisolver-1.4.5-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:210ef2c3a1f03272649aff1ef992df2e724748918c4bc2d5a90352849eb40bea"}, + {file = "kiwisolver-1.4.5-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:11d011a7574eb3b82bcc9c1a1d35c1d7075677fdd15de527d91b46bd35e935ee"}, + {file = "kiwisolver-1.4.5.tar.gz", hash = "sha256:e57e563a57fb22a142da34f38acc2fc1a5c864bc29ca1517a88abc963e60d6ec"}, +] [[package]] name = "markupsafe" -version = "2.1.3" +version = "2.1.4" description = "Safely add untrusted strings to HTML/XML markup." -category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "MarkupSafe-2.1.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:de8153a7aae3835484ac168a9a9bdaa0c5eee4e0bc595503c95d53b942879c84"}, + {file = "MarkupSafe-2.1.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e888ff76ceb39601c59e219f281466c6d7e66bd375b4ec1ce83bcdc68306796b"}, + {file = "MarkupSafe-2.1.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a0b838c37ba596fcbfca71651a104a611543077156cb0a26fe0c475e1f152ee8"}, + {file = "MarkupSafe-2.1.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dac1ebf6983148b45b5fa48593950f90ed6d1d26300604f321c74a9ca1609f8e"}, + {file = "MarkupSafe-2.1.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0fbad3d346df8f9d72622ac71b69565e621ada2ce6572f37c2eae8dacd60385d"}, + {file = "MarkupSafe-2.1.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:d5291d98cd3ad9a562883468c690a2a238c4a6388ab3bd155b0c75dd55ece858"}, + {file = "MarkupSafe-2.1.4-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:a7cc49ef48a3c7a0005a949f3c04f8baa5409d3f663a1b36f0eba9bfe2a0396e"}, + {file = "MarkupSafe-2.1.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:b83041cda633871572f0d3c41dddd5582ad7d22f65a72eacd8d3d6d00291df26"}, + {file = "MarkupSafe-2.1.4-cp310-cp310-win32.whl", hash = "sha256:0c26f67b3fe27302d3a412b85ef696792c4a2386293c53ba683a89562f9399b0"}, + {file = "MarkupSafe-2.1.4-cp310-cp310-win_amd64.whl", hash = "sha256:a76055d5cb1c23485d7ddae533229039b850db711c554a12ea64a0fd8a0129e2"}, + {file = "MarkupSafe-2.1.4-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:9e9e3c4020aa2dc62d5dd6743a69e399ce3de58320522948af6140ac959ab863"}, + {file = "MarkupSafe-2.1.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:0042d6a9880b38e1dd9ff83146cc3c9c18a059b9360ceae207805567aacccc69"}, + {file = "MarkupSafe-2.1.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:55d03fea4c4e9fd0ad75dc2e7e2b6757b80c152c032ea1d1de487461d8140efc"}, + {file = "MarkupSafe-2.1.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ab3a886a237f6e9c9f4f7d272067e712cdb4efa774bef494dccad08f39d8ae6"}, + {file = "MarkupSafe-2.1.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:abf5ebbec056817057bfafc0445916bb688a255a5146f900445d081db08cbabb"}, + {file = "MarkupSafe-2.1.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e1a0d1924a5013d4f294087e00024ad25668234569289650929ab871231668e7"}, + {file = "MarkupSafe-2.1.4-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:e7902211afd0af05fbadcc9a312e4cf10f27b779cf1323e78d52377ae4b72bea"}, + {file = "MarkupSafe-2.1.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:c669391319973e49a7c6230c218a1e3044710bc1ce4c8e6eb71f7e6d43a2c131"}, + {file = "MarkupSafe-2.1.4-cp311-cp311-win32.whl", hash = "sha256:31f57d64c336b8ccb1966d156932f3daa4fee74176b0fdc48ef580be774aae74"}, + {file = "MarkupSafe-2.1.4-cp311-cp311-win_amd64.whl", hash = "sha256:54a7e1380dfece8847c71bf7e33da5d084e9b889c75eca19100ef98027bd9f56"}, + {file = "MarkupSafe-2.1.4-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:a76cd37d229fc385738bd1ce4cba2a121cf26b53864c1772694ad0ad348e509e"}, + {file = "MarkupSafe-2.1.4-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:987d13fe1d23e12a66ca2073b8d2e2a75cec2ecb8eab43ff5624ba0ad42764bc"}, + {file = "MarkupSafe-2.1.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5244324676254697fe5c181fc762284e2c5fceeb1c4e3e7f6aca2b6f107e60dc"}, + {file = "MarkupSafe-2.1.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:78bc995e004681246e85e28e068111a4c3f35f34e6c62da1471e844ee1446250"}, + {file = "MarkupSafe-2.1.4-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a4d176cfdfde84f732c4a53109b293d05883e952bbba68b857ae446fa3119b4f"}, + {file = "MarkupSafe-2.1.4-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:f9917691f410a2e0897d1ef99619fd3f7dd503647c8ff2475bf90c3cf222ad74"}, + {file = "MarkupSafe-2.1.4-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:f06e5a9e99b7df44640767842f414ed5d7bedaaa78cd817ce04bbd6fd86e2dd6"}, + {file = "MarkupSafe-2.1.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:396549cea79e8ca4ba65525470d534e8a41070e6b3500ce2414921099cb73e8d"}, + {file = "MarkupSafe-2.1.4-cp312-cp312-win32.whl", hash = "sha256:f6be2d708a9d0e9b0054856f07ac7070fbe1754be40ca8525d5adccdbda8f475"}, + {file = "MarkupSafe-2.1.4-cp312-cp312-win_amd64.whl", hash = "sha256:5045e892cfdaecc5b4c01822f353cf2c8feb88a6ec1c0adef2a2e705eef0f656"}, + {file = "MarkupSafe-2.1.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:7a07f40ef8f0fbc5ef1000d0c78771f4d5ca03b4953fc162749772916b298fc4"}, + {file = "MarkupSafe-2.1.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d18b66fe626ac412d96c2ab536306c736c66cf2a31c243a45025156cc190dc8a"}, + {file = "MarkupSafe-2.1.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:698e84142f3f884114ea8cf83e7a67ca8f4ace8454e78fe960646c6c91c63bfa"}, + {file = "MarkupSafe-2.1.4-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:49a3b78a5af63ec10d8604180380c13dcd870aba7928c1fe04e881d5c792dc4e"}, + {file = "MarkupSafe-2.1.4-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:15866d7f2dc60cfdde12ebb4e75e41be862348b4728300c36cdf405e258415ec"}, + {file = "MarkupSafe-2.1.4-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:6aa5e2e7fc9bc042ae82d8b79d795b9a62bd8f15ba1e7594e3db243f158b5565"}, + {file = "MarkupSafe-2.1.4-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:54635102ba3cf5da26eb6f96c4b8c53af8a9c0d97b64bdcb592596a6255d8518"}, + {file = "MarkupSafe-2.1.4-cp37-cp37m-win32.whl", hash = "sha256:3583a3a3ab7958e354dc1d25be74aee6228938312ee875a22330c4dc2e41beb0"}, + {file = "MarkupSafe-2.1.4-cp37-cp37m-win_amd64.whl", hash = "sha256:d6e427c7378c7f1b2bef6a344c925b8b63623d3321c09a237b7cc0e77dd98ceb"}, + {file = "MarkupSafe-2.1.4-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:bf1196dcc239e608605b716e7b166eb5faf4bc192f8a44b81e85251e62584bd2"}, + {file = "MarkupSafe-2.1.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:4df98d4a9cd6a88d6a585852f56f2155c9cdb6aec78361a19f938810aa020954"}, + {file = "MarkupSafe-2.1.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b835aba863195269ea358cecc21b400276747cc977492319fd7682b8cd2c253d"}, + {file = "MarkupSafe-2.1.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:23984d1bdae01bee794267424af55eef4dfc038dc5d1272860669b2aa025c9e3"}, + {file = "MarkupSafe-2.1.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1c98c33ffe20e9a489145d97070a435ea0679fddaabcafe19982fe9c971987d5"}, + {file = "MarkupSafe-2.1.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:9896fca4a8eb246defc8b2a7ac77ef7553b638e04fbf170bff78a40fa8a91474"}, + {file = "MarkupSafe-2.1.4-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:b0fe73bac2fed83839dbdbe6da84ae2a31c11cfc1c777a40dbd8ac8a6ed1560f"}, + {file = "MarkupSafe-2.1.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:c7556bafeaa0a50e2fe7dc86e0382dea349ebcad8f010d5a7dc6ba568eaaa789"}, + {file = "MarkupSafe-2.1.4-cp38-cp38-win32.whl", hash = "sha256:fc1a75aa8f11b87910ffd98de62b29d6520b6d6e8a3de69a70ca34dea85d2a8a"}, + {file = "MarkupSafe-2.1.4-cp38-cp38-win_amd64.whl", hash = "sha256:3a66c36a3864df95e4f62f9167c734b3b1192cb0851b43d7cc08040c074c6279"}, + {file = "MarkupSafe-2.1.4-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:765f036a3d00395a326df2835d8f86b637dbaf9832f90f5d196c3b8a7a5080cb"}, + {file = "MarkupSafe-2.1.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:21e7af8091007bf4bebf4521184f4880a6acab8df0df52ef9e513d8e5db23411"}, + {file = "MarkupSafe-2.1.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d5c31fe855c77cad679b302aabc42d724ed87c043b1432d457f4976add1c2c3e"}, + {file = "MarkupSafe-2.1.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7653fa39578957bc42e5ebc15cf4361d9e0ee4b702d7d5ec96cdac860953c5b4"}, + {file = "MarkupSafe-2.1.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:47bb5f0142b8b64ed1399b6b60f700a580335c8e1c57f2f15587bd072012decc"}, + {file = "MarkupSafe-2.1.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:fe8512ed897d5daf089e5bd010c3dc03bb1bdae00b35588c49b98268d4a01e00"}, + {file = "MarkupSafe-2.1.4-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:36d7626a8cca4d34216875aee5a1d3d654bb3dac201c1c003d182283e3205949"}, + {file = "MarkupSafe-2.1.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:b6f14a9cd50c3cb100eb94b3273131c80d102e19bb20253ac7bd7336118a673a"}, + {file = "MarkupSafe-2.1.4-cp39-cp39-win32.whl", hash = "sha256:c8f253a84dbd2c63c19590fa86a032ef3d8cc18923b8049d91bcdeeb2581fbf6"}, + {file = "MarkupSafe-2.1.4-cp39-cp39-win_amd64.whl", hash = "sha256:8b570a1537367b52396e53325769608f2a687ec9a4363647af1cded8928af959"}, + {file = "MarkupSafe-2.1.4.tar.gz", hash = "sha256:3aae9af4cac263007fd6309c64c6ab4506dd2b79382d9d19a1994f9240b8db4f"}, +] [[package]] name = "matplotlib" version = "3.8.2" description = "Python plotting package" -category = "main" optional = false python-versions = ">=3.9" +files = [ + {file = "matplotlib-3.8.2-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:09796f89fb71a0c0e1e2f4bdaf63fb2cefc84446bb963ecdeb40dfee7dfa98c7"}, + {file = "matplotlib-3.8.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6f9c6976748a25e8b9be51ea028df49b8e561eed7809146da7a47dbecebab367"}, + {file = "matplotlib-3.8.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b78e4f2cedf303869b782071b55fdde5987fda3038e9d09e58c91cc261b5ad18"}, + {file = "matplotlib-3.8.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4e208f46cf6576a7624195aa047cb344a7f802e113bb1a06cfd4bee431de5e31"}, + {file = "matplotlib-3.8.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:46a569130ff53798ea5f50afce7406e91fdc471ca1e0e26ba976a8c734c9427a"}, + {file = "matplotlib-3.8.2-cp310-cp310-win_amd64.whl", hash = "sha256:830f00640c965c5b7f6bc32f0d4ce0c36dfe0379f7dd65b07a00c801713ec40a"}, + {file = "matplotlib-3.8.2-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:d86593ccf546223eb75a39b44c32788e6f6440d13cfc4750c1c15d0fcb850b63"}, + {file = "matplotlib-3.8.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:9a5430836811b7652991939012f43d2808a2db9b64ee240387e8c43e2e5578c8"}, + {file = "matplotlib-3.8.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b9576723858a78751d5aacd2497b8aef29ffea6d1c95981505877f7ac28215c6"}, + {file = "matplotlib-3.8.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5ba9cbd8ac6cf422f3102622b20f8552d601bf8837e49a3afed188d560152788"}, + {file = "matplotlib-3.8.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:03f9d160a29e0b65c0790bb07f4f45d6a181b1ac33eb1bb0dd225986450148f0"}, + {file = "matplotlib-3.8.2-cp311-cp311-win_amd64.whl", hash = "sha256:3773002da767f0a9323ba1a9b9b5d00d6257dbd2a93107233167cfb581f64717"}, + {file = "matplotlib-3.8.2-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:4c318c1e95e2f5926fba326f68177dee364aa791d6df022ceb91b8221bd0a627"}, + {file = "matplotlib-3.8.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:091275d18d942cf1ee9609c830a1bc36610607d8223b1b981c37d5c9fc3e46a4"}, + {file = "matplotlib-3.8.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1b0f3b8ea0e99e233a4bcc44590f01604840d833c280ebb8fe5554fd3e6cfe8d"}, + {file = "matplotlib-3.8.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d7b1704a530395aaf73912be741c04d181f82ca78084fbd80bc737be04848331"}, + {file = "matplotlib-3.8.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:533b0e3b0c6768eef8cbe4b583731ce25a91ab54a22f830db2b031e83cca9213"}, + {file = "matplotlib-3.8.2-cp312-cp312-win_amd64.whl", hash = "sha256:0f4fc5d72b75e2c18e55eb32292659cf731d9d5b312a6eb036506304f4675630"}, + {file = "matplotlib-3.8.2-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:deaed9ad4da0b1aea77fe0aa0cebb9ef611c70b3177be936a95e5d01fa05094f"}, + {file = "matplotlib-3.8.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:172f4d0fbac3383d39164c6caafd3255ce6fa58f08fc392513a0b1d3b89c4f89"}, + {file = "matplotlib-3.8.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c7d36c2209d9136cd8e02fab1c0ddc185ce79bc914c45054a9f514e44c787917"}, + {file = "matplotlib-3.8.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5864bdd7da445e4e5e011b199bb67168cdad10b501750367c496420f2ad00843"}, + {file = "matplotlib-3.8.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ef8345b48e95cee45ff25192ed1f4857273117917a4dcd48e3905619bcd9c9b8"}, + {file = "matplotlib-3.8.2-cp39-cp39-win_amd64.whl", hash = "sha256:7c48d9e221b637c017232e3760ed30b4e8d5dfd081daf327e829bf2a72c731b4"}, + {file = "matplotlib-3.8.2-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:aa11b3c6928a1e496c1a79917d51d4cd5d04f8a2e75f21df4949eeefdf697f4b"}, + {file = "matplotlib-3.8.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d1095fecf99eeb7384dabad4bf44b965f929a5f6079654b681193edf7169ec20"}, + {file = "matplotlib-3.8.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:bddfb1db89bfaa855912261c805bd0e10218923cc262b9159a49c29a7a1c1afa"}, + {file = "matplotlib-3.8.2.tar.gz", hash = "sha256:01a978b871b881ee76017152f1f1a0cbf6bd5f7b8ff8c96df0df1bd57d8755a1"}, +] [package.dependencies] contourpy = ">=1.0.1" @@ -450,9 +977,12 @@ python-dateutil = ">=2.7" name = "matplotlib-inline" version = "0.1.6" description = "Inline Matplotlib backend for Jupyter" -category = "dev" optional = false python-versions = ">=3.5" +files = [ + {file = "matplotlib-inline-0.1.6.tar.gz", hash = "sha256:f887e5f10ba98e8d2b150ddcf4702c1e5f8b3a20005eb0f74bfdbd360ee6f304"}, + {file = "matplotlib_inline-0.1.6-py3-none-any.whl", hash = "sha256:f1f41aab5328aa5aaea9b16d083b128102f8712542f819fe7e6a420ff581b311"}, +] [package.dependencies] traitlets = "*" @@ -461,86 +991,146 @@ traitlets = "*" name = "mpmath" version = "1.3.0" description = "Python library for arbitrary-precision floating-point arithmetic" -category = "main" optional = false python-versions = "*" +files = [ + {file = "mpmath-1.3.0-py3-none-any.whl", hash = "sha256:a0b2b9fe80bbcd81a6647ff13108738cfb482d481d826cc0e02f5b35e5c88d2c"}, + {file = "mpmath-1.3.0.tar.gz", hash = "sha256:7a28eb2a9774d00c7bc92411c19a89209d5da7c4c9a9e227be8330a23a25b91f"}, +] [package.extras] -develop = ["pytest (>=4.6)", "pycodestyle", "pytest-cov", "codecov", "wheel"] +develop = ["codecov", "pycodestyle", "pytest (>=4.6)", "pytest-cov", "wheel"] docs = ["sphinx"] gmpy = ["gmpy2 (>=2.1.0a4)"] tests = ["pytest (>=4.6)"] [[package]] name = "nest-asyncio" -version = "1.5.8" +version = "1.6.0" description = "Patch asyncio to allow nested event loops" -category = "dev" optional = false python-versions = ">=3.5" +files = [ + {file = "nest_asyncio-1.6.0-py3-none-any.whl", hash = "sha256:87af6efd6b5e897c81050477ef65c62e2b2f35d51703cae01aff2905b1852e1c"}, + {file = "nest_asyncio-1.6.0.tar.gz", hash = "sha256:6f172d5449aca15afd6c646851f4e31e02c598d553a667e38cafa997cfec55fe"}, +] [[package]] name = "networkx" version = "3.2.1" description = "Python package for creating and manipulating graphs and networks" -category = "main" optional = false python-versions = ">=3.9" +files = [ + {file = "networkx-3.2.1-py3-none-any.whl", hash = "sha256:f18c69adc97877c42332c170849c96cefa91881c99a7cb3e95b7c659ebdc1ec2"}, + {file = "networkx-3.2.1.tar.gz", hash = "sha256:9f1bb5cf3409bf324e0a722c20bdb4c20ee39bf1c30ce8ae499c8502b0b5e0c6"}, +] [package.extras] -default = ["numpy (>=1.22)", "scipy (>=1.9,!=1.11.0,!=1.11.1)", "matplotlib (>=3.5)", "pandas (>=1.4)"] -developer = ["changelist (==0.4)", "pre-commit (>=3.2)", "mypy (>=1.1)", "rtoml"] -doc = ["sphinx (>=7)", "pydata-sphinx-theme (>=0.14)", "sphinx-gallery (>=0.14)", "numpydoc (>=1.6)", "pillow (>=9.4)", "nb2plots (>=0.7)", "texext (>=0.6.7)", "nbconvert (<7.9)"] -extra = ["lxml (>=4.6)", "pygraphviz (>=1.11)", "pydot (>=1.4.2)", "sympy (>=1.10)"] +default = ["matplotlib (>=3.5)", "numpy (>=1.22)", "pandas (>=1.4)", "scipy (>=1.9,!=1.11.0,!=1.11.1)"] +developer = ["changelist (==0.4)", "mypy (>=1.1)", "pre-commit (>=3.2)", "rtoml"] +doc = ["nb2plots (>=0.7)", "nbconvert (<7.9)", "numpydoc (>=1.6)", "pillow (>=9.4)", "pydata-sphinx-theme (>=0.14)", "sphinx (>=7)", "sphinx-gallery (>=0.14)", "texext (>=0.6.7)"] +extra = ["lxml (>=4.6)", "pydot (>=1.4.2)", "pygraphviz (>=1.11)", "sympy (>=1.10)"] test = ["pytest (>=7.2)", "pytest-cov (>=4.0)"] [[package]] name = "numpy" -version = "1.26.2" +version = "1.26.3" description = "Fundamental package for array computing in Python" -category = "main" optional = false python-versions = ">=3.9" +files = [ + {file = "numpy-1.26.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:806dd64230dbbfaca8a27faa64e2f414bf1c6622ab78cc4264f7f5f028fee3bf"}, + {file = "numpy-1.26.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:02f98011ba4ab17f46f80f7f8f1c291ee7d855fcef0a5a98db80767a468c85cd"}, + {file = "numpy-1.26.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6d45b3ec2faed4baca41c76617fcdcfa4f684ff7a151ce6fc78ad3b6e85af0a6"}, + {file = "numpy-1.26.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bdd2b45bf079d9ad90377048e2747a0c82351989a2165821f0c96831b4a2a54b"}, + {file = "numpy-1.26.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:211ddd1e94817ed2d175b60b6374120244a4dd2287f4ece45d49228b4d529178"}, + {file = "numpy-1.26.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:b1240f767f69d7c4c8a29adde2310b871153df9b26b5cb2b54a561ac85146485"}, + {file = "numpy-1.26.3-cp310-cp310-win32.whl", hash = "sha256:21a9484e75ad018974a2fdaa216524d64ed4212e418e0a551a2d83403b0531d3"}, + {file = "numpy-1.26.3-cp310-cp310-win_amd64.whl", hash = "sha256:9e1591f6ae98bcfac2a4bbf9221c0b92ab49762228f38287f6eeb5f3f55905ce"}, + {file = "numpy-1.26.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b831295e5472954104ecb46cd98c08b98b49c69fdb7040483aff799a755a7374"}, + {file = "numpy-1.26.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:9e87562b91f68dd8b1c39149d0323b42e0082db7ddb8e934ab4c292094d575d6"}, + {file = "numpy-1.26.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8c66d6fec467e8c0f975818c1796d25c53521124b7cfb760114be0abad53a0a2"}, + {file = "numpy-1.26.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f25e2811a9c932e43943a2615e65fc487a0b6b49218899e62e426e7f0a57eeda"}, + {file = "numpy-1.26.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:af36e0aa45e25c9f57bf684b1175e59ea05d9a7d3e8e87b7ae1a1da246f2767e"}, + {file = "numpy-1.26.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:51c7f1b344f302067b02e0f5b5d2daa9ed4a721cf49f070280ac202738ea7f00"}, + {file = "numpy-1.26.3-cp311-cp311-win32.whl", hash = "sha256:7ca4f24341df071877849eb2034948459ce3a07915c2734f1abb4018d9c49d7b"}, + {file = "numpy-1.26.3-cp311-cp311-win_amd64.whl", hash = "sha256:39763aee6dfdd4878032361b30b2b12593fb445ddb66bbac802e2113eb8a6ac4"}, + {file = "numpy-1.26.3-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:a7081fd19a6d573e1a05e600c82a1c421011db7935ed0d5c483e9dd96b99cf13"}, + {file = "numpy-1.26.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:12c70ac274b32bc00c7f61b515126c9205323703abb99cd41836e8125ea0043e"}, + {file = "numpy-1.26.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7f784e13e598e9594750b2ef6729bcd5a47f6cfe4a12cca13def35e06d8163e3"}, + {file = "numpy-1.26.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5f24750ef94d56ce6e33e4019a8a4d68cfdb1ef661a52cdaee628a56d2437419"}, + {file = "numpy-1.26.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:77810ef29e0fb1d289d225cabb9ee6cf4d11978a00bb99f7f8ec2132a84e0166"}, + {file = "numpy-1.26.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8ed07a90f5450d99dad60d3799f9c03c6566709bd53b497eb9ccad9a55867f36"}, + {file = "numpy-1.26.3-cp312-cp312-win32.whl", hash = "sha256:f73497e8c38295aaa4741bdfa4fda1a5aedda5473074369eca10626835445511"}, + {file = "numpy-1.26.3-cp312-cp312-win_amd64.whl", hash = "sha256:da4b0c6c699a0ad73c810736303f7fbae483bcb012e38d7eb06a5e3b432c981b"}, + {file = "numpy-1.26.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:1666f634cb3c80ccbd77ec97bc17337718f56d6658acf5d3b906ca03e90ce87f"}, + {file = "numpy-1.26.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:18c3319a7d39b2c6a9e3bb75aab2304ab79a811ac0168a671a62e6346c29b03f"}, + {file = "numpy-1.26.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0b7e807d6888da0db6e7e75838444d62495e2b588b99e90dd80c3459594e857b"}, + {file = "numpy-1.26.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b4d362e17bcb0011738c2d83e0a65ea8ce627057b2fdda37678f4374a382a137"}, + {file = "numpy-1.26.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b8c275f0ae90069496068c714387b4a0eba5d531aace269559ff2b43655edd58"}, + {file = "numpy-1.26.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:cc0743f0302b94f397a4a65a660d4cd24267439eb16493fb3caad2e4389bccbb"}, + {file = "numpy-1.26.3-cp39-cp39-win32.whl", hash = "sha256:9bc6d1a7f8cedd519c4b7b1156d98e051b726bf160715b769106661d567b3f03"}, + {file = "numpy-1.26.3-cp39-cp39-win_amd64.whl", hash = "sha256:867e3644e208c8922a3be26fc6bbf112a035f50f0a86497f98f228c50c607bb2"}, + {file = "numpy-1.26.3-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:3c67423b3703f8fbd90f5adaa37f85b5794d3366948efe9a5190a5f3a83fc34e"}, + {file = "numpy-1.26.3-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:46f47ee566d98849323f01b349d58f2557f02167ee301e5e28809a8c0e27a2d0"}, + {file = "numpy-1.26.3-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:a8474703bffc65ca15853d5fd4d06b18138ae90c17c8d12169968e998e448bb5"}, + {file = "numpy-1.26.3.tar.gz", hash = "sha256:697df43e2b6310ecc9d95f05d5ef20eacc09c7c4ecc9da3f235d39e71b7da1e4"}, +] [[package]] name = "nvidia-cublas-cu12" version = "12.1.3.1" description = "CUBLAS native runtime libraries" -category = "main" optional = false python-versions = ">=3" +files = [ + {file = "nvidia_cublas_cu12-12.1.3.1-py3-none-manylinux1_x86_64.whl", hash = "sha256:ee53ccca76a6fc08fb9701aa95b6ceb242cdaab118c3bb152af4e579af792728"}, + {file = "nvidia_cublas_cu12-12.1.3.1-py3-none-win_amd64.whl", hash = "sha256:2b964d60e8cf11b5e1073d179d85fa340c120e99b3067558f3cf98dd69d02906"}, +] [[package]] name = "nvidia-cuda-cupti-cu12" version = "12.1.105" description = "CUDA profiling tools runtime libs." -category = "main" optional = false python-versions = ">=3" +files = [ + {file = "nvidia_cuda_cupti_cu12-12.1.105-py3-none-manylinux1_x86_64.whl", hash = "sha256:e54fde3983165c624cb79254ae9818a456eb6e87a7fd4d56a2352c24ee542d7e"}, + {file = "nvidia_cuda_cupti_cu12-12.1.105-py3-none-win_amd64.whl", hash = "sha256:bea8236d13a0ac7190bd2919c3e8e6ce1e402104276e6f9694479e48bb0eb2a4"}, +] [[package]] name = "nvidia-cuda-nvrtc-cu12" version = "12.1.105" description = "NVRTC native runtime libraries" -category = "main" optional = false python-versions = ">=3" +files = [ + {file = "nvidia_cuda_nvrtc_cu12-12.1.105-py3-none-manylinux1_x86_64.whl", hash = "sha256:339b385f50c309763ca65456ec75e17bbefcbbf2893f462cb8b90584cd27a1c2"}, + {file = "nvidia_cuda_nvrtc_cu12-12.1.105-py3-none-win_amd64.whl", hash = "sha256:0a98a522d9ff138b96c010a65e145dc1b4850e9ecb75a0172371793752fd46ed"}, +] [[package]] name = "nvidia-cuda-runtime-cu12" version = "12.1.105" description = "CUDA Runtime native Libraries" -category = "main" optional = false python-versions = ">=3" +files = [ + {file = "nvidia_cuda_runtime_cu12-12.1.105-py3-none-manylinux1_x86_64.whl", hash = "sha256:6e258468ddf5796e25f1dc591a31029fa317d97a0a94ed93468fc86301d61e40"}, + {file = "nvidia_cuda_runtime_cu12-12.1.105-py3-none-win_amd64.whl", hash = "sha256:dfb46ef84d73fababab44cf03e3b83f80700d27ca300e537f85f636fac474344"}, +] [[package]] name = "nvidia-cudnn-cu12" version = "8.9.2.26" description = "cuDNN runtime libraries" -category = "main" optional = false python-versions = ">=3" +files = [ + {file = "nvidia_cudnn_cu12-8.9.2.26-py3-none-manylinux1_x86_64.whl", hash = "sha256:5ccb288774fdfb07a7e7025ffec286971c06d8d7b4fb162525334616d7629ff9"}, +] [package.dependencies] nvidia-cublas-cu12 = "*" @@ -549,25 +1139,34 @@ nvidia-cublas-cu12 = "*" name = "nvidia-cufft-cu12" version = "11.0.2.54" description = "CUFFT native runtime libraries" -category = "main" optional = false python-versions = ">=3" +files = [ + {file = "nvidia_cufft_cu12-11.0.2.54-py3-none-manylinux1_x86_64.whl", hash = "sha256:794e3948a1aa71fd817c3775866943936774d1c14e7628c74f6f7417224cdf56"}, + {file = "nvidia_cufft_cu12-11.0.2.54-py3-none-win_amd64.whl", hash = "sha256:d9ac353f78ff89951da4af698f80870b1534ed69993f10a4cf1d96f21357e253"}, +] [[package]] name = "nvidia-curand-cu12" version = "10.3.2.106" description = "CURAND native runtime libraries" -category = "main" optional = false python-versions = ">=3" +files = [ + {file = "nvidia_curand_cu12-10.3.2.106-py3-none-manylinux1_x86_64.whl", hash = "sha256:9d264c5036dde4e64f1de8c50ae753237c12e0b1348738169cd0f8a536c0e1e0"}, + {file = "nvidia_curand_cu12-10.3.2.106-py3-none-win_amd64.whl", hash = "sha256:75b6b0c574c0037839121317e17fd01f8a69fd2ef8e25853d826fec30bdba74a"}, +] [[package]] name = "nvidia-cusolver-cu12" version = "11.4.5.107" description = "CUDA solver native runtime libraries" -category = "main" optional = false python-versions = ">=3" +files = [ + {file = "nvidia_cusolver_cu12-11.4.5.107-py3-none-manylinux1_x86_64.whl", hash = "sha256:8a7ec542f0412294b15072fa7dab71d31334014a69f953004ea7a118206fe0dd"}, + {file = "nvidia_cusolver_cu12-11.4.5.107-py3-none-win_amd64.whl", hash = "sha256:74e0c3a24c78612192a74fcd90dd117f1cf21dea4822e66d89e8ea80e3cd2da5"}, +] [package.dependencies] nvidia-cublas-cu12 = "*" @@ -578,67 +1177,110 @@ nvidia-nvjitlink-cu12 = "*" name = "nvidia-cusparse-cu12" version = "12.1.0.106" description = "CUSPARSE native runtime libraries" -category = "main" optional = false python-versions = ">=3" +files = [ + {file = "nvidia_cusparse_cu12-12.1.0.106-py3-none-manylinux1_x86_64.whl", hash = "sha256:f3b50f42cf363f86ab21f720998517a659a48131e8d538dc02f8768237bd884c"}, + {file = "nvidia_cusparse_cu12-12.1.0.106-py3-none-win_amd64.whl", hash = "sha256:b798237e81b9719373e8fae8d4f091b70a0cf09d9d85c95a557e11df2d8e9a5a"}, +] [package.dependencies] nvidia-nvjitlink-cu12 = "*" [[package]] name = "nvidia-nccl-cu12" -version = "2.18.1" +version = "2.19.3" description = "NVIDIA Collective Communication Library (NCCL) Runtime" -category = "main" optional = false python-versions = ">=3" +files = [ + {file = "nvidia_nccl_cu12-2.19.3-py3-none-manylinux1_x86_64.whl", hash = "sha256:a9734707a2c96443331c1e48c717024aa6678a0e2a4cb66b2c364d18cee6b48d"}, +] [[package]] name = "nvidia-nvjitlink-cu12" version = "12.3.101" description = "Nvidia JIT LTO Library" -category = "main" optional = false python-versions = ">=3" +files = [ + {file = "nvidia_nvjitlink_cu12-12.3.101-py3-none-manylinux1_x86_64.whl", hash = "sha256:64335a8088e2b9d196ae8665430bc6a2b7e6ef2eb877a9c735c804bd4ff6467c"}, + {file = "nvidia_nvjitlink_cu12-12.3.101-py3-none-win_amd64.whl", hash = "sha256:1b2e317e437433753530792f13eece58f0aec21a2b05903be7bffe58a606cbd1"}, +] [[package]] name = "nvidia-nvtx-cu12" version = "12.1.105" description = "NVIDIA Tools Extension" -category = "main" optional = false python-versions = ">=3" +files = [ + {file = "nvidia_nvtx_cu12-12.1.105-py3-none-manylinux1_x86_64.whl", hash = "sha256:dc21cf308ca5691e7c04d962e213f8a4aa9bbfa23d95412f452254c2caeb09e5"}, + {file = "nvidia_nvtx_cu12-12.1.105-py3-none-win_amd64.whl", hash = "sha256:65f4d98982b31b60026e0e6de73fbdfc09d08a96f4656dd3665ca616a11e1e82"}, +] [[package]] name = "onnx" version = "1.15.0" description = "Open Neural Network Exchange" -category = "main" optional = false python-versions = ">=3.8" +files = [ + {file = "onnx-1.15.0-cp310-cp310-macosx_10_12_universal2.whl", hash = "sha256:51cacb6aafba308aaf462252ced562111f6991cdc7bc57a6c554c3519453a8ff"}, + {file = "onnx-1.15.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:0aee26b6f7f7da7e840de75ad9195a77a147d0662c94eaa6483be13ba468ffc1"}, + {file = "onnx-1.15.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:baf6ef6c93b3b843edb97a8d5b3d229a1301984f3f8dee859c29634d2083e6f9"}, + {file = "onnx-1.15.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:96ed899fe6000edc05bb2828863d3841cfddd5a7cf04c1a771f112e94de75d9f"}, + {file = "onnx-1.15.0-cp310-cp310-win32.whl", hash = "sha256:f1ad3d77fc2f4b4296f0ac2c8cadd8c1dcf765fc586b737462d3a0fe8f7c696a"}, + {file = "onnx-1.15.0-cp310-cp310-win_amd64.whl", hash = "sha256:ca4ebc4f47109bfb12c8c9e83dd99ec5c9f07d2e5f05976356c6ccdce3552010"}, + {file = "onnx-1.15.0-cp311-cp311-macosx_10_12_universal2.whl", hash = "sha256:233ffdb5ca8cc2d960b10965a763910c0830b64b450376da59207f454701f343"}, + {file = "onnx-1.15.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:51fa79c9ea9af033638ec51f9177b8e76c55fad65bb83ea96ee88fafade18ee7"}, + {file = "onnx-1.15.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f277d4861729f5253a51fa41ce91bfec1c4574ee41b5637056b43500917295ce"}, + {file = "onnx-1.15.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d8a7c94d2ebead8f739fdb70d1ce5a71726f4e17b3e5b8ad64455ea1b2801a85"}, + {file = "onnx-1.15.0-cp311-cp311-win32.whl", hash = "sha256:17dcfb86a8c6bdc3971443c29b023dd9c90ff1d15d8baecee0747a6b7f74e650"}, + {file = "onnx-1.15.0-cp311-cp311-win_amd64.whl", hash = "sha256:60a3e28747e305cd2e766e6a53a0a6d952cf9e72005ec6023ce5e07666676a4e"}, + {file = "onnx-1.15.0-cp38-cp38-macosx_10_12_universal2.whl", hash = "sha256:6b5c798d9e0907eaf319e3d3e7c89a2ed9a854bcb83da5fefb6d4c12d5e90721"}, + {file = "onnx-1.15.0-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:a4f774ff50092fe19bd8f46b2c9b27b1d30fbd700c22abde48a478142d464322"}, + {file = "onnx-1.15.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b2b0e7f3938f2d994c34616bfb8b4b1cebbc4a0398483344fe5e9f2fe95175e6"}, + {file = "onnx-1.15.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:49cebebd0020a4b12c1dd0909d426631212ef28606d7e4d49463d36abe7639ad"}, + {file = "onnx-1.15.0-cp38-cp38-win32.whl", hash = "sha256:1fdf8a3ff75abc2b32c83bf27fb7c18d6b976c9c537263fadd82b9560fe186fa"}, + {file = "onnx-1.15.0-cp38-cp38-win_amd64.whl", hash = "sha256:763e55c26e8de3a2dce008d55ae81b27fa8fb4acbb01a29b9f3c01f200c4d676"}, + {file = "onnx-1.15.0-cp39-cp39-macosx_10_12_universal2.whl", hash = "sha256:b2d5e802837629fc9c86f19448d19dd04d206578328bce202aeb3d4bedab43c4"}, + {file = "onnx-1.15.0-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:9a9cfbb5e5d5d88f89d0dfc9df5fb858899db874e1d5ed21e76c481f3cafc90d"}, + {file = "onnx-1.15.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3f472bbe5cb670a0a4a4db08f41fde69b187a009d0cb628f964840d3f83524e9"}, + {file = "onnx-1.15.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2bf2de9bef64792e5b8080c678023ac7d2b9e05d79a3e17e92cf6a4a624831d2"}, + {file = "onnx-1.15.0-cp39-cp39-win32.whl", hash = "sha256:ef4d9eb44b111e69e4534f3233fc2c13d1e26920d24ae4359d513bd54694bc6d"}, + {file = "onnx-1.15.0-cp39-cp39-win_amd64.whl", hash = "sha256:95d7a3e2d79d371e272e39ae3f7547e0b116d0c7f774a4004e97febe6c93507f"}, + {file = "onnx-1.15.0.tar.gz", hash = "sha256:b18461a7d38f286618ca2a6e78062a2a9c634ce498e631e708a8041b00094825"}, +] [package.dependencies] numpy = "*" protobuf = ">=3.20.2" [package.extras] -reference = ["google-re2", "pillow"] +reference = ["Pillow", "google-re2"] [[package]] name = "packaging" version = "23.2" description = "Core utilities for Python packages" -category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "packaging-23.2-py3-none-any.whl", hash = "sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7"}, + {file = "packaging-23.2.tar.gz", hash = "sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5"}, +] [[package]] name = "parso" version = "0.8.3" description = "A Python Parser" -category = "dev" optional = false python-versions = ">=3.6" +files = [ + {file = "parso-0.8.3-py2.py3-none-any.whl", hash = "sha256:c001d4636cd3aecdaf33cbb40aebb59b094be2a74c556778ef5576c175e19e75"}, + {file = "parso-0.8.3.tar.gz", hash = "sha256:8c07be290bb59f03588915921e29e8a50002acaf2cdc5fa0e0114f91709fafa0"}, +] [package.extras] qa = ["flake8 (==3.8.3)", "mypy (==0.782)"] @@ -648,44 +1290,126 @@ testing = ["docopt", "pytest (<6.0.0)"] name = "pexpect" version = "4.9.0" description = "Pexpect allows easy control of interactive console applications." -category = "dev" optional = false python-versions = "*" +files = [ + {file = "pexpect-4.9.0-py2.py3-none-any.whl", hash = "sha256:7236d1e080e4936be2dc3e326cec0af72acf9212a7e1d060210e70a47e253523"}, + {file = "pexpect-4.9.0.tar.gz", hash = "sha256:ee7d41123f3c9911050ea2c2dac107568dc43b2d3b0c7557a33212c398ead30f"}, +] [package.dependencies] ptyprocess = ">=0.5" [[package]] name = "pillow" -version = "10.1.0" +version = "10.2.0" description = "Python Imaging Library (Fork)" -category = "main" optional = false python-versions = ">=3.8" +files = [ + {file = "pillow-10.2.0-cp310-cp310-macosx_10_10_x86_64.whl", hash = "sha256:7823bdd049099efa16e4246bdf15e5a13dbb18a51b68fa06d6c1d4d8b99a796e"}, + {file = "pillow-10.2.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:83b2021f2ade7d1ed556bc50a399127d7fb245e725aa0113ebd05cfe88aaf588"}, + {file = "pillow-10.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6fad5ff2f13d69b7e74ce5b4ecd12cc0ec530fcee76356cac6742785ff71c452"}, + {file = "pillow-10.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:da2b52b37dad6d9ec64e653637a096905b258d2fc2b984c41ae7d08b938a67e4"}, + {file = "pillow-10.2.0-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:47c0995fc4e7f79b5cfcab1fc437ff2890b770440f7696a3ba065ee0fd496563"}, + {file = "pillow-10.2.0-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:322bdf3c9b556e9ffb18f93462e5f749d3444ce081290352c6070d014c93feb2"}, + {file = "pillow-10.2.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:51f1a1bffc50e2e9492e87d8e09a17c5eea8409cda8d3f277eb6edc82813c17c"}, + {file = "pillow-10.2.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:69ffdd6120a4737710a9eee73e1d2e37db89b620f702754b8f6e62594471dee0"}, + {file = "pillow-10.2.0-cp310-cp310-win32.whl", hash = "sha256:c6dafac9e0f2b3c78df97e79af707cdc5ef8e88208d686a4847bab8266870023"}, + {file = "pillow-10.2.0-cp310-cp310-win_amd64.whl", hash = "sha256:aebb6044806f2e16ecc07b2a2637ee1ef67a11840a66752751714a0d924adf72"}, + {file = "pillow-10.2.0-cp310-cp310-win_arm64.whl", hash = "sha256:7049e301399273a0136ff39b84c3678e314f2158f50f517bc50285fb5ec847ad"}, + {file = "pillow-10.2.0-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:35bb52c37f256f662abdfa49d2dfa6ce5d93281d323a9af377a120e89a9eafb5"}, + {file = "pillow-10.2.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:9c23f307202661071d94b5e384e1e1dc7dfb972a28a2310e4ee16103e66ddb67"}, + {file = "pillow-10.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:773efe0603db30c281521a7c0214cad7836c03b8ccff897beae9b47c0b657d61"}, + {file = "pillow-10.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:11fa2e5984b949b0dd6d7a94d967743d87c577ff0b83392f17cb3990d0d2fd6e"}, + {file = "pillow-10.2.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:716d30ed977be8b37d3ef185fecb9e5a1d62d110dfbdcd1e2a122ab46fddb03f"}, + {file = "pillow-10.2.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:a086c2af425c5f62a65e12fbf385f7c9fcb8f107d0849dba5839461a129cf311"}, + {file = "pillow-10.2.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:c8de2789052ed501dd829e9cae8d3dcce7acb4777ea4a479c14521c942d395b1"}, + {file = "pillow-10.2.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:609448742444d9290fd687940ac0b57fb35e6fd92bdb65386e08e99af60bf757"}, + {file = "pillow-10.2.0-cp311-cp311-win32.whl", hash = "sha256:823ef7a27cf86df6597fa0671066c1b596f69eba53efa3d1e1cb8b30f3533068"}, + {file = "pillow-10.2.0-cp311-cp311-win_amd64.whl", hash = "sha256:1da3b2703afd040cf65ec97efea81cfba59cdbed9c11d8efc5ab09df9509fc56"}, + {file = "pillow-10.2.0-cp311-cp311-win_arm64.whl", hash = "sha256:edca80cbfb2b68d7b56930b84a0e45ae1694aeba0541f798e908a49d66b837f1"}, + {file = "pillow-10.2.0-cp312-cp312-macosx_10_10_x86_64.whl", hash = "sha256:1b5e1b74d1bd1b78bc3477528919414874748dd363e6272efd5abf7654e68bef"}, + {file = "pillow-10.2.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:0eae2073305f451d8ecacb5474997c08569fb4eb4ac231ffa4ad7d342fdc25ac"}, + {file = "pillow-10.2.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b7c2286c23cd350b80d2fc9d424fc797575fb16f854b831d16fd47ceec078f2c"}, + {file = "pillow-10.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1e23412b5c41e58cec602f1135c57dfcf15482013ce6e5f093a86db69646a5aa"}, + {file = "pillow-10.2.0-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:52a50aa3fb3acb9cf7213573ef55d31d6eca37f5709c69e6858fe3bc04a5c2a2"}, + {file = "pillow-10.2.0-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:127cee571038f252a552760076407f9cff79761c3d436a12af6000cd182a9d04"}, + {file = "pillow-10.2.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:8d12251f02d69d8310b046e82572ed486685c38f02176bd08baf216746eb947f"}, + {file = "pillow-10.2.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:54f1852cd531aa981bc0965b7d609f5f6cc8ce8c41b1139f6ed6b3c54ab82bfb"}, + {file = "pillow-10.2.0-cp312-cp312-win32.whl", hash = "sha256:257d8788df5ca62c980314053197f4d46eefedf4e6175bc9412f14412ec4ea2f"}, + {file = "pillow-10.2.0-cp312-cp312-win_amd64.whl", hash = "sha256:154e939c5f0053a383de4fd3d3da48d9427a7e985f58af8e94d0b3c9fcfcf4f9"}, + {file = "pillow-10.2.0-cp312-cp312-win_arm64.whl", hash = "sha256:f379abd2f1e3dddb2b61bc67977a6b5a0a3f7485538bcc6f39ec76163891ee48"}, + {file = "pillow-10.2.0-cp38-cp38-macosx_10_10_x86_64.whl", hash = "sha256:8373c6c251f7ef8bda6675dd6d2b3a0fcc31edf1201266b5cf608b62a37407f9"}, + {file = "pillow-10.2.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:870ea1ada0899fd0b79643990809323b389d4d1d46c192f97342eeb6ee0b8483"}, + {file = "pillow-10.2.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b4b6b1e20608493548b1f32bce8cca185bf0480983890403d3b8753e44077129"}, + {file = "pillow-10.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3031709084b6e7852d00479fd1d310b07d0ba82765f973b543c8af5061cf990e"}, + {file = "pillow-10.2.0-cp38-cp38-manylinux_2_28_aarch64.whl", hash = "sha256:3ff074fc97dd4e80543a3e91f69d58889baf2002b6be64347ea8cf5533188213"}, + {file = "pillow-10.2.0-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:cb4c38abeef13c61d6916f264d4845fab99d7b711be96c326b84df9e3e0ff62d"}, + {file = "pillow-10.2.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:b1b3020d90c2d8e1dae29cf3ce54f8094f7938460fb5ce8bc5c01450b01fbaf6"}, + {file = "pillow-10.2.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:170aeb00224ab3dc54230c797f8404507240dd868cf52066f66a41b33169bdbe"}, + {file = "pillow-10.2.0-cp38-cp38-win32.whl", hash = "sha256:c4225f5220f46b2fde568c74fca27ae9771536c2e29d7c04f4fb62c83275ac4e"}, + {file = "pillow-10.2.0-cp38-cp38-win_amd64.whl", hash = "sha256:0689b5a8c5288bc0504d9fcee48f61a6a586b9b98514d7d29b840143d6734f39"}, + {file = "pillow-10.2.0-cp39-cp39-macosx_10_10_x86_64.whl", hash = "sha256:b792a349405fbc0163190fde0dc7b3fef3c9268292586cf5645598b48e63dc67"}, + {file = "pillow-10.2.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c570f24be1e468e3f0ce7ef56a89a60f0e05b30a3669a459e419c6eac2c35364"}, + {file = "pillow-10.2.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d8ecd059fdaf60c1963c58ceb8997b32e9dc1b911f5da5307aab614f1ce5c2fb"}, + {file = "pillow-10.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c365fd1703040de1ec284b176d6af5abe21b427cb3a5ff68e0759e1e313a5e7e"}, + {file = "pillow-10.2.0-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:70c61d4c475835a19b3a5aa42492409878bbca7438554a1f89d20d58a7c75c01"}, + {file = "pillow-10.2.0-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:b6f491cdf80ae540738859d9766783e3b3c8e5bd37f5dfa0b76abdecc5081f13"}, + {file = "pillow-10.2.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:9d189550615b4948f45252d7f005e53c2040cea1af5b60d6f79491a6e147eef7"}, + {file = "pillow-10.2.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:49d9ba1ed0ef3e061088cd1e7538a0759aab559e2e0a80a36f9fd9d8c0c21591"}, + {file = "pillow-10.2.0-cp39-cp39-win32.whl", hash = "sha256:babf5acfede515f176833ed6028754cbcd0d206f7f614ea3447d67c33be12516"}, + {file = "pillow-10.2.0-cp39-cp39-win_amd64.whl", hash = "sha256:0304004f8067386b477d20a518b50f3fa658a28d44e4116970abfcd94fac34a8"}, + {file = "pillow-10.2.0-cp39-cp39-win_arm64.whl", hash = "sha256:0fb3e7fc88a14eacd303e90481ad983fd5b69c761e9e6ef94c983f91025da869"}, + {file = "pillow-10.2.0-pp310-pypy310_pp73-macosx_10_10_x86_64.whl", hash = "sha256:322209c642aabdd6207517e9739c704dc9f9db943015535783239022002f054a"}, + {file = "pillow-10.2.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3eedd52442c0a5ff4f887fab0c1c0bb164d8635b32c894bc1faf4c618dd89df2"}, + {file = "pillow-10.2.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cb28c753fd5eb3dd859b4ee95de66cc62af91bcff5db5f2571d32a520baf1f04"}, + {file = "pillow-10.2.0-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:33870dc4653c5017bf4c8873e5488d8f8d5f8935e2f1fb9a2208c47cdd66efd2"}, + {file = "pillow-10.2.0-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:3c31822339516fb3c82d03f30e22b1d038da87ef27b6a78c9549888f8ceda39a"}, + {file = "pillow-10.2.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:a2b56ba36e05f973d450582fb015594aaa78834fefe8dfb8fcd79b93e64ba4c6"}, + {file = "pillow-10.2.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:d8e6aeb9201e655354b3ad049cb77d19813ad4ece0df1249d3c793de3774f8c7"}, + {file = "pillow-10.2.0-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:2247178effb34a77c11c0e8ac355c7a741ceca0a732b27bf11e747bbc950722f"}, + {file = "pillow-10.2.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:15587643b9e5eb26c48e49a7b33659790d28f190fc514a322d55da2fb5c2950e"}, + {file = "pillow-10.2.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:753cd8f2086b2b80180d9b3010dd4ed147efc167c90d3bf593fe2af21265e5a5"}, + {file = "pillow-10.2.0-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:7c8f97e8e7a9009bcacbe3766a36175056c12f9a44e6e6f2d5caad06dcfbf03b"}, + {file = "pillow-10.2.0-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:d1b35bcd6c5543b9cb547dee3150c93008f8dd0f1fef78fc0cd2b141c5baf58a"}, + {file = "pillow-10.2.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:fe4c15f6c9285dc54ce6553a3ce908ed37c8f3825b5a51a15c91442bb955b868"}, + {file = "pillow-10.2.0.tar.gz", hash = "sha256:e87f0b2c78157e12d7686b27d63c070fd65d994e8ddae6f328e0dcf4a0cd007e"}, +] [package.extras] docs = ["furo", "olefile", "sphinx (>=2.4)", "sphinx-copybutton", "sphinx-inline-tabs", "sphinx-removed-in", "sphinxext-opengraph"] +fpx = ["olefile"] +mic = ["olefile"] tests = ["check-manifest", "coverage", "defusedxml", "markdown2", "olefile", "packaging", "pyroma", "pytest", "pytest-cov", "pytest-timeout"] +typing = ["typing-extensions"] +xmp = ["defusedxml"] [[package]] name = "platformdirs" -version = "4.1.0" +version = "4.2.0" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." -category = "dev" optional = false python-versions = ">=3.8" +files = [ + {file = "platformdirs-4.2.0-py3-none-any.whl", hash = "sha256:0614df2a2f37e1a662acbd8e2b25b92ccf8632929bc6d43467e17fe89c75e068"}, + {file = "platformdirs-4.2.0.tar.gz", hash = "sha256:ef0cc731df711022c174543cb70a9b5bd22e5a9337c8624ef2c2ceb8ddad8768"}, +] [package.extras] -docs = ["furo (>=2023.7.26)", "proselint (>=0.13)", "sphinx-autodoc-typehints (>=1.24)", "sphinx (>=7.1.1)"] -test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest-cov (>=4.1)", "pytest-mock (>=3.11.1)", "pytest (>=7.4)"] +docs = ["furo (>=2023.9.10)", "proselint (>=0.13)", "sphinx (>=7.2.6)", "sphinx-autodoc-typehints (>=1.25.2)"] +test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4.3)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)"] [[package]] name = "pluggy" -version = "1.3.0" +version = "1.4.0" description = "plugin and hook calling mechanisms for python" -category = "dev" optional = false python-versions = ">=3.8" +files = [ + {file = "pluggy-1.4.0-py3-none-any.whl", hash = "sha256:7db9f7b503d67d1c5b95f59773ebb58a8c1c288129a88665838012cfb07b8981"}, + {file = "pluggy-1.4.0.tar.gz", hash = "sha256:8c85c2876142a764e5b7548e7d9a0e0ddb46f5185161049a79b7e974454223be"}, +] [package.extras] dev = ["pre-commit", "tox"] @@ -693,30 +1417,62 @@ testing = ["pytest", "pytest-benchmark"] [[package]] name = "prompt-toolkit" -version = "3.0.41" +version = "3.0.43" description = "Library for building powerful interactive command lines in Python" -category = "dev" optional = false python-versions = ">=3.7.0" +files = [ + {file = "prompt_toolkit-3.0.43-py3-none-any.whl", hash = "sha256:a11a29cb3bf0a28a387fe5122cdb649816a957cd9261dcedf8c9f1fef33eacf6"}, + {file = "prompt_toolkit-3.0.43.tar.gz", hash = "sha256:3527b7af26106cbc65a040bcc84839a3566ec1b051bb0bfe953631e704b0ff7d"}, +] [package.dependencies] wcwidth = "*" [[package]] name = "protobuf" -version = "4.25.1" +version = "4.25.2" description = "" -category = "main" optional = false python-versions = ">=3.8" +files = [ + {file = "protobuf-4.25.2-cp310-abi3-win32.whl", hash = "sha256:b50c949608682b12efb0b2717f53256f03636af5f60ac0c1d900df6213910fd6"}, + {file = "protobuf-4.25.2-cp310-abi3-win_amd64.whl", hash = "sha256:8f62574857ee1de9f770baf04dde4165e30b15ad97ba03ceac65f760ff018ac9"}, + {file = "protobuf-4.25.2-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:2db9f8fa64fbdcdc93767d3cf81e0f2aef176284071507e3ede160811502fd3d"}, + {file = "protobuf-4.25.2-cp37-abi3-manylinux2014_aarch64.whl", hash = "sha256:10894a2885b7175d3984f2be8d9850712c57d5e7587a2410720af8be56cdaf62"}, + {file = "protobuf-4.25.2-cp37-abi3-manylinux2014_x86_64.whl", hash = "sha256:fc381d1dd0516343f1440019cedf08a7405f791cd49eef4ae1ea06520bc1c020"}, + {file = "protobuf-4.25.2-cp38-cp38-win32.whl", hash = "sha256:33a1aeef4b1927431d1be780e87b641e322b88d654203a9e9d93f218ee359e61"}, + {file = "protobuf-4.25.2-cp38-cp38-win_amd64.whl", hash = "sha256:47f3de503fe7c1245f6f03bea7e8d3ec11c6c4a2ea9ef910e3221c8a15516d62"}, + {file = "protobuf-4.25.2-cp39-cp39-win32.whl", hash = "sha256:5e5c933b4c30a988b52e0b7c02641760a5ba046edc5e43d3b94a74c9fc57c1b3"}, + {file = "protobuf-4.25.2-cp39-cp39-win_amd64.whl", hash = "sha256:d66a769b8d687df9024f2985d5137a337f957a0916cf5464d1513eee96a63ff0"}, + {file = "protobuf-4.25.2-py3-none-any.whl", hash = "sha256:a8b7a98d4ce823303145bf3c1a8bdb0f2f4642a414b196f04ad9853ed0c8f830"}, + {file = "protobuf-4.25.2.tar.gz", hash = "sha256:fe599e175cb347efc8ee524bcd4b902d11f7262c0e569ececcb89995c15f0a5e"}, +] [[package]] name = "psutil" -version = "5.9.6" +version = "5.9.8" description = "Cross-platform lib for process and system monitoring in Python." -category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" +files = [ + {file = "psutil-5.9.8-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:26bd09967ae00920df88e0352a91cff1a78f8d69b3ecabbfe733610c0af486c8"}, + {file = "psutil-5.9.8-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:05806de88103b25903dff19bb6692bd2e714ccf9e668d050d144012055cbca73"}, + {file = "psutil-5.9.8-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:611052c4bc70432ec770d5d54f64206aa7203a101ec273a0cd82418c86503bb7"}, + {file = "psutil-5.9.8-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:50187900d73c1381ba1454cf40308c2bf6f34268518b3f36a9b663ca87e65e36"}, + {file = "psutil-5.9.8-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:02615ed8c5ea222323408ceba16c60e99c3f91639b07da6373fb7e6539abc56d"}, + {file = "psutil-5.9.8-cp27-none-win32.whl", hash = "sha256:36f435891adb138ed3c9e58c6af3e2e6ca9ac2f365efe1f9cfef2794e6c93b4e"}, + {file = "psutil-5.9.8-cp27-none-win_amd64.whl", hash = "sha256:bd1184ceb3f87651a67b2708d4c3338e9b10c5df903f2e3776b62303b26cb631"}, + {file = "psutil-5.9.8-cp36-abi3-macosx_10_9_x86_64.whl", hash = "sha256:aee678c8720623dc456fa20659af736241f575d79429a0e5e9cf88ae0605cc81"}, + {file = "psutil-5.9.8-cp36-abi3-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8cb6403ce6d8e047495a701dc7c5bd788add903f8986d523e3e20b98b733e421"}, + {file = "psutil-5.9.8-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d06016f7f8625a1825ba3732081d77c94589dca78b7a3fc072194851e88461a4"}, + {file = "psutil-5.9.8-cp36-cp36m-win32.whl", hash = "sha256:7d79560ad97af658a0f6adfef8b834b53f64746d45b403f225b85c5c2c140eee"}, + {file = "psutil-5.9.8-cp36-cp36m-win_amd64.whl", hash = "sha256:27cc40c3493bb10de1be4b3f07cae4c010ce715290a5be22b98493509c6299e2"}, + {file = "psutil-5.9.8-cp37-abi3-win32.whl", hash = "sha256:bc56c2a1b0d15aa3eaa5a60c9f3f8e3e565303b465dbf57a1b730e7a2b9844e0"}, + {file = "psutil-5.9.8-cp37-abi3-win_amd64.whl", hash = "sha256:8db4c1b57507eef143a15a6884ca10f7c73876cdf5d51e713151c1236a0e68cf"}, + {file = "psutil-5.9.8-cp38-abi3-macosx_11_0_arm64.whl", hash = "sha256:d16bbddf0693323b8c6123dd804100241da461e41d6e332fb0ba6058f630f8c8"}, + {file = "psutil-5.9.8.tar.gz", hash = "sha256:6be126e3225486dff286a8fb9a06246a5253f4c7c53b475ea5f5ac934e64194c"}, +] [package.extras] test = ["enum34", "ipaddress", "mock", "pywin32", "wmi"] @@ -725,17 +1481,23 @@ test = ["enum34", "ipaddress", "mock", "pywin32", "wmi"] name = "ptyprocess" version = "0.7.0" description = "Run a subprocess in a pseudo terminal" -category = "dev" optional = false python-versions = "*" +files = [ + {file = "ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35"}, + {file = "ptyprocess-0.7.0.tar.gz", hash = "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220"}, +] [[package]] name = "pure-eval" version = "0.2.2" description = "Safely evaluate AST nodes without side effects" -category = "dev" optional = false python-versions = "*" +files = [ + {file = "pure_eval-0.2.2-py3-none-any.whl", hash = "sha256:01eaab343580944bc56080ebe0a674b39ec44a945e6d09ba7db3cb8cec289350"}, + {file = "pure_eval-0.2.2.tar.gz", hash = "sha256:2b45320af6dfaa1750f543d714b6d1c520a1688dec6fd24d339063ce0aaa9ac3"}, +] [package.extras] tests = ["pytest"] @@ -744,17 +1506,23 @@ tests = ["pytest"] name = "pycparser" version = "2.21" description = "C parser in Python" -category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "pycparser-2.21-py2.py3-none-any.whl", hash = "sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9"}, + {file = "pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"}, +] [[package]] name = "pygments" version = "2.17.2" description = "Pygments is a syntax highlighting package written in Python." -category = "dev" optional = false python-versions = ">=3.7" +files = [ + {file = "pygments-2.17.2-py3-none-any.whl", hash = "sha256:b27c2826c47d0f3219f29554824c30c5e8945175d888647acd804ddd04af846c"}, + {file = "pygments-2.17.2.tar.gz", hash = "sha256:da46cec9fd2de5be3a8a784f434e4c4ab670b4ff54d605c4c2717e9d49c4c367"}, +] [package.extras] plugins = ["importlib-metadata"] @@ -764,20 +1532,26 @@ windows-terminal = ["colorama (>=0.4.6)"] name = "pyparsing" version = "3.1.1" description = "pyparsing module - Classes and methods to define and execute parsing grammars" -category = "main" optional = false python-versions = ">=3.6.8" +files = [ + {file = "pyparsing-3.1.1-py3-none-any.whl", hash = "sha256:32c7c0b711493c72ff18a981d24f28aaf9c1fb7ed5e9667c9e84e3db623bdbfb"}, + {file = "pyparsing-3.1.1.tar.gz", hash = "sha256:ede28a1a32462f5a9705e07aea48001a08f7cf81a021585011deba701581a0db"}, +] [package.extras] -diagrams = ["railroad-diagrams", "jinja2"] +diagrams = ["jinja2", "railroad-diagrams"] [[package]] name = "pytest" version = "7.4.4" description = "pytest: simple powerful testing with Python" -category = "dev" optional = false python-versions = ">=3.7" +files = [ + {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, + {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, +] [package.dependencies] colorama = {version = "*", markers = "sys_platform == \"win32\""} @@ -794,9 +1568,12 @@ testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "no name = "python-dateutil" version = "2.8.2" description = "Extensions to the standard Python datetime module" -category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" +files = [ + {file = "python-dateutil-2.8.2.tar.gz", hash = "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86"}, + {file = "python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"}, +] [package.dependencies] six = ">=1.5" @@ -805,17 +1582,126 @@ six = ">=1.5" name = "pywin32" version = "306" description = "Python for Window Extensions" -category = "dev" optional = false python-versions = "*" +files = [ + {file = "pywin32-306-cp310-cp310-win32.whl", hash = "sha256:06d3420a5155ba65f0b72f2699b5bacf3109f36acbe8923765c22938a69dfc8d"}, + {file = "pywin32-306-cp310-cp310-win_amd64.whl", hash = "sha256:84f4471dbca1887ea3803d8848a1616429ac94a4a8d05f4bc9c5dcfd42ca99c8"}, + {file = "pywin32-306-cp311-cp311-win32.whl", hash = "sha256:e65028133d15b64d2ed8f06dd9fbc268352478d4f9289e69c190ecd6818b6407"}, + {file = "pywin32-306-cp311-cp311-win_amd64.whl", hash = "sha256:a7639f51c184c0272e93f244eb24dafca9b1855707d94c192d4a0b4c01e1100e"}, + {file = "pywin32-306-cp311-cp311-win_arm64.whl", hash = "sha256:70dba0c913d19f942a2db25217d9a1b726c278f483a919f1abfed79c9cf64d3a"}, + {file = "pywin32-306-cp312-cp312-win32.whl", hash = "sha256:383229d515657f4e3ed1343da8be101000562bf514591ff383ae940cad65458b"}, + {file = "pywin32-306-cp312-cp312-win_amd64.whl", hash = "sha256:37257794c1ad39ee9be652da0462dc2e394c8159dfd913a8a4e8eb6fd346da0e"}, + {file = "pywin32-306-cp312-cp312-win_arm64.whl", hash = "sha256:5821ec52f6d321aa59e2db7e0a35b997de60c201943557d108af9d4ae1ec7040"}, + {file = "pywin32-306-cp37-cp37m-win32.whl", hash = "sha256:1c73ea9a0d2283d889001998059f5eaaba3b6238f767c9cf2833b13e6a685f65"}, + {file = "pywin32-306-cp37-cp37m-win_amd64.whl", hash = "sha256:72c5f621542d7bdd4fdb716227be0dd3f8565c11b280be6315b06ace35487d36"}, + {file = "pywin32-306-cp38-cp38-win32.whl", hash = "sha256:e4c092e2589b5cf0d365849e73e02c391c1349958c5ac3e9d5ccb9a28e017b3a"}, + {file = "pywin32-306-cp38-cp38-win_amd64.whl", hash = "sha256:e8ac1ae3601bee6ca9f7cb4b5363bf1c0badb935ef243c4733ff9a393b1690c0"}, + {file = "pywin32-306-cp39-cp39-win32.whl", hash = "sha256:e25fd5b485b55ac9c057f67d94bc203f3f6595078d1fb3b458c9c28b7153a802"}, + {file = "pywin32-306-cp39-cp39-win_amd64.whl", hash = "sha256:39b61c15272833b5c329a2989999dcae836b1eed650252ab1b7bfbe1d59f30f4"}, +] [[package]] name = "pyzmq" -version = "25.1.1" +version = "25.1.2" description = "Python bindings for 0MQ" -category = "dev" optional = false python-versions = ">=3.6" +files = [ + {file = "pyzmq-25.1.2-cp310-cp310-macosx_10_15_universal2.whl", hash = "sha256:e624c789359f1a16f83f35e2c705d07663ff2b4d4479bad35621178d8f0f6ea4"}, + {file = "pyzmq-25.1.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:49151b0efece79f6a79d41a461d78535356136ee70084a1c22532fc6383f4ad0"}, + {file = "pyzmq-25.1.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d9a5f194cf730f2b24d6af1f833c14c10f41023da46a7f736f48b6d35061e76e"}, + {file = "pyzmq-25.1.2-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:faf79a302f834d9e8304fafdc11d0d042266667ac45209afa57e5efc998e3872"}, + {file = "pyzmq-25.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7f51a7b4ead28d3fca8dda53216314a553b0f7a91ee8fc46a72b402a78c3e43d"}, + {file = "pyzmq-25.1.2-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:0ddd6d71d4ef17ba5a87becf7ddf01b371eaba553c603477679ae817a8d84d75"}, + {file = "pyzmq-25.1.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:246747b88917e4867e2367b005fc8eefbb4a54b7db363d6c92f89d69abfff4b6"}, + {file = "pyzmq-25.1.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:00c48ae2fd81e2a50c3485de1b9d5c7c57cd85dc8ec55683eac16846e57ac979"}, + {file = "pyzmq-25.1.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:5a68d491fc20762b630e5db2191dd07ff89834086740f70e978bb2ef2668be08"}, + {file = "pyzmq-25.1.2-cp310-cp310-win32.whl", hash = "sha256:09dfe949e83087da88c4a76767df04b22304a682d6154de2c572625c62ad6886"}, + {file = "pyzmq-25.1.2-cp310-cp310-win_amd64.whl", hash = "sha256:fa99973d2ed20417744fca0073390ad65ce225b546febb0580358e36aa90dba6"}, + {file = "pyzmq-25.1.2-cp311-cp311-macosx_10_15_universal2.whl", hash = "sha256:82544e0e2d0c1811482d37eef297020a040c32e0687c1f6fc23a75b75db8062c"}, + {file = "pyzmq-25.1.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:01171fc48542348cd1a360a4b6c3e7d8f46cdcf53a8d40f84db6707a6768acc1"}, + {file = "pyzmq-25.1.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bc69c96735ab501419c432110016329bf0dea8898ce16fab97c6d9106dc0b348"}, + {file = "pyzmq-25.1.2-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3e124e6b1dd3dfbeb695435dff0e383256655bb18082e094a8dd1f6293114642"}, + {file = "pyzmq-25.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7598d2ba821caa37a0f9d54c25164a4fa351ce019d64d0b44b45540950458840"}, + {file = "pyzmq-25.1.2-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:d1299d7e964c13607efd148ca1f07dcbf27c3ab9e125d1d0ae1d580a1682399d"}, + {file = "pyzmq-25.1.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:4e6f689880d5ad87918430957297c975203a082d9a036cc426648fcbedae769b"}, + {file = "pyzmq-25.1.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:cc69949484171cc961e6ecd4a8911b9ce7a0d1f738fcae717177c231bf77437b"}, + {file = "pyzmq-25.1.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:9880078f683466b7f567b8624bfc16cad65077be046b6e8abb53bed4eeb82dd3"}, + {file = "pyzmq-25.1.2-cp311-cp311-win32.whl", hash = "sha256:4e5837af3e5aaa99a091302df5ee001149baff06ad22b722d34e30df5f0d9097"}, + {file = "pyzmq-25.1.2-cp311-cp311-win_amd64.whl", hash = "sha256:25c2dbb97d38b5ac9fd15586e048ec5eb1e38f3d47fe7d92167b0c77bb3584e9"}, + {file = "pyzmq-25.1.2-cp312-cp312-macosx_10_15_universal2.whl", hash = "sha256:11e70516688190e9c2db14fcf93c04192b02d457b582a1f6190b154691b4c93a"}, + {file = "pyzmq-25.1.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:313c3794d650d1fccaaab2df942af9f2c01d6217c846177cfcbc693c7410839e"}, + {file = "pyzmq-25.1.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1b3cbba2f47062b85fe0ef9de5b987612140a9ba3a9c6d2543c6dec9f7c2ab27"}, + {file = "pyzmq-25.1.2-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fc31baa0c32a2ca660784d5af3b9487e13b61b3032cb01a115fce6588e1bed30"}, + {file = "pyzmq-25.1.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:02c9087b109070c5ab0b383079fa1b5f797f8d43e9a66c07a4b8b8bdecfd88ee"}, + {file = "pyzmq-25.1.2-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:f8429b17cbb746c3e043cb986328da023657e79d5ed258b711c06a70c2ea7537"}, + {file = "pyzmq-25.1.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:5074adeacede5f810b7ef39607ee59d94e948b4fd954495bdb072f8c54558181"}, + {file = "pyzmq-25.1.2-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:7ae8f354b895cbd85212da245f1a5ad8159e7840e37d78b476bb4f4c3f32a9fe"}, + {file = "pyzmq-25.1.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:b264bf2cc96b5bc43ce0e852be995e400376bd87ceb363822e2cb1964fcdc737"}, + {file = "pyzmq-25.1.2-cp312-cp312-win32.whl", hash = "sha256:02bbc1a87b76e04fd780b45e7f695471ae6de747769e540da909173d50ff8e2d"}, + {file = "pyzmq-25.1.2-cp312-cp312-win_amd64.whl", hash = "sha256:ced111c2e81506abd1dc142e6cd7b68dd53747b3b7ae5edbea4578c5eeff96b7"}, + {file = "pyzmq-25.1.2-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:7b6d09a8962a91151f0976008eb7b29b433a560fde056ec7a3db9ec8f1075438"}, + {file = "pyzmq-25.1.2-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:967668420f36878a3c9ecb5ab33c9d0ff8d054f9c0233d995a6d25b0e95e1b6b"}, + {file = "pyzmq-25.1.2-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:5edac3f57c7ddaacdb4d40f6ef2f9e299471fc38d112f4bc6d60ab9365445fb0"}, + {file = "pyzmq-25.1.2-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:0dabfb10ef897f3b7e101cacba1437bd3a5032ee667b7ead32bbcdd1a8422fe7"}, + {file = "pyzmq-25.1.2-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:2c6441e0398c2baacfe5ba30c937d274cfc2dc5b55e82e3749e333aabffde561"}, + {file = "pyzmq-25.1.2-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:16b726c1f6c2e7625706549f9dbe9b06004dfbec30dbed4bf50cbdfc73e5b32a"}, + {file = "pyzmq-25.1.2-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:a86c2dd76ef71a773e70551a07318b8e52379f58dafa7ae1e0a4be78efd1ff16"}, + {file = "pyzmq-25.1.2-cp36-cp36m-win32.whl", hash = "sha256:359f7f74b5d3c65dae137f33eb2bcfa7ad9ebefd1cab85c935f063f1dbb245cc"}, + {file = "pyzmq-25.1.2-cp36-cp36m-win_amd64.whl", hash = "sha256:55875492f820d0eb3417b51d96fea549cde77893ae3790fd25491c5754ea2f68"}, + {file = "pyzmq-25.1.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b8c8a419dfb02e91b453615c69568442e897aaf77561ee0064d789705ff37a92"}, + {file = "pyzmq-25.1.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8807c87fa893527ae8a524c15fc505d9950d5e856f03dae5921b5e9aa3b8783b"}, + {file = "pyzmq-25.1.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:5e319ed7d6b8f5fad9b76daa0a68497bc6f129858ad956331a5835785761e003"}, + {file = "pyzmq-25.1.2-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:3c53687dde4d9d473c587ae80cc328e5b102b517447456184b485587ebd18b62"}, + {file = "pyzmq-25.1.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:9add2e5b33d2cd765ad96d5eb734a5e795a0755f7fc49aa04f76d7ddda73fd70"}, + {file = "pyzmq-25.1.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:e690145a8c0c273c28d3b89d6fb32c45e0d9605b2293c10e650265bf5c11cfec"}, + {file = "pyzmq-25.1.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:00a06faa7165634f0cac1abb27e54d7a0b3b44eb9994530b8ec73cf52e15353b"}, + {file = "pyzmq-25.1.2-cp37-cp37m-win32.whl", hash = "sha256:0f97bc2f1f13cb16905a5f3e1fbdf100e712d841482b2237484360f8bc4cb3d7"}, + {file = "pyzmq-25.1.2-cp37-cp37m-win_amd64.whl", hash = "sha256:6cc0020b74b2e410287e5942e1e10886ff81ac77789eb20bec13f7ae681f0fdd"}, + {file = "pyzmq-25.1.2-cp38-cp38-macosx_10_15_universal2.whl", hash = "sha256:bef02cfcbded83473bdd86dd8d3729cd82b2e569b75844fb4ea08fee3c26ae41"}, + {file = "pyzmq-25.1.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:e10a4b5a4b1192d74853cc71a5e9fd022594573926c2a3a4802020360aa719d8"}, + {file = "pyzmq-25.1.2-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:8c5f80e578427d4695adac6fdf4370c14a2feafdc8cb35549c219b90652536ae"}, + {file = "pyzmq-25.1.2-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:5dde6751e857910c1339890f3524de74007958557593b9e7e8c5f01cd919f8a7"}, + {file = "pyzmq-25.1.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ea1608dd169da230a0ad602d5b1ebd39807ac96cae1845c3ceed39af08a5c6df"}, + {file = "pyzmq-25.1.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:0f513130c4c361201da9bc69df25a086487250e16b5571ead521b31ff6b02220"}, + {file = "pyzmq-25.1.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:019744b99da30330798bb37df33549d59d380c78e516e3bab9c9b84f87a9592f"}, + {file = "pyzmq-25.1.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:2e2713ef44be5d52dd8b8e2023d706bf66cb22072e97fc71b168e01d25192755"}, + {file = "pyzmq-25.1.2-cp38-cp38-win32.whl", hash = "sha256:07cd61a20a535524906595e09344505a9bd46f1da7a07e504b315d41cd42eb07"}, + {file = "pyzmq-25.1.2-cp38-cp38-win_amd64.whl", hash = "sha256:eb7e49a17fb8c77d3119d41a4523e432eb0c6932187c37deb6fbb00cc3028088"}, + {file = "pyzmq-25.1.2-cp39-cp39-macosx_10_15_universal2.whl", hash = "sha256:94504ff66f278ab4b7e03e4cba7e7e400cb73bfa9d3d71f58d8972a8dc67e7a6"}, + {file = "pyzmq-25.1.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6dd0d50bbf9dca1d0bdea219ae6b40f713a3fb477c06ca3714f208fd69e16fd8"}, + {file = "pyzmq-25.1.2-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:004ff469d21e86f0ef0369717351073e0e577428e514c47c8480770d5e24a565"}, + {file = "pyzmq-25.1.2-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:c0b5ca88a8928147b7b1e2dfa09f3b6c256bc1135a1338536cbc9ea13d3b7add"}, + {file = "pyzmq-25.1.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2c9a79f1d2495b167119d02be7448bfba57fad2a4207c4f68abc0bab4b92925b"}, + {file = "pyzmq-25.1.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:518efd91c3d8ac9f9b4f7dd0e2b7b8bf1a4fe82a308009016b07eaa48681af82"}, + {file = "pyzmq-25.1.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:1ec23bd7b3a893ae676d0e54ad47d18064e6c5ae1fadc2f195143fb27373f7f6"}, + {file = "pyzmq-25.1.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:db36c27baed588a5a8346b971477b718fdc66cf5b80cbfbd914b4d6d355e44e2"}, + {file = "pyzmq-25.1.2-cp39-cp39-win32.whl", hash = "sha256:39b1067f13aba39d794a24761e385e2eddc26295826530a8c7b6c6c341584289"}, + {file = "pyzmq-25.1.2-cp39-cp39-win_amd64.whl", hash = "sha256:8e9f3fabc445d0ce320ea2c59a75fe3ea591fdbdeebec5db6de530dd4b09412e"}, + {file = "pyzmq-25.1.2-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:a8c1d566344aee826b74e472e16edae0a02e2a044f14f7c24e123002dcff1c05"}, + {file = "pyzmq-25.1.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:759cfd391a0996345ba94b6a5110fca9c557ad4166d86a6e81ea526c376a01e8"}, + {file = "pyzmq-25.1.2-pp310-pypy310_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7c61e346ac34b74028ede1c6b4bcecf649d69b707b3ff9dc0fab453821b04d1e"}, + {file = "pyzmq-25.1.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4cb8fc1f8d69b411b8ec0b5f1ffbcaf14c1db95b6bccea21d83610987435f1a4"}, + {file = "pyzmq-25.1.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:3c00c9b7d1ca8165c610437ca0c92e7b5607b2f9076f4eb4b095c85d6e680a1d"}, + {file = "pyzmq-25.1.2-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:df0c7a16ebb94452d2909b9a7b3337940e9a87a824c4fc1c7c36bb4404cb0cde"}, + {file = "pyzmq-25.1.2-pp37-pypy37_pp73-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:45999e7f7ed5c390f2e87ece7f6c56bf979fb213550229e711e45ecc7d42ccb8"}, + {file = "pyzmq-25.1.2-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:ac170e9e048b40c605358667aca3d94e98f604a18c44bdb4c102e67070f3ac9b"}, + {file = "pyzmq-25.1.2-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d1b604734bec94f05f81b360a272fc824334267426ae9905ff32dc2be433ab96"}, + {file = "pyzmq-25.1.2-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:a793ac733e3d895d96f865f1806f160696422554e46d30105807fdc9841b9f7d"}, + {file = "pyzmq-25.1.2-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:0806175f2ae5ad4b835ecd87f5f85583316b69f17e97786f7443baaf54b9bb98"}, + {file = "pyzmq-25.1.2-pp38-pypy38_pp73-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:ef12e259e7bc317c7597d4f6ef59b97b913e162d83b421dd0db3d6410f17a244"}, + {file = "pyzmq-25.1.2-pp38-pypy38_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:ea253b368eb41116011add00f8d5726762320b1bda892f744c91997b65754d73"}, + {file = "pyzmq-25.1.2-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1b9b1f2ad6498445a941d9a4fee096d387fee436e45cc660e72e768d3d8ee611"}, + {file = "pyzmq-25.1.2-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:8b14c75979ce932c53b79976a395cb2a8cd3aaf14aef75e8c2cb55a330b9b49d"}, + {file = "pyzmq-25.1.2-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:889370d5174a741a62566c003ee8ddba4b04c3f09a97b8000092b7ca83ec9c49"}, + {file = "pyzmq-25.1.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9a18fff090441a40ffda8a7f4f18f03dc56ae73f148f1832e109f9bffa85df15"}, + {file = "pyzmq-25.1.2-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:99a6b36f95c98839ad98f8c553d8507644c880cf1e0a57fe5e3a3f3969040882"}, + {file = "pyzmq-25.1.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4345c9a27f4310afbb9c01750e9461ff33d6fb74cd2456b107525bbeebcb5be3"}, + {file = "pyzmq-25.1.2-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:3516e0b6224cf6e43e341d56da15fd33bdc37fa0c06af4f029f7d7dfceceabbc"}, + {file = "pyzmq-25.1.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:146b9b1f29ead41255387fb07be56dc29639262c0f7344f570eecdcd8d683314"}, + {file = "pyzmq-25.1.2.tar.gz", hash = "sha256:93f1aa311e8bb912e34f004cf186407a4e90eec4f0ecc0efd26056bf7eda0226"}, +] [package.dependencies] cffi = {version = "*", markers = "implementation_name == \"pypy\""} @@ -824,9 +1710,12 @@ cffi = {version = "*", markers = "implementation_name == \"pypy\""} name = "requests" version = "2.31.0" description = "Python HTTP for Humans." -category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "requests-2.31.0-py3-none-any.whl", hash = "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f"}, + {file = "requests-2.31.0.tar.gz", hash = "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1"}, +] [package.dependencies] certifi = ">=2017.4.17" @@ -836,39 +1725,71 @@ urllib3 = ">=1.21.1,<3" [package.extras] socks = ["PySocks (>=1.5.6,!=1.5.7)"] -use_chardet_on_py3 = ["chardet (>=3.0.2,<6)"] +use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] [[package]] name = "scipy" -version = "1.11.4" +version = "1.12.0" description = "Fundamental algorithms for scientific computing in Python" -category = "main" optional = false python-versions = ">=3.9" +files = [ + {file = "scipy-1.12.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:78e4402e140879387187f7f25d91cc592b3501a2e51dfb320f48dfb73565f10b"}, + {file = "scipy-1.12.0-cp310-cp310-macosx_12_0_arm64.whl", hash = "sha256:f5f00ebaf8de24d14b8449981a2842d404152774c1a1d880c901bf454cb8e2a1"}, + {file = "scipy-1.12.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e53958531a7c695ff66c2e7bb7b79560ffdc562e2051644c5576c39ff8efb563"}, + {file = "scipy-1.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5e32847e08da8d895ce09d108a494d9eb78974cf6de23063f93306a3e419960c"}, + {file = "scipy-1.12.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:4c1020cad92772bf44b8e4cdabc1df5d87376cb219742549ef69fc9fd86282dd"}, + {file = "scipy-1.12.0-cp310-cp310-win_amd64.whl", hash = "sha256:75ea2a144096b5e39402e2ff53a36fecfd3b960d786b7efd3c180e29c39e53f2"}, + {file = "scipy-1.12.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:408c68423f9de16cb9e602528be4ce0d6312b05001f3de61fe9ec8b1263cad08"}, + {file = "scipy-1.12.0-cp311-cp311-macosx_12_0_arm64.whl", hash = "sha256:5adfad5dbf0163397beb4aca679187d24aec085343755fcdbdeb32b3679f254c"}, + {file = "scipy-1.12.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c3003652496f6e7c387b1cf63f4bb720951cfa18907e998ea551e6de51a04467"}, + {file = "scipy-1.12.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8b8066bce124ee5531d12a74b617d9ac0ea59245246410e19bca549656d9a40a"}, + {file = "scipy-1.12.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:8bee4993817e204d761dba10dbab0774ba5a8612e57e81319ea04d84945375ba"}, + {file = "scipy-1.12.0-cp311-cp311-win_amd64.whl", hash = "sha256:a24024d45ce9a675c1fb8494e8e5244efea1c7a09c60beb1eeb80373d0fecc70"}, + {file = "scipy-1.12.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:e7e76cc48638228212c747ada851ef355c2bb5e7f939e10952bc504c11f4e372"}, + {file = "scipy-1.12.0-cp312-cp312-macosx_12_0_arm64.whl", hash = "sha256:f7ce148dffcd64ade37b2df9315541f9adad6efcaa86866ee7dd5db0c8f041c3"}, + {file = "scipy-1.12.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9c39f92041f490422924dfdb782527a4abddf4707616e07b021de33467f917bc"}, + {file = "scipy-1.12.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a7ebda398f86e56178c2fa94cad15bf457a218a54a35c2a7b4490b9f9cb2676c"}, + {file = "scipy-1.12.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:95e5c750d55cf518c398a8240571b0e0782c2d5a703250872f36eaf737751338"}, + {file = "scipy-1.12.0-cp312-cp312-win_amd64.whl", hash = "sha256:e646d8571804a304e1da01040d21577685ce8e2db08ac58e543eaca063453e1c"}, + {file = "scipy-1.12.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:913d6e7956c3a671de3b05ccb66b11bc293f56bfdef040583a7221d9e22a2e35"}, + {file = "scipy-1.12.0-cp39-cp39-macosx_12_0_arm64.whl", hash = "sha256:bba1b0c7256ad75401c73e4b3cf09d1f176e9bd4248f0d3112170fb2ec4db067"}, + {file = "scipy-1.12.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:730badef9b827b368f351eacae2e82da414e13cf8bd5051b4bdfd720271a5371"}, + {file = "scipy-1.12.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6546dc2c11a9df6926afcbdd8a3edec28566e4e785b915e849348c6dd9f3f490"}, + {file = "scipy-1.12.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:196ebad3a4882081f62a5bf4aeb7326aa34b110e533aab23e4374fcccb0890dc"}, + {file = "scipy-1.12.0-cp39-cp39-win_amd64.whl", hash = "sha256:b360f1b6b2f742781299514e99ff560d1fe9bd1bff2712894b52abe528d1fd1e"}, + {file = "scipy-1.12.0.tar.gz", hash = "sha256:4bf5abab8a36d20193c698b0f1fc282c1d083c94723902c447e5d2f1780936a3"}, +] [package.dependencies] -numpy = ">=1.21.6,<1.28.0" +numpy = ">=1.22.4,<1.29.0" [package.extras] -test = ["pytest", "pytest-cov", "pytest-timeout", "pytest-xdist", "asv", "mpmath", "gmpy2", "threadpoolctl", "scikit-umfpack", "pooch"] -doc = ["sphinx (!=4.1.0)", "pydata-sphinx-theme (==0.9.0)", "sphinx-design (>=0.2.0)", "matplotlib (>2)", "numpydoc", "jupytext", "myst-nb", "pooch"] -dev = ["mypy", "typing-extensions", "types-psutil", "pycodestyle", "ruff", "cython-lint (>=0.12.2)", "rich-click", "click", "doit (>=0.36.0)", "pydevtool"] +dev = ["click", "cython-lint (>=0.12.2)", "doit (>=0.36.0)", "mypy", "pycodestyle", "pydevtool", "rich-click", "ruff", "types-psutil", "typing_extensions"] +doc = ["jupytext", "matplotlib (>2)", "myst-nb", "numpydoc", "pooch", "pydata-sphinx-theme (==0.9.0)", "sphinx (!=4.1.0)", "sphinx-design (>=0.2.0)"] +test = ["asv", "gmpy2", "hypothesis", "mpmath", "pooch", "pytest", "pytest-cov", "pytest-timeout", "pytest-xdist", "scikit-umfpack", "threadpoolctl"] [[package]] name = "six" version = "1.16.0" description = "Python 2 and 3 compatibility utilities" -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" +files = [ + {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, + {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, +] [[package]] name = "stack-data" version = "0.6.3" description = "Extract data from python stack frames and tracebacks for informative displays" -category = "dev" optional = false python-versions = "*" +files = [ + {file = "stack_data-0.6.3-py3-none-any.whl", hash = "sha256:d5558e0c25a4cb0853cddad3d77da9891a08cb85dd9f9f91b9f8cd66e511e695"}, + {file = "stack_data-0.6.3.tar.gz", hash = "sha256:836a778de4fec4dcd1dcd89ed8abff8a221f58308462e1c4aa2a3cf30148f0b9"}, +] [package.dependencies] asttokens = ">=2.1.0" @@ -876,15 +1797,17 @@ executing = ">=1.2.0" pure-eval = "*" [package.extras] -tests = ["pytest", "typeguard", "pygments", "littleutils", "cython"] +tests = ["cython", "littleutils", "pygments", "pytest", "typeguard"] [[package]] name = "statistics" version = "1.0.3.5" description = "A Python 2.* port of 3.4 Statistics Module" -category = "main" optional = false python-versions = "*" +files = [ + {file = "statistics-1.0.3.5.tar.gz", hash = "sha256:2dc379b80b07bf2ddd5488cad06b2b9531da4dd31edb04dc9ec0dc226486c138"}, +] [package.dependencies] docutils = ">=0.3" @@ -893,9 +1816,12 @@ docutils = ">=0.3" name = "sympy" version = "1.12" description = "Computer algebra system (CAS) in Python" -category = "main" optional = false python-versions = ">=3.8" +files = [ + {file = "sympy-1.12-py3-none-any.whl", hash = "sha256:c3588cd4295d0c0f603d0f2ae780587e64e2efeedb3521e46b9bb1d08d184fa5"}, + {file = "sympy-1.12.tar.gz", hash = "sha256:ebf595c8dac3e0fdc4152c51878b498396ec7f30e7a914d6071e674d49420fb8"}, +] [package.dependencies] mpmath = ">=0.19" @@ -904,17 +1830,46 @@ mpmath = ">=0.19" name = "tomli" version = "2.0.1" description = "A lil' TOML parser" -category = "dev" optional = false python-versions = ">=3.7" +files = [ + {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, + {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, +] [[package]] name = "torch" -version = "2.1.1" +version = "2.2.0" description = "Tensors and Dynamic neural networks in Python with strong GPU acceleration" -category = "main" optional = false python-versions = ">=3.8.0" +files = [ + {file = "torch-2.2.0-cp310-cp310-manylinux1_x86_64.whl", hash = "sha256:d366158d6503a3447e67f8c0ad1328d54e6c181d88572d688a625fac61b13a97"}, + {file = "torch-2.2.0-cp310-cp310-manylinux2014_aarch64.whl", hash = "sha256:707f2f80402981e9f90d0038d7d481678586251e6642a7a6ef67fc93511cb446"}, + {file = "torch-2.2.0-cp310-cp310-win_amd64.whl", hash = "sha256:15c8f0a105c66b28496092fca1520346082e734095f8eaf47b5786bac24b8a31"}, + {file = "torch-2.2.0-cp310-none-macosx_10_9_x86_64.whl", hash = "sha256:0ca4df4b728515ad009b79f5107b00bcb2c63dc202d991412b9eb3b6a4f24349"}, + {file = "torch-2.2.0-cp310-none-macosx_11_0_arm64.whl", hash = "sha256:3d3eea2d5969b9a1c9401429ca79efc668120314d443d3463edc3289d7f003c7"}, + {file = "torch-2.2.0-cp311-cp311-manylinux1_x86_64.whl", hash = "sha256:0d1c580e379c0d48f0f0a08ea28d8e373295aa254de4f9ad0631f9ed8bc04c24"}, + {file = "torch-2.2.0-cp311-cp311-manylinux2014_aarch64.whl", hash = "sha256:9328e3c1ce628a281d2707526b4d1080eae7c4afab4f81cea75bde1f9441dc78"}, + {file = "torch-2.2.0-cp311-cp311-win_amd64.whl", hash = "sha256:03c8e660907ac1b8ee07f6d929c4e15cd95be2fb764368799cca02c725a212b8"}, + {file = "torch-2.2.0-cp311-none-macosx_10_9_x86_64.whl", hash = "sha256:da0cefe7f84ece3e3b56c11c773b59d1cb2c0fd83ddf6b5f7f1fd1a987b15c3e"}, + {file = "torch-2.2.0-cp311-none-macosx_11_0_arm64.whl", hash = "sha256:f81d23227034221a4a4ff8ef24cc6cec7901edd98d9e64e32822778ff01be85e"}, + {file = "torch-2.2.0-cp312-cp312-manylinux1_x86_64.whl", hash = "sha256:dcbfb2192ac41ca93c756ebe9e2af29df0a4c14ee0e7a0dd78f82c67a63d91d4"}, + {file = "torch-2.2.0-cp312-cp312-manylinux2014_aarch64.whl", hash = "sha256:9eeb42971619e24392c9088b5b6d387d896e267889d41d267b1fec334f5227c5"}, + {file = "torch-2.2.0-cp312-cp312-win_amd64.whl", hash = "sha256:c718b2ca69a6cac28baa36d86d8c0ec708b102cebd1ceb1b6488e404cd9be1d1"}, + {file = "torch-2.2.0-cp312-none-macosx_10_9_x86_64.whl", hash = "sha256:f11d18fceb4f9ecb1ac680dde7c463c120ed29056225d75469c19637e9f98d12"}, + {file = "torch-2.2.0-cp312-none-macosx_11_0_arm64.whl", hash = "sha256:ee1da852bfd4a7e674135a446d6074c2da7194c1b08549e31eae0b3138c6b4d2"}, + {file = "torch-2.2.0-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:0d819399819d0862268ac531cf12a501c253007df4f9e6709ede8a0148f1a7b8"}, + {file = "torch-2.2.0-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:08f53ccc38c49d839bc703ea1b20769cc8a429e0c4b20b56921a9f64949bf325"}, + {file = "torch-2.2.0-cp38-cp38-win_amd64.whl", hash = "sha256:93bffe3779965a71dab25fc29787538c37c5d54298fd2f2369e372b6fb137d41"}, + {file = "torch-2.2.0-cp38-none-macosx_10_9_x86_64.whl", hash = "sha256:c17ec323da778efe8dad49d8fb534381479ca37af1bfc58efdbb8607a9d263a3"}, + {file = "torch-2.2.0-cp38-none-macosx_11_0_arm64.whl", hash = "sha256:c02685118008834e878f676f81eab3a952b7936fa31f474ef8a5ff4b5c78b36d"}, + {file = "torch-2.2.0-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:d9f39d6f53cec240a0e3baa82cb697593340f9d4554cee6d3d6ca07925c2fac0"}, + {file = "torch-2.2.0-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:51770c065206250dc1222ea7c0eff3f88ab317d3e931cca2aee461b85fbc2472"}, + {file = "torch-2.2.0-cp39-cp39-win_amd64.whl", hash = "sha256:008e4c6ad703de55af760c73bf937ecdd61a109f9b08f2bbb9c17e7c7017f194"}, + {file = "torch-2.2.0-cp39-none-macosx_10_9_x86_64.whl", hash = "sha256:de8680472dd14e316f42ceef2a18a301461a9058cd6e99a1f1b20f78f11412f1"}, + {file = "torch-2.2.0-cp39-none-macosx_11_0_arm64.whl", hash = "sha256:99e1dcecb488e3fd25bcaac56e48cdb3539842904bdc8588b0b255fde03a254c"}, +] [package.dependencies] filelock = "*" @@ -930,191 +1885,129 @@ nvidia-cufft-cu12 = {version = "11.0.2.54", markers = "platform_system == \"Linu nvidia-curand-cu12 = {version = "10.3.2.106", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""} nvidia-cusolver-cu12 = {version = "11.4.5.107", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""} nvidia-cusparse-cu12 = {version = "12.1.0.106", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""} -nvidia-nccl-cu12 = {version = "2.18.1", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""} +nvidia-nccl-cu12 = {version = "2.19.3", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""} nvidia-nvtx-cu12 = {version = "12.1.105", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""} sympy = "*" -triton = {version = "2.1.0", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""} -typing-extensions = "*" +triton = {version = "2.2.0", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""} +typing-extensions = ">=4.8.0" [package.extras] -dynamo = ["jinja2"] opt-einsum = ["opt-einsum (>=3.3)"] +optree = ["optree (>=0.9.1)"] [[package]] name = "tornado" version = "6.4" description = "Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed." -category = "dev" optional = false python-versions = ">= 3.8" +files = [ + {file = "tornado-6.4-cp38-abi3-macosx_10_9_universal2.whl", hash = "sha256:02ccefc7d8211e5a7f9e8bc3f9e5b0ad6262ba2fbb683a6443ecc804e5224ce0"}, + {file = "tornado-6.4-cp38-abi3-macosx_10_9_x86_64.whl", hash = "sha256:27787de946a9cffd63ce5814c33f734c627a87072ec7eed71f7fc4417bb16263"}, + {file = "tornado-6.4-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f7894c581ecdcf91666a0912f18ce5e757213999e183ebfc2c3fdbf4d5bd764e"}, + {file = "tornado-6.4-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e43bc2e5370a6a8e413e1e1cd0c91bedc5bd62a74a532371042a18ef19e10579"}, + {file = "tornado-6.4-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f0251554cdd50b4b44362f73ad5ba7126fc5b2c2895cc62b14a1c2d7ea32f212"}, + {file = "tornado-6.4-cp38-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:fd03192e287fbd0899dd8f81c6fb9cbbc69194d2074b38f384cb6fa72b80e9c2"}, + {file = "tornado-6.4-cp38-abi3-musllinux_1_1_i686.whl", hash = "sha256:88b84956273fbd73420e6d4b8d5ccbe913c65d31351b4c004ae362eba06e1f78"}, + {file = "tornado-6.4-cp38-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:71ddfc23a0e03ef2df1c1397d859868d158c8276a0603b96cf86892bff58149f"}, + {file = "tornado-6.4-cp38-abi3-win32.whl", hash = "sha256:6f8a6c77900f5ae93d8b4ae1196472d0ccc2775cc1dfdc9e7727889145c45052"}, + {file = "tornado-6.4-cp38-abi3-win_amd64.whl", hash = "sha256:10aeaa8006333433da48dec9fe417877f8bcc21f48dda8d661ae79da357b2a63"}, + {file = "tornado-6.4.tar.gz", hash = "sha256:72291fa6e6bc84e626589f1c29d90a5a6d593ef5ae68052ee2ef000dfd273dee"}, +] [[package]] name = "traitlets" -version = "5.14.0" +version = "5.14.1" description = "Traitlets Python configuration system" -category = "dev" optional = false python-versions = ">=3.8" +files = [ + {file = "traitlets-5.14.1-py3-none-any.whl", hash = "sha256:2e5a030e6eff91737c643231bfcf04a65b0132078dad75e4936700b213652e74"}, + {file = "traitlets-5.14.1.tar.gz", hash = "sha256:8585105b371a04b8316a43d5ce29c098575c2e477850b62b848b964f1444527e"}, +] [package.extras] docs = ["myst-parser", "pydata-sphinx-theme", "sphinx"] -test = ["argcomplete (>=3.0.3)", "mypy (>=1.7.0)", "pre-commit", "pytest-mock", "pytest-mypy-testing", "pytest (>=7.0,<7.5)"] +test = ["argcomplete (>=3.0.3)", "mypy (>=1.7.0)", "pre-commit", "pytest (>=7.0,<7.5)", "pytest-mock", "pytest-mypy-testing"] [[package]] name = "triton" -version = "2.1.0" +version = "2.2.0" description = "A language and compiler for custom Deep Learning operations" -category = "main" optional = false python-versions = "*" +files = [ + {file = "triton-2.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a2294514340cfe4e8f4f9e5c66c702744c4a117d25e618bd08469d0bfed1e2e5"}, + {file = "triton-2.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:da58a152bddb62cafa9a857dd2bc1f886dbf9f9c90a2b5da82157cd2b34392b0"}, + {file = "triton-2.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0af58716e721460a61886668b205963dc4d1e4ac20508cc3f623aef0d70283d5"}, + {file = "triton-2.2.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e8fe46d3ab94a8103e291bd44c741cc294b91d1d81c1a2888254cbf7ff846dab"}, + {file = "triton-2.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b8ce26093e539d727e7cf6f6f0d932b1ab0574dc02567e684377630d86723ace"}, + {file = "triton-2.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:227cc6f357c5efcb357f3867ac2a8e7ecea2298cd4606a8ba1e931d1d5a947df"}, +] [package.dependencies] filelock = "*" [package.extras] -build = ["cmake (>=3.18)", "lit"] -tests = ["autopep8", "flake8", "isort", "numpy", "pytest", "scipy (>=1.7.1)"] -tutorials = ["matplotlib", "pandas", "tabulate"] +build = ["cmake (>=3.20)", "lit"] +tests = ["autopep8", "flake8", "isort", "numpy", "pytest", "scipy (>=1.7.1)", "torch"] +tutorials = ["matplotlib", "pandas", "tabulate", "torch"] [[package]] name = "typing-extensions" -version = "4.8.0" +version = "4.9.0" description = "Backported and Experimental Type Hints for Python 3.8+" -category = "main" optional = false python-versions = ">=3.8" +files = [ + {file = "typing_extensions-4.9.0-py3-none-any.whl", hash = "sha256:af72aea155e91adfc61c3ae9e0e342dbc0cba726d6cba4b6c72c1f34e47291cd"}, + {file = "typing_extensions-4.9.0.tar.gz", hash = "sha256:23478f88c37f27d76ac8aee6c905017a143b0b1b886c3c9f66bc2fd94f9f5783"}, +] [[package]] name = "urllib3" -version = "2.1.0" +version = "2.2.0" description = "HTTP library with thread-safe connection pooling, file post, and more." -category = "main" optional = false python-versions = ">=3.8" +files = [ + {file = "urllib3-2.2.0-py3-none-any.whl", hash = "sha256:ce3711610ddce217e6d113a2732fafad960a03fd0318c91faa79481e35c11224"}, + {file = "urllib3-2.2.0.tar.gz", hash = "sha256:051d961ad0c62a94e50ecf1af379c3aba230c66c710493493560c0c223c49f20"}, +] [package.extras] brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)"] +h2 = ["h2 (>=4,<5)"] socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] zstd = ["zstandard (>=0.18.0)"] [[package]] name = "wcwidth" -version = "0.2.12" +version = "0.2.13" description = "Measures the displayed width of unicode strings in a terminal" -category = "dev" optional = false python-versions = "*" +files = [ + {file = "wcwidth-0.2.13-py2.py3-none-any.whl", hash = "sha256:3da69048e4540d84af32131829ff948f1e022c1c6bdb8d6102117aac784f6859"}, + {file = "wcwidth-0.2.13.tar.gz", hash = "sha256:72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5"}, +] [[package]] name = "zipp" version = "3.17.0" description = "Backport of pathlib-compatible object wrapper for zip files" -category = "main" optional = false python-versions = ">=3.8" +files = [ + {file = "zipp-3.17.0-py3-none-any.whl", hash = "sha256:0e923e726174922dce09c53c59ad483ff7bbb8e572e00c7f7c46b88556409f31"}, + {file = "zipp-3.17.0.tar.gz", hash = "sha256:84e64a1c28cf7e91ed2078bb8cc8c259cb19b76942096c8d7b84947690cabaf0"}, +] [package.extras] -docs = ["sphinx (>=3.5)", "sphinx (<7.2.5)", "jaraco.packaging (>=9.3)", "rst.linker (>=1.9)", "furo", "sphinx-lint", "jaraco.tidelift (>=1.4)"] -testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-ruff", "jaraco.itertools", "jaraco.functools", "more-itertools", "big-o", "pytest-ignore-flaky", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"] +testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-ignore-flaky", "pytest-mypy (>=0.9.1)", "pytest-ruff"] [metadata] -lock-version = "1.1" +lock-version = "2.0" python-versions = "^3.9" content-hash = "cf9482db6e504a38e3044e26a6b145e6fb4295936e19a6226e9b6dcbc2ba3270" - -[metadata.files] -appnope = [] -asttokens = [] -certifi = [] -cffi = [] -charset-normalizer = [] -click = [] -colorama = [] -comm = [] -contourpy = [] -cycler = [] -debugpy = [] -decorator = [] -docutils = [] -exceptiongroup = [] -executing = [] -ezkl = [] -filelock = [] -fonttools = [] -fsspec = [] -idna = [] -importlib-metadata = [] -importlib-resources = [] -iniconfig = [] -ipykernel = [] -ipython = [] -jedi = [] -jinja2 = [ - {file = "Jinja2-3.1.2-py3-none-any.whl", hash = "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"}, - {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, -] -jupyter-client = [] -jupyter-core = [] -kiwisolver = [] -markupsafe = [] -matplotlib = [] -matplotlib-inline = [] -mpmath = [] -nest-asyncio = [] -networkx = [] -numpy = [] -nvidia-cublas-cu12 = [] -nvidia-cuda-cupti-cu12 = [] -nvidia-cuda-nvrtc-cu12 = [] -nvidia-cuda-runtime-cu12 = [] -nvidia-cudnn-cu12 = [] -nvidia-cufft-cu12 = [] -nvidia-curand-cu12 = [] -nvidia-cusolver-cu12 = [] -nvidia-cusparse-cu12 = [] -nvidia-nccl-cu12 = [] -nvidia-nvjitlink-cu12 = [] -nvidia-nvtx-cu12 = [] -onnx = [] -packaging = [] -parso = [] -pexpect = [] -pillow = [] -platformdirs = [] -pluggy = [] -prompt-toolkit = [] -protobuf = [] -psutil = [] -ptyprocess = [] -pure-eval = [] -pycparser = [ - {file = "pycparser-2.21-py2.py3-none-any.whl", hash = "sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9"}, - {file = "pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"}, -] -pygments = [] -pyparsing = [] -pytest = [] -python-dateutil = [] -pywin32 = [] -pyzmq = [] -requests = [] -scipy = [] -six = [ - {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, - {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, -] -stack-data = [] -statistics = [] -sympy = [] -tomli = [ - {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, - {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, -] -torch = [] -tornado = [] -traitlets = [] -triton = [] -typing-extensions = [] -urllib3 = [] -wcwidth = [] -zipp = [] diff --git a/tests/conftest.py b/tests/conftest.py index e7eb8ec..e2f4979 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -9,10 +9,19 @@ def error() -> float: @pytest.fixture def column_0(): - return torch.tensor([3.0, 4.5, 1.0, 2.0, 7.5, 6.4, 5.5]) + return torch.tensor([3.0, 4.5, 1.0, 2.0, 7.5, 6.4, 5.5, 6.4]) @pytest.fixture def column_1(): - return torch.tensor([2.7, 3.3, 1.1, 2.2, 3.8, 8.2, 4.4]) + return torch.tensor([2.7, 3.3, 1.1, 2.2, 3.8, 8.2, 4.4, 3.8]) + +@pytest.fixture +def column_2(): + return torch.tensor([1.3, 4.3, 1.1, 2.2, 8.8, 7.0, 2.0, 3.3]) + + +@pytest.fixture +def scales(): + return [3] diff --git a/tests/helpers.py b/tests/helpers.py index be0a703..cc27ecb 100644 --- a/tests/helpers.py +++ b/tests/helpers.py @@ -1,14 +1,34 @@ import json -from typing import Type +from typing import Type, Sequence, Optional from pathlib import Path import torch -from zkstats.core import prover_gen_settings, verifier_setup, prover_gen_proof, verifier_verify -from zkstats.computation import IModel, IsResultPrecise +from zkstats.core import prover_gen_settings, setup, prover_gen_proof, verifier_verify, get_data_commitment_maps +from zkstats.computation import IModel -def compute(basepath: Path, data: list[torch.Tensor], model: Type[IModel]) -> IsResultPrecise: +DEFAULT_POSSIBLE_SCALES = list(range(20)) + + +def data_to_file(data_path: Path, data: list[torch.Tensor]) -> dict[str, list]: + column_names = [f"columns_{i}" for i in range(len(data))] + column_to_data = { + column: d.tolist() + for column, d in zip(column_names, data) + } + with open(data_path, "w") as f: + json.dump(column_to_data, f) + return column_to_data + + +def compute( + basepath: Path, + data: list[torch.Tensor], + model: Type[IModel], + scales_params: Optional[Sequence[int]] = None, + selected_columns_params: Optional[list[str]] = None, +) -> None: sel_data_path = basepath / "comb_data.json" model_path = basepath / "model.onnx" settings_path = basepath / "settings.json" @@ -19,25 +39,36 @@ def compute(basepath: Path, data: list[torch.Tensor], model: Type[IModel]) -> Is vk_path = basepath / "model.vk" data_path = basepath / "data.json" - columns = [f"columns_{i}" for i in range(len(data))] - column_to_data = { - column: d.tolist() - for column, d in zip(columns, data) - } - with open(data_path, "w") as f: - json.dump(column_to_data, f) + column_to_data = data_to_file(data_path, data) + # If selected_columns_params is None, select all columns + if selected_columns_params is None: + selected_columns = list(column_to_data.keys()) + else: + selected_columns = selected_columns_params + + scales: Sequence[int] | str + scales_for_commitments: Sequence[int] + if scales_params is None: + scales = 'default' + scales_for_commitments = DEFAULT_POSSIBLE_SCALES + else: + scales = scales_params + scales_for_commitments = scales_params + + commitment_maps = get_data_commitment_maps(data_path, scales_for_commitments) prover_gen_settings( data_path=data_path, - col_array=list(column_to_data.keys()), + selected_columns=selected_columns, sel_data_path=str(sel_data_path), prover_model=model, prover_model_path=str(model_path), - scale="default", + scale=scales, mode="resources", settings_path=str(settings_path), ) - verifier_setup( + + setup( str(model_path), str(compiled_model_path), str(settings_path), @@ -57,4 +88,15 @@ def compute(basepath: Path, data: list[torch.Tensor], model: Type[IModel]) -> Is str(proof_path), str(settings_path), str(vk_path), + selected_columns, + commitment_maps, ) + + +# Error tolerance between zkstats python implementation and python statistics module +ERROR_ZKSTATS_STATISTICS = 0.0001 + + +def assert_result(expected_result: float, circuit_result: float): + assert abs(expected_result - circuit_result) < ERROR_ZKSTATS_STATISTICS * expected_result, f"{expected_result=} != {circuit_result=}, {ERROR_ZKSTATS_STATISTICS=}" + diff --git a/tests/test_computation.py b/tests/test_computation.py index e899785..3193bf6 100644 --- a/tests/test_computation.py +++ b/tests/test_computation.py @@ -1,31 +1,131 @@ import statistics import torch -import torch -from zkstats.computation import State, create_model -from zkstats.ops import Mean, Median +import pytest + +from zkstats.computation import State, computation_to_model +from zkstats.ops import ( + Mean, + Median, + GeometricMean, + HarmonicMean, + Mode, + PStdev, + PVariance, + Stdev, + Variance, + Covariance, + Correlation, + Regression, +) -from .helpers import compute +from .helpers import assert_result, compute -def computation(state: State, x: list[torch.Tensor]): - out_0 = state.median(x[0]) - out_1 = state.median(x[1]) - return state.mean(torch.tensor([out_0, out_1]).reshape(1,-1,1)) +def nested_computation(state: State, args: list[torch.Tensor]): + x = args[0] + y = args[1] + z = args[2] + out_0 = state.median(x) + out_1 = state.geometric_mean(y) + out_2 = state.harmonic_mean(x) + out_3 = state.mode(x) + out_4 = state.pstdev(y) + out_5 = state.pvariance(z) + out_6 = state.stdev(x) + out_7 = state.variance(y) + out_8 = state.covariance(x, y) + out_9 = state.correlation(y, z) + out_10 = state.linear_regression(x, y) + slope, intercept = out_10[0][0][0], out_10[0][1][0] + reshaped = torch.tensor([ + out_0, + out_1, + out_2, + out_3, + out_4, + out_5, + out_6, + out_7, + out_8, + out_9, + slope, + intercept, + ]).reshape(1,-1,1) + out_10 = state.mean(reshaped) + return out_10 -def test_computation(tmp_path, column_0: torch.Tensor, column_1: torch.Tensor, error: float): - state, model = create_model(computation, error) - compute(tmp_path, [column_0, column_1], model) - assert state.current_op_index == 3 +@pytest.mark.parametrize( + "error", + [0.1], +) +def test_nested_computation(tmp_path, column_0: torch.Tensor, column_1: torch.Tensor, column_2: torch.Tensor, error, scales): + state, model = computation_to_model(nested_computation, error) + x, y, z = column_0, column_1, column_2 + compute(tmp_path, [x, y, z], model, scales) + # There are 11 ops in the computation + assert state.current_op_index == 12 ops = state.ops - op0 = ops[0] - assert isinstance(op0, Median) - assert op0.result == statistics.median(column_0) - op1 = ops[1] - assert isinstance(op1, Median) - assert op1.result == statistics.median(column_1) - op2 = ops[2] - assert isinstance(op2, Mean) - assert op2.result == statistics.mean([op0.result.tolist(), op1.result.tolist()]) + op_0 = ops[0] + assert isinstance(op_0, Median) + out_0 = statistics.median(x.tolist()) + assert_result(torch.tensor(out_0), op_0.result) + + op_1 = ops[1] + assert isinstance(op_1, GeometricMean) + out_1 = statistics.geometric_mean(y.tolist()) + assert_result(torch.tensor(out_1), op_1.result) + + op_2 = ops[2] + assert isinstance(op_2, HarmonicMean) + out_2 = statistics.harmonic_mean(x.tolist()) + assert_result(torch.tensor(out_2), op_2.result) + + op_3 = ops[3] + assert isinstance(op_3, Mode) + out_3 = statistics.mode(x.tolist()) + assert_result(torch.tensor(out_3), op_3.result) + + op_4 = ops[4] + assert isinstance(op_4, PStdev) + out_4 = statistics.pstdev(y.tolist()) + assert_result(torch.tensor(out_4), op_4.result) + + op_5 = ops[5] + assert isinstance(op_5, PVariance) + out_5 = statistics.pvariance(z.tolist()) + assert_result(torch.tensor(out_5), op_5.result) + + op_6 = ops[6] + assert isinstance(op_6, Stdev) + out_6 = statistics.stdev(x.tolist()) + assert_result(torch.tensor(out_6), op_6.result) + + op_7 = ops[7] + assert isinstance(op_7, Variance) + out_7 = statistics.variance(y.tolist()) + assert_result(torch.tensor(out_7), op_7.result) + + op_8 = ops[8] + assert isinstance(op_8, Covariance) + out_8 = statistics.covariance(x.tolist(), y.tolist()) + assert_result(torch.tensor(out_8), op_8.result) + + op_9 = ops[9] + assert isinstance(op_9, Correlation) + out_9 = statistics.correlation(y.tolist(), z.tolist()) + assert_result(torch.tensor(out_9), op_9.result) + + op_10 = ops[10] + assert isinstance(op_10, Regression) + out_10 = statistics.linear_regression(x.tolist(), y.tolist()) + assert op_10.result.shape == (1, 2, 1) + assert_result(op_10.result[0][0][0], out_10.slope) + assert_result(op_10.result[0][1][0], out_10.intercept) + + op_11 = ops[11] + assert isinstance(op_11, Mean) + out_11 = statistics.mean([out_0, out_1, out_2, out_3, out_4, out_5, out_6, out_7, out_8, out_9, out_10.slope, out_10.intercept]) + assert_result(torch.tensor(out_11), op_11.result) diff --git a/tests/test_core.py b/tests/test_core.py index 7fc65ad..b9492c3 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -1,10 +1,67 @@ -import pytest - -# FIXME: it's just a template to be replaced with real tests later -@pytest.mark.parametrize("test_input,expected", [ - ("3+5", 8), - ("2+4", 6), - ("6*9", 54), -]) -def test_eval(test_input, expected): - assert eval(test_input) == expected \ No newline at end of file +import torch + +from zkstats.core import get_data_commitment_maps +from zkstats.computation import computation_to_model + +from .helpers import data_to_file, compute + + +def test_get_data_commitment_maps(tmp_path, column_0, column_1, scales): + data_path = tmp_path / "data.json" + # data_json is a mapping[column_name, column_data] + # { + # "columns_0": [1, 2, 3, 4, 5], + # "columns_1": [6, 7, 8, 9, 10], + # } + data_json = data_to_file(data_path, [column_0, column_1]) + # commitment_maps is a mapping[scale -> mapping[column_name, commitment_hex]] + # { + # scale_0: { + # "columns_0": "0x...", + # "columns_1": "0x...", + # }, + # scale_1: { + # "columns_0": "0x...", + # "columns_1": "0x...", + # } + # } + commitment_maps = get_data_commitment_maps(data_path, scales) + + assert len(commitment_maps) == len(scales) + for scale, commitment_map in commitment_maps.items(): + assert int(scale) in scales + assert len(commitment_map) == len(data_json) + for column_name, commitment_hex in commitment_map.items(): + assert column_name in data_json + # Check if the commitment is a valid hex number + int(commitment_hex, 16) + + +def test_get_data_commitment_maps_hardcoded(tmp_path): + """ + This test is to check if the data commitment scheme doesn't change + """ + data_path = tmp_path / "data.json" + column_0 = torch.tensor([3.0, 4.5, 1.0, 2.0, 7.5, 6.4, 5.5]) + column_1 = torch.tensor([2.7, 3.3, 1.1, 2.2, 3.8, 8.2, 4.4]) + data_to_file(data_path, [column_0, column_1]) + scales = [2, 3] + commitment_maps = get_data_commitment_maps(data_path, scales) + expected = {"2": {'columns_0': '0x28b5eeb5aeee399c8c50c5b323def9a1aec1deee5b9ae193463d4f9b8893a9a3', 'columns_1': '0x0523c85a86dddd810418e8376ce6d9d21b1b7363764c9c31b575b8ffbad82987'}, "3": {'columns_0': '0x0a2906522d3f902ff4a63ee8aed4d2eaec0b14f71c51eb9557bd693a4e7d77ad', 'columns_1': '0x2dac7fee1efb9eb955f52494a26a3fba6d1fa28cc819e598cb0af31a47b29d08'}} + assert commitment_maps == expected + + +def test_integration_select_partial_columns(tmp_path, column_0, column_1, error, scales): + data_path = tmp_path / "data.json" + data_json = data_to_file(data_path, [column_0, column_1]) + columns = list(data_json.keys()) + assert len(columns) == 2 + # Select only the first column from two columns + selected_columns = [columns[0]] + + def simple_computation(state, x): + return state.mean(x[0]) + + _, model = computation_to_model(simple_computation, error) + # gen settings, setup, prove, verify + compute(tmp_path, [column_0, column_1], model, scales, selected_columns) diff --git a/tests/test_ops.py b/tests/test_ops.py index cebe4a1..fc32899 100644 --- a/tests/test_ops.py +++ b/tests/test_ops.py @@ -1,36 +1,78 @@ -import json from typing import Type, Callable -from dataclasses import dataclass -from pathlib import Path import statistics import pytest import torch -from zkstats.computation import Operation, Mean, Median, IModel, IsResultPrecise +from zkstats.ops import Mean, Median, GeometricMean, HarmonicMean, Mode, PStdev, PVariance, Stdev, Variance, Covariance, Correlation, Operation, Regression +from zkstats.computation import IModel, IsResultPrecise -from .helpers import compute +from .helpers import compute, assert_result + + +# Error tolerance between circuit and python implementation +ERROR_CIRCUIT_DEFAULT = 0.01 +ERROR_CIRCUIT_STRICT = 0.0001 +ERROR_CIRCUIT_RELAXED = 0.1 + + +@pytest.mark.parametrize( + "op_type, expected_func, error", + [ + (Mean, statistics.mean, ERROR_CIRCUIT_DEFAULT), + (Median, statistics.median, ERROR_CIRCUIT_DEFAULT), + (GeometricMean, statistics.geometric_mean, ERROR_CIRCUIT_DEFAULT), + # Be more tolerant for HarmonicMean + (HarmonicMean, statistics.harmonic_mean, ERROR_CIRCUIT_RELAXED), + # Be less tolerant for Mode + (Mode, statistics.mode, ERROR_CIRCUIT_STRICT), + (PStdev, statistics.pstdev, ERROR_CIRCUIT_DEFAULT), + (PVariance, statistics.pvariance, ERROR_CIRCUIT_DEFAULT), + (Stdev, statistics.stdev, ERROR_CIRCUIT_DEFAULT), + (Variance, statistics.variance, ERROR_CIRCUIT_DEFAULT), + ] +) +def test_ops_1_parameter(tmp_path, column_0: torch.Tensor, error: float, op_type: Type[Operation], expected_func: Callable[[list[float]], float], scales: list[float]): + run_test_ops(tmp_path, op_type, expected_func, error, scales, [column_0]) @pytest.mark.parametrize( - "op_type, expected_func", + "op_type, expected_func, error", [ - (Mean, statistics.mean), - (Median, statistics.median), + (Covariance, statistics.covariance, ERROR_CIRCUIT_RELAXED), + (Correlation, statistics.correlation, ERROR_CIRCUIT_RELAXED), ] ) -def test_1d(tmp_path, column_0: torch.Tensor, error: float, op_type: Type[Operation], expected_func: Callable[[list[float]], float]): - op = op_type.create(column_0, error) - expected_res = expected_func(column_0.tolist()) - assert expected_res == op.result - model = op_to_model(op) - compute(tmp_path, [column_0], model) +def test_ops_2_parameters(tmp_path, column_0: torch.Tensor, column_1: torch.Tensor, error: float, op_type: Type[Operation], expected_func: Callable[[list[float]], float], scales: list[float]): + run_test_ops(tmp_path, op_type, expected_func, error, scales, [column_0, column_1]) -def op_to_model(op: Operation) -> Type[IModel]: +@pytest.mark.parametrize( + "error", + [ + ERROR_CIRCUIT_RELAXED + ] +) +def test_linear_regression(tmp_path, column_0: torch.Tensor, column_1: torch.Tensor, error: float, scales: list[float]): + expected_res = statistics.linear_regression(column_0.tolist(), column_1.tolist()) + columns = [column_0, column_1] + regression = Regression.create(columns, error) + # shape = [1, 2, 1] + actual_res = regression.result + assert_result(expected_res.slope, actual_res[0][0][0]) + assert_result(expected_res.intercept, actual_res[0][1][0]) class Model(IModel): - def forward(self, x: list[torch.Tensor]) -> tuple[IsResultPrecise, torch.Tensor]: - return op.ezkl(x), op.result - return Model + def forward(self, *x: list[torch.Tensor]) -> tuple[IsResultPrecise, torch.Tensor]: + return regression.ezkl(x), regression.result + compute(tmp_path, columns, Model, scales) +def run_test_ops(tmp_path, op_type: Type[Operation], expected_func: Callable[[list[float]], float], error: float, scales: list[float], columns: list[torch.Tensor]): + op = op_type.create(columns, error) + expected_res = expected_func(*[column.tolist() for column in columns]) + # Check expected_res and op.result are close, within ERROR_STATISTICS + assert_result(expected_res, op.result) + class Model(IModel): + def forward(self, *x: list[torch.Tensor]) -> tuple[IsResultPrecise, torch.Tensor]: + return op.ezkl(x), op.result + compute(tmp_path, columns, Model, scales) diff --git a/zkstats/cli.py b/zkstats/cli.py index 37eabf6..b7c6249 100644 --- a/zkstats/cli.py +++ b/zkstats/cli.py @@ -1,3 +1,4 @@ +import json import os import sys from typing import Type @@ -6,7 +7,8 @@ import click import torch -from .core import prover_gen_proof, prover_gen_settings, verifier_setup, verifier_verify, gen_data_commitment +from .core import prover_gen_proof, prover_gen_settings, setup, verifier_verify, get_data_commitment_maps +from .computation import computation_to_model cwd = os.getcwd() # TODO: Should make this configurable @@ -18,9 +20,11 @@ vk_path = f"{output_dir}/model.vk" proof_path = f"{output_dir}/model.pf" settings_path = f"{output_dir}/settings.json" -srs_path = f"{output_dir}/kzg.srs" witness_path = f"{output_dir}/witness.json" comb_data_path = f"{output_dir}/comb_data.json" +commitment_maps_path = f"{output_dir}/commitment_maps.json" + +default_possible_scales = list(range(20)) @click.group() @@ -29,13 +33,19 @@ def cli(): @click.command() -@click.argument('model_path') +@click.argument('computation_path') @click.argument('data_path') -def prove(model_path: str, data_path: str): - model = load_model(model_path) - print("Loaded model:", model) +def prove(computation_path: str, data_path: str): + computation = load_computation(computation_path) + _, model = computation_to_model(computation) + commitment_maps = get_data_commitment_maps(data_path, default_possible_scales) + with open(commitment_maps_path, "w") as f: + json.dump(commitment_maps, f) + # By default select all columns + selected_columns = list(commitment_maps[str(default_possible_scales[0])].keys()) prover_gen_settings( - [data_path], + data_path, + selected_columns, comb_data_path, model, model_onnx_path, @@ -43,8 +53,8 @@ def prove(model_path: str, data_path: str): "resources", settings_path, ) - verifier_setup( - model_path, + setup( + model_onnx_path, compiled_model_path, settings_path, vk_path, @@ -61,41 +71,46 @@ def prove(model_path: str, data_path: str): pk_path, ) print("Finished generating proof") - verifier_verify(proof_path, settings_path, vk_path) + verifier_verify(proof_path, settings_path, vk_path, selected_columns, commitment_maps) print("Proof path:", proof_path) print("Settings path:", settings_path) print("Verification key path:", vk_path) + print("Commitment maps path:", commitment_maps_path) @click.command() -@click.argument('proof_path') -@click.argument('settings_path') -@click.argument('vk_path') -def verify(proof_path: str, settings_path: str, vk_path: str): - verifier_verify(proof_path, settings_path, vk_path) +def verify(): + # Load commitment maps + with open(commitment_maps_path, "r") as f: + commitment_maps = json.load(f) + # By default select all columns + selected_columns = list(commitment_maps[str(default_possible_scales[0])].keys()) + verifier_verify(proof_path, settings_path, vk_path, selected_columns, commitment_maps) @click.command() @click.argument('data_path') -def commit(data_path: str): +@click.argument('scale_str') +def commit(data_path: str, scale_str: str): """ Now we just assume the data is a list of floats. We should be able to """ - commitment = gen_data_commitment(data_path) - print("Commitment:", hex(commitment)) + scale = int(scale_str) + commitment_maps = get_data_commitment_maps(data_path, [scale]) + print("Commitment maps:", commitment_maps) def main(): cli() -def load_model(module_path: str) -> Type[torch.nn.Module]: +def load_computation(module_path: str) -> Type[torch.nn.Module]: """ Load a model from a Python module. """ # FIXME: This is unsafe since malicious code can be executed - model_name = "Model" + model_name = "computation" module_name = os.path.splitext(os.path.basename(module_path))[0] spec = importlib.util.spec_from_file_location(module_name, module_path) module = importlib.util.module_from_spec(spec) @@ -103,10 +118,9 @@ def load_model(module_path: str) -> Type[torch.nn.Module]: spec.loader.exec_module(module) try: - cls = getattr(module, model_name) + return getattr(module, model_name) except AttributeError: - raise ImportError(f"class {model_name} does not exist in {module_name}") - return cls + raise ImportError(f"{model_name=} does not exist in {module_name=}") # Register commands diff --git a/zkstats/computation.py b/zkstats/computation.py index 45a1654..5a70647 100644 --- a/zkstats/computation.py +++ b/zkstats/computation.py @@ -4,7 +4,22 @@ import torch from torch import nn -from .ops import Operation, Mean, Median, IsResultPrecise +from .ops import ( + Operation, + Mean, + Median, + GeometricMean, + HarmonicMean, + Mode, + PStdev, + PVariance, + Stdev, + Variance, + Covariance, + Correlation, + Regression, + IsResultPrecise, +) DEFAULT_ERROR = 0.01 @@ -31,15 +46,91 @@ def __init__(self, error: float) -> None: def set_ready_for_exporting_onnx(self) -> None: self.current_op_index = 0 - def mean(self, X: torch.Tensor) -> tuple[IsResultPrecise, torch.Tensor]: - return self._call_op(X, Mean) - - def median(self, X: torch.Tensor) -> tuple[IsResultPrecise, torch.Tensor]: - return self._call_op(X, Median) - - # TODO: add the rest of the operations - - def _call_op(self, x: torch.Tensor, op_type: Type[Operation]) -> Union[torch.Tensor, tuple[IsResultPrecise, torch.Tensor]]: + def mean(self, x: torch.Tensor) -> torch.Tensor: + """ + Calculate the mean of the input tensor. The behavior should conform to + [statistics.mean](https://docs.python.org/3/library/statistics.html#statistics.mean) in Python standard library. + """ + return self._call_op([x], Mean) + + def median(self, x: torch.Tensor) -> torch.Tensor: + """ + Calculate the median of the input tensor. The behavior should conform to + [statistics.median](https://docs.python.org/3/library/statistics.html#statistics.median) in Python standard library. + """ + return self._call_op([x], Median) + + def geometric_mean(self, x: torch.Tensor) -> torch.Tensor: + """ + Calculate the geometric mean of the input tensor. The behavior should conform to + [statistics.geometric_mean](https://docs.python.org/3/library/statistics.html#statistics.geometric_mean) in Python standard library. + """ + return self._call_op([x], GeometricMean) + + def harmonic_mean(self, x: torch.Tensor) -> torch.Tensor: + """ + Calculate the harmonic mean of the input tensor. The behavior should conform to + [statistics.harmonic_mean](https://docs.python.org/3/library/statistics.html#statistics.harmonic_mean) in Python standard library. + """ + return self._call_op([x], HarmonicMean) + + def mode(self, x: torch.Tensor) -> torch.Tensor: + """ + Calculate the mode of the input tensor. The behavior should conform to + [statistics.mode](https://docs.python.org/3/library/statistics.html#statistics.mode) in Python standard library. + """ + return self._call_op([x], Mode) + + def pstdev(self, x: torch.Tensor) -> torch.Tensor: + """ + Calculate the population standard deviation of the input tensor. The behavior should conform to + [statistics.pstdev](https://docs.python.org/3/library/statistics.html#statistics.pstdev) in Python standard library. + """ + return self._call_op([x], PStdev) + + def pvariance(self, x: torch.Tensor) -> torch.Tensor: + """ + Calculate the population variance of the input tensor. The behavior should conform to + [statistics.pvariance](https://docs.python.org/3/library/statistics.html#statistics.pvariance) in Python standard library. + """ + return self._call_op([x], PVariance) + + def stdev(self, x: torch.Tensor) -> torch.Tensor: + """ + Calculate the sample standard deviation of the input tensor. The behavior should conform to + [statistics.stdev](https://docs.python.org/3/library/statistics.html#statistics.stdev) in Python standard library. + """ + return self._call_op([x], Stdev) + + def variance(self, x: torch.Tensor) -> torch.Tensor: + """ + Calculate the sample variance of the input tensor. The behavior should conform to + [statistics.variance](https://docs.python.org/3/library/statistics.html#statistics.variance) in Python standard library. + """ + return self._call_op([x], Variance) + + def covariance(self, x: torch.Tensor, y: torch.Tensor) -> torch.Tensor: + """ + Calculate the covariance of x and y. The behavior should conform to + [statistics.covariance](https://docs.python.org/3/library/statistics.html#statistics.covariance) in Python standard library. + """ + return self._call_op([x, y], Covariance) + + def correlation(self, x: torch.Tensor, y: torch.Tensor) -> torch.Tensor: + """ + Calculate the correlation of x and y. The behavior should conform to + [statistics.correlation](https://docs.python.org/3/library/statistics.html#statistics.correlation) in Python standard library. + """ + return self._call_op([x, y], Correlation) + + def linear_regression(self, x: torch.Tensor, y: torch.Tensor) -> torch.Tensor: + """ + Calculate the linear regression of x and y. The behavior should conform to + [statistics.linear_regression](https://docs.python.org/3/library/statistics.html#statistics.linear_regression) in Python standard library. + """ + return self._call_op([x, y], Regression) + + def _call_op(self, x: list[torch.Tensor], op_type: Type[Operation]) -> Union[torch.Tensor, tuple[IsResultPrecise, torch.Tensor]]: if self.current_op_index is None: op = op_type.create(x, self.error) self.ops.append(op) @@ -95,18 +186,21 @@ def forward(self, *x: list[torch.Tensor]) -> tuple[IsResultPrecise, torch.Tensor ... - # An computation function. Example: # def computation(state: State, x: list[torch.Tensor]): # out_0 = state.median(x[0]) # out_1 = state.median(x[1]) # return state.mean(torch.tensor([out_0, out_1]).reshape(1,-1,1)) -TComputation = Callable[[State, list[torch.Tensor]], tuple[IsResultPrecise, torch.Tensor]] +TComputation = Callable[[State, list[torch.Tensor]], torch.Tensor] -def create_model(computation: TComputation, error: float = DEFAULT_ERROR) -> tuple[State, Type[IModel]]: +def computation_to_model(computation: TComputation, error: float = DEFAULT_ERROR) -> tuple[State, Type[IModel]]: """ Create a torch model from a `computation` function defined by user + :param computation: A function that takes a State and a list of torch.Tensor, and returns a torch.Tensor + :param error: The error tolerance for the computation. + :return: A tuple of State and Model. The Model is a torch model that can be used for exporting to onnx. + State is a container for intermediate results of computation, which can be useful when debugging. """ state = State(error) @@ -117,5 +211,4 @@ def preprocess(self, x: list[torch.Tensor]) -> None: def forward(self, *x: list[torch.Tensor]) -> tuple[IsResultPrecise, torch.Tensor]: return computation(state, x) - return state, Model diff --git a/zkstats/core.py b/zkstats/core.py index 73b5f76..09af412 100644 --- a/zkstats/core.py +++ b/zkstats/core.py @@ -1,8 +1,5 @@ -import sys -import importlib.util -from typing import Type +from typing import Type, Sequence, Mapping, Union, Literal import torch -from torch import Tensor import ezkl import os import numpy as np @@ -12,85 +9,37 @@ from zkstats.computation import IModel -# Export model -def _export_onnx(model: Type[IModel], data_tensor_array: list[Tensor], model_loc: str): - circuit = model() - try: - circuit.preprocess(data_tensor_array) - except AttributeError: - pass - - device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") - - # print(device) - - circuit.to(device) - - # Flips the neural net into inference mode - circuit.eval() - input_names = [] - dynamic_axes = {} - - data_tensor_tuple = () - for i in range(len(data_tensor_array)): - data_tensor_tuple += (data_tensor_array[i],) - input_index = "input"+str(i+1) - input_names.append(input_index) - dynamic_axes[input_index] = {0 : 'batch_size'} - dynamic_axes["output"] = {0 : 'batch_size'} - - # Export the model - torch.onnx.export(circuit, # model being run - data_tensor_tuple, # model input (or a tuple for multiple inputs) - model_loc, # where to save the model (can be a file or file-like object) - export_params=True, # store the trained parameter weights inside the model file - opset_version=11, # the ONNX version to export the model to - do_constant_folding=True, # whether to execute constant folding for optimization - input_names = input_names, # the model's input names - output_names = ['output'], # the model's output names - dynamic_axes=dynamic_axes) - -# =================================================================================================== -# =================================================================================================== - -# mode is either "accuracy" or "resources" -# sel_data = selected column from data that will be used for computation -def _gen_settings(sel_data_path, onnx_filename, scale, mode, settings_filename): - print("==== Generate & Calibrate Setting ====") - # Set input to be Poseidon Hash, and param of computation graph to be public - # Poseidon is not homomorphic additive, maybe consider Pedersens or Dory commitment. - gip_run_args = ezkl.PyRunArgs() - gip_run_args.input_visibility = "hashed" # matrix and generalized inverse commitments - gip_run_args.output_visibility = "public" # no parameters used - gip_run_args.param_visibility = "private" # should be Tensor(True)--> to enforce arbitrary data in w - - # generate settings - ezkl.gen_settings(onnx_filename, settings_filename, py_run_args=gip_run_args) - if scale =="default": - ezkl.calibrate_settings( - sel_data_path, onnx_filename, settings_filename, mode) - else: - ezkl.calibrate_settings( - sel_data_path, onnx_filename, settings_filename, mode, scales = scale) - - assert os.path.exists(settings_filename) - assert os.path.exists(sel_data_path) - assert os.path.exists(onnx_filename) - f_setting = open(settings_filename, "r") - print("scale: ", scale) - print("setting: ", f_setting.read()) # =================================================================================================== # =================================================================================================== -# Here dummy_sel_data_path is redundant, but here to use process_data -def verifier_define_calculation(dummy_data_path, col_array, dummy_sel_data_path, verifier_model, verifier_model_path): - dummy_data_tensor_array = _process_data(dummy_data_path, col_array, dummy_sel_data_path) +def verifier_define_calculation( + dummy_data_path: str, + selected_columns: list[str], + # TODO: Here dummy_sel_data_path is redundant, but here to use process_data + dummy_sel_data_path: str, + verifier_model: Type[IModel], + verifier_model_path: str, +) -> None: + """ + Export the verifier model to an ONNX file. + :param dummy_data_path: path to the dummy data file + :param selected_columns: column names selected for computation + :param dummy_sel_data_path: path to store generated preprocessed dummy data file + :param verifier_model: the verifier model class + :param verifier_model_path: path to store the generated verifier model file in onnx format + """ + dummy_data_tensor_array = _process_data(dummy_data_path, selected_columns, dummy_sel_data_path) # export onnx file _export_onnx(verifier_model, dummy_data_tensor_array, verifier_model_path) -# given data file (whole json table), create a dummy data file with randomized data -def create_dummy(data_path, dummy_data_path): + +# TODO: Should only need the shape of data instead of the real dataset, since +# users (verifiers) call this function and they don't have the real data. +def create_dummy(data_path: str, dummy_data_path: str) -> None: + """ + Create a dummy data file with randomized data based on the shape of the original data. + """ data = json.loads(open(data_path, "r").read()) # assume all columns have same number of rows dummy_data ={} @@ -103,26 +52,30 @@ def create_dummy(data_path, dummy_data_path): # =================================================================================================== # =================================================================================================== -# New version -def _process_data(data_path, col_array, sel_data_path) -> list[Tensor]: - data_tensor_array=[] - sel_data = [] - data_onefile = json.loads(open(data_path, "r").read()) - - for col in col_array: - data = data_onefile[col] - data_tensor = torch.tensor(data, dtype = torch.float64) - data_tensor_array.append(torch.reshape(data_tensor, (1,-1,1))) - sel_data.append(data) - # Serialize data into file: - # sel_data comes from `data` - json.dump(dict(input_data = sel_data), open(sel_data_path, 'w')) - return data_tensor_array - -# we decide to not have sel_data_path as parameter since a bit redundant parameter. -def prover_gen_settings(data_path, col_array, sel_data_path, prover_model,prover_model_path, scale, mode, settings_path): - data_tensor_array = _process_data(data_path,col_array, sel_data_path) +def prover_gen_settings( + data_path: str, + selected_columns: list[str], + sel_data_path: list[str], + prover_model: Type[IModel], + prover_model_path: str, + scale: Union[list[int], Literal["default"]], + # TODO: should be able to hardcode mode to "resources" or make it default? + mode: Union[Literal["resources"], Literal["accuracy"]], + settings_path: str, +): + """ + Generate and calibrate settings for the given model and data. + :param data_path: path to the data file + :param selected_columns: column names selected for computation + :param sel_data_path: path to store generated preprocessed data file + :param prover_model: the prover model class + :param prover_model_path: path to store the generated prover model file in onnx format + :param scale: the scale to use for the computation. It's a list of integer or "default" for default scale + :param mode: the mode to use for the computation. It's either "resources" or "accuracy" + :param settings_path: path to store the generated settings file + """ + data_tensor_array = _process_data(data_path, selected_columns, sel_data_path) # export onnx file _export_onnx(prover_model, data_tensor_array, prover_model_path) @@ -132,11 +85,24 @@ def prover_gen_settings(data_path, col_array, sel_data_path, prover_model,prover # =================================================================================================== # =================================================================================================== -# Here prover can concurrently call this since all params are public to get pk. -# Here write as verifier function to emphasize that verifier must calculate its own vk to be sure -def verifier_setup(verifier_model_path, verifier_compiled_model_path, settings_path, vk_path, pk_path): +def setup( + model_path: str, + compiled_model_path: str, + settings_path: str, + vk_path: str, + pk_path: str, +) -> None: + """ + Compile the verifier model and generate the verification key and public key. + + :param model_path: path to the model file in onnx format + :param compiled_model_path: path to store the generated compiled verifier model + :param settings_path: path to the settings file + :param vk_path: path to store the generated verification key file + :param pk_path: path to store the generated public key file + """ # compile circuit - res = ezkl.compile_circuit(verifier_model_path, verifier_compiled_model_path, settings_path) + res = ezkl.compile_circuit(model_path, compiled_model_path, settings_path) assert res == True # srs path @@ -146,7 +112,7 @@ def verifier_setup(verifier_model_path, verifier_compiled_model_path, settings_p print("==== setting up ezkl ====") start_time = time.time() res = ezkl.setup( - verifier_compiled_model_path, + compiled_model_path, vk_path, pk_path) end_time = time.time() @@ -161,40 +127,27 @@ def verifier_setup(verifier_model_path, verifier_compiled_model_path, settings_p # =================================================================================================== # =================================================================================================== -def prover_setup( - data_path, - col_array, - sel_data_path, - prover_model, - prover_model_path, - prover_compiled_model_path, - scale, - mode, - settings_path, - vk_path, - pk_path, -): - data_tensor_array = _process_data(data_path, col_array, sel_data_path) - - # export onnx file - _export_onnx(prover_model, data_tensor_array, prover_model_path) - # gen + calibrate setting - _gen_settings(sel_data_path, prover_model_path, scale, mode, settings_path) - verifier_setup(prover_model_path, prover_compiled_model_path, settings_path, vk_path, pk_path) - - def prover_gen_proof( - prover_model_path, - sel_data_path, - witness_path, - prover_compiled_model_path, - settings_path, - proof_path, - pk_path -): - print("!@# compiled_model exists?", os.path.isfile(prover_compiled_model_path)) + prover_model_path: str, + sel_data_path: str, + witness_path: str, + prover_compiled_model_path: str, + settings_path: str, + proof_path: str, + pk_path: str, +) -> None: + """ + Generate a proof for the given model and data. + + :param prover_model_path: path to the prover model file in onnx format + :param sel_data_path: path to the preprocessed data file + :param witness_path: path to store the generated witness file + :param prover_compiled_model_path: path to store the generated compiled prover model + :param settings_path: path to the settings file + :param proof_path: path to store the generated proof file + :param pk_path: path to the public key file + """ res = ezkl.compile_circuit(prover_model_path, prover_compiled_model_path, settings_path) - print("!@# compiled_model exists?", os.path.isfile(prover_compiled_model_path)) assert res == True # now generate the witness file print('==== Generating Witness ====') @@ -224,35 +177,206 @@ def prover_gen_proof( print(f"Time gen prf: {time_gen_prf} seconds") assert os.path.isfile(proof_path) + # =================================================================================================== # =================================================================================================== -def verifier_verify(proof_path, settings_path, vk_path): - # enforce boolean statement to be true - settings = json.load(open(settings_path)) - output_scale = settings['model_output_scales'] - # First check the zk proof is valid +# commitment_map is a mapping[column_name, commitment_hex] +# E.g. { +# "columns_0": "0x...", +# ... +# } +TCommitmentMap = Mapping[str, str] +# commitment_maps is a mapping[scale, mapping[column_name, commitment_hex]] +# E.g. { +# scale_0: { +# "columns_0": "0x...", +# ... +# }, +# ... +# } +TCommitmentMaps = Mapping[str, TCommitmentMap] + +def verifier_verify(proof_path: str, settings_path: str, vk_path: str, selected_columns: Sequence[str], commitment_maps: TCommitmentMaps) -> torch.Tensor: + """ + Verify the proof and return the result. + + :param proof_path: path to the proof file + :param settings_path: path to the settings file + :param vk_path: path to the verification key file + :param expected_data_commitments: expected data commitments for columns. The i-th commitment should + be stored in `expected_data_commitments[i]`. + """ + + # 1. First check the zk proof is valid res = ezkl.verify( proof_path, settings_path, vk_path, ) + # TODO: change asserts to return boolean assert res == True - # Then, parse the proof and check the boolean output is true (i.e. the first output is 1.0), - # to make sure the result is within error bounds. - proof = json.load(open(proof_path)) - num_inputs = len(settings['model_input_scales']) - proof_instance = proof["instances"] - print("prf instances: ", proof_instance) - print("num_inputs: ", num_inputs) - # First output is the boolean result - is_valid = ezkl.vecu64_to_float(proof_instance[0][num_inputs], output_scale[0]) - assert is_valid == 1.0 - - # Print the parsed proof - print("proof boolean: ", is_valid) - # TODO: Should we check if the number of outputs is 2? - outputs = proof_instance[0][num_inputs+1:] - for i, v in enumerate(outputs): - print("proof result",i,":", ezkl.vecu64_to_float(v, output_scale[1])) + # 2. Check if input/output are correct + with open(settings_path) as f: + settings = json.load(f) + input_scales = settings['model_input_scales'] + output_scales = settings['model_output_scales'] + with open(proof_path) as f: + proof = json.load(f) + proof_instance = proof["instances"][0] + inputs = proof_instance[:len(input_scales)] + outputs = proof_instance[len(input_scales):] + len_inputs = len(inputs) + len_outputs = len(outputs) + # `instances` = input commitments + params (which is 0 in our case) + output + assert len(proof_instance) == len_inputs + len_outputs, f"lengths mismatch: {len(proof_instance)=}, {len_inputs=}, {len_outputs=}" + + # 2.1 Check input commitments + # All inputs are hashed so are commitments + assert len_inputs == len(selected_columns), f"lengths mismatch: {len_inputs=}, {len(selected_columns)=}" + # Sanity check + # Check each commitment is correct + for i, (actual_commitment, column_name) in enumerate(zip(inputs, selected_columns)): + actual_commitment_str = ezkl.vecu64_to_felt(actual_commitment) + input_scale = input_scales[i] + expected_commitment = commitment_maps[str(input_scale)][column_name] + assert actual_commitment_str == expected_commitment, f"commitment mismatch: {i=}, {actual_commitment_str=}, {expected_commitment=}" + + # 2.2 Check output is correct + # - is a tuple (is_in_error, result) + # - is_valid is True + # Sanity check + is_in_error = ezkl.vecu64_to_float(outputs[0], output_scales[0]) + assert is_in_error == 1.0, f"result is not within error" + return ezkl.vecu64_to_float(outputs[1], output_scales[1]) + + +# =================================================================================================== +# =================================================================================================== + +def get_data_commitment_maps(data_path: str, scales: Sequence[int]) -> TCommitmentMaps: + """ + Generate a data commitment map for each scale. Commitments for different scales are required + so that verifiers can verify proofs with different scales. + + :param data_path: path to the data file. The data file should be a JSON file with the following format: + { + "column_0": [number_0, number_1, ...], + "column_1": [number_0, number_1, ...], + } + :param scales: a list of scales to use for the commitments. + :return: a map from scale to column name to commitment. + """ + with open(data_path) as f: + data_json = json.load(f) + return { + str(scale): { + k: _get_commitment_for_column(v, scale) for k, v in data_json.items() + } for scale in scales + } + + +# =================================================================================================== +# Private functions +# =================================================================================================== + +def _export_onnx(model: Type[IModel], data_tensor_array: list[torch.Tensor], model_loc: str) -> None: + circuit = model() + try: + circuit.preprocess(data_tensor_array) + except AttributeError: + pass + + device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") + + # print(device) + + circuit.to(device) + + # Flips the neural net into inference mode + circuit.eval() + input_names = [] + dynamic_axes = {} + + data_tensor_tuple = () + for i in range(len(data_tensor_array)): + data_tensor_tuple += (data_tensor_array[i],) + input_index = "input"+str(i+1) + input_names.append(input_index) + dynamic_axes[input_index] = {0 : 'batch_size'} + dynamic_axes["output"] = {0 : 'batch_size'} + + # Export the model + torch.onnx.export(circuit, # model being run + data_tensor_tuple, # model input (or a tuple for multiple inputs) + model_loc, # where to save the model (can be a file or file-like object) + export_params=True, # store the trained parameter weights inside the model file + opset_version=11, # the ONNX version to export the model to + do_constant_folding=True, # whether to execute constant folding for optimization + input_names = input_names, # the model's input names + output_names = ['output'], # the model's output names + dynamic_axes=dynamic_axes) + + +# mode is either "accuracy" or "resources" +# sel_data = selected column from data that will be used for computation +def _gen_settings( + sel_data_path: str, + onnx_filename: str, + scale: Union[list[int], Literal["default"]], + mode: Union[Literal["resources"], Literal["accuracy"]], + settings_filename: str, +) -> None: + print("==== Generate & Calibrate Setting ====") + # Set input to be Poseidon Hash, and param of computation graph to be public + # 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 shown + gip_run_args.output_visibility = "public" # should be `(torch.Tensor(1.0), output)` + + # generate settings + ezkl.gen_settings(onnx_filename, settings_filename, py_run_args=gip_run_args) + if scale =="default": + ezkl.calibrate_settings( + sel_data_path, onnx_filename, settings_filename, mode) + else: + assert isinstance(scale, list) + ezkl.calibrate_settings( + sel_data_path, onnx_filename, settings_filename, mode, scales = scale) + + assert os.path.exists(settings_filename) + assert os.path.exists(sel_data_path) + assert os.path.exists(onnx_filename) + f_setting = open(settings_filename, "r") + print("scale: ", scale) + print("setting: ", f_setting.read()) + + +def _process_data( + data_path: str, + col_array: list[str], + sel_data_path: list[str], + ) -> list[torch.Tensor]: + data_tensor_array=[] + sel_data = [] + data_onefile = json.loads(open(data_path, "r").read()) + + for col in col_array: + data = data_onefile[col] + data_tensor = torch.tensor(data, dtype = torch.float32) + data_tensor_array.append(torch.reshape(data_tensor, (1,-1,1))) + sel_data.append(data) + # Serialize data into file: + # sel_data comes from `data` + json.dump(dict(input_data = sel_data), open(sel_data_path, 'w')) + return data_tensor_array + + +def _get_commitment_for_column(column: list[float], scale: int) -> str: + # Ref: https://github.com/zkonduit/ezkl/discussions/633 + serialized_data = [ezkl.float_to_vecu64(x, scale) for x in column] + res_poseidon_hash = ezkl.poseidon_hash(serialized_data) + res_hex = ezkl.vecu64_to_felt(res_poseidon_hash[0]) + return res_hex \ No newline at end of file diff --git a/zkstats/ops.py b/zkstats/ops.py index 8d4c641..f4fe3bc 100644 --- a/zkstats/ops.py +++ b/zkstats/ops.py @@ -1,4 +1,5 @@ from abc import ABC, abstractmethod, abstractclassmethod +import statistics import numpy as np import torch @@ -9,24 +10,25 @@ class Operation(ABC): def __init__(self, result: torch.Tensor, error: float): - self.result = result + self.result = torch.nn.Parameter(data=result, requires_grad=False) self.error = error @abstractclassmethod - def create(cls, x: torch.Tensor, error: float) -> 'Operation': + def create(cls, x: list[torch.Tensor], error: float) -> 'Operation': ... @abstractmethod - def ezkl(self, x: torch.Tensor) -> IsResultPrecise: + def ezkl(self, x: list[torch.Tensor]) -> IsResultPrecise: ... class Mean(Operation): @classmethod - def create(cls, x: torch.Tensor, error: float) -> 'Mean': - return cls(torch.mean(x), error) + def create(cls, x: list[torch.Tensor], error: float) -> 'Mean': + return cls(torch.mean(x[0]), error) - def ezkl(self, x: torch.Tensor) -> IsResultPrecise: + def ezkl(self, x: list[torch.Tensor]) -> IsResultPrecise: + x = x[0] size = x.size() return torch.abs(torch.sum(x)-size[1]*self.result)<=torch.abs(self.error*size[1]*self.result) @@ -52,30 +54,32 @@ def __init__(self, x: torch.Tensor, error: float): super().__init__(torch.tensor(np.median(x_1d)), error) sorted_x = np.sort(x_1d) len_x = len(x_1d) - self.lower = torch.tensor(sorted_x[int(len_x/2)-1]) - self.upper = torch.tensor(sorted_x[int(len_x/2)]) + self.lower = torch.nn.Parameter(data = torch.tensor(sorted_x[int(len_x/2)-1], dtype = torch.float32), requires_grad=False) + self.upper = torch.nn.Parameter(data = torch.tensor(sorted_x[int(len_x/2)], dtype = torch.float32), requires_grad=False) + @classmethod - def create(cls, x: torch.Tensor, error: float) -> 'Median': - return cls(x, error) + def create(cls, x: list[torch.Tensor], error: float) -> 'Median': + return cls(x[0], error) - def ezkl(self, X: torch.Tensor) -> IsResultPrecise: + def ezkl(self, x: list[torch.Tensor]) -> IsResultPrecise: + x = x[0] # since within 1%, we regard as same value - count_less = torch.sum((X < (1-self.error)*self.result).double()) - count_equal = torch.sum((torch.abs(X-self.result)<=torch.abs(self.error*self.result)).double()) - size = X.size()[1] - half_len = torch.floor(torch.div(size, 2)) - + count_less = torch.sum((x < self.result).float()) + count_equal = torch.sum((x==self.result).float()) + len = x.size()[1] + half_len = torch.floor(torch.div(len, 2)) + # not support modulo yet - less_cons = count_lesshalf_len # For count_equal == 0 - lower_exist = torch.sum((torch.abs(X-self.lower)<=torch.abs(self.error*self.lower)).double())>0 - lower_cons = torch.sum((X>(1+self.error)*self.lower).double())==half_len - upper_exist = torch.sum((torch.abs(X-self.upper)<=torch.abs(self.error*self.upper)).double())>0 - upper_cons = torch.sum((X<(1-self.error)*self.upper).double())==half_len - bound = count_less==half_len + lower_exist = torch.sum((x==self.lower).float())>0 + lower_cons = torch.sum((x>self.lower).float())==half_len + upper_exist = torch.sum((x==self.upper).float())>0 + upper_cons = torch.sum((x IsResultPrecise: return torch.where(count_equal==0, median_out_cons, median_in_cons) +class GeometricMean(Operation): + @classmethod + def create(cls, x: list[torch.Tensor], error: float) -> 'GeometricMean': + x_1d = to_1d(x[0]) + result = torch.exp(torch.mean(torch.log(x_1d))) + return cls(result, error) + + def ezkl(self, x: list[torch.Tensor]) -> IsResultPrecise: + # Assume x is [1, n, 1] + x = x[0] + size = x.size()[1] + return torch.abs((torch.log(self.result)*size)-torch.sum(torch.log(x)))<=size*torch.log(torch.tensor(1+self.error)) + + +class HarmonicMean(Operation): + @classmethod + def create(cls, x: list[torch.Tensor], error: float) -> 'HarmonicMean': + x_1d = to_1d(x[0]) + result = torch.div(1.0,torch.mean(torch.div(1.0, x_1d))) + return cls(result, error) + + def ezkl(self, x: list[torch.Tensor]) -> IsResultPrecise: + # Assume x is [1, n, 1] + x = x[0] + size = x.size()[1] + return torch.abs((self.result*torch.sum(torch.div(1.0, x))) - size)<=torch.abs(self.error*size) + + +def mode_within(data_array: torch.Tensor, error: float) -> torch.Tensor: + """ + Find the mode (the single most common data point) from the data_array. + :param data_array: The data array. + :param error: The error that allows the data point to be considered as the same. + For example, if error = 0.01, then 0.999 and 1.001 are considered as the same. + """ + max_sum_freq = 0 + mode = data_array[0] + + for check_val in set(data_array): + sum_freq = sum(1 for ele in data_array if abs(ele - check_val) <= abs(error * check_val)) + if sum_freq > max_sum_freq: + mode = check_val + max_sum_freq = sum_freq + return mode + + +class Mode(Operation): + @classmethod + def create(cls, x: list[torch.Tensor], error: float) -> 'Mode': + x_1d = to_1d(x[0]) + # FIXME: Now hardcode 0.01 to be acceptable range of dataset that + # we want to consider it the same, totally different from our result_error + # This value doesn't depend on any scale, but on the dataset itself. + result = torch.tensor(mode_within(x_1d, 0.01)) + return cls(result, error) + + def ezkl(self, x: list[torch.Tensor]) -> IsResultPrecise: + # Assume x is [1, n, 1] + x = x[0] + size = x.size()[1] + count_equal = torch.sum((torch.abs(x-self.result)<=torch.abs(self.error*self.result)).float()) + _result = torch.tensor([ + torch.sum((torch.abs(x-ele[0])<=torch.abs(self.error*ele[0])).float())<= count_equal + for ele in x[0] + ], dtype = torch.float32) + return torch.sum(_result) == size + + +class PStdev(Operation): + def __init__(self, x: torch.Tensor, error: float): + x_1d = to_1d(x) + self.data_mean = torch.nn.Parameter(data=torch.mean(x_1d), requires_grad=False) + result = torch.sqrt(torch.var(x_1d, correction = 0)) + super().__init__(result, error) + + @classmethod + def create(cls, x: list[torch.Tensor], error: float) -> 'PStdev': + return cls(x[0], error) + + def ezkl(self, x: list[torch.Tensor]) -> IsResultPrecise: + x = x[0] + size = x.size()[1] + x_mean_cons = torch.abs(torch.sum(x)-size*(self.data_mean))<=torch.abs(self.error*size*self.data_mean) + return torch.logical_and( + torch.abs(torch.sum((x-self.data_mean)*(x-self.data_mean))-self.result*self.result*size)<=torch.abs(2*self.error*self.result*self.result*size),x_mean_cons + ) + + +class PVariance(Operation): + def __init__(self, x: torch.Tensor, error: float): + x_1d = to_1d(x) + self.data_mean = torch.nn.Parameter(data=torch.mean(x_1d), requires_grad=False) + result = torch.var(x_1d, correction = 0) + super().__init__(result, error) + + @classmethod + def create(cls, x: list[torch.Tensor], error: float) -> 'PVariance': + return cls(x[0], error) + + def ezkl(self, x: list[torch.Tensor]) -> IsResultPrecise: + x = x[0] + size = x.size()[1] + x_mean_cons = torch.abs(torch.sum(x)-size*(self.data_mean))<=torch.abs(self.error*size*self.data_mean) + return torch.logical_and( + torch.abs(torch.sum((x-self.data_mean)*(x-self.data_mean))-self.result*size)<=torch.abs(self.error*self.result*size), x_mean_cons + ) + + +class Stdev(Operation): + def __init__(self, x: torch.Tensor, error: float): + x_1d = to_1d(x) + self.data_mean = torch.nn.Parameter(data=torch.mean(x_1d), requires_grad=False) + result = torch.sqrt(torch.var(x_1d, correction = 1)) + super().__init__(result, error) + + @classmethod + def create(cls, x: list[torch.Tensor], error: float) -> 'Stdev': + return cls(x[0], error) + + def ezkl(self, x: list[torch.Tensor]) -> IsResultPrecise: + x = x[0] + size = x.size()[1] + x_mean_cons = torch.abs(torch.sum(x)-size*(self.data_mean))<=torch.abs(self.error*size*self.data_mean) + return torch.logical_and( + torch.abs(torch.sum((x-self.data_mean)*(x-self.data_mean))-self.result*self.result*(size - 1))<=torch.abs(2*self.error*self.result*self.result*(size - 1)), x_mean_cons + ) + + +class Variance(Operation): + def __init__(self, x: torch.Tensor, error: float): + x_1d = to_1d(x) + self.data_mean = torch.nn.Parameter(data=torch.mean(x_1d), requires_grad=False) + result = torch.var(x_1d, correction = 1) + super().__init__(result, error) + + @classmethod + def create(cls, x: list[torch.Tensor], error: float) -> 'Variance': + return cls(x[0], error) + + def ezkl(self, x: list[torch.Tensor]) -> IsResultPrecise: + x = x[0] + size = x.size()[1] + x_mean_cons = torch.abs(torch.sum(x)-size*(self.data_mean))<=torch.abs(self.error*size*self.data_mean) + return torch.logical_and( + torch.abs(torch.sum((x-self.data_mean)*(x-self.data_mean))-self.result*(size - 1))<=torch.abs(self.error*self.result*(size - 1)), x_mean_cons + ) + + +class Covariance(Operation): + def __init__(self, x: torch.Tensor, y: torch.Tensor, error: float): + x_1d = to_1d(x) + y_1d = to_1d(y) + x_1d_list = x_1d.tolist() + y_1d_list = y_1d.tolist() + + self.x_mean = torch.nn.Parameter(data=torch.tensor(statistics.mean(x_1d_list), dtype = torch.float32), requires_grad=False) + self.y_mean = torch.nn.Parameter(data=torch.tensor(statistics.mean(y_1d_list), dtype = torch.float32), requires_grad=False) + result = torch.tensor(statistics.covariance(x_1d_list, y_1d_list), dtype = torch.float32) + + super().__init__(result, error) + + @classmethod + def create(cls, x: list[torch.Tensor], error: float) -> 'Covariance': + return cls(x[0], x[1], error) + + def ezkl(self, args: list[torch.Tensor]) -> IsResultPrecise: + x, y = args[0], args[1] + size_x = x.size()[1] + size_y = y.size()[1] + x_mean_cons = torch.abs(torch.sum(x)-size_x*(self.x_mean))<=torch.abs(self.error*size_x*self.x_mean) + y_mean_cons = torch.abs(torch.sum(y)-size_y*(self.y_mean))<=torch.abs(self.error*size_y*self.y_mean) + return torch.logical_and( + torch.logical_and(x_mean_cons,y_mean_cons), + torch.abs(torch.sum((x-self.x_mean)*(y-self.y_mean))-(size_x-1)*self.result) torch.Tensor: + size_x = x.size()[1] + x_mean_cons = torch.abs(torch.sum(x)-size_x*(x_mean))<=torch.abs(error*size_x*x_mean) + return (torch.logical_and(torch.abs(torch.sum((x-x_mean)*(x-x_mean))-x_std*x_std*(size_x-1))<=torch.abs(2*error*x_std*x_std*(size_x-1)),x_mean_cons),x_std) + + +def covariance(x: torch.Tensor, y: torch.Tensor, cov: torch.Tensor, x_mean: torch.Tensor, y_mean: torch.Tensor, error: float) -> torch.Tensor: + size_x = x.size()[1] + size_y = y.size()[1] + x_mean_cons = torch.abs(torch.sum(x)-size_x*(x_mean))<=torch.abs(error*size_x*(x_mean)) + y_mean_cons = torch.abs(torch.sum(y)-size_y*(y_mean))<=torch.abs(error*size_y*(y_mean)) + return (torch.logical_and(torch.logical_and(x_mean_cons,y_mean_cons), torch.abs(torch.sum((x-x_mean)*(y-y_mean))-(size_x-1)*(cov)) 'Correlation': + return cls(args[0], args[1], error) + + def ezkl(self, args: list[torch.Tensor]) -> IsResultPrecise: + x, y = args[0], args[1] + bool1, cov = covariance(x, y, self.cov, self.x_mean, self.y_mean, self.error) + bool2, x_std = stdev(x, self.x_std, self.x_mean, self.error) + bool3, y_std = stdev(y, self.y_std, self.y_mean, self.error) + bool4 = torch.abs(cov - self.result*x_std*y_std)<=self.error*cov + return torch.logical_and(torch.logical_and(bool1, bool2),torch.logical_and(bool3, bool4)) + + +def stacked_x(args: list[float]): + return np.column_stack((*args, np.ones_like(args[0]))) + + +class Regression(Operation): + def __init__(self, xs: list[torch.Tensor], y: torch.Tensor, error: float): + x_1ds = [to_1d(i).tolist() for i in xs] + y_1d = to_1d(y).tolist() + + x_one = stacked_x(x_1ds) + result_1d = np.matmul(np.matmul(np.linalg.inv(np.matmul(x_one.transpose(), x_one)), x_one.transpose()), y_1d) + result = torch.tensor(result_1d, dtype = torch.float32).reshape(1, -1, 1) + super().__init__(result, error) + + @classmethod + def create(cls, args: list[torch.Tensor], error: float) -> 'Regression': + xs = args[:-1] + y = args[-1] + return cls(xs, y, error) -# TODO: add the rest of the operations + def ezkl(self, args: list[torch.Tensor]) -> IsResultPrecise: + # infer y from the last parameter + y = args[-1] + x_one = torch.cat((*args[:-1], torch.ones_like(args[0])), dim=2) + x_t = torch.transpose(x_one, 1, 2) + return torch.sum(torch.abs(x_t @ x_one @ self.result - x_t @ y)) <= self.error * torch.sum(torch.abs(x_t @ y))