Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions MEDfl/rw/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,35 @@ def __init__(


class FlowerClient(fl.client.NumPyClient):
"""
Federated learning client for MEDfl real-world pipelines.

This client:
- connects to a Flower server,
- loads local CSV data,
- applies server-provided schema (features/target),
- handles train/val/test splits (fractions or test_ids),
- optionally enables differential privacy with Opacus.

Parameters
----------
server_address : str
Address of the Flower server, e.g. ``"127.0.0.1:8080"``.
data_path : str, optional
Path to the local CSV file. Default is ``"data/data.csv"``.
dp_config : DPConfig, optional
Differential privacy configuration. If ``None``, DP is disabled.
val_frac : float, optional
Client-side validation fraction override. If ``None``, use server value.
test_frac : float, optional
Client-side test fraction override. If ``None``, use server value.
id_col : str, optional
Name of the ID column used when selecting test samples via ``test_ids``.
test_ids : str, optional
Comma-separated list of IDs (or line numbers) to use as test set.
seed : int, optional
Random seed used for splits. Default is ``42``.
"""
def __init__(
self,
server_address,
Expand Down
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
Expand Down
Binary file removed docs/_build/.doctrees/Medfl.LearningManager.doctree
Binary file not shown.
Binary file removed docs/_build/.doctrees/Medfl.NetManager.doctree
Binary file not shown.
Binary file removed docs/_build/.doctrees/environment.pickle
Binary file not shown.
Binary file removed docs/_build/.doctrees/index.doctree
Binary file not shown.
303 changes: 0 additions & 303 deletions docs/_build/_modules/Medfl/NetManager/network.html

This file was deleted.

20 changes: 0 additions & 20 deletions docs/_build/_sources/index.rst.txt

This file was deleted.

7 changes: 0 additions & 7 deletions docs/_build/_sources/modules.rst.txt

This file was deleted.

Binary file removed docs/_build/_static/MEDomics.png
Binary file not shown.
Loading
Loading