taps.apps.fedlearn.tasks¶
no_local_train() ¶
no_local_train(
client: Client,
round_idx: int,
epochs: int,
batch_size: int,
lr: float,
device: device,
) -> list[Result]
local_train() ¶
local_train(
client: Client,
round_idx: int,
epochs: int,
batch_size: int,
lr: float,
device: device,
) -> list[Result]
Local training job.
Parameters:
-
client(Client) –The client to train.
-
round_idx(int) –The current round number.
-
epochs(int) –Number of epochs.
-
batch_size(int) –Batch size when iterating through data.
-
lr(float) –Learning rate.
-
device(device) –Backend hardware to train with.
Returns:
Source code in taps/apps/fedlearn/tasks.py
test_model() ¶
Evaluate a model.