Skip to content

taps.apps.fedlearn.types

ClientID module-attribute

ClientID: TypeAlias = int

Integer IDs for Client instances.

Result module-attribute

Result: TypeAlias = Dict[str, Any]

Result type for each FL epoch, round, and task.

DataChoices

Bases: Enum

Dataset options.

CIFAR10 class-attribute instance-attribute

CIFAR10 = 'cifar10'

Cifar10 dataset.

CIFAR100 class-attribute instance-attribute

CIFAR100 = 'cifar100'

Cifar100 dataset.

FMNIST class-attribute instance-attribute

FMNIST = 'fmnist'

FMNIST dataset.

MNIST class-attribute instance-attribute

MNIST = 'mnist'

MNIST dataset.

Client

Bases: BaseModel

Client class.

idx class-attribute instance-attribute

idx: ClientID = Field(description='Client ID')

Client ID.

model class-attribute instance-attribute

model: Module = Field(description="Client's local model")

Client's local model.

data class-attribute instance-attribute

data: Optional[Subset] = Field(
    description="The subset of data this client will train on."
)

The subset of data this client will train on.