feat(framework): Add runtime dependency installation option#6741
Merged
danieljanes merged 24 commits intomainfrom Apr 9, 2026
Merged
feat(framework): Add runtime dependency installation option#6741danieljanes merged 24 commits intomainfrom
danieljanes merged 24 commits intomainfrom
Conversation
…t, and ability to limit to a local pypi repo with --index-url argument. Creates an ephemeral virtual environment for each run, and cleans it up after execution Signed-off-by: Patrick Foley <patrick@flower.ai>
Signed-off-by: Patrick Foley <patrick@flower.ai>
Signed-off-by: Patrick Foley <patrick@flower.ai>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an opt-in mechanism for installing application dependencies at runtime (via uv sync) and threads the corresponding CLI/config options through SuperNode/SuperExec and the various flwr-* app processes.
Changes:
- Introduces
--allow-runtime-dependency-installationand propagates it through SuperLink/SuperNode/SuperExec process launching. - Adds a new
dependency_installerutility to create/activate a per-run/per-launch runtime environment and install dependencies viauv. - Updates ClientApp/ServerApp/Simulation processes to optionally install dependencies and clean up the runtime environment on exit.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| framework/py/flwr/supernode/start_client_internal.py | Forwards runtime dependency install flags to the flower-superexec subprocess. |
| framework/py/flwr/supernode/runtime/run_clientapp.py | Optionally installs app dependencies before loading/running the ClientApp and cleans up on exit. |
| framework/py/flwr/supernode/cli/flwr_clientapp.py | Passes new runtime dependency install parameters into run_clientapp/superexec wrapper. |
| framework/py/flwr/supernode/cli/flower_supernode.py | Adds parsing/forwarding of runtime dependency installation CLI args for SuperNode. |
| framework/py/flwr/supercore/superexec/run_superexec.py | Plumbs index_url/runtime_dependency_install into plugin construction and deprecation log output. |
| framework/py/flwr/supercore/superexec/plugin/exec_plugin.py | Extends ExecPlugin to store index_url and runtime install toggle. |
| framework/py/flwr/supercore/superexec/plugin/base_exec_plugin.py | Adds forwarding of runtime install flags when launching app subprocesses. |
| framework/py/flwr/supercore/superexec/dependency_installer.py | New module implementing uv installation, dependency sync, env activation, and cleanup. |
| framework/py/flwr/supercore/cli/flower_superexec.py | Adds runtime dependency installation CLI args to flower-superexec. |
| framework/py/flwr/simulation/app.py | Optionally installs simulation app dependencies and cleans up runtime env on exit. |
| framework/py/flwr/server/serverapp/app.py | Optionally installs server app dependencies and cleans up runtime env on exit. |
| framework/py/flwr/server/app.py | Forwards runtime dependency install flags when spawning flower-superexec in subprocess isolation mode. |
| framework/py/flwr/common/constant.py | Adds RUNTIME_DEPENDENCY_INSTALL default toggle constant. |
| framework/py/flwr/common/args.py | Introduces shared CLI arg helper add_args_runtime_dependency_install and includes it in common app args. |
| framework/py/flwr/cli/log.py | Changes log streaming loop behavior (notably error handling wrapper removal). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Signed-off-by: Patrick Foley <patrick@flower.ai>
Signed-off-by: Patrick Foley <patrick@flower.ai>
Signed-off-by: Patrick Foley <patrick@flower.ai>
psfoley
commented
Mar 12, 2026
Signed-off-by: Patrick Foley <patrick@flower.ai>
panh99
reviewed
Mar 13, 2026
Signed-off-by: Patrick Foley <patrick@flower.ai>
jafermarq
reviewed
Apr 8, 2026
jafermarq
reviewed
Apr 8, 2026
Co-authored-by: Javier <jafermarq@users.noreply.github.com>
…d on provided flag Signed-off-by: Patrick Foley <patrick@flower.ai>
Signed-off-by: Patrick Foley <patrick@flower.ai>
Signed-off-by: Patrick Foley <patrick@flower.ai>
…dependencies are needed, also report that Signed-off-by: Patrick Foley <patrick@flower.ai>
Signed-off-by: Patrick Foley <patrick@flower.ai>
jafermarq
previously approved these changes
Apr 8, 2026
jafermarq
previously approved these changes
Apr 9, 2026
danieljanes
previously approved these changes
Apr 9, 2026
jafermarq
approved these changes
Apr 9, 2026
danieljanes
approved these changes
Apr 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.