Skip to content

Commit

Permalink
Fix return types in Strategy docs (#2432)
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-narozniak authored Oct 7, 2023
1 parent b9ae24a commit 6df3e86
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions doc/source/ref-changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@

### What's new?

- **Fix the incorrect return types of Strategy** ([#2432](https://github.com/adap/flower/pull/2432/files))

The types of the return values in the docstrings in two methods (`aggregate_fit` and `aggregate_evaluate`) now match the hint types in the code.

- **Unify client API** ([#2303](https://github.com/adap/flower/pull/2303))

Using the `client_fn`, Flower clients can interchangeably run as standalone processes (i.e. via `start_client`) or in simulation (i.e. via `start_simulation`) without requiring changes to how the client class is defined and instantiated.
Expand Down
4 changes: 2 additions & 2 deletions src/py/flwr/server/strategy/strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def aggregate_fit(
Returns
-------
parameters : Optional[Parameters]
parameters : Tuple[Optional[Parameters], Dict[str, Scalar]]
If parameters are returned, then the server will treat these as the
new global model parameters (i.e., it will replace the previous
parameters with the ones returned from this method). If `None` is
Expand Down Expand Up @@ -156,7 +156,7 @@ def aggregate_evaluate(
Returns
-------
aggregation_result : Optional[float]
aggregation_result : Tuple[Optional[float], Dict[str, Scalar]]
The aggregated evaluation result. Aggregation typically uses some variant
of a weighted average.
"""
Expand Down

0 comments on commit 6df3e86

Please sign in to comment.