-
Notifications
You must be signed in to change notification settings - Fork 181
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
Add Flower SuperExec plugin #2855
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change to use FlowerJob instead of building the job on your own.
nvflare/app_opt/flower/plugin.py
Outdated
# Locate all allowed files in the FAB directory | ||
tmp_dir = _copy_to_tmp_dir(Path(fab_path)) | ||
|
||
# Create FedJob | ||
job = FlowerJob(job_name, tmp_dir) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @yanchengnv . May I know if this is the correct way to use FlowerJob
? I somehow got a strange custom
folder after exporting the Flower job:
The temporary folder that contains all flower files is correct:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You cannot directly pass tmp_dir to FlowerJob as "flower_content".
FlowerJob requires the "flower_content" to be a str, whereas tmp_dir is Path.
You need to pass str(tmp_dir) to FlowerJob.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yanchengnv Thanks so much for your help! I've just updated the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please pass a "str" as "flower_content" to FlowerJob.
nvflare/app_opt/flower/plugin.py
Outdated
# Locate all allowed files in the FAB directory | ||
tmp_dir = _copy_to_tmp_dir(Path(fab_path)) | ||
|
||
# Create FedJob | ||
job = FlowerJob(job_name, tmp_dir) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You cannot directly pass tmp_dir to FlowerJob as "flower_content".
FlowerJob requires the "flower_content" to be a str, whereas tmp_dir is Path.
You need to pass str(tmp_dir) to FlowerJob.
Description
This PR adds a FlowerSuperExecPlugin in the new file plugin.py under the nvflare/app_opt/flower/ directory. It enables users to run a Flower app with a Flare backend using the flwr run command, which is the same as how it is done in pure Flower.
Types of changes
./runtest.sh
.