utils
Utility functions/classes for ophthalmology protocols.
Classes
GenericOphthalmologyModellerSide
class GenericOphthalmologyModellerSide( *, algorithm: Sequence[Union[_InferenceModellerSide, NoResultsModellerAlgorithm]], mailbox: _ModellerMailbox, **kwargs: Any,):
Modeller side of a generic ophthalmology protocol.
Arguments
algorithm
: The sequence of GA modeller algorithms to be used.mailbox
: The mailbox to use for communication with the Workers.- **
**kwargs
**: Additional keyword arguments.
Ancestors
- BaseModellerProtocol
- bitfount.federated.protocols.base._BaseProtocol
- typing.Generic
- abc.ABC
Variables
- static
algorithm : collections.abc.Sequence
Methods
initialise
def initialise(self, task_id: Optional[str] = None, **kwargs: Any) ‑> None:
Inherited from:
BaseModellerProtocol.initialise :
Initialises the component algorithms.
run
async def run( self, *, context: Optional[ProtocolContext] = None, **kwargs: Any,) ‑> Union[Any, list[Any]]:
Runs Modeller side of the protocol.
This just sends the model parameters to the workers sequentially and then tells the workers when the protocol is finished.
Arguments
context
: Optional. Run-time context for the protocol.- **
**kwargs
**: Additional keyword arguments.