Skip to content

Make flower-simulation accept ClientApp and ServerApp objects - #3024

Merged
danieljanes merged 168 commits into
mainfrom
vce-fleet-notebook-ready
Mar 5, 2024
Merged

Make flower-simulation accept ClientApp and ServerApp objects#3024
danieljanes merged 168 commits into
mainfrom
vce-fleet-notebook-ready

Conversation

@jafermarq

@jafermarq jafermarq commented Feb 27, 2024

Copy link
Copy Markdown
Member

Enables running the new Simulation Engine on Notebooks. For this to be possible we need:

  • to update run_simulation so it accepts ClientApp and ServerApp objects and not just strings pointing to modules where those are defined.
  • Wrap the whole execution into a new thread (which will itself launch another one running the ServerApp). This is needed since notebooks have their own Asyncio event loop running, conflicting with some parts of the Simulation Engine if they run on the main thread. Running on the main thread remains the default behaviour when the code is executed outside a notebook environment (whether it is from the cli via flower-simulation or from a python script)
  • Decide if we apply the changes to the notebooks (or keep it in a separate code cell?) -> in a future PR.

Comment thread src/py/flwr/simulation/run_simulation.py Outdated
Comment thread src/py/flwr/simulation/run_simulation.py Outdated
Comment thread src/py/flwr/simulation/run_simulation.py Outdated
Comment thread src/py/flwr/simulation/run_simulation.py Outdated
Comment thread src/py/flwr/simulation/run_simulation.py Outdated
Comment thread src/py/flwr/simulation/run_simulation.py Outdated
Comment thread src/py/flwr/simulation/run_simulation.py Outdated
Comment thread src/py/flwr/simulation/run_simulation.py Outdated
Comment thread src/py/flwr/simulation/run_simulation.py Outdated
Comment thread src/py/flwr/simulation/run_simulation.py Outdated
@danieljanes
danieljanes enabled auto-merge (squash) March 5, 2024 10:29
@danieljanes
danieljanes merged commit c05df2a into main Mar 5, 2024
@danieljanes
danieljanes deleted the vce-fleet-notebook-ready branch March 5, 2024 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants