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

feat(framework) Enable configuring the simulation backend via flwr run #4059

Merged
merged 11 commits into from
Aug 23, 2024

Conversation

jafermarq
Copy link
Contributor

@jafermarq jafermarq commented Aug 22, 2024

If the [federations] section in a pyproject.toml contains options.backend components, these will be passed to flower-simulation via the existing --backend-config CLI argument. This can be used to parameterize the simulation backend, for example to control the CPU/GPU resources a ClientApp uses.

[tool.flwr.federations.remote-A100]
address = "1.2.3.4:5678"  # SuperExec address
options.backend.client-resources.num-cpus = 4
options.backend.client-resources.num-gpus = 0.25
options.backend.init-args.log-to-driver = false

The above content of options.backend will be parsed into:

{'client-resources': {'num-cpus': 4, 'num-gpus': 0.25}, 'init-args': {'log-to-driver': False}}

and eventually passed to flower-simulation. At the entry point of flower-simulation from the CLI. the - will be replaced with _.

Note

Specifying options.backend... is entirely optional.

@jafermarq jafermarq added the simulation An issue related to Flower's simulation label Aug 22, 2024
@jafermarq jafermarq marked this pull request as ready for review August 22, 2024 12:42
@danieljanes danieljanes enabled auto-merge (squash) August 23, 2024 11:38
@danieljanes danieljanes merged commit cca0fab into main Aug 23, 2024
33 checks passed
@danieljanes danieljanes deleted the extend-simulation-plugin-support branch August 23, 2024 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
simulation An issue related to Flower's simulation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants