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
- _id
- _namespace
- _config_schema
The module identifier.
The namespace of the module.
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_name
- module_config
The name of the module to be loaded.
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.