energy_fault_detector.registration
Class for registering classes of different types.
- class Registry[source]
Bases:
objectRegistry for classes to get the class by name and type.
- get(class_type, class_name)[source]
Get a class by class_type and class_name from the registry
- Return type:
TypeVar(SomeClass)
- get_alternative_class_names(class_name)[source]
Get all alternative class names of the given class
- Return type:
List[str]
- print_available_classes()[source]
Print the available classes and their config names
- Return type:
None
- register(module_path, class_type, class_names)[source]
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]) – a list of names which may be used to refer to this class. Default is None
- Return type:
None