Skip to main content

Deployment Mode

Deployment mode uses Flower SuperLink and SuperNode processes. It is closer to a real federated deployment than local simulation and requires at least two client nodes.

Install and verify

Install FedGWAS on the server node and on every participating client node:

python -m pip install FedGWAS
python -m pip install flwr

Each client node also needs access to PLINK-compatible genotype data and the configured PLINK executable. Confirm the Flower commands are available before starting the federation:

flower-superlink --help
flower-supernode --help
flwr --help

Data layout

For local deployment tests, point each SuperNode at a center config. The shipped tiny correctness experiment uses:

experiments/correctness/tiny_even/configs/
server/config.yaml
center_1/config.yaml
center_2/config.yaml

For your own data, copy the template and update paths, thresholds, and output directories:

cp configs/config_template.yaml configs/config.yaml

Start the federation

Start SuperLink:

flower-superlink --insecure --fleet-api-address 127.0.0.1:9092

Start two SuperNodes in separate terminals:

flower-supernode \
--insecure \
--superlink 127.0.0.1:9092 \
--clientappio-api-address 127.0.0.1:9094 \
--node-config 'partition-id=0 num-partitions=2 config-file="experiments/correctness/tiny_even/configs/center_1/config.yaml"'
flower-supernode \
--insecure \
--superlink 127.0.0.1:9092 \
--clientappio-api-address 127.0.0.1:9095 \
--node-config 'partition-id=1 num-partitions=2 config-file="experiments/correctness/tiny_even/configs/center_2/config.yaml"'

Run the Fed-GWAS app

flwr run . local-deployment --stream

local-deployment must point at the SuperLink Exec API port:

[tool.flwr.federations.local-deployment]
address = "127.0.0.1:9093"
insecure = true
options.num-supernodes = 2

Flower ports

PortRole
9091ServerAppIo API
9092Fleet API; SuperNodes connect here
9093Exec API; flwr run connects here
9094+ClientAppIo API for each SuperNode

TLS

For TLS-enabled runs, provide certificates to SuperLink and SuperNode:

flower-superlink \
--ssl-ca-certfile <ca-cert> \
--ssl-certfile <server-cert> \
--ssl-keyfile <server-key>
flower-supernode \
--superlink 127.0.0.1:9092 \
--clientappio-api-address 127.0.0.1:9094 \
--root-certificates <ca-cert>