rlightning.utils.launch¶
Entry for launch RLightning experiments.
This module provides the main entry point for launching RLightning RL experiments, handling configuration loading, logging setup, and Ray cluster initialization.
- rlightning.utils.launch.launch(main_func: Callable[[MainConfig], None], config_path: str | Path) None[source]¶
Launch a RLightning experiment with the given main function.
This function handles all the boilerplate for launching experiments: - Hydra configuration loading. - Logging setup. - Ray cluster initialization (for distributed mode). - Graceful shutdown.
- Parameters:
main_func – The user-defined main function that takes a MainConfig and runs the experiment logic.
config_path – Path to the Hydra configuration directory.
Example
>>> def main(config: MainConfig): ... # Your experiment logic here ... pass >>> launch(main_func=main, config_path="./conf")