Typings#
- class rizemind.strategies.compensation.typings.SupportsDistribute(*args, **kwargs)[source]
Bases:
ProtocolProtocol for objects that can distribute compensation to federated learning trainers.
This protocol defines the interface for reward distribution mechanisms in a federated learning system. Implementers are responsible for distributing compensation to trainers based on their participation scores.
The protocol supports blockchain-based reward distribution where trainers are identified by their Ethereum addresses.
- distribute(trainer_scores: list[tuple[ChecksumAddress, float]]) str[source]
Distribute compensation to trainers based on their scores.
- Parameters:
trainer_scores – List of tuples containing trainer addresses and their
Ethereum (corresponding compensation scores. Addresses must be valid)
addresses. (checksum)
- Returns:
Transaction hash or confirmation string of the next round operation.