Skip to content

Commit

Permalink
Merge branch 'main' into update-changelog-1.15
Browse files Browse the repository at this point in the history
  • Loading branch information
danieljanes authored Jan 30, 2025
2 parents 6dcd94f + 212768b commit 062df61
Show file tree
Hide file tree
Showing 41 changed files with 221 additions and 1,026 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,8 @@ jobs:
run: |
flwr new tmp-${{ matrix.framework }} --framework ${{ matrix.framework }} --username gh_ci
cd tmp-${{ matrix.framework }}
sed -i 's/"flwr\[[^]]*\][^"]*", *//g' pyproject.toml
pip install flwr[simulation]
pip install .
- name: Run project
run: |
Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ flower-client-app = "flwr.client.supernode:run_client_app" # Deprecated
python = "^3.9"
# Mandatory dependencies
numpy = ">=1.26.0,<3.0.0"
grpcio = "^1.69.0"
protobuf = "^5.29.3"
grpcio = "^1.62.3,!=1.65.0"
protobuf = "^4.21.6"
cryptography = "^43.0.1"
pycryptodome = "^3.18.0"
iterators = "^0.0.2"
Expand All @@ -92,7 +92,7 @@ rest = ["starlette", "uvicorn"]

[tool.poetry.group.dev.dependencies]
types-dataclasses = "==0.6.6"
types-protobuf = "==5.29.1.20241207"
types-protobuf = "==4.21.0.7"
types-requests = "==2.31.0.20240125"
types-setuptools = "==69.0.0.20240125"
clang-format = "==17.0.6"
Expand All @@ -107,7 +107,7 @@ parameterized = "==0.9.0"
pytest = "==7.4.4"
pytest-cov = "==4.1.0"
pytest-watcher = "==0.4.3"
grpcio-tools = "==1.69.0"
grpcio-tools = "==1.62.3"
mypy-protobuf = "==3.2.0"
jupyterlab = "==4.0.12"
rope = "==1.13.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version = "1.0.0"
description = ""
license = "Apache-2.0"
dependencies = [
"flwr[simulation]>=1.14.0",
"flwr[simulation]>=1.15.0",
"flwr-datasets[vision]>=0.5.0",
"torch==2.5.1",
"torchvision==0.20.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version = "1.0.0"
description = ""
license = "Apache-2.0"
dependencies = [
"flwr[simulation]>=1.14.0",
"flwr[simulation]>=1.15.0",
"flwr-datasets>=0.5.0",
"torch==2.3.1",
"trl==0.8.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version = "1.0.0"
description = ""
license = "Apache-2.0"
dependencies = [
"flwr[simulation]>=1.14.0",
"flwr[simulation]>=1.15.0",
"flwr-datasets>=0.5.0",
"torch==2.5.1",
"transformers>=4.30.0,<5.0",
Expand Down
2 changes: 1 addition & 1 deletion src/py/flwr/cli/new/templates/app/pyproject.jax.toml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version = "1.0.0"
description = ""
license = "Apache-2.0"
dependencies = [
"flwr[simulation]>=1.14.0",
"flwr[simulation]>=1.15.0",
"jax==0.4.30",
"jaxlib==0.4.30",
"scikit-learn==1.6.1",
Expand Down
2 changes: 1 addition & 1 deletion src/py/flwr/cli/new/templates/app/pyproject.mlx.toml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version = "1.0.0"
description = ""
license = "Apache-2.0"
dependencies = [
"flwr[simulation]>=1.14.0",
"flwr[simulation]>=1.15.0",
"flwr-datasets[vision]>=0.5.0",
"mlx==0.21.1",
]
Expand Down
2 changes: 1 addition & 1 deletion src/py/flwr/cli/new/templates/app/pyproject.numpy.toml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version = "1.0.0"
description = ""
license = "Apache-2.0"
dependencies = [
"flwr[simulation]>=1.14.0",
"flwr[simulation]>=1.15.0",
"numpy>=2.0.2",
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version = "1.0.0"
description = ""
license = "Apache-2.0"
dependencies = [
"flwr[simulation]>=1.14.0",
"flwr[simulation]>=1.15.0",
"flwr-datasets[vision]>=0.5.0",
"torch==2.5.1",
"torchvision==0.20.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version = "1.0.0"
description = ""
license = "Apache-2.0"
dependencies = [
"flwr[simulation]>=1.14.0",
"flwr[simulation]>=1.15.0",
"flwr-datasets[vision]>=0.5.0",
"scikit-learn>=1.6.1",
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version = "1.0.0"
description = ""
license = "Apache-2.0"
dependencies = [
"flwr[simulation]>=1.14.0",
"flwr[simulation]>=1.15.0",
"flwr-datasets[vision]>=0.5.0",
"tensorflow>=2.11.1,<2.18.0",
]
Expand Down
16 changes: 3 additions & 13 deletions src/py/flwr/proto/clientappio_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

75 changes: 12 additions & 63 deletions src/py/flwr/proto/clientappio_pb2_grpc.py
Original file line number Diff line number Diff line change
@@ -1,29 +1,9 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
import warnings

from flwr.proto import clientappio_pb2 as flwr_dot_proto_dot_clientappio__pb2

GRPC_GENERATED_VERSION = '1.69.0'
GRPC_VERSION = grpc.__version__
_version_not_supported = False

try:
from grpc._utilities import first_version_is_lower
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
_version_not_supported = True

if _version_not_supported:
raise RuntimeError(
f'The grpc package installed is at version {GRPC_VERSION},'
+ f' but the generated code in flwr/proto/clientappio_pb2_grpc.py depends on'
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
)


class ClientAppIoStub(object):
"""Missing associated documentation comment in .proto file."""
Expand All @@ -38,17 +18,17 @@ def __init__(self, channel):
'/flwr.proto.ClientAppIo/GetToken',
request_serializer=flwr_dot_proto_dot_clientappio__pb2.GetTokenRequest.SerializeToString,
response_deserializer=flwr_dot_proto_dot_clientappio__pb2.GetTokenResponse.FromString,
_registered_method=True)
)
self.PullClientAppInputs = channel.unary_unary(
'/flwr.proto.ClientAppIo/PullClientAppInputs',
request_serializer=flwr_dot_proto_dot_clientappio__pb2.PullClientAppInputsRequest.SerializeToString,
response_deserializer=flwr_dot_proto_dot_clientappio__pb2.PullClientAppInputsResponse.FromString,
_registered_method=True)
)
self.PushClientAppOutputs = channel.unary_unary(
'/flwr.proto.ClientAppIo/PushClientAppOutputs',
request_serializer=flwr_dot_proto_dot_clientappio__pb2.PushClientAppOutputsRequest.SerializeToString,
response_deserializer=flwr_dot_proto_dot_clientappio__pb2.PushClientAppOutputsResponse.FromString,
_registered_method=True)
)


class ClientAppIoServicer(object):
Expand Down Expand Up @@ -97,7 +77,6 @@ def add_ClientAppIoServicer_to_server(servicer, server):
generic_handler = grpc.method_handlers_generic_handler(
'flwr.proto.ClientAppIo', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
server.add_registered_method_handlers('flwr.proto.ClientAppIo', rpc_method_handlers)


# This class is part of an EXPERIMENTAL API.
Expand All @@ -115,21 +94,11 @@ def GetToken(request,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/flwr.proto.ClientAppIo/GetToken',
return grpc.experimental.unary_unary(request, target, '/flwr.proto.ClientAppIo/GetToken',
flwr_dot_proto_dot_clientappio__pb2.GetTokenRequest.SerializeToString,
flwr_dot_proto_dot_clientappio__pb2.GetTokenResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

@staticmethod
def PullClientAppInputs(request,
Expand All @@ -142,21 +111,11 @@ def PullClientAppInputs(request,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/flwr.proto.ClientAppIo/PullClientAppInputs',
return grpc.experimental.unary_unary(request, target, '/flwr.proto.ClientAppIo/PullClientAppInputs',
flwr_dot_proto_dot_clientappio__pb2.PullClientAppInputsRequest.SerializeToString,
flwr_dot_proto_dot_clientappio__pb2.PullClientAppInputsResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

@staticmethod
def PushClientAppOutputs(request,
Expand All @@ -169,18 +128,8 @@ def PushClientAppOutputs(request,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/flwr.proto.ClientAppIo/PushClientAppOutputs',
return grpc.experimental.unary_unary(request, target, '/flwr.proto.ClientAppIo/PushClientAppOutputs',
flwr_dot_proto_dot_clientappio__pb2.PushClientAppOutputsRequest.SerializeToString,
flwr_dot_proto_dot_clientappio__pb2.PushClientAppOutputsResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
16 changes: 3 additions & 13 deletions src/py/flwr/proto/error_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 0 additions & 20 deletions src/py/flwr/proto/error_pb2_grpc.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,4 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
import warnings


GRPC_GENERATED_VERSION = '1.69.0'
GRPC_VERSION = grpc.__version__
_version_not_supported = False

try:
from grpc._utilities import first_version_is_lower
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
_version_not_supported = True

if _version_not_supported:
raise RuntimeError(
f'The grpc package installed is at version {GRPC_VERSION},'
+ f' but the generated code in flwr/proto/error_pb2_grpc.py depends on'
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
)
20 changes: 5 additions & 15 deletions src/py/flwr/proto/exec_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 062df61

Please sign in to comment.