Skip to content

Commit

Permalink
chore: integrate the new CP and the new VL
Browse files Browse the repository at this point in the history
  • Loading branch information
bcm-at-zama committed Oct 5, 2023
1 parent 152a2e2 commit 86b5c34
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
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"
# If one wants to force the installation of a given rc version
# /!\ WARNING /!\: This version should NEVER be a wildcard as it might create some
# issues when trying to run it in the future.
CP_VERSION_SPEC_FOR_RC="concrete-python==2.4.0"
CP_VERSION_SPEC_FOR_RC="concrete-python==2.5.0rc1"

# If one wants to use the last RC version
# CP_VERSION_SPEC_FOR_RC="$$(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
23c5d6fb1d7ce0d5200ecf9fb6d4aeb0
2 changes: 1 addition & 1 deletion src/concrete/ml/common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
# Use new VL with .simulate() by default once CP's multi-parameter/precision bug is fixed
# TODO: https://github.com/zama-ai/concrete-ml-internal/issues/3856
# Indicate if the old simulation method should be used when simulating FHE executions
USE_OLD_VL = True
USE_OLD_VL = False

# Debug option for testing round PBS optimization
# Setting this option to true will make quantizers "round half up"
Expand Down
4 changes: 2 additions & 2 deletions src/concrete/ml/quantization/quantized_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def check_model_is_compiled(self):
raise AttributeError(
"The quantized module is not compiled. Please run compile(...) first before "
"executing it in FHE."
)
) # pragma: no cover

@property
def post_processing_params(self) -> Dict[str, Any]:
Expand Down Expand Up @@ -696,7 +696,7 @@ def compile(
if not USE_OLD_VL:
self.fhe_circuit.enable_fhe_simulation() # pragma: no cover

self._is_compiled = True
self._is_compiled = True # pragma: no cover

return self.fhe_circuit

Expand Down
3 changes: 2 additions & 1 deletion src/concrete/ml/sklearn/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,8 @@ def predict(self, X: Data, fhe: Union[FheMode, str] = FheMode.DISABLE) -> numpy.
# If the old simulation method should be used
if USE_OLD_VL:
predict_method = partial(
self.fhe_circuit.graph, p_error=self.fhe_circuit.p_error
self.fhe_circuit.graph,
p_error=self.fhe_circuit.p_error, # pragma: no cover
)

# Else, use the official simulation method
Expand Down

0 comments on commit 86b5c34

Please sign in to comment.