diff --git a/benchmarks/glm.py b/benchmarks/glm.py index b3b2302e24..09defe5222 100644 --- a/benchmarks/glm.py +++ b/benchmarks/glm.py @@ -113,20 +113,14 @@ def get_preprocessor() -> ColumnTransformer: def get_train_test_data(data: pandas.DataFrame) -> Tuple[pandas.DataFrame, pandas.DataFrame]: """Split the data into a train and test set.""" - ( - train_data, - test_data, - ) = train_test_split( + (train_data, test_data,) = train_test_split( data, test_size=0.2, random_state=0, ) # The test set is reduced for faster FHE runs. - ( - _, - test_data, - ) = train_test_split( + (_, test_data,) = train_test_split( test_data, test_size=500, random_state=0, diff --git a/src/concrete/ml/pytest/torch_models.py b/src/concrete/ml/pytest/torch_models.py index cb87f4bf6b..d2b41e4d9f 100644 --- a/src/concrete/ml/pytest/torch_models.py +++ b/src/concrete/ml/pytest/torch_models.py @@ -867,7 +867,9 @@ def __init__(self, input_output, activation_function, n_bits=2, disable_bit_chec n_bits_weights = n_bits # Generate the pattern 0, 1, ..., 2^N-1, 0, 1, .. 2^N-1, 0, 1.. - all_weights = numpy.mod(numpy.arange(numpy.prod(self.fc1.weight.shape)), 2**n_bits_weights) + all_weights = numpy.mod( + numpy.arange(numpy.prod(self.fc1.weight.shape)), 2**n_bits_weights + ) # Shuffle the pattern and reshape to weight shape numpy.random.shuffle(all_weights) diff --git a/src/concrete/ml/quantization/base_quantized_op.py b/src/concrete/ml/quantization/base_quantized_op.py index 903fc4767f..31c3df90b7 100644 --- a/src/concrete/ml/quantization/base_quantized_op.py +++ b/src/concrete/ml/quantization/base_quantized_op.py @@ -237,14 +237,14 @@ def dump_dict(self) -> Dict: metadata["_input_idx_to_params_name"] = self._input_idx_to_params_name metadata["_params_that_are_onnx_inputs"] = self._params_that_are_onnx_inputs metadata["_params_that_are_onnx_var_inputs"] = self._params_that_are_onnx_var_inputs - metadata["_params_that_are_required_onnx_inputs"] = ( - self._params_that_are_required_onnx_inputs - ) + metadata[ + "_params_that_are_required_onnx_inputs" + ] = self._params_that_are_required_onnx_inputs metadata["_has_attr"] = self._has_attr metadata["_inputs_not_quantized"] = self._inputs_not_quantized - metadata["quantize_inputs_with_model_outputs_precision"] = ( - self.quantize_inputs_with_model_outputs_precision - ) + metadata[ + "quantize_inputs_with_model_outputs_precision" + ] = self.quantize_inputs_with_model_outputs_precision metadata["produces_graph_output"] = self.produces_graph_output metadata["produces_raw_output"] = self.produces_raw_output metadata["error_tracker"] = self.error_tracker