mmlearn.datasets.core.modalities.ModalityRegistry¶
- class ModalityRegistry[source]¶
Bases:
object
Modality registry.
A singleton class that manages the supported modalities (and their properties) in the library. The class provides methods to add new modalities and properties, and to access the existing modalities. The class is implemented as a singleton to ensure that there is only one instance of the registry in the library.
Methods
- add_default_property(name, format_string)[source]¶
Add a new property that is applicable to all modalities.
- Parameters:
- Warns:
UserWarning – If the property already exists for the default properties. It will overwrite the existing property.
- Raises:
ValueError – If the format string is invalid. A valid format string contains at least one placeholder enclosed in curly braces.
- Return type: