flwr-nightly 1.4.0.dev20230327__py3-none-any.whl → 1.4.0.dev20230330__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
flwr/simulation/app.py CHANGED
@@ -21,7 +21,7 @@ from typing import Any, Callable, Dict, List, Optional
21
21
 
22
22
  import ray
23
23
 
24
- from flwr.client.client import Client
24
+ from flwr.client import ClientLike
25
25
  from flwr.common import EventType, event
26
26
  from flwr.common.logger import log
27
27
  from flwr.server import Server
@@ -38,7 +38,7 @@ Invalid Arguments in method:
38
38
 
39
39
  `start_simulation(
40
40
  *,
41
- client_fn: Callable[[str], Client],
41
+ client_fn: Callable[[str], ClientLike],
42
42
  num_clients: Optional[int] = None,
43
43
  clients_ids: Optional[List[str]] = None,
44
44
  client_resources: Optional[Dict[str, float]] = None,
@@ -61,7 +61,7 @@ REASON:
61
61
 
62
62
  def start_simulation( # pylint: disable=too-many-arguments
63
63
  *,
64
- client_fn: Callable[[str], Client],
64
+ client_fn: Callable[[str], ClientLike],
65
65
  num_clients: Optional[int] = None,
66
66
  clients_ids: Optional[List[str]] = None,
67
67
  client_resources: Optional[Dict[str, float]] = None,
@@ -76,16 +76,17 @@ def start_simulation( # pylint: disable=too-many-arguments
76
76
 
77
77
  Parameters
78
78
  ----------
79
- client_fn : Callable[[str], Client]
79
+ client_fn : Callable[[str], ClientLike]
80
80
  A function creating client instances. The function must take a single
81
- str argument called `cid`. It should return a single client instance.
82
- Note that the created client instances are ephemeral and will often be
83
- destroyed after a single method invocation. Since client instances are
84
- not long-lived, they should not attempt to carry state over method
85
- invocations. Any state required by the instance (model, dataset,
86
- hyperparameters, ...) should be (re-)created in either the call to
87
- `client_fn` or the call to any of the client methods (e.g., load
88
- evaluation data in the `evaluate` method itself).
81
+ str argument called `cid`. It should return a single client instance
82
+ of type ClientLike. Note that the created client instances
83
+ are ephemeral and will often be destroyed after a single method
84
+ invocation. Since client instances are not long-lived, they should not
85
+ attempt to carry state over method invocations. Any state required by
86
+ the instance (model, dataset,hyperparameters, ...) should be
87
+ (re-)created in either the call to `client_fn` or the call to any of
88
+ the client methods (e.g., load evaluation data in the `evaluate`
89
+ method itself).
89
90
  num_clients : Optional[int]
90
91
  The total number of clients in this simulation. This must be set if
91
92
  `clients_ids` is not set and vice-versa.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: flwr-nightly
3
- Version: 1.4.0.dev20230327
3
+ Version: 1.4.0.dev20230330
4
4
  Summary: Flower: A Friendly Federated Learning Framework
5
5
  Home-page: https://flower.dev
6
6
  License: Apache-2.0
@@ -92,11 +92,11 @@ flwr/server/utils/__init__.py,sha256=I3aifvGufkoK1Od-w1Xz_nicgAYllqXScQiRU6A5xvA
92
92
  flwr/server/utils/tensorboard.py,sha256=BeaO4HIm6HrBXNwRXB_BetOrG4zmsDh_dTJzU3AJAv8,5112
93
93
  flwr/server/utils/validator.py,sha256=BjDMGy8pgB7nwg-w-QNFQf_lipzc0FbVlx-IdHlEVuQ,4939
94
94
  flwr/simulation/__init__.py,sha256=7gYUX6zr_yJd1wtv65xRHajBvurkfoPVXv66buUy4H8,1270
95
- flwr/simulation/app.py,sha256=4UKy2OgCsTveHmtvIvqL2NsuL0OiIR4n1wDRLrugK88,7737
95
+ flwr/simulation/app.py,sha256=kYvgqQeQKOzOlQRNWdEYnf6FxmvoStfqYGhsjEghqDQ,7773
96
96
  flwr/simulation/ray_transport/__init__.py,sha256=eJ3pijYkI7XhbX2rLu6FBGTo8hZkFL8RSj4twhApOGw,727
97
97
  flwr/simulation/ray_transport/ray_client_proxy.py,sha256=yGY8p0TKxak-OH7zqFxd9oDe3TQ_cfAZEp0-JJYEnyg,5472
98
- flwr_nightly-1.4.0.dev20230327.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
99
- flwr_nightly-1.4.0.dev20230327.dist-info/entry_points.txt,sha256=1uLlD5tIunkzALMfMWnqjdE_D5hRUX_I1iMmOMv6tZI,181
100
- flwr_nightly-1.4.0.dev20230327.dist-info/WHEEL,sha256=vVCvjcmxuUltf8cYhJ0sJMRDLr1XsPuxEId8YDzbyCY,88
101
- flwr_nightly-1.4.0.dev20230327.dist-info/METADATA,sha256=c1HRyMpArw235b_wB2qU4XQo_ul2uwVwuYLlR2XvsLg,12839
102
- flwr_nightly-1.4.0.dev20230327.dist-info/RECORD,,
98
+ flwr_nightly-1.4.0.dev20230330.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
99
+ flwr_nightly-1.4.0.dev20230330.dist-info/entry_points.txt,sha256=1uLlD5tIunkzALMfMWnqjdE_D5hRUX_I1iMmOMv6tZI,181
100
+ flwr_nightly-1.4.0.dev20230330.dist-info/WHEEL,sha256=vVCvjcmxuUltf8cYhJ0sJMRDLr1XsPuxEId8YDzbyCY,88
101
+ flwr_nightly-1.4.0.dev20230330.dist-info/METADATA,sha256=QgQDA5FLcEymq6UwgEpTRv67SYqhvw5tUHk6Ww3tGu4,12839
102
+ flwr_nightly-1.4.0.dev20230330.dist-info/RECORD,,