From 3e7d0fccd4c6362a4ed4c4453b9884b798216fae Mon Sep 17 00:00:00 2001 From: "Daniel J. Beutel" Date: Fri, 8 Sep 2023 11:37:27 +0200 Subject: [PATCH 1/2] Remove deprecated experimental arg rest --- src/py/flwr/client/app.py | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/src/py/flwr/client/app.py b/src/py/flwr/client/app.py index 401b2ba901f9..c042bab06a60 100644 --- a/src/py/flwr/client/app.py +++ b/src/py/flwr/client/app.py @@ -96,7 +96,6 @@ def start_client( client: Client, grpc_max_message_length: int = GRPC_MAX_MESSAGE_LENGTH, root_certificates: Optional[Union[bytes, str]] = None, - rest: bool = False, # Deprecated in favor of `transport` transport: Optional[str] = None, ) -> None: """Start a Flower client node which connects to a Flower server. @@ -121,11 +120,6 @@ class `flwr.client.Client`. The PEM-encoded root certificates as a byte string or a path string. If provided, a secure connection using the certificates will be established to an SSL-enabled Flower server. - rest : bool (default: False) - DEPRECATED - USE 'transport' INSTEAD. - Defines whether or not the client is interacting with the server using the - experimental REST API. This feature is experimental, it might change - considerably in future versions of Flower. transport : Optional[str] (default: None) Configure the transport layer. Allowed values: - 'grpc-bidi': gRPC, bidirectional streaming @@ -161,7 +155,7 @@ class `flwr.client.Client`. # Set the default transport layer if transport is None: - transport = TRANSPORT_TYPE_REST if rest else TRANSPORT_TYPE_GRPC_BIDI + transport = TRANSPORT_TYPE_GRPC_BIDI # Use either gRPC bidirectional streaming or REST request/response if transport == TRANSPORT_TYPE_REST: @@ -231,7 +225,6 @@ def start_numpy_client( client: NumPyClient, grpc_max_message_length: int = GRPC_MAX_MESSAGE_LENGTH, root_certificates: Optional[bytes] = None, - rest: bool = False, # Deprecated in favor of `transport` transport: Optional[str] = None, ) -> None: """Start a Flower NumPyClient which connects to a gRPC server. @@ -255,11 +248,6 @@ def start_numpy_client( The PEM-encoded root certificates as a byte string or a path string. If provided, a secure connection using the certificates will be established to an SSL-enabled Flower server. - rest : bool (default: False) - DEPRECATED - USE 'transport' INSTEAD. - Defines whether or not the client is interacting with the server using the - experimental REST API. This feature is experimental, it might change - considerably in future versions of Flower. transport : Optional[str] (default: None) Configure the transport layer. Allowed values: - 'grpc-bidi': gRPC, bidirectional streaming @@ -290,7 +278,6 @@ def start_numpy_client( client=_wrap_numpy_client(client=client), grpc_max_message_length=grpc_max_message_length, root_certificates=root_certificates, - rest=rest, transport=transport, ) From 29027993df3d216749ef3bae1b1d378eac521f8d Mon Sep 17 00:00:00 2001 From: "Daniel J. Beutel" Date: Fri, 8 Sep 2023 11:43:37 +0200 Subject: [PATCH 2/2] Update changelog --- doc/source/ref-changelog.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/source/ref-changelog.md b/doc/source/ref-changelog.md index 55ab5060b1eb..3dcf25d79be2 100644 --- a/doc/source/ref-changelog.md +++ b/doc/source/ref-changelog.md @@ -16,6 +16,10 @@ Python 3.7 support was deprecated in Flower 1.5, and this release removes support. Flower now requires Python 3.8. +- **Remove experimental argument** `rest` **from** `start_client` ([#2324](https://github.com/adap/flower/pull/2324)) + + The (still experimental) argument `rest` was removed from `start_client` and `start_numpy_client`. Use `transport="rest"` to opt into the experimental REST API instead. + ## v1.5.0 (2023-08-31) ### Thanks to our contributors