Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated experimental arg rest #2324

Merged
merged 2 commits into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions doc/source/ref-changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 1 addition & 14 deletions src/py/flwr/client/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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.
Expand All @@ -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
Expand Down Expand Up @@ -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,
)

Expand Down