Client Modules
The client entry point is pipeline/client_app.py. Flower calls client_fn(context), which creates a FedLRClient for the current partition.
Initialization path
FedLRClient.__init__ performs the following work:
- Reads the partition id from the Flower
Context. - Resolves the center configuration path. In simulation mode, this is derived from
config_pathandpartition-id. - Loads the YAML file with
DataLoader. - Converts or binds the input data to a PLINK prefix.
- Stores configuration records in Flower client state on first initialization.
- Restores configuration records from state on later rounds.
- Initializes
BaseGWASClient, thresholds, participation flags, and the per-client logger.
Stage routing
fit(parameters, config) reads config["stage"] and delegates to the matching branch:
| Stage | Implementation |
|---|---|
key_exchange | pipeline/client_app.py with helpers from prg_masking.py |
sync / sync_response | pipeline/clients/seed_sync.py and pipeline/clients/client_to_client.py |
local_qc | pipeline/clients/local_qc.py |
global_qc / global_qc_response | pipeline/clients/local_qc.py, pipeline/clients/c2c_payloads.py, and pipeline/clients/client_qc_aggregator.py |
local_lr / local_lr_filter_response | pipeline/clients/local_qc.py and pipeline/clients/lr_privacy.py |
init_chunks / init_chunks_lr | BaseGWASClient.partition_data |
iterative_king | pipeline/clients/iterative_king.py |
iterative_lr / iterative_lr_response | pipeline/clients/iterative_lr.py |
Chunking behavior
BaseGWASClient.partition_data supports three partition modes:
samples: reads.fam, shuffles sample IDs withglobal_seed, writes a PLINK--keepfile, and creates sample chunks.snps: reads.bim, shuffles SNP IDs withglobal_seed, writes a PLINK--extractfile, and creates SNP chunks.both: currently implemented as a simplified single-chunk path.
Each chunk is rebuilt as .bed/.bim/.fam, encoded into a numpy array, sent to the server, and then removed from the local intermediate directory. Intermediate directories can be scoped to run_<run_id> when run_id or run_tag is configured.