From dffbfa3fc154235ff7691b3852bd44f5445bb852 Mon Sep 17 00:00:00 2001 From: rudy-6-4 Date: Wed, 21 Aug 2024 11:37:44 +0200 Subject: [PATCH] chore: fix p_error simulation only in Concrete side - new concrete version: 2.8.0rc3.dev20240820 - update licenses - add a FIXME to align with the Concrete's simulation fix --- deps_licenses/licenses_linux_user.txt | 2 +- deps_licenses/licenses_linux_user.txt.md5 | 2 +- deps_licenses/licenses_mac_intel_user.txt | 2 +- deps_licenses/licenses_mac_intel_user.txt.md5 | 2 +- deps_licenses/licenses_mac_silicon_user.txt | 2 +- .../licenses_mac_silicon_user.txt.md5 | 2 +- poetry.lock | 30 +++++++++---------- pyproject.toml | 2 +- tests/torch/test_compile_torch.py | 3 ++ tests/torch/test_hybrid_converter.py | 2 +- 10 files changed, 26 insertions(+), 23 deletions(-) diff --git a/deps_licenses/licenses_linux_user.txt b/deps_licenses/licenses_linux_user.txt index 93b190697..746f931bb 100644 --- a/deps_licenses/licenses_linux_user.txt +++ b/deps_licenses/licenses_linux_user.txt @@ -6,7 +6,7 @@ brevitas, 0.10.2, UNKNOWN certifi, 2024.6.2, Mozilla Public License 2.0 (MPL 2.0) charset-normalizer, 3.3.2, MIT License coloredlogs, 15.0.1, MIT License -concrete-python, 2.7.0.dev20240802, BSD-3-Clause +concrete-python, 2.8.0rc3.dev20240820, BSD-3-Clause dependencies, 2.0.1, BSD License dill, 0.3.8, BSD License filelock, 3.15.3, The Unlicense (Unlicense) diff --git a/deps_licenses/licenses_linux_user.txt.md5 b/deps_licenses/licenses_linux_user.txt.md5 index 22746f919..a8d8b21ec 100644 --- a/deps_licenses/licenses_linux_user.txt.md5 +++ b/deps_licenses/licenses_linux_user.txt.md5 @@ -1 +1 @@ -6ea5ce643148e3d97848133185cdaeda +f07036c8072f32a26aa79e5e4bbd9c32 diff --git a/deps_licenses/licenses_mac_intel_user.txt b/deps_licenses/licenses_mac_intel_user.txt index 1f2bb941d..822e58c8f 100644 --- a/deps_licenses/licenses_mac_intel_user.txt +++ b/deps_licenses/licenses_mac_intel_user.txt @@ -6,7 +6,7 @@ brevitas, 0.10.2, UNKNOWN certifi, 2024.6.2, Mozilla Public License 2.0 (MPL 2.0) charset-normalizer, 3.3.2, MIT License coloredlogs, 15.0.1, MIT License -concrete-python, 2.7.0.dev20240802, BSD-3-Clause +concrete-python, 2.8.0rc3.dev20240820, BSD-3-Clause dependencies, 2.0.1, BSD License dill, 0.3.8, BSD License filelock, 3.15.3, The Unlicense (Unlicense) diff --git a/deps_licenses/licenses_mac_intel_user.txt.md5 b/deps_licenses/licenses_mac_intel_user.txt.md5 index 22746f919..a8d8b21ec 100644 --- a/deps_licenses/licenses_mac_intel_user.txt.md5 +++ b/deps_licenses/licenses_mac_intel_user.txt.md5 @@ -1 +1 @@ -6ea5ce643148e3d97848133185cdaeda +f07036c8072f32a26aa79e5e4bbd9c32 diff --git a/deps_licenses/licenses_mac_silicon_user.txt b/deps_licenses/licenses_mac_silicon_user.txt index 8f7da5509..a60e4ae52 100644 --- a/deps_licenses/licenses_mac_silicon_user.txt +++ b/deps_licenses/licenses_mac_silicon_user.txt @@ -6,7 +6,7 @@ brevitas, 0.10.2, UNKNOWN certifi, 2024.6.2, Mozilla Public License 2.0 (MPL 2.0) charset-normalizer, 3.3.2, MIT License coloredlogs, 15.0.1, MIT License -concrete-python, 2.7.0.dev20240802, BSD-3-Clause +concrete-python, 2.8.0rc3.dev20240820, BSD-3-Clause dependencies, 2.0.1, BSD License dill, 0.3.8, BSD License filelock, 3.15.3, The Unlicense (Unlicense) diff --git a/deps_licenses/licenses_mac_silicon_user.txt.md5 b/deps_licenses/licenses_mac_silicon_user.txt.md5 index 22746f919..a8d8b21ec 100644 --- a/deps_licenses/licenses_mac_silicon_user.txt.md5 +++ b/deps_licenses/licenses_mac_silicon_user.txt.md5 @@ -1 +1 @@ -6ea5ce643148e3d97848133185cdaeda +f07036c8072f32a26aa79e5e4bbd9c32 diff --git a/poetry.lock b/poetry.lock index 9408c8c5c..f1cd90bf9 100644 --- a/poetry.lock +++ b/poetry.lock @@ -766,23 +766,23 @@ test = ["pytest"] [[package]] name = "concrete-python" -version = "2.7.0.dev20240802" +version = "2.8.0rc3.dev20240820" description = "A state-of-the-art homomorphic encryption framework" optional = false python-versions = ">=3.8" files = [ - {file = "concrete_python-2.7.0.dev20240802-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a8d58a38d0363b0c2343310cda03f38b3d9d16269a8935cdf6f1099bd0caf8a9"}, - {file = "concrete_python-2.7.0.dev20240802-cp310-cp310-macosx_11_0_x86_64.whl", hash = "sha256:a60faf65b98af0f0bddbc63a2328fd4c17e443bdf09f553e27cd40c0ad197d1c"}, - {file = "concrete_python-2.7.0.dev20240802-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:cc68884729d2b038e5df16836a907de1a8aa5b9be802f25a0773eb45db24128a"}, - {file = "concrete_python-2.7.0.dev20240802-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:387232afea72a0bbf33d278549517dbd7901ac39ef589ec6bf3e1a0a773d68ef"}, - {file = "concrete_python-2.7.0.dev20240802-cp311-cp311-macosx_11_0_x86_64.whl", hash = "sha256:7d37a4d814e963df4150f8619b3e5fd07b904e9546c85879a20a7e9c75ea62b6"}, - {file = "concrete_python-2.7.0.dev20240802-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:5768e92b843ba08bb8209879342e397dae02aaeaf333bf0e032c8a3393351974"}, - {file = "concrete_python-2.7.0.dev20240802-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:e4688c0a2f7e4e6a53c28221a6541c7236d488fc5dbd91fc37caa54e865b3e2a"}, - {file = "concrete_python-2.7.0.dev20240802-cp38-cp38-macosx_11_0_x86_64.whl", hash = "sha256:a906ba67094b524909b88182f6812475a5b292a59957d4b46b0e27dbdc972535"}, - {file = "concrete_python-2.7.0.dev20240802-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:367f29ae55d7c33f7036bc2a0c6afc0f5be504ae8e15dd41f6efb0dfd43a39ad"}, - {file = "concrete_python-2.7.0.dev20240802-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:dcd285242fbbe968dc0d28efabcccc4b0df7eb4b8f9d1c0d86ebe39e288cc79c"}, - {file = "concrete_python-2.7.0.dev20240802-cp39-cp39-macosx_11_0_x86_64.whl", hash = "sha256:99dfc32ab76810c2fc8013a2cc4d5ab7db4cafb7ce96570f4433e845b8b0a90f"}, - {file = "concrete_python-2.7.0.dev20240802-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:2c281405f666cea59079a53f77e86d1245662bf45b334a44bb823db547e561c0"}, + {file = "concrete_python-2.8.0rc3.dev20240820-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:eb0819adf98a985e189e88aeb653318ce0d2d7b9a89da98478819b5481a9689a"}, + {file = "concrete_python-2.8.0rc3.dev20240820-cp310-cp310-macosx_11_0_x86_64.whl", hash = "sha256:b50d513b9daf474bc7ed93ab5d23e3846ff94c53090cfecdb75bb9309e963f32"}, + {file = "concrete_python-2.8.0rc3.dev20240820-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:da0deb0c83338a70f102f3136989a80694eea5b0913452fc33a1b6fc0a91f380"}, + {file = "concrete_python-2.8.0rc3.dev20240820-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:b14510814e0576e2ec7b7cc4cfaea2308946c59697ce5239141619a0528ac572"}, + {file = "concrete_python-2.8.0rc3.dev20240820-cp311-cp311-macosx_11_0_x86_64.whl", hash = "sha256:d00ebec3f157c6f23edc5dc91e6dc59036c026e7b7d942b8eb321ca42f738c8d"}, + {file = "concrete_python-2.8.0rc3.dev20240820-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:70a37bb1e1b02c3da20b8bd95fd0b584d8fce5acceef84925ac0ccc3b9a3f5d6"}, + {file = "concrete_python-2.8.0rc3.dev20240820-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:27eaf7562ed690b820ff50c22c980eba6bc239ba6277c2784bfff4fa3846b6ca"}, + {file = "concrete_python-2.8.0rc3.dev20240820-cp38-cp38-macosx_11_0_x86_64.whl", hash = "sha256:2a4a26ddd76bbeaeed93af3fe096ac3e90168a7d6544c033dc53fec8f9521900"}, + {file = "concrete_python-2.8.0rc3.dev20240820-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:746da66e0110b28e656ce957fd61ca94fa52c79b97ebf91848d13e9effe002d2"}, + {file = "concrete_python-2.8.0rc3.dev20240820-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:b9eb3b5473b5217c6e99fc0f7eddbb886b423e35071676c4490080b601edda15"}, + {file = "concrete_python-2.8.0rc3.dev20240820-cp39-cp39-macosx_11_0_x86_64.whl", hash = "sha256:3a5dc5d059e7b6e3e86004a4000cbb6721fef90c9c553fc283ed8c9d55675ac2"}, + {file = "concrete_python-2.8.0rc3.dev20240820-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:c1d619db33a1b96dcb5c3d436be55b9c98cad925d800c2f2f1eb89e802e53cea"}, ] [package.dependencies] @@ -3098,7 +3098,6 @@ files = [ {file = "msgpack-1.0.8-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5fbb160554e319f7b22ecf530a80a3ff496d38e8e07ae763b9e82fadfe96f273"}, {file = "msgpack-1.0.8-cp39-cp39-win32.whl", hash = "sha256:f9af38a89b6a5c04b7d18c492c8ccf2aee7048aff1ce8437c4683bb5a1df893d"}, {file = "msgpack-1.0.8-cp39-cp39-win_amd64.whl", hash = "sha256:ed59dd52075f8fc91da6053b12e8c89e37aa043f8986efd89e61fae69dc1b011"}, - {file = "msgpack-1.0.8-py3-none-any.whl", hash = "sha256:24f727df1e20b9876fa6e95f840a2a2651e34c0ad147676356f4bf5fbb0206ca"}, {file = "msgpack-1.0.8.tar.gz", hash = "sha256:95c02b0e27e706e48d0e5426d1710ca78e0f0628d6e89d5b5a5b91a5f12274f3"}, ] @@ -3661,6 +3660,7 @@ description = "Nvidia JIT LTO Library" optional = false python-versions = ">=3" files = [ + {file = "nvidia_nvjitlink_cu12-12.5.82-py3-none-manylinux2014_aarch64.whl", hash = "sha256:98103729cc5226e13ca319a10bbf9433bbbd44ef64fe72f45f067cacc14b8d27"}, {file = "nvidia_nvjitlink_cu12-12.5.82-py3-none-manylinux2014_x86_64.whl", hash = "sha256:f9b37bc5c8cf7509665cb6ada5aaa0ce65618f2332b7d3e78e9790511f111212"}, {file = "nvidia_nvjitlink_cu12-12.5.82-py3-none-win_amd64.whl", hash = "sha256:e782564d705ff0bf61ac3e1bf730166da66dd2fe9012f111ede5fc49b64ae697"}, ] @@ -7070,4 +7070,4 @@ test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", [metadata] lock-version = "2.0" python-versions = ">=3.8.1,<3.11" -content-hash = "a79e8fa17df9216b2331611a1cbb233ea4cd2481beaf5fb76224b240b2c1cf93" +content-hash = "c8700a1a81483292d4e1933f2d1fc1fe0a3f6c94d92bf359b7f1bd3132d6904e" diff --git a/pyproject.toml b/pyproject.toml index 522529268..907aa46e3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,7 +38,7 @@ python = ">=3.8.1,<3.11" # source, so we should only use this for Concrete Python's non-public releases # https://python-poetry.org/docs/1.7/repositories#project-configuration # concrete-python = {version="==2.7.0", source = "zama-pypi-cpu"} -concrete-python = {version="==2.7.0.dev20240802", source = "zama-pypi-cpu"} +concrete-python = {version="==2.8.0rc3.dev20240820", source = "zama-pypi-cpu"} setuptools = "65.6.3" skops = {version = "0.5.0"} xgboost = "1.6.2" diff --git a/tests/torch/test_compile_torch.py b/tests/torch/test_compile_torch.py index 68c75c680..269966dcf 100644 --- a/tests/torch/test_compile_torch.py +++ b/tests/torch/test_compile_torch.py @@ -675,6 +675,9 @@ def test_compile_brevitas_qat( ) +# Update this test to align with Concrete's simulation fix. +# FIXME: https://github.com/zama-ai/concrete-ml-internal/issues/4578 +@pytest.mark.xfail @pytest.mark.parametrize( "model_class, expected_onnx_str", [ diff --git a/tests/torch/test_hybrid_converter.py b/tests/torch/test_hybrid_converter.py index bda439b2a..4d6f5df52 100644 --- a/tests/torch/test_hybrid_converter.py +++ b/tests/torch/test_hybrid_converter.py @@ -62,7 +62,7 @@ def run_hybrid_llm_test( try: hybrid_model.compile_model( inputs, - p_error=0.1, + p_error=10e-40, # compare precisely simulate and disable n_bits=9, rounding_threshold_bits=8, configuration=configuration,