From d39c6aa0040fcf65fe6364f7fe3294700aedb3fa Mon Sep 17 00:00:00 2001 From: jfrery Date: Wed, 29 May 2024 15:56:51 +0200 Subject: [PATCH] chore: review --- src/concrete/ml/deployment/fhe_client_server.py | 3 +-- tests/deployment/test_client_server.py | 5 +---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/concrete/ml/deployment/fhe_client_server.py b/src/concrete/ml/deployment/fhe_client_server.py index 4b82f6869..61387df65 100644 --- a/src/concrete/ml/deployment/fhe_client_server.py +++ b/src/concrete/ml/deployment/fhe_client_server.py @@ -141,8 +141,7 @@ def run( """ assert_true(self.server is not None, "Model has not been loaded.") - if isinstance(serialized_encrypted_quantized_data, bytes): - serialized_encrypted_quantized_data = (serialized_encrypted_quantized_data,) + serialized_encrypted_quantized_data = to_tuple(serialized_encrypted_quantized_data) deserialized_data = tuple( fhe.Value.deserialize(data) for data in serialized_encrypted_quantized_data diff --git a/tests/deployment/test_client_server.py b/tests/deployment/test_client_server.py index 25f9cf478..86cc204e5 100644 --- a/tests/deployment/test_client_server.py +++ b/tests/deployment/test_client_server.py @@ -406,7 +406,4 @@ def test_save_mode_handling(n_bits, fit_encrypted, mode, error_message): with pytest.raises((AssertionError, ValueError), match=error_message): model_dev.save(mode=mode) else: - try: - model_dev.save(mode=mode) - except ValueError: - pytest.fail("Valid mode raised ValueError unexpectedly") + model_dev.save(mode=mode)