Skip to content

Commit

Permalink
Merge branch 'main' into doc/serverapp-docker-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tanertopal authored May 16, 2024
2 parents 6370fbc + a62df57 commit 5ebbbc9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
3 changes: 3 additions & 0 deletions doc/build-versioned-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ END
# Actually building the docs for a given language and version
sphinx-build -b html source/ build/html/${current_version}/${current_language} -A lang=True -D language=${current_language}

# Clean the history of the checked-out branch to remove conflicts
git clean -fd

done
done

Expand Down
16 changes: 12 additions & 4 deletions src/py/flwr/server/workflow/default_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@

import io
import timeit
from logging import INFO
from logging import INFO, WARN
from typing import Optional, cast

import flwr.common.recordset_compat as compat
from flwr.common import ConfigsRecord, Context, GetParametersIns, log
from flwr.common import ConfigsRecord, Context, GetParametersIns, ParametersRecord, log
from flwr.common.constant import MessageType, MessageTypeLegacy

from ..compat.app_utils import start_update_client_manager_thread
Expand Down Expand Up @@ -135,9 +135,17 @@ def default_init_params_workflow(driver: Driver, context: Context) -> None:
)
]
)
log(INFO, "Received initial parameters from one random client")
msg = list(messages)[0]
paramsrecord = next(iter(msg.content.parameters_records.values()))
if msg.has_content():
log(INFO, "Received initial parameters from one random client")
paramsrecord = next(iter(msg.content.parameters_records.values()))
else:
log(
WARN,
"Failed to receive initial parameters from the client."
" Empty initial parameters will be used.",
)
paramsrecord = ParametersRecord()

context.state.parameters_records[MAIN_PARAMS_RECORD] = paramsrecord

Expand Down

0 comments on commit 5ebbbc9

Please sign in to comment.