blazefl.core.ModelSelector#

class blazefl.core.ModelSelector(*args, **kwargs)[source]#

Bases: Protocol

Abstract base class for selecting models in federated learning.

This class defines the interface for selecting and retrieving models based on a given model name.

Raises:

NotImplementedError – If the method is not implemented in a subclass.

__init__(*args, **kwargs)#

Methods

__init__(*args, **kwargs)

select_model(model_name)

Select and return a model instance by its name.

select_model(model_name: str) Module[source]#

Select and return a model instance by its name.

Parameters:

model_name (str) – The name of the model to select.

Returns:

An instance of the selected model.

Return type:

torch.nn.Module