morpheus.utils.module_utils.ModuleLoaderFactory
- class ModuleLoaderFactory(module_id, module_namespace, config_schema=None)[source]
Bases:
object
Class that acts as a simple wrapper to load a SegmentModule.
- Attributes
- _idstr
The module identifier.
- _namespacestr
The namespace of the module.
- _config_schemaType[BaseModel], optional
The Pydantic model representing the parameter contract for the module.
Methods
get_instance
(module_name, module_config)Loads a module instance and returns its definition. print_schema
()Returns a human-readable description of the module's parameter schema. - get_instance(module_name, module_config)[source]
Loads a module instance and returns its definition.
- Parameters
- module_namestr
The name of the module to be loaded.
- module_configdict
The configuration dictionary for the module.
- Returns
- ModuleLoader
A specific instance of this module.
- print_schema()[source]
Returns a human-readable description of the module’s parameter schema.
- Returns
- str
A description of the module’s parameter schema.