dqm_ml_core.utils.registry
Plugin registry for dynamically loading DQM components.
This module contains the PluginLoadedRegistry class and load_registered_plugins function for discovering and loading metric processors, data loaders, and output writers via Python entry points.
logger = logging.getLogger(__name__)
module-attribute
PluginLoadedRegistry
Singleton registry that provides lazy access to all registered DQM components.
Components include: - Metrics (DatametricProcessor) - DataLoaders - OutputWriters
Source code in packages/dqm-ml-core/src/dqm_ml_core/utils/registry.py
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | |
get_dataloaders_registry() -> dict[str, Any]
classmethod
Return the registry of available data loaders.
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
A dictionary mapping data loader names to their classes. |
Source code in packages/dqm-ml-core/src/dqm_ml_core/utils/registry.py
79 80 81 82 83 84 85 86 87 88 | |
get_metrics_registry() -> dict[str, type[DatametricProcessor]]
classmethod
Return the registry of available metric processors.
Returns:
| Type | Description |
|---|---|
dict[str, type[DatametricProcessor]]
|
A dictionary mapping metric processor names to their classes. |
Source code in packages/dqm-ml-core/src/dqm_ml_core/utils/registry.py
67 68 69 70 71 72 73 74 75 76 77 | |
get_outputwriter_registry() -> dict[str, Any]
classmethod
Return the registry of available output writers.
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
A dictionary mapping output writer names to their classes. |
Source code in packages/dqm-ml-core/src/dqm_ml_core/utils/registry.py
90 91 92 93 94 95 96 97 98 99 100 | |
load_registered_plugins(plugin_group: str, base_class: Any, base_name: str = 'default') -> dict[str, Any]
Discover and load plugins registered via Python entry points.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
plugin_group
|
str
|
The entry point group name (e.g., 'dqm_ml.metrics'). |
required |
base_class
|
Any
|
Optional base class to verify plugin type safety. |
required |
base_name
|
str
|
Name of the base class to ignore during discovery. |
'default'
|
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
A dictionary mapping plugin names to their loaded classes. |
Source code in packages/dqm-ml-core/src/dqm_ml_core/utils/registry.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | |