From bc4814334947c506d732f46fb1ad53c04171e1df Mon Sep 17 00:00:00 2001 From: andrei-stoian-zama Date: Mon, 23 Oct 2023 09:57:12 +0000 Subject: [PATCH] chore: prepare release 1.3.0 --- docs/conf.py | 2 +- docs/developer-guide/api/README.md | 1 + .../api/concrete.ml.common.utils.md | 30 +++++++++++++++++++ .../concrete.ml.quantization.quantizers.md | 1 + .../api/concrete.ml.sklearn.base.md | 6 ++-- pyproject.toml | 2 +- src/concrete/ml/version.py | 2 +- 7 files changed, 38 insertions(+), 6 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index b1429bd67..4bff4f187 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -27,7 +27,7 @@ root_url = root_url if root_url.endswith("/") else root_url + "/" # The full version, including alpha/beta/rc tags -release = "1.2.0" +release = "1.3.0" # -- General configuration --------------------------------------------------- diff --git a/docs/developer-guide/api/README.md b/docs/developer-guide/api/README.md index a25a0e776..3d4f97733 100644 --- a/docs/developer-guide/api/README.md +++ b/docs/developer-guide/api/README.md @@ -228,6 +228,7 @@ - [`utils.all_values_are_floats`](./concrete.ml.common.utils.md#function-all_values_are_floats): Indicate if all unpacked values are of a supported float dtype. - [`utils.all_values_are_integers`](./concrete.ml.common.utils.md#function-all_values_are_integers): Indicate if all unpacked values are of a supported integer dtype. - [`utils.all_values_are_of_dtype`](./concrete.ml.common.utils.md#function-all_values_are_of_dtype): Indicate if all unpacked values are of the specified dtype(s). +- [`utils.array_allclose_and_same_shape`](./concrete.ml.common.utils.md#function-array_allclose_and_same_shape): Check if two numpy arrays are equal within a tolerances and have the same shape. - [`utils.check_dtype_and_cast`](./concrete.ml.common.utils.md#function-check_dtype_and_cast): Convert any allowed type into an array and cast it if required. - [`utils.check_there_is_no_p_error_options_in_configuration`](./concrete.ml.common.utils.md#function-check_there_is_no_p_error_options_in_configuration): Check the user did not set p_error or global_p_error in configuration. - [`utils.compute_bits_precision`](./concrete.ml.common.utils.md#function-compute_bits_precision): Compute the number of bits required to represent x. diff --git a/docs/developer-guide/api/concrete.ml.common.utils.md b/docs/developer-guide/api/concrete.ml.common.utils.md index 8ee74fa63..c48051f30 100644 --- a/docs/developer-guide/api/concrete.ml.common.utils.md +++ b/docs/developer-guide/api/concrete.ml.common.utils.md @@ -455,6 +455,36 @@ Indicate if all unpacked values are of the specified dtype(s). ______________________________________________________________________ + + +## function `array_allclose_and_same_shape` + +```python +array_allclose_and_same_shape( + a, + b, + rtol: float = 1e-05, + atol: float = 1e-08, + equal_nan: bool = False +) → bool +``` + +Check if two numpy arrays are equal within a tolerances and have the same shape. + +**Args:** + +- `a` (numpy.ndarray): The first input array +- `b` (numpy.ndarray): The second input array +- `rtol` (float): The relative tolerance parameter +- `atol` (float): The absolute tolerance parameter +- `equal_nan` (bool): Whether to compare NaN’s as equal. If True, NaN’s in a will be considered equal to NaN’s in b in the output array + +**Returns:** + +- `bool`: True if the arrays have the same shape and all elements are equal within the specified tolerances, False otherwise. + +______________________________________________________________________ + ## class `FheMode` diff --git a/docs/developer-guide/api/concrete.ml.quantization.quantizers.md b/docs/developer-guide/api/concrete.ml.quantization.quantizers.md index 054d925de..ab728b96c 100644 --- a/docs/developer-guide/api/concrete.ml.quantization.quantizers.md +++ b/docs/developer-guide/api/concrete.ml.quantization.quantizers.md @@ -8,6 +8,7 @@ Quantization utilities for a numpy array/tensor. ## **Global Variables** +- **QUANT_ROUND_LIKE_ROUND_PBS** - **STABILITY_CONST** ______________________________________________________________________ diff --git a/docs/developer-guide/api/concrete.ml.sklearn.base.md b/docs/developer-guide/api/concrete.ml.sklearn.base.md index a131edf9d..80ddbfd9b 100644 --- a/docs/developer-guide/api/concrete.ml.sklearn.base.md +++ b/docs/developer-guide/api/concrete.ml.sklearn.base.md @@ -3823,7 +3823,7 @@ For KNN, the de-quantization step is not required. Because \_inference returns t ______________________________________________________________________ - + ### method `predict` @@ -3846,7 +3846,7 @@ quantize_input(X: 'ndarray') → ndarray ______________________________________________________________________ - + ## class `SklearnKNeighborsClassifierMixin` @@ -4183,7 +4183,7 @@ For KNN, the de-quantization step is not required. Because \_inference returns t ______________________________________________________________________ - + ### method `predict` diff --git a/pyproject.toml b/pyproject.toml index 1f50dc716..20c6478e1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "concrete-ml" -version = "1.2.0" +version = "1.3.0" description = "Concrete ML is an open-source set of tools which aims to simplify the use of fully homomorphic encryption (FHE) for data scientists." license = "BSD-3-Clause-Clear" authors = [ diff --git a/src/concrete/ml/version.py b/src/concrete/ml/version.py index 78fc8a3cc..263ca74bf 100644 --- a/src/concrete/ml/version.py +++ b/src/concrete/ml/version.py @@ -1,3 +1,3 @@ """File to manage the version of the package.""" # Auto-generated by "make set_version" do not modify -__version__ = "1.2.0" +__version__ = "1.3.0"