rlightning.utils.registry¶
Registry module for component registration and discovery.
This module provides registry classes for dynamically registering and retrieving components like buffers, policies, environments, and weights.
- Available registries:
BUFFERS: Registry for data buffer classes.
WEIGHTS: Registry for weight management classes.
POLICIES: Registry for policy classes.
ENVS: Registry for environment classes.
- rlightning.utils.registry.load_modules_from_config(config: MockModule('omegaconf.DictConfig')) None[source]¶
Dynamically loads Python modules specified in the configuration.
This function looks for a list under the imports key in the provided Hydra config. If found, it iterates through the list and imports each module. This is useful for registering plugins or other components at runtime without modifying the core codebase.
- Parameters:
config (DictConfig) – The Hydra configuration object.