taps.apps.configs.fedlearn¶
FedlearnConfig
¶
Bases: AppConfig
Federated learning application configuration.
Parameters:
-
name
(Literal[str]
, default:'fedlearn'
) –Application name.
-
alpha
(float
, default:100000.0
) –Alpha parameter for number of samples across clients.
-
dataset
(DataChoices
, default:<DataChoices.MNIST: 'mnist'>
) –Training and testing dataset.
-
data_dir
(Path
, default:PosixPath('data/fedlearn')
) –Dataset download directory.
-
device
(str
, default:'cpu'
) –Device to use (e.g., cpu or cuda).
-
clients
(int
, default:8
) –Number of simulated clients.
-
rounds
(int
, default:3
) –Number of aggregation rounds.
-
participation
(float
, default:1.0
) –Fraction of participating clients in each round.
-
epochs
(int
, default:3
) –Number of epochs for local training.
-
lr
(float
, default:0.001
) –Learning rate for local training.
-
batch_size
(int
, default:3
) –Batch size for local training.
-
train
(bool
, default:True
) –Flag for performing training (false will use no-op training tasks).
-
test
(bool
, default:True
) –Evaluate the global model on test data after each round.
-
seed
(int | None
, default:None
) –Random seed.
get_app
¶
get_app() -> App
Create an application instance from the config.