diff --git a/Makefile b/Makefile index dd1996b82..ec2607314 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ OPEN_PR="true" # Force the installation of a Concrete Python version, which is very useful with nightly versions # /!\ WARNING /!\: This version should NEVER be a wildcard as it might create some # issues when trying to run it in the future. -CONCRETE_PYTHON_VERSION="concrete-python==2.7.0" +CONCRETE_PYTHON_VERSION="concrete-python==2.7.0.dev20240731" # Force the installation of Concrete Python's latest version, release-candidates included # CONCRETE_PYTHON_VERSION="$$(poetry run python \ @@ -59,6 +59,12 @@ setup_env: poetry run python -c "import skorch" || true # Details above poetry run python -c "from brevitas.core.scaling import AccumulatorAwareParameterPreScaling" || true # Details above + # For some issues with Mac Intel + if [[ $$(uname) == "Darwin" ]] && [[ $$(uname -m) == 'x86_64' ]]; then \ + poetry run pip uninstall brevitas -y; \ + poetry run pip install brevitas; \ + fi + .PHONY: sync_env # Synchronise the environment sync_env: if [[ $$(poetry --version) != "Poetry (version $(POETRY_VERSION))" ]];then \ diff --git a/deps_licenses/licenses_linux_user.txt b/deps_licenses/licenses_linux_user.txt index c65a35064..fbd933c3d 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, BSD-3-Clause +concrete-python, 2.7.0.dev20240731, 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 ae19e0c04..b3c161349 100644 --- a/deps_licenses/licenses_linux_user.txt.md5 +++ b/deps_licenses/licenses_linux_user.txt.md5 @@ -1 +1 @@ -787b1ddb8ddf395cb9c2fd08b57b99c0 +4c5946ebf8d2349587bb18874b83606e diff --git a/deps_licenses/licenses_mac_intel_user.txt b/deps_licenses/licenses_mac_intel_user.txt index 66c655689..d6bb77f10 100644 --- a/deps_licenses/licenses_mac_intel_user.txt +++ b/deps_licenses/licenses_mac_intel_user.txt @@ -1,10 +1,12 @@ Name, Version, License +Jinja2, 3.1.4, BSD License +MarkupSafe, 2.1.5, BSD License PyYAML, 6.0.1, MIT License -brevitas, 0.8.0, UNKNOWN +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, BSD-3-Clause +concrete-python, 2.7.0.dev20240731, BSD-3-Clause dependencies, 2.0.1, BSD License dill, 0.3.8, BSD License filelock, 3.15.3, The Unlicense (Unlicense) @@ -12,7 +14,7 @@ flatbuffers, 24.3.25, Apache Software License fsspec, 2024.6.0, BSD License huggingface-hub, 0.23.4, Apache Software License humanfriendly, 10.0, MIT License -hummingbird-ml, 0.4.8, MIT License +hummingbird-ml, 0.4.11, MIT License idna, 3.7, BSD License importlib_resources, 6.4.0, Apache Software License joblib, 1.4.2, BSD License @@ -41,10 +43,11 @@ skorch, 0.11.0, new BSD 3-Clause sympy, 1.12.1, BSD License tabulate, 0.8.10, MIT License threadpoolctl, 3.5.0, BSD License -torch, 1.13.1, BSD License +torch, 2.2.2, BSD License tqdm, 4.66.4, MIT License; Mozilla Public License 2.0 (MPL 2.0) -typing_extensions, 4.5.0, Python Software Foundation License +typing_extensions, 4.12.2, Python Software Foundation License tzdata, 2024.1, Apache Software License +unfoldNd, 0.2.2, MIT License urllib3, 2.2.2, MIT License xgboost, 1.6.2, Apache Software License z3-solver, 4.13.0.0, MIT License diff --git a/deps_licenses/licenses_mac_intel_user.txt.md5 b/deps_licenses/licenses_mac_intel_user.txt.md5 index b01182f0f..b3c161349 100644 --- a/deps_licenses/licenses_mac_intel_user.txt.md5 +++ b/deps_licenses/licenses_mac_intel_user.txt.md5 @@ -1 +1 @@ -1cde59339dad23a5ecae8ac1192e872e +4c5946ebf8d2349587bb18874b83606e diff --git a/deps_licenses/licenses_mac_silicon_user.txt b/deps_licenses/licenses_mac_silicon_user.txt index 324f50aa0..ea49e9295 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, BSD-3-Clause +concrete-python, 2.7.0.dev20240731, BSD-3-Clause dependencies, 2.0.1, BSD License dill, 0.3.8, BSD License filelock, 3.15.3, The Unlicense (Unlicense) @@ -51,4 +51,3 @@ unfoldNd, 0.2.2, MIT License urllib3, 2.2.2, MIT License xgboost, 1.6.2, Apache Software License z3-solver, 4.13.0.0, MIT License -zipp, 3.19.2, MIT License diff --git a/deps_licenses/licenses_mac_silicon_user.txt.md5 b/deps_licenses/licenses_mac_silicon_user.txt.md5 index ae19e0c04..b3c161349 100644 --- a/deps_licenses/licenses_mac_silicon_user.txt.md5 +++ b/deps_licenses/licenses_mac_silicon_user.txt.md5 @@ -1 +1 @@ -787b1ddb8ddf395cb9c2fd08b57b99c0 +4c5946ebf8d2349587bb18874b83606e diff --git a/poetry.lock b/poetry.lock index be718e266..ace8fccbd 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. [[package]] name = "aiohttp" @@ -766,23 +766,23 @@ test = ["pytest"] [[package]] name = "concrete-python" -version = "2.7.0" +version = "2.7.0.dev20240731" description = "A state-of-the-art homomorphic encryption framework" optional = false python-versions = ">=3.8" files = [ - {file = "concrete_python-2.7.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:05efb76ec4e6b6922bfb1b45ffb0ea89d6d01349a39e99c70f76f267876779c7"}, - {file = "concrete_python-2.7.0-cp310-cp310-macosx_11_0_x86_64.whl", hash = "sha256:5fff285dda24eaacbde0b81efa658b191920958933fb1c01aa001fa04464435a"}, - {file = "concrete_python-2.7.0-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:d28f4a6b74ec752214f544589ea5e0095c51f31feb961ce04c9161aed7fe0fd3"}, - {file = "concrete_python-2.7.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:61c1c50388057e59123d9a66697c944be88220c01f936d98f8741970e6455387"}, - {file = "concrete_python-2.7.0-cp311-cp311-macosx_11_0_x86_64.whl", hash = "sha256:ae7d70af82cb22938b2f3b3c3fea5dff840c0084cf5150d4cc272c9afd652d0b"}, - {file = "concrete_python-2.7.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:f770d473f51d5378869f351df50d63ceb5668d2743755ca1dac6be009948af80"}, - {file = "concrete_python-2.7.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:61721b517f35294d14edd41a5afe905ad72d2a5bbcf540ead374522ee2f4a605"}, - {file = "concrete_python-2.7.0-cp38-cp38-macosx_11_0_x86_64.whl", hash = "sha256:0d6f7c28529f4a83ce373b76839779a0be3c8a7c7069f8bd3f2235b84049266e"}, - {file = "concrete_python-2.7.0-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:ec7b911fc5c546b73d62a07150fdbafd819d94972749c63ce746eba820fc4292"}, - {file = "concrete_python-2.7.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ed13b050ce4c5e80105e34e848ec4da63ae9a2b257f53199f7bc5638c907136d"}, - {file = "concrete_python-2.7.0-cp39-cp39-macosx_11_0_x86_64.whl", hash = "sha256:a836384147b996870dfc18f5ce2bb14c013a1d6b7a9ac27c71767f18d829247a"}, - {file = "concrete_python-2.7.0-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:ac729b747a444d6efb0c13012a48902a471e920b8f0af3dfb03b057387d727f8"}, + {file = "concrete_python-2.7.0.dev20240731-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:559ed1b4f40bdab1c797db0221122fe83310766a49f663c842d8f86a4d5b69f3"}, + {file = "concrete_python-2.7.0.dev20240731-cp310-cp310-macosx_11_0_x86_64.whl", hash = "sha256:e0c5ca82b45c66fcd96745db4a0f5cff6c77ad5b91845cee1a87aa3e6a9f1b35"}, + {file = "concrete_python-2.7.0.dev20240731-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:8233ec23abe3355811de86c3ff53b788cb54f9a32c52dbeb11697f2347f7927c"}, + {file = "concrete_python-2.7.0.dev20240731-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ecbb190a3fd7a528b5486c594a8bd9277c6512309101e6c745eb068c41449c3b"}, + {file = "concrete_python-2.7.0.dev20240731-cp311-cp311-macosx_11_0_x86_64.whl", hash = "sha256:bfe8efc420efa812ff2c6ee9e3736c53218191ff3802df8cf8fb0ebc2b0f2eb1"}, + {file = "concrete_python-2.7.0.dev20240731-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:d0a2c3616f74eca2aec5678a1bac4a22c172ae7fd0b6b6d4eaca34d5f31fc800"}, + {file = "concrete_python-2.7.0.dev20240731-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:e555a8d7172a252130b98fb17a0c0950bd90792f78dcae325e623f403ccc52a1"}, + {file = "concrete_python-2.7.0.dev20240731-cp38-cp38-macosx_11_0_x86_64.whl", hash = "sha256:47b1ac66dad4ad5c3bb9cd873ea40e27bf6ee6af71a91d0a6f8089de0d33e234"}, + {file = "concrete_python-2.7.0.dev20240731-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:b7a749d63948a214e138546e0282c7b3946ffd284296c475427d8ee16b035e36"}, + {file = "concrete_python-2.7.0.dev20240731-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a5bdc8c1d3de183a300e3eeded968ba05ca0c09b41daafa23df9e65d42b0a764"}, + {file = "concrete_python-2.7.0.dev20240731-cp39-cp39-macosx_11_0_x86_64.whl", hash = "sha256:e804c3988fdf4b9ab778affdc76d3f3a812e5f9355f632946310a4bfa3e99cd0"}, + {file = "concrete_python-2.7.0.dev20240731-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:8b3a39d5ed49161c12e064422b1965ab36ffdd75451e05eb0294b1a96021ff91"}, ] [package.dependencies] @@ -795,9 +795,14 @@ torch = ">=1.13" z3-solver = ">=4.12" [package.extras] -dev = ["auditwheel (==5.3.0)", "black (==24.4.0)", "delocate (==0.10.4)", "isort (==5.12.0)", "matplotlib (>=3.7)", "mypy (==1.10.0)", "pillow (>=10.2)", "pybind11 (==2.10.4)", "pydocstyle (==6.3.0)", "pygraphviz (>=1.11)", "pylint (==2.17.1)", "pytest (==7.2.2)", "pytest-cov (==4.0.0)", "pytest-randomly (==3.15.0)", "pytest-xdist (==3.2.1)", "ruff (==0.0.259)", "wheel (==0.40.0)"] +dev = ["auditwheel (==5.3.0)", "black (==24.4.0)", "delocate (==0.10.4)", "isort (==5.12.0)", "matplotlib (>=3.7)", "mypy (==1.10.0)", "pillow (>=10.2)", "py-progress-tracker (==0.7.0)", "pybind11 (==2.10.4)", "pydocstyle (==6.3.0)", "pygraphviz (>=1.11)", "pylint (==2.17.1)", "pytest (==7.2.2)", "pytest-cov (==4.0.0)", "pytest-randomly (==3.15.0)", "pytest-xdist (==3.2.1)", "ruff (==0.0.259)", "wheel (==0.40.0)"] full = ["matplotlib (>=3.7)", "pillow (>=10.2)", "pygraphviz (>=1.11)"] +[package.source] +type = "legacy" +url = "https://pypi.zama.ai/cpu" +reference = "zama-pypi-cpu" + [[package]] name = "contourpy" version = "1.1.1" @@ -3093,6 +3098,7 @@ 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"}, ] @@ -3655,7 +3661,6 @@ 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"}, ] @@ -6282,6 +6287,52 @@ files = [ {file = "tomlkit-0.7.0.tar.gz", hash = "sha256:ac57f29693fab3e309ea789252fcce3061e19110085aa31af5446ca749325618"}, ] +[[package]] +name = "torch" +version = "2.2.2" +description = "Tensors and Dynamic neural networks in Python with strong GPU acceleration" +optional = false +python-versions = ">=3.8.0" +files = [ + {file = "torch-2.2.2-cp310-cp310-manylinux1_x86_64.whl", hash = "sha256:bc889d311a855dd2dfd164daf8cc903a6b7273a747189cebafdd89106e4ad585"}, + {file = "torch-2.2.2-cp310-cp310-manylinux2014_aarch64.whl", hash = "sha256:15dffa4cc3261fa73d02f0ed25f5fa49ecc9e12bf1ae0a4c1e7a88bbfaad9030"}, + {file = "torch-2.2.2-cp310-cp310-win_amd64.whl", hash = "sha256:11e8fe261233aeabd67696d6b993eeb0896faa175c6b41b9a6c9f0334bdad1c5"}, + {file = "torch-2.2.2-cp310-none-macosx_10_9_x86_64.whl", hash = "sha256:b2e2200b245bd9f263a0d41b6a2dab69c4aca635a01b30cca78064b0ef5b109e"}, + {file = "torch-2.2.2-cp310-none-macosx_11_0_arm64.whl", hash = "sha256:877b3e6593b5e00b35bbe111b7057464e76a7dd186a287280d941b564b0563c2"}, + {file = "torch-2.2.2-cp311-cp311-manylinux1_x86_64.whl", hash = "sha256:ad4c03b786e074f46606f4151c0a1e3740268bcf29fbd2fdf6666d66341c1dcb"}, + {file = "torch-2.2.2-cp311-cp311-manylinux2014_aarch64.whl", hash = "sha256:32827fa1fbe5da8851686256b4cd94cc7b11be962862c2293811c94eea9457bf"}, + {file = "torch-2.2.2-cp311-cp311-win_amd64.whl", hash = "sha256:f9ef0a648310435511e76905f9b89612e45ef2c8b023bee294f5e6f7e73a3e7c"}, + {file = "torch-2.2.2-cp311-none-macosx_10_9_x86_64.whl", hash = "sha256:95b9b44f3bcebd8b6cd8d37ec802048c872d9c567ba52c894bba90863a439059"}, + {file = "torch-2.2.2-cp311-none-macosx_11_0_arm64.whl", hash = "sha256:49aa4126ede714c5aeef7ae92969b4b0bbe67f19665106463c39f22e0a1860d1"}, + {file = "torch-2.2.2-cp312-cp312-manylinux1_x86_64.whl", hash = "sha256:cf12cdb66c9c940227ad647bc9cf5dba7e8640772ae10dfe7569a0c1e2a28aca"}, + {file = "torch-2.2.2-cp312-cp312-manylinux2014_aarch64.whl", hash = "sha256:89ddac2a8c1fb6569b90890955de0c34e1724f87431cacff4c1979b5f769203c"}, + {file = "torch-2.2.2-cp312-cp312-win_amd64.whl", hash = "sha256:451331406b760f4b1ab298ddd536486ab3cfb1312614cfe0532133535be60bea"}, + {file = "torch-2.2.2-cp312-none-macosx_10_9_x86_64.whl", hash = "sha256:eb4d6e9d3663e26cd27dc3ad266b34445a16b54908e74725adb241aa56987533"}, + {file = "torch-2.2.2-cp312-none-macosx_11_0_arm64.whl", hash = "sha256:bf9558da7d2bf7463390b3b2a61a6a3dbb0b45b161ee1dd5ec640bf579d479fc"}, + {file = "torch-2.2.2-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:cd2bf7697c9e95fb5d97cc1d525486d8cf11a084c6af1345c2c2c22a6b0029d0"}, + {file = "torch-2.2.2-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:b421448d194496e1114d87a8b8d6506bce949544e513742b097e2ab8f7efef32"}, + {file = "torch-2.2.2-cp38-cp38-win_amd64.whl", hash = "sha256:3dbcd563a9b792161640c0cffe17e3270d85e8f4243b1f1ed19cca43d28d235b"}, + {file = "torch-2.2.2-cp38-none-macosx_10_9_x86_64.whl", hash = "sha256:31f4310210e7dda49f1fb52b0ec9e59382cfcb938693f6d5378f25b43d7c1d29"}, + {file = "torch-2.2.2-cp38-none-macosx_11_0_arm64.whl", hash = "sha256:c795feb7e8ce2e0ef63f75f8e1ab52e7fd5e1a4d7d0c31367ade1e3de35c9e95"}, + {file = "torch-2.2.2-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:a6e5770d68158d07456bfcb5318b173886f579fdfbf747543901ce718ea94782"}, + {file = "torch-2.2.2-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:67dcd726edff108e2cd6c51ff0e416fd260c869904de95750e80051358680d24"}, + {file = "torch-2.2.2-cp39-cp39-win_amd64.whl", hash = "sha256:539d5ef6c4ce15bd3bd47a7b4a6e7c10d49d4d21c0baaa87c7d2ef8698632dfb"}, + {file = "torch-2.2.2-cp39-none-macosx_10_9_x86_64.whl", hash = "sha256:dff696de90d6f6d1e8200e9892861fd4677306d0ef604cb18f2134186f719f82"}, + {file = "torch-2.2.2-cp39-none-macosx_11_0_arm64.whl", hash = "sha256:3a4dd910663fd7a124c056c878a52c2b0be4a5a424188058fe97109d4436ee42"}, +] + +[package.dependencies] +filelock = "*" +fsspec = "*" +jinja2 = "*" +networkx = "*" +sympy = "*" +typing-extensions = ">=4.8.0" + +[package.extras] +opt-einsum = ["opt-einsum (>=3.3)"] +optree = ["optree (>=0.9.1)"] + [[package]] name = "torch" version = "2.3.1" @@ -6336,6 +6387,48 @@ typing-extensions = ">=4.8.0" opt-einsum = ["opt-einsum (>=3.3)"] optree = ["optree (>=0.9.1)"] +[[package]] +name = "torchvision" +version = "0.17.2" +description = "image and video datasets and models for torch deep learning" +optional = false +python-versions = ">=3.8" +files = [ + {file = "torchvision-0.17.2-cp310-cp310-macosx_10_13_x86_64.whl", hash = "sha256:1f2910fe3c21ad6875b2720d46fad835b2e4b336e9553d31ca364d24c90b1d4f"}, + {file = "torchvision-0.17.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ecc1c503fa8a54fbab777e06a7c228032b8ab78efebf35b28bc8f22f544f51f1"}, + {file = "torchvision-0.17.2-cp310-cp310-manylinux1_x86_64.whl", hash = "sha256:f400145fc108833e7c2fc28486a04989ca742146d7a2a2cc48878ebbb40cdbbd"}, + {file = "torchvision-0.17.2-cp310-cp310-manylinux2014_aarch64.whl", hash = "sha256:e9e4bed404af33dfc92eecc2b513d21ddc4c242a7fd8708b3b09d3a26aa6f444"}, + {file = "torchvision-0.17.2-cp310-cp310-win_amd64.whl", hash = "sha256:ba2e62f233eab3d42b648c122a3a29c47cc108ca314dfd5cbb59cd3a143fd623"}, + {file = "torchvision-0.17.2-cp311-cp311-macosx_10_13_x86_64.whl", hash = "sha256:9b83e55ee7d0a1704f52b9c0ac87388e7a6d1d98a6bde7b0b35f9ab54d7bda54"}, + {file = "torchvision-0.17.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e031004a1bc432c980a7bd642f6c189a3efc316e423fc30b5569837166a4e28d"}, + {file = "torchvision-0.17.2-cp311-cp311-manylinux1_x86_64.whl", hash = "sha256:3bbc24b7713e8f22766992562547d8b4b10001208d372fe599255af84bfd1a69"}, + {file = "torchvision-0.17.2-cp311-cp311-manylinux2014_aarch64.whl", hash = "sha256:833fd2e4216ced924c8aca0525733fe727f9a1af66dfad7c5be7257e97c39678"}, + {file = "torchvision-0.17.2-cp311-cp311-win_amd64.whl", hash = "sha256:6835897df852fad1015e6a106c167c83848114cbcc7d86112384a973404e4431"}, + {file = "torchvision-0.17.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:14fd1d4a033c325bdba2d03a69c3450cab6d3a625f85cc375781d9237ca5d04d"}, + {file = "torchvision-0.17.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:9c3acbebbe379af112b62b535820174277b1f3eed30df264a4e458d58ee4e5b2"}, + {file = "torchvision-0.17.2-cp312-cp312-manylinux1_x86_64.whl", hash = "sha256:77d680adf6ce367166a186d2c7fda3a73807ab9a03b2c31a03fa8812c8c5335b"}, + {file = "torchvision-0.17.2-cp312-cp312-manylinux2014_aarch64.whl", hash = "sha256:f1c9ab3152cfb27f83aca072cac93a3a4c4e4ab0261cf0f2d516b9868a4e96f3"}, + {file = "torchvision-0.17.2-cp312-cp312-win_amd64.whl", hash = "sha256:3f784381419f3ed3f2ec2aa42fb4aeec5bf4135e298d1631e41c926e6f1a0dff"}, + {file = "torchvision-0.17.2-cp38-cp38-macosx_10_13_x86_64.whl", hash = "sha256:b83aac8d78f48981146d582168d75b6c947cfb0a7693f76e219f1926f6e595a3"}, + {file = "torchvision-0.17.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:1ece40557e122d79975860a005aa7e2a9e2e6c350a03e78a00ec1450083312fd"}, + {file = "torchvision-0.17.2-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:32dbeba3987e20f2dc1bce8d1504139fff582898346dfe8ad98d649f97ca78fa"}, + {file = "torchvision-0.17.2-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:35ba5c1600c3203549d2316422a659bd20c0cfda1b6085eec94fb9f35f55ca43"}, + {file = "torchvision-0.17.2-cp38-cp38-win_amd64.whl", hash = "sha256:2f69570f50b1d195e51bc03feffb7b7728207bc36efcfb1f0813712b2379d881"}, + {file = "torchvision-0.17.2-cp39-cp39-macosx_10_13_x86_64.whl", hash = "sha256:4868bbfa55758c8107e69a0e7dd5e77b89056035cd38b767ad5b98cdb71c0f0d"}, + {file = "torchvision-0.17.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:efd6d0dd0668e15d01a2cffadc74068433b32cbcf5692e0c4aa15fc5cb250ce7"}, + {file = "torchvision-0.17.2-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:7dc85b397f6c6d9ef12716ce0d6e11ac2b803f5cccff6fe3966db248e7774478"}, + {file = "torchvision-0.17.2-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:d506854c5acd69b20a8b6641f01fe841685a21c5406b56813184f1c9fc94279e"}, + {file = "torchvision-0.17.2-cp39-cp39-win_amd64.whl", hash = "sha256:067095e87a020a7a251ac1d38483aa591c5ccb81e815527c54db88a982fc9267"}, +] + +[package.dependencies] +numpy = "*" +pillow = ">=5.3.0,<8.3.dev0 || >=8.4.dev0" +torch = "2.2.2" + +[package.extras] +scipy = ["scipy"] + [[package]] name = "torchvision" version = "0.18.1" @@ -6977,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 = "8c40076c8e792b643101ae8157e11406accb2298ba22939a155ee02155161a76" +content-hash = "3a1c6356fc977504843d13a73956d9aea09db078427cc6fd4a82b6b541cfa7ed" diff --git a/pyproject.toml b/pyproject.toml index ab272b773..842385cba 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,12 +38,16 @@ 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 = "2.7.0" +concrete-python = {version="==2.7.0.dev20240731", source = "zama-pypi-cpu"} setuptools = "65.6.3" skops = {version = "0.5.0"} xgboost = "1.6.2" skorch = "0.11.0" -torch = "2.3.1" +# torch version needs to be pinned for MacOS Intel since it isn't supported by Pytorch anymore +torch = [ + {version = "2.2.2", markers = "platform_system=='Darwin' and platform_machine!='arm64'" }, + {version = "2.3.1", markers = "platform_system!='Darwin' or platform_machine=='arm64'" } +] typing-extensions = "^4.5.0" brevitas = "0.10.2" onnx = "1.16.1" @@ -114,7 +118,12 @@ flake8-bugbear = "23.2.13" flake8 = "6.0.0" ipython = "^8.10.0" markdown-it-py = "2.2.0" -torchvision = "0.18.1" +# torchvision's version depends on torch but is not enforced by the requirements of the +# package so we have to enforce it here by hand +torchvision = [ + {version = "0.17.2", markers = "platform_system=='Darwin' and platform_machine!='arm64'" }, + {version = "0.18.1", markers = "platform_system!='Darwin' or platform_machine=='arm64'" } +] [build-system] requires = ["poetry-core>=1.0.0"] diff --git a/script/make_utils/fix_omp_issues_for_intel_mac.sh b/script/make_utils/fix_omp_issues_for_intel_mac.sh index 826cf60f7..b396dad49 100755 --- a/script/make_utils/fix_omp_issues_for_intel_mac.sh +++ b/script/make_utils/fix_omp_issues_for_intel_mac.sh @@ -3,11 +3,12 @@ # Fix OMP issues for macOS Intel, https://github.com/zama-ai/concrete-ml-internal/issues/3951 # This should be avoided for macOS with arm64 architecture -set -ex +set -e UNAME=$(uname) MACHINE=$(uname -m) PYTHON_VERSION=$(python --version | cut -d' ' -f2 | cut -d'.' -f1,2) +DO_REGENERATE=0 if [ "$UNAME" == "Darwin" ] && [ "$MACHINE" != "arm64" ] then @@ -21,20 +22,47 @@ then WHICH_VENV=$(command -v python | sed -e "s@bin/python@@") WHICH_PYTHON=$(python -c 'import sys; print(f"python{sys.version_info.major}.{sys.version_info.minor}")') + # To update the dylib changes (eg with major updates in torch), please uncomment this, and + # then recopy to the given sections + if [ $DO_REGENERATE -eq 1 ] + then + cd "${WHICH_VENV}"/lib/"${WHICH_PYTHON}" + + LIST_OF_OMP_DYLIBS=$(find . -name "*omp*.dylib") + + for X in $LIST_OF_OMP_DYLIBS + do + if [[ "$X" != *"concrete"* ]]; then + echo "rm \"\${WHICH_VENV}\"/lib/\"\${WHICH_PYTHON}\"/$X" + echo "ln -s \"\${WHICH_VENV}\"/lib/\"\${WHICH_PYTHON}\"/site-packages/concrete/.dylibs/libomp.dylib \"\${WHICH_VENV}\"/lib/\"\${WHICH_PYTHON}\"/$X" + fi + done + + exit 255 + fi + # The error is specific to python version if [ "$PYTHON_VERSION" == "3.8" ] || [ "$PYTHON_VERSION" == "3.9" ] then - rm "${WHICH_VENV}"/lib/"${WHICH_PYTHON}"/site-packages/torch/lib/libiomp5.dylib - ln -s "${WHICH_VENV}"/lib/"${WHICH_PYTHON}"/site-packages/concrete/.dylibs/libomp.dylib "${WHICH_VENV}"/lib/"${WHICH_PYTHON}"/site-packages/torch/lib/libiomp5.dylib - rm "${WHICH_VENV}"/lib/"${WHICH_PYTHON}"/site-packages/functorch/.dylibs/libiomp5.dylib - ln -s "${WHICH_VENV}"/lib/"${WHICH_PYTHON}"/site-packages/concrete/.dylibs/libomp.dylib "${WHICH_VENV}"lib/"${WHICH_PYTHON}"/site-packages/functorch/.dylibs/libiomp5.dylib + rm "${WHICH_VENV}"/lib/"${WHICH_PYTHON}"/./site-packages/xgboost/.dylibs/libomp.dylib + ln -s "${WHICH_VENV}"/lib/"${WHICH_PYTHON}"/site-packages/concrete/.dylibs/libomp.dylib "${WHICH_VENV}"/lib/"${WHICH_PYTHON}"/./site-packages/xgboost/.dylibs/libomp.dylib + rm "${WHICH_VENV}"/lib/"${WHICH_PYTHON}"/./site-packages/torch/.dylibs/libiomp5.dylib + ln -s "${WHICH_VENV}"/lib/"${WHICH_PYTHON}"/site-packages/concrete/.dylibs/libomp.dylib "${WHICH_VENV}"/lib/"${WHICH_PYTHON}"/./site-packages/torch/.dylibs/libiomp5.dylib + rm "${WHICH_VENV}"/lib/"${WHICH_PYTHON}"/./site-packages/torch/lib/libiomp5.dylib + ln -s "${WHICH_VENV}"/lib/"${WHICH_PYTHON}"/site-packages/concrete/.dylibs/libomp.dylib "${WHICH_VENV}"/lib/"${WHICH_PYTHON}"/./site-packages/torch/lib/libiomp5.dylib + rm "${WHICH_VENV}"/lib/"${WHICH_PYTHON}"/./site-packages/sklearn/.dylibs/libomp.dylib + ln -s "${WHICH_VENV}"/lib/"${WHICH_PYTHON}"/site-packages/concrete/.dylibs/libomp.dylib "${WHICH_VENV}"/lib/"${WHICH_PYTHON}"/./site-packages/sklearn/.dylibs/libomp.dylib elif [ "$PYTHON_VERSION" == "3.10" ] then - rm "${WHICH_VENV}"/lib/"${WHICH_PYTHON}"/site-packages/torch/lib/libiomp5.dylib - ln -s "${WHICH_VENV}"/lib/"${WHICH_PYTHON}"/site-packages/concrete/.dylibs/libomp.dylib "${WHICH_VENV}"/lib/"${WHICH_PYTHON}"/site-packages/torch/lib/libiomp5.dylib - rm "${WHICH_VENV}"/lib/"${WHICH_PYTHON}"/site-packages/torch/.dylibs/libiomp5.dylib - ln -s "${WHICH_VENV}"/lib/"${WHICH_PYTHON}"/site-packages/concrete/.dylibs/libomp.dylib "${WHICH_VENV}"lib/"${WHICH_PYTHON}"/site-packages/torch/.dylibs/libiomp5.dylib + rm "${WHICH_VENV}"/lib/"${WHICH_PYTHON}"/./site-packages/xgboost/.dylibs/libomp.dylib + ln -s "${WHICH_VENV}"/lib/"${WHICH_PYTHON}"/site-packages/concrete/.dylibs/libomp.dylib "${WHICH_VENV}"/lib/"${WHICH_PYTHON}"/./site-packages/xgboost/.dylibs/libomp.dylib + rm "${WHICH_VENV}"/lib/"${WHICH_PYTHON}"/./site-packages/torch/lib/libiomp5.dylib + ln -s "${WHICH_VENV}"/lib/"${WHICH_PYTHON}"/site-packages/concrete/.dylibs/libomp.dylib "${WHICH_VENV}"/lib/"${WHICH_PYTHON}"/./site-packages/torch/lib/libiomp5.dylib + rm "${WHICH_VENV}"/lib/"${WHICH_PYTHON}"/./site-packages/sklearn/.dylibs/libomp.dylib + ln -s "${WHICH_VENV}"/lib/"${WHICH_PYTHON}"/site-packages/concrete/.dylibs/libomp.dylib "${WHICH_VENV}"/lib/"${WHICH_PYTHON}"/./site-packages/sklearn/.dylibs/libomp.dylib + rm "${WHICH_VENV}"/lib/"${WHICH_PYTHON}"/./site-packages/functorch/.dylibs/libiomp5.dylib + ln -s "${WHICH_VENV}"/lib/"${WHICH_PYTHON}"/site-packages/concrete/.dylibs/libomp.dylib "${WHICH_VENV}"/lib/"${WHICH_PYTHON}"/./site-packages/functorch/.dylibs/libiomp5.dylib else echo "Please have a look to libraries libiomp5.dylib related to torch and then" echo "apply appropriate fix" diff --git a/src/concrete/ml/pandas/_client_server_files/client.zip b/src/concrete/ml/pandas/_client_server_files/client.zip index 97258b481..27219bddc 100644 --- a/src/concrete/ml/pandas/_client_server_files/client.zip +++ b/src/concrete/ml/pandas/_client_server_files/client.zip @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9d499c763d2bf47891e73f47a84f6d169ec7a4a006147d443e623530e237b27f -size 595 +oid sha256:bd864f2b27fa7eb26f944f1f44b7c199e32120c20004ae446389248f8aa5a226 +size 597 diff --git a/src/concrete/ml/pandas/_client_server_files/server.zip b/src/concrete/ml/pandas/_client_server_files/server.zip index 153498177..b4b70ee7e 100644 --- a/src/concrete/ml/pandas/_client_server_files/server.zip +++ b/src/concrete/ml/pandas/_client_server_files/server.zip @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b15ea810a1c5779a1aac3568991434d3ea75536563844fe1292871e48876c106 +oid sha256:da8046c0110fce74381df2c1e490a2cbd45367823204566533aad224a6a0997f size 1607