flwr-nightly 1.15.0.dev20250129__py3-none-any.whl → 1.16.0.dev20250131__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. flwr/cli/ls.py +3 -2
  2. flwr/cli/new/templates/app/README.md.tpl +3 -2
  3. flwr/cli/new/templates/app/pyproject.baseline.toml.tpl +4 -4
  4. flwr/cli/new/templates/app/pyproject.flowertune.toml.tpl +2 -2
  5. flwr/cli/new/templates/app/pyproject.huggingface.toml.tpl +4 -4
  6. flwr/cli/new/templates/app/pyproject.jax.toml.tpl +2 -2
  7. flwr/cli/new/templates/app/pyproject.mlx.toml.tpl +2 -2
  8. flwr/cli/new/templates/app/pyproject.numpy.toml.tpl +2 -2
  9. flwr/cli/new/templates/app/pyproject.pytorch.toml.tpl +2 -2
  10. flwr/cli/new/templates/app/pyproject.sklearn.toml.tpl +3 -3
  11. flwr/cli/new/templates/app/pyproject.tensorflow.toml.tpl +2 -2
  12. flwr/cli/stop.py +3 -2
  13. flwr/cli/utils.py +1 -1
  14. flwr/client/supernode/app.py +4 -28
  15. flwr/common/args.py +25 -47
  16. flwr/common/config.py +15 -2
  17. flwr/common/logger.py +10 -5
  18. flwr/proto/clientappio_pb2.py +3 -13
  19. flwr/proto/clientappio_pb2_grpc.py +12 -63
  20. flwr/proto/error_pb2.py +3 -13
  21. flwr/proto/error_pb2_grpc.py +0 -20
  22. flwr/proto/exec_pb2.py +5 -15
  23. flwr/proto/exec_pb2_grpc.py +24 -105
  24. flwr/proto/fab_pb2.py +3 -13
  25. flwr/proto/fab_pb2_grpc.py +0 -20
  26. flwr/proto/fleet_pb2.py +4 -14
  27. flwr/proto/fleet_pb2_grpc.py +28 -119
  28. flwr/proto/grpcadapter_pb2.py +4 -14
  29. flwr/proto/grpcadapter_pb2_grpc.py +4 -35
  30. flwr/proto/log_pb2.py +3 -13
  31. flwr/proto/log_pb2_grpc.py +0 -20
  32. flwr/proto/message_pb2.py +5 -15
  33. flwr/proto/message_pb2_grpc.py +0 -20
  34. flwr/proto/node_pb2.py +3 -13
  35. flwr/proto/node_pb2_grpc.py +0 -20
  36. flwr/proto/recordset_pb2.py +8 -18
  37. flwr/proto/recordset_pb2_grpc.py +0 -20
  38. flwr/proto/run_pb2.py +6 -16
  39. flwr/proto/run_pb2_grpc.py +0 -20
  40. flwr/proto/serverappio_pb2.py +26 -45
  41. flwr/proto/serverappio_pb2.pyi +0 -62
  42. flwr/proto/serverappio_pb2_grpc.py +47 -264
  43. flwr/proto/serverappio_pb2_grpc.pyi +7 -27
  44. flwr/proto/simulationio_pb2.py +3 -13
  45. flwr/proto/simulationio_pb2_grpc.py +24 -105
  46. flwr/proto/task_pb2.py +3 -13
  47. flwr/proto/task_pb2_grpc.py +0 -20
  48. flwr/proto/transport_pb2.py +10 -20
  49. flwr/proto/transport_pb2_grpc.py +4 -35
  50. flwr/server/app.py +3 -7
  51. flwr/server/superlink/driver/serverappio_servicer.py +0 -94
  52. {flwr_nightly-1.15.0.dev20250129.dist-info → flwr_nightly-1.16.0.dev20250131.dist-info}/METADATA +3 -3
  53. {flwr_nightly-1.15.0.dev20250129.dist-info → flwr_nightly-1.16.0.dev20250131.dist-info}/RECORD +56 -56
  54. {flwr_nightly-1.15.0.dev20250129.dist-info → flwr_nightly-1.16.0.dev20250131.dist-info}/LICENSE +0 -0
  55. {flwr_nightly-1.15.0.dev20250129.dist-info → flwr_nightly-1.16.0.dev20250131.dist-info}/WHEEL +0 -0
  56. {flwr_nightly-1.15.0.dev20250129.dist-info → flwr_nightly-1.16.0.dev20250131.dist-info}/entry_points.txt +0 -0
flwr/cli/ls.py CHANGED
@@ -117,7 +117,7 @@ def ls( # pylint: disable=too-many-locals, too-many-branches, R0913, R0917
117
117
  federation, config, federation_config_overrides
118
118
  )
119
119
  exit_if_no_address(federation_config, "ls")
120
-
120
+ channel = None
121
121
  try:
122
122
  if runs and run_id is not None:
123
123
  raise ValueError(
@@ -148,7 +148,8 @@ def ls( # pylint: disable=too-many-locals, too-many-branches, R0913, R0917
148
148
  )
149
149
  raise typer.Exit(code=1) from err
150
150
  finally:
151
- channel.close()
151
+ if channel:
152
+ channel.close()
152
153
  except (typer.Exit, Exception) as err: # pylint: disable=broad-except
153
154
  if suppress_output:
154
155
  restore_output()
@@ -18,8 +18,9 @@ Refer to the [How to Run Simulations](https://flower.ai/docs/framework/how-to-ru
18
18
 
19
19
  ## Run with the Deployment Engine
20
20
 
21
- > \[!NOTE\]
22
- > An update to this example will show how to run this Flower application with the Deployment Engine and TLS certificates, or with Docker.
21
+ Follow this [how-to guide](https://flower.ai/docs/framework/how-to-run-flower-with-deployment-engine.html) to run the same app in this example but with Flower's Deployment Engine. After that, you might be intersted in setting up [secure TLS-enabled communications](https://flower.ai/docs/framework/how-to-enable-tls-connections.html) and [SuperNode authentication](https://flower.ai/docs/framework/how-to-authenticate-supernodes.html) in your federation.
22
+
23
+ You can run Flower on Docker too! Check out the [Flower with Docker](https://flower.ai/docs/framework/docker/index.html) documentation.
23
24
 
24
25
  ## Resources
25
26
 
@@ -8,10 +8,10 @@ version = "1.0.0"
8
8
  description = ""
9
9
  license = "Apache-2.0"
10
10
  dependencies = [
11
- "flwr[simulation]>=1.14.0",
12
- "flwr-datasets[vision]>=0.3.0",
13
- "torch==2.2.1",
14
- "torchvision==0.17.1",
11
+ "flwr[simulation]>=1.16.0",
12
+ "flwr-datasets[vision]>=0.5.0",
13
+ "torch==2.5.1",
14
+ "torchvision==0.20.1",
15
15
  ]
16
16
 
17
17
  [tool.hatch.metadata]
@@ -8,8 +8,8 @@ version = "1.0.0"
8
8
  description = ""
9
9
  license = "Apache-2.0"
10
10
  dependencies = [
11
- "flwr[simulation]>=1.14.0",
12
- "flwr-datasets>=0.3.0",
11
+ "flwr[simulation]>=1.16.0",
12
+ "flwr-datasets>=0.5.0",
13
13
  "torch==2.3.1",
14
14
  "trl==0.8.1",
15
15
  "bitsandbytes==0.45.0",
@@ -8,13 +8,13 @@ version = "1.0.0"
8
8
  description = ""
9
9
  license = "Apache-2.0"
10
10
  dependencies = [
11
- "flwr[simulation]>=1.14.0",
12
- "flwr-datasets>=0.3.0",
13
- "torch==2.2.1",
11
+ "flwr[simulation]>=1.16.0",
12
+ "flwr-datasets>=0.5.0",
13
+ "torch==2.5.1",
14
14
  "transformers>=4.30.0,<5.0",
15
15
  "evaluate>=0.4.0,<1.0",
16
16
  "datasets>=2.0.0, <3.0",
17
- "scikit-learn>=1.3.1, <2.0",
17
+ "scikit-learn>=1.6.1, <2.0",
18
18
  ]
19
19
 
20
20
  [tool.hatch.build.targets.wheel]
@@ -8,10 +8,10 @@ version = "1.0.0"
8
8
  description = ""
9
9
  license = "Apache-2.0"
10
10
  dependencies = [
11
- "flwr[simulation]>=1.14.0",
11
+ "flwr[simulation]>=1.16.0",
12
12
  "jax==0.4.30",
13
13
  "jaxlib==0.4.30",
14
- "scikit-learn==1.3.2",
14
+ "scikit-learn==1.6.1",
15
15
  ]
16
16
 
17
17
  [tool.hatch.build.targets.wheel]
@@ -8,8 +8,8 @@ version = "1.0.0"
8
8
  description = ""
9
9
  license = "Apache-2.0"
10
10
  dependencies = [
11
- "flwr[simulation]>=1.14.0",
12
- "flwr-datasets[vision]>=0.3.0",
11
+ "flwr[simulation]>=1.16.0",
12
+ "flwr-datasets[vision]>=0.5.0",
13
13
  "mlx==0.21.1",
14
14
  ]
15
15
 
@@ -8,8 +8,8 @@ version = "1.0.0"
8
8
  description = ""
9
9
  license = "Apache-2.0"
10
10
  dependencies = [
11
- "flwr[simulation]>=1.14.0",
12
- "numpy>=1.21.0",
11
+ "flwr[simulation]>=1.16.0",
12
+ "numpy>=2.0.2",
13
13
  ]
14
14
 
15
15
  [tool.hatch.build.targets.wheel]
@@ -8,8 +8,8 @@ version = "1.0.0"
8
8
  description = ""
9
9
  license = "Apache-2.0"
10
10
  dependencies = [
11
- "flwr[simulation]>=1.14.0",
12
- "flwr-datasets[vision]>=0.3.0",
11
+ "flwr[simulation]>=1.16.0",
12
+ "flwr-datasets[vision]>=0.5.0",
13
13
  "torch==2.5.1",
14
14
  "torchvision==0.20.1",
15
15
  ]
@@ -8,9 +8,9 @@ version = "1.0.0"
8
8
  description = ""
9
9
  license = "Apache-2.0"
10
10
  dependencies = [
11
- "flwr[simulation]>=1.14.0",
12
- "flwr-datasets[vision]>=0.3.0",
13
- "scikit-learn>=1.1.1",
11
+ "flwr[simulation]>=1.16.0",
12
+ "flwr-datasets[vision]>=0.5.0",
13
+ "scikit-learn>=1.6.1",
14
14
  ]
15
15
 
16
16
  [tool.hatch.build.targets.wheel]
@@ -8,8 +8,8 @@ version = "1.0.0"
8
8
  description = ""
9
9
  license = "Apache-2.0"
10
10
  dependencies = [
11
- "flwr[simulation]>=1.14.0",
12
- "flwr-datasets[vision]>=0.3.0",
11
+ "flwr[simulation]>=1.16.0",
12
+ "flwr-datasets[vision]>=0.5.0",
13
13
  "tensorflow>=2.11.1,<2.18.0",
14
14
  ]
15
15
 
flwr/cli/stop.py CHANGED
@@ -84,7 +84,7 @@ def stop( # pylint: disable=R0914
84
84
  federation, config, federation_config_overrides
85
85
  )
86
86
  exit_if_no_address(federation_config, "stop")
87
-
87
+ channel = None
88
88
  try:
89
89
  auth_plugin = try_obtain_cli_auth_plugin(app, federation, federation_config)
90
90
  channel = init_channel(app, federation_config, auth_plugin)
@@ -101,7 +101,8 @@ def stop( # pylint: disable=R0914
101
101
  )
102
102
  raise typer.Exit(code=1) from err
103
103
  finally:
104
- channel.close()
104
+ if channel:
105
+ channel.close()
105
106
  except (typer.Exit, Exception) as err: # pylint: disable=broad-except
106
107
  if suppress_output:
107
108
  restore_output()
flwr/cli/utils.py CHANGED
@@ -274,7 +274,7 @@ def init_channel(
274
274
  interceptors: list[grpc.UnaryUnaryClientInterceptor] = []
275
275
  if auth_plugin is not None:
276
276
  auth_plugin.load_tokens()
277
- interceptors = CliUserAuthInterceptor(auth_plugin)
277
+ interceptors.append(CliUserAuthInterceptor(auth_plugin))
278
278
 
279
279
  # Create the gRPC channel
280
280
  channel = create_channel(
@@ -41,7 +41,7 @@ from flwr.common.constant import (
41
41
  )
42
42
  from flwr.common.exit import ExitCode, flwr_exit
43
43
  from flwr.common.exit_handlers import register_exit_handlers
44
- from flwr.common.logger import log, warn_deprecated_feature
44
+ from flwr.common.logger import log
45
45
 
46
46
  from ..app import start_client_internal
47
47
  from ..clientapp.utils import get_load_client_app_fn
@@ -50,7 +50,6 @@ from ..clientapp.utils import get_load_client_app_fn
50
50
  def run_supernode() -> None:
51
51
  """Run Flower SuperNode."""
52
52
  args = _parse_args_run_supernode().parse_args()
53
- _warn_deprecated_server_arg(args)
54
53
 
55
54
  log(INFO, "Starting Flower SuperNode")
56
55
 
@@ -109,26 +108,6 @@ def run_client_app() -> None:
109
108
  register_exit_handlers(event_type=EventType.RUN_CLIENT_APP_LEAVE)
110
109
 
111
110
 
112
- def _warn_deprecated_server_arg(args: argparse.Namespace) -> None:
113
- """Warn about the deprecated argument `--server`."""
114
- if args.server != FLEET_API_GRPC_RERE_DEFAULT_ADDRESS:
115
- warn = "Passing flag --server is deprecated. Use --superlink instead."
116
- warn_deprecated_feature(warn)
117
-
118
- if args.superlink != FLEET_API_GRPC_RERE_DEFAULT_ADDRESS:
119
- # if `--superlink` also passed, then
120
- # warn user that this argument overrides what was passed with `--server`
121
- log(
122
- WARN,
123
- "Both `--server` and `--superlink` were passed. "
124
- "`--server` will be ignored. Connecting to the Superlink Fleet API "
125
- "at %s.",
126
- args.superlink,
127
- )
128
- else:
129
- args.superlink = args.server
130
-
131
-
132
111
  def _parse_args_run_supernode() -> argparse.ArgumentParser:
133
112
  """Parse flower-supernode command line arguments."""
134
113
  parser = argparse.ArgumentParser(
@@ -206,15 +185,12 @@ def _parse_args_common(parser: argparse.ArgumentParser) -> None:
206
185
  help="Specifies the path to the PEM-encoded root certificate file for "
207
186
  "establishing secure HTTPS connections.",
208
187
  )
209
- parser.add_argument(
210
- "--server",
211
- default=FLEET_API_GRPC_RERE_DEFAULT_ADDRESS,
212
- help="Server address",
213
- )
214
188
  parser.add_argument(
215
189
  "--superlink",
216
190
  default=FLEET_API_GRPC_RERE_DEFAULT_ADDRESS,
217
- help="SuperLink Fleet API (gRPC-rere) address (IPv4, IPv6, or a domain name)",
191
+ help="SuperLink Fleet API address (IPv4, IPv6, or a domain name). If using the "
192
+ "REST (experimental) transport, ensure your address is in the form "
193
+ "`http://...` or `https://...` when TLS is enabled.",
218
194
  )
219
195
  parser.add_argument(
220
196
  "--max-retries",
flwr/common/args.py CHANGED
@@ -20,13 +20,9 @@ import sys
20
20
  from logging import DEBUG, ERROR, WARN
21
21
  from os.path import isfile
22
22
  from pathlib import Path
23
- from typing import Optional
23
+ from typing import Optional, Union
24
24
 
25
- from flwr.common.constant import (
26
- TRANSPORT_TYPE_GRPC_ADAPTER,
27
- TRANSPORT_TYPE_GRPC_RERE,
28
- TRANSPORT_TYPE_REST,
29
- )
25
+ from flwr.common.constant import TRANSPORT_TYPE_REST
30
26
  from flwr.common.logger import log
31
27
 
32
28
 
@@ -55,9 +51,9 @@ def add_args_flwr_app_common(parser: argparse.ArgumentParser) -> None:
55
51
  def try_obtain_root_certificates(
56
52
  args: argparse.Namespace,
57
53
  grpc_server_address: str,
58
- ) -> Optional[bytes]:
54
+ ) -> Optional[Union[bytes, str]]:
59
55
  """Validate and return the root certificates."""
60
- root_cert_path = args.root_certificates
56
+ root_cert_path: Optional[str] = args.root_certificates
61
57
  if args.insecure:
62
58
  if root_cert_path is not None:
63
59
  sys.exit(
@@ -93,56 +89,38 @@ def try_obtain_root_certificates(
93
89
  grpc_server_address,
94
90
  root_cert_path,
95
91
  )
92
+ if args.transport == TRANSPORT_TYPE_REST:
93
+ return root_cert_path
96
94
  return root_certificates
97
95
 
98
96
 
99
97
  def try_obtain_server_certificates(
100
98
  args: argparse.Namespace,
101
- transport_type: str,
102
99
  ) -> Optional[tuple[bytes, bytes, bytes]]:
103
100
  """Validate and return the CA cert, server cert, and server private key."""
104
101
  if args.insecure:
105
102
  log(WARN, "Option `--insecure` was set. Starting insecure HTTP server.")
106
103
  return None
107
104
  # Check if certificates are provided
108
- if transport_type in [TRANSPORT_TYPE_GRPC_RERE, TRANSPORT_TYPE_GRPC_ADAPTER]:
109
- if args.ssl_certfile and args.ssl_keyfile and args.ssl_ca_certfile:
110
- if not isfile(args.ssl_ca_certfile):
111
- sys.exit("Path argument `--ssl-ca-certfile` does not point to a file.")
112
- if not isfile(args.ssl_certfile):
113
- sys.exit("Path argument `--ssl-certfile` does not point to a file.")
114
- if not isfile(args.ssl_keyfile):
115
- sys.exit("Path argument `--ssl-keyfile` does not point to a file.")
116
- certificates = (
117
- Path(args.ssl_ca_certfile).read_bytes(), # CA certificate
118
- Path(args.ssl_certfile).read_bytes(), # server certificate
119
- Path(args.ssl_keyfile).read_bytes(), # server private key
120
- )
121
- return certificates
122
- if args.ssl_certfile or args.ssl_keyfile or args.ssl_ca_certfile:
123
- sys.exit(
124
- "You need to provide valid file paths to `--ssl-certfile`, "
125
- "`--ssl-keyfile`, and `—-ssl-ca-certfile` to create a secure "
126
- "connection in Fleet API server (gRPC-rere)."
127
- )
128
- if transport_type == TRANSPORT_TYPE_REST:
129
- if args.ssl_certfile and args.ssl_keyfile:
130
- if not isfile(args.ssl_certfile):
131
- sys.exit("Path argument `--ssl-certfile` does not point to a file.")
132
- if not isfile(args.ssl_keyfile):
133
- sys.exit("Path argument `--ssl-keyfile` does not point to a file.")
134
- certificates = (
135
- b"",
136
- Path(args.ssl_certfile).read_bytes(), # server certificate
137
- Path(args.ssl_keyfile).read_bytes(), # server private key
138
- )
139
- return certificates
140
- if args.ssl_certfile or args.ssl_keyfile:
141
- sys.exit(
142
- "You need to provide valid file paths to `--ssl-certfile` "
143
- "and `--ssl-keyfile` to create a secure connection "
144
- "in Fleet API server (REST, experimental)."
145
- )
105
+ if args.ssl_certfile and args.ssl_keyfile and args.ssl_ca_certfile:
106
+ if not isfile(args.ssl_ca_certfile):
107
+ sys.exit("Path argument `--ssl-ca-certfile` does not point to a file.")
108
+ if not isfile(args.ssl_certfile):
109
+ sys.exit("Path argument `--ssl-certfile` does not point to a file.")
110
+ if not isfile(args.ssl_keyfile):
111
+ sys.exit("Path argument `--ssl-keyfile` does not point to a file.")
112
+ certificates = (
113
+ Path(args.ssl_ca_certfile).read_bytes(), # CA certificate
114
+ Path(args.ssl_certfile).read_bytes(), # server certificate
115
+ Path(args.ssl_keyfile).read_bytes(), # server private key
116
+ )
117
+ return certificates
118
+ if args.ssl_certfile or args.ssl_keyfile or args.ssl_ca_certfile:
119
+ sys.exit(
120
+ "You need to provide valid file paths to `--ssl-certfile`, "
121
+ "`--ssl-keyfile`, and `—-ssl-ca-certfile` to create a secure "
122
+ "connection in Fleet API server (gRPC-rere)."
123
+ )
146
124
  log(
147
125
  ERROR,
148
126
  "Certificates are required unless running in insecure mode. "
flwr/common/config.py CHANGED
@@ -23,6 +23,7 @@ from pathlib import Path
23
23
  from typing import IO, Any, Optional, TypeVar, Union, cast, get_args
24
24
 
25
25
  import tomli
26
+ import typer
26
27
 
27
28
  from flwr.common.constant import (
28
29
  APP_DIR,
@@ -233,8 +234,20 @@ def parse_config_args(
233
234
 
234
235
  matches = pattern.findall(config_line)
235
236
  toml_str = "\n".join(f"{k} = {v}" for k, v in matches)
236
- overrides.update(tomli.loads(toml_str))
237
- flat_overrides = flatten_dict(overrides) if flatten else overrides
237
+ try:
238
+ overrides.update(tomli.loads(toml_str))
239
+ flat_overrides = flatten_dict(overrides) if flatten else overrides
240
+ except tomli.TOMLDecodeError as err:
241
+ typer.secho(
242
+ "❌ The provided configuration string is in an invalid format. "
243
+ "The correct format should be, e.g., 'key1=123 key2=false "
244
+ 'key3="string"\', where values must be of type bool, int, '
245
+ "string, or float. Ensure proper formatting with "
246
+ "space-separated key-value pairs.",
247
+ fg=typer.colors.RED,
248
+ bold=True,
249
+ )
250
+ raise typer.Exit(code=1) from err
238
251
 
239
252
  return flat_overrides
240
253
 
flwr/common/logger.py CHANGED
@@ -128,12 +128,17 @@ console_handler.setLevel(logging.INFO)
128
128
  FLOWER_LOGGER.addHandler(console_handler)
129
129
 
130
130
  # Set log level via env var (show timestamps for `DEBUG`)
131
- if log_level := os.getenv("PYTHONLOGLEVEL"):
131
+ if log_level := os.getenv("FLWR_LOG_LEVEL"):
132
+ log_level = log_level.upper()
132
133
  try:
133
- use_time_stamps = log_level.upper() == "DEBUG"
134
- update_console_handler(
135
- level=log_level, timestamps=use_time_stamps, colored=True
136
- )
134
+ is_debug = log_level == "DEBUG"
135
+ if is_debug:
136
+ log(
137
+ WARN,
138
+ "DEBUG logs enabled. Do not use this in production, as it may expose "
139
+ "sensitive details.",
140
+ )
141
+ update_console_handler(level=log_level, timestamps=is_debug, colored=True)
137
142
  except Exception: # pylint: disable=broad-exception-caught
138
143
  # Alert user but don't raise exception
139
144
  log(
@@ -1,22 +1,12 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
3
- # NO CHECKED-IN PROTOBUF GENCODE
4
3
  # source: flwr/proto/clientappio.proto
5
- # Protobuf Python Version: 5.29.0
4
+ # Protobuf Python Version: 4.25.1
6
5
  """Generated protocol buffer code."""
7
6
  from google.protobuf import descriptor as _descriptor
8
7
  from google.protobuf import descriptor_pool as _descriptor_pool
9
- from google.protobuf import runtime_version as _runtime_version
10
8
  from google.protobuf import symbol_database as _symbol_database
11
9
  from google.protobuf.internal import builder as _builder
12
- _runtime_version.ValidateProtobufRuntimeVersion(
13
- _runtime_version.Domain.PUBLIC,
14
- 5,
15
- 29,
16
- 0,
17
- '',
18
- 'flwr/proto/clientappio.proto'
19
- )
20
10
  # @@protoc_insertion_point(imports)
21
11
 
22
12
  _sym_db = _symbol_database.Default()
@@ -32,8 +22,8 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1c\x66lwr/proto/
32
22
  _globals = globals()
33
23
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
34
24
  _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'flwr.proto.clientappio_pb2', _globals)
35
- if not _descriptor._USE_C_DESCRIPTORS:
36
- DESCRIPTOR._loaded_options = None
25
+ if _descriptor._USE_C_DESCRIPTORS == False:
26
+ DESCRIPTOR._options = None
37
27
  _globals['_CLIENTAPPOUTPUTCODE']._serialized_start=675
38
28
  _globals['_CLIENTAPPOUTPUTCODE']._serialized_end=751
39
29
  _globals['_CLIENTAPPOUTPUTSTATUS']._serialized_start=114
@@ -1,29 +1,9 @@
1
1
  # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
2
  """Client and server classes corresponding to protobuf-defined services."""
3
3
  import grpc
4
- import warnings
5
4
 
6
5
  from flwr.proto import clientappio_pb2 as flwr_dot_proto_dot_clientappio__pb2
7
6
 
8
- GRPC_GENERATED_VERSION = '1.69.0'
9
- GRPC_VERSION = grpc.__version__
10
- _version_not_supported = False
11
-
12
- try:
13
- from grpc._utilities import first_version_is_lower
14
- _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
15
- except ImportError:
16
- _version_not_supported = True
17
-
18
- if _version_not_supported:
19
- raise RuntimeError(
20
- f'The grpc package installed is at version {GRPC_VERSION},'
21
- + f' but the generated code in flwr/proto/clientappio_pb2_grpc.py depends on'
22
- + f' grpcio>={GRPC_GENERATED_VERSION}.'
23
- + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
24
- + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
25
- )
26
-
27
7
 
28
8
  class ClientAppIoStub(object):
29
9
  """Missing associated documentation comment in .proto file."""
@@ -38,17 +18,17 @@ class ClientAppIoStub(object):
38
18
  '/flwr.proto.ClientAppIo/GetToken',
39
19
  request_serializer=flwr_dot_proto_dot_clientappio__pb2.GetTokenRequest.SerializeToString,
40
20
  response_deserializer=flwr_dot_proto_dot_clientappio__pb2.GetTokenResponse.FromString,
41
- _registered_method=True)
21
+ )
42
22
  self.PullClientAppInputs = channel.unary_unary(
43
23
  '/flwr.proto.ClientAppIo/PullClientAppInputs',
44
24
  request_serializer=flwr_dot_proto_dot_clientappio__pb2.PullClientAppInputsRequest.SerializeToString,
45
25
  response_deserializer=flwr_dot_proto_dot_clientappio__pb2.PullClientAppInputsResponse.FromString,
46
- _registered_method=True)
26
+ )
47
27
  self.PushClientAppOutputs = channel.unary_unary(
48
28
  '/flwr.proto.ClientAppIo/PushClientAppOutputs',
49
29
  request_serializer=flwr_dot_proto_dot_clientappio__pb2.PushClientAppOutputsRequest.SerializeToString,
50
30
  response_deserializer=flwr_dot_proto_dot_clientappio__pb2.PushClientAppOutputsResponse.FromString,
51
- _registered_method=True)
31
+ )
52
32
 
53
33
 
54
34
  class ClientAppIoServicer(object):
@@ -97,7 +77,6 @@ def add_ClientAppIoServicer_to_server(servicer, server):
97
77
  generic_handler = grpc.method_handlers_generic_handler(
98
78
  'flwr.proto.ClientAppIo', rpc_method_handlers)
99
79
  server.add_generic_rpc_handlers((generic_handler,))
100
- server.add_registered_method_handlers('flwr.proto.ClientAppIo', rpc_method_handlers)
101
80
 
102
81
 
103
82
  # This class is part of an EXPERIMENTAL API.
@@ -115,21 +94,11 @@ class ClientAppIo(object):
115
94
  wait_for_ready=None,
116
95
  timeout=None,
117
96
  metadata=None):
118
- return grpc.experimental.unary_unary(
119
- request,
120
- target,
121
- '/flwr.proto.ClientAppIo/GetToken',
97
+ return grpc.experimental.unary_unary(request, target, '/flwr.proto.ClientAppIo/GetToken',
122
98
  flwr_dot_proto_dot_clientappio__pb2.GetTokenRequest.SerializeToString,
123
99
  flwr_dot_proto_dot_clientappio__pb2.GetTokenResponse.FromString,
124
- options,
125
- channel_credentials,
126
- insecure,
127
- call_credentials,
128
- compression,
129
- wait_for_ready,
130
- timeout,
131
- metadata,
132
- _registered_method=True)
100
+ options, channel_credentials,
101
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
133
102
 
134
103
  @staticmethod
135
104
  def PullClientAppInputs(request,
@@ -142,21 +111,11 @@ class ClientAppIo(object):
142
111
  wait_for_ready=None,
143
112
  timeout=None,
144
113
  metadata=None):
145
- return grpc.experimental.unary_unary(
146
- request,
147
- target,
148
- '/flwr.proto.ClientAppIo/PullClientAppInputs',
114
+ return grpc.experimental.unary_unary(request, target, '/flwr.proto.ClientAppIo/PullClientAppInputs',
149
115
  flwr_dot_proto_dot_clientappio__pb2.PullClientAppInputsRequest.SerializeToString,
150
116
  flwr_dot_proto_dot_clientappio__pb2.PullClientAppInputsResponse.FromString,
151
- options,
152
- channel_credentials,
153
- insecure,
154
- call_credentials,
155
- compression,
156
- wait_for_ready,
157
- timeout,
158
- metadata,
159
- _registered_method=True)
117
+ options, channel_credentials,
118
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
160
119
 
161
120
  @staticmethod
162
121
  def PushClientAppOutputs(request,
@@ -169,18 +128,8 @@ class ClientAppIo(object):
169
128
  wait_for_ready=None,
170
129
  timeout=None,
171
130
  metadata=None):
172
- return grpc.experimental.unary_unary(
173
- request,
174
- target,
175
- '/flwr.proto.ClientAppIo/PushClientAppOutputs',
131
+ return grpc.experimental.unary_unary(request, target, '/flwr.proto.ClientAppIo/PushClientAppOutputs',
176
132
  flwr_dot_proto_dot_clientappio__pb2.PushClientAppOutputsRequest.SerializeToString,
177
133
  flwr_dot_proto_dot_clientappio__pb2.PushClientAppOutputsResponse.FromString,
178
- options,
179
- channel_credentials,
180
- insecure,
181
- call_credentials,
182
- compression,
183
- wait_for_ready,
184
- timeout,
185
- metadata,
186
- _registered_method=True)
134
+ options, channel_credentials,
135
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
flwr/proto/error_pb2.py CHANGED
@@ -1,22 +1,12 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
3
- # NO CHECKED-IN PROTOBUF GENCODE
4
3
  # source: flwr/proto/error.proto
5
- # Protobuf Python Version: 5.29.0
4
+ # Protobuf Python Version: 4.25.1
6
5
  """Generated protocol buffer code."""
7
6
  from google.protobuf import descriptor as _descriptor
8
7
  from google.protobuf import descriptor_pool as _descriptor_pool
9
- from google.protobuf import runtime_version as _runtime_version
10
8
  from google.protobuf import symbol_database as _symbol_database
11
9
  from google.protobuf.internal import builder as _builder
12
- _runtime_version.ValidateProtobufRuntimeVersion(
13
- _runtime_version.Domain.PUBLIC,
14
- 5,
15
- 29,
16
- 0,
17
- '',
18
- 'flwr/proto/error.proto'
19
- )
20
10
  # @@protoc_insertion_point(imports)
21
11
 
22
12
  _sym_db = _symbol_database.Default()
@@ -29,8 +19,8 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16\x66lwr/proto/
29
19
  _globals = globals()
30
20
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
31
21
  _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'flwr.proto.error_pb2', _globals)
32
- if not _descriptor._USE_C_DESCRIPTORS:
33
- DESCRIPTOR._loaded_options = None
22
+ if _descriptor._USE_C_DESCRIPTORS == False:
23
+ DESCRIPTOR._options = None
34
24
  _globals['_ERROR']._serialized_start=38
35
25
  _globals['_ERROR']._serialized_end=75
36
26
  # @@protoc_insertion_point(module_scope)
@@ -1,24 +1,4 @@
1
1
  # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
2
  """Client and server classes corresponding to protobuf-defined services."""
3
3
  import grpc
4
- import warnings
5
4
 
6
-
7
- GRPC_GENERATED_VERSION = '1.69.0'
8
- GRPC_VERSION = grpc.__version__
9
- _version_not_supported = False
10
-
11
- try:
12
- from grpc._utilities import first_version_is_lower
13
- _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
14
- except ImportError:
15
- _version_not_supported = True
16
-
17
- if _version_not_supported:
18
- raise RuntimeError(
19
- f'The grpc package installed is at version {GRPC_VERSION},'
20
- + f' but the generated code in flwr/proto/error_pb2_grpc.py depends on'
21
- + f' grpcio>={GRPC_GENERATED_VERSION}.'
22
- + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
23
- + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
24
- )