nemo_curator.backends.experimental.ray_actor_pool.utils
nemo_curator.backends.experimental.ray_actor_pool.utils
Module Contents
Functions
Data
API
Calculate optimal number of actors for a stage.
Create a named RayActorPoolStageAdapter or RayActorPoolRAFTAdapter.
This function creates a dynamic subclass of the given adapter class, named after the stage’s class name. This ensures that when Ray calls type(adapter).name, it returns the original stage’s class name rather than ‘RayActorPoolStageAdapter’ or ‘RayActorPoolRAFTAdapter’.
Parameters:
stage
ProcessingStage to adapt
cls
The adapter class to inherit from
Returns: ActorClass[RayActorPoolStageAdapter | RayActorPoolRAFTAdapter]
A ray.remote decorated class that can be used to create actors