nemo_gym.server_runtime.ray_support
nemo_gym.server_runtime.ray_support
Ray support for Gym servers: detecting Ray, starting or joining a cluster, and shutting down a cluster Gym started.
Module Contents
Functions
Data
API
Join the run’s Ray cluster if this server declares that it uses Ray.
The literal ray_enabled assigned in a class body, or None when there is none.
Import Ray only for processes configured to use it.
The ray_enabled declaration of the server an entrypoint starts, read from source.
The supervisor must decide whether to start Ray before any server exists; see entrypoint_class_flag for
what the source alone can settle.
Initialize ray cluster in a process.
We store the Ray address in the global config dict so that child processes can connect to it.
This avoids the need to start a new Ray cluster in each child process.
Note: This function will modify the global config dict - update ray_head_node_address
Whether Ray can be imported in this process, checked without importing it.