blazefl.core.ModelSelector#

class blazefl.core.ModelSelector[source]#

Bases: ABC

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__()#

Methods

__init__()

select_model(model_name)

Select and return a model instance by its name.

abstract 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