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

Make flower-simulation accept ClientApp and ServerApp objects #3024

Merged
merged 168 commits into from
Mar 5, 2024

Conversation

jafermarq
Copy link
Contributor

@jafermarq jafermarq commented Feb 27, 2024

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.

@danieljanes danieljanes enabled auto-merge (squash) March 5, 2024 10:29
@danieljanes danieljanes merged commit c05df2a into main Mar 5, 2024
28 checks passed
@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
Examples Add or update a Flower example simulation An issue related to Flower's simulation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants