Skip to content

Commit

Permalink
docs(framework) Update client_fn docstrings to new signature
Browse files Browse the repository at this point in the history
  • Loading branch information
danieljanes committed Jul 13, 2024
1 parent 5505e0a commit d905089
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/py/flwr/client/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class `flwr.client.Client` (default: None)
Starting an SSL-enabled gRPC client using system certificates:
>>> def client_fn(context: Context):
>>> return FlowerClient()
>>> return FlowerClient().to_client()
>>>
>>> start_client(
>>> server_address=localhost:8080,
Expand Down
2 changes: 1 addition & 1 deletion src/py/flwr/client/client_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class ClientApp:
>>> class FlowerClient(NumPyClient):
>>> # ...
>>>
>>> def client_fn(node_id: int, partition_id: Optional[int]):
>>> def client_fn(context: Context):
>>> return FlowerClient().to_client()
>>>
>>> app = ClientApp(client_fn)
Expand Down
6 changes: 3 additions & 3 deletions src/py/flwr/simulation/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ def start_simulation(
Parameters
----------
client_fn : ClientFnExt
A function creating Client instances. The function must have the signature
`client_fn(node_id: int, partition_id: Optional[int]). It should return
a single client instance of type Client. Note that the created client
A function creating `Client` instances. The function must have the signature
`client_fn(context: Context). It should return
a single client instance of type `Client`. Note that the created client
instances are ephemeral and will often be destroyed after a single method
invocation. Since client instances are not long-lived, they should not attempt
to carry state over method invocations. Any state required by the instance
Expand Down

0 comments on commit d905089

Please sign in to comment.