Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix outdated evaluation docs #1257

Merged
merged 1 commit into from
Jun 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc/source/evaluation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ An evaluation function is any function that can take the current global model pa
x_val, y_val = x_train[45000:50000], y_train[45000:50000]
# The `evaluate` function will be called after every round
def evaluate(weights: fl.common.Weights) -> Optional[Tuple[float, float]]:
def evaluate(weights: fl.common.Weights) -> Optional[Tuple[float, Dict]]:
model.set_weights(weights) # Update model with the latest parameters
loss, accuracy = model.evaluate(x_val, y_val)
return loss, accuracy
return loss, {"accuracy": accuracy}
return evaluate
Expand Down