energy_fault_detector.registration

Class for registering classes of different types.

class Registry

Bases: object

Registry for classes to get the class by name and type.

get(class_type, class_name)

Get a class by class_type and class_name from the registry

Return type:

TypeVar(SomeClass)

get_alternative_class_names(class_name)

Get all alternative class names of the given class

Return type:

List[str]

print_available_classes()

Print the available classes and their config names

Return type:

None

register(module_path, class_type, class_names)

Register a class to refer to in the configuration.

Parameters:
  • module_path (str) – Path to the module containing the class.

  • class_type (str) – type of the class (anomaly_score, autoencoder, threshold_selector or data_preprocessor)

  • class_names (List[str], optional) – a list of names which may be used to refer to this class. Default is None

Return type:

None

register(**kwargs)

Shorthand function for registration