Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: integrate Concrete Python 2.5.0rc1 #367

Merged
merged 7 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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.4.0"
CONCRETE_PYTHON_VERSION="concrete-python==2.5.0rc1"

# Force the installation of Concrete Python's latest version, release-candidates included
# CONCRETE_PYTHON_VERSION="$$(poetry run python \
Expand Down
2 changes: 1 addition & 1 deletion deps_licenses/licenses_linux_user.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ certifi, 2023.7.22, Mozilla Public License 2.0 (MPL 2.0)
charset-normalizer, 3.2.0, MIT License
click, 8.1.7, BSD License
coloredlogs, 15.0.1, MIT License
concrete-python, 2.4.0, BSD-3-Clause
concrete-python, 2.5.0rc1, BSD-3-Clause
dependencies, 2.0.1, BSD License
dill, 0.3.7, BSD License
exceptiongroup, 1.1.3, MIT License
Expand Down
2 changes: 1 addition & 1 deletion deps_licenses/licenses_linux_user.txt.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5ea389d8b97dc534603abf9b77ff8a40
6e23de913fba55c72e9420fdef5e78de
2 changes: 1 addition & 1 deletion deps_licenses/licenses_mac_intel_user.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ certifi, 2023.7.22, Mozilla Public License 2.0 (MPL 2.0)
charset-normalizer, 3.2.0, MIT License
click, 8.1.7, BSD License
coloredlogs, 15.0.1, MIT License
concrete-python, 2.4.0, BSD-3-Clause
concrete-python, 2.5.0rc1, BSD-3-Clause
dependencies, 2.0.1, BSD License
dill, 0.3.7, BSD License
exceptiongroup, 1.1.3, MIT License
Expand Down
2 changes: 1 addition & 1 deletion deps_licenses/licenses_mac_intel_user.txt.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5ea389d8b97dc534603abf9b77ff8a40
6e23de913fba55c72e9420fdef5e78de
2 changes: 1 addition & 1 deletion deps_licenses/licenses_mac_silicon_user.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ certifi, 2023.7.22, Mozilla Public License 2.0 (MPL 2.0)
charset-normalizer, 3.2.0, MIT License
click, 8.1.7, BSD License
coloredlogs, 15.0.1, MIT License
concrete-python, 2.4.0, BSD-3-Clause
concrete-python, 2.5.0rc1, BSD-3-Clause
dependencies, 2.0.1, BSD License
dill, 0.3.7, BSD License
exceptiongroup, 1.1.3, MIT License
Expand Down
2 changes: 1 addition & 1 deletion deps_licenses/licenses_mac_silicon_user.txt.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5ea389d8b97dc534603abf9b77ff8a40
6e23de913fba55c72e9420fdef5e78de
31 changes: 16 additions & 15 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ readme = "README.md"
# Investigate if it is better to fix specific versions or use lower and upper bounds
# FIXME: https://github.com/zama-ai/concrete-ml-internal/issues/2665
python = ">=3.8.1,<3.11"
concrete-python = "2.4.0"
concrete-python = "2.5.0-rc1 "
setuptools = "65.6.3"
skops = {version = "0.5.0"}
xgboost = "1.6.2"
Expand Down
7 changes: 4 additions & 3 deletions src/concrete/ml/common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@

MAX_BITWIDTH_BACKWARD_COMPATIBLE = 8

# Use new VL with .simulate() by default once CP's multi-parameter/precision bug is fixed
# FIXME: https://github.com/zama-ai/concrete-ml-internal/issues/3856
# Indicate if the old simulation method should be used when simulating FHE executions
# Indicate if the old virtual library method should be used instead of the compiler simulation
# when simulating FHE executions
# Set 'USE_OLD_VL' to False by default once the new simulation is fixed
# FIXME: https://github.com/zama-ai/concrete-ml-internal/issues/4091
USE_OLD_VL = True

# Debug option for testing round PBS optimization
Expand Down
5 changes: 0 additions & 5 deletions src/concrete/ml/quantization/quantized_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -691,11 +691,6 @@ def compile(
jit=False,
)

# CRT simulation is not supported yet
# FIXME: https://github.com/zama-ai/concrete-ml-internal/issues/3841
if not USE_OLD_VL:
self.fhe_circuit.enable_fhe_simulation() # pragma: no cover

self._is_compiled = True

return self.fhe_circuit
Expand Down
9 changes: 2 additions & 7 deletions src/concrete/ml/sklearn/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -561,16 +561,11 @@ def compile(
jit=False,
)

self._is_compiled = True

# For mypy
assert isinstance(self.fhe_circuit, Circuit)

# CRT simulation is not supported yet
# FIXME: https://github.com/zama-ai/concrete-ml-internal/issues/3841
if not USE_OLD_VL:
self.fhe_circuit.enable_fhe_simulation() # pragma: no cover

self._is_compiled = True

return self.fhe_circuit

@abstractmethod
Expand Down