nemo_curator.backends.ray_actor_pool.utils
nemo_curator.backends.ray_actor_pool.utils
Module Contents
Classes
Functions
Data
API
Bases: ValueError
Calculate an actor count from a supplied CPU/GPU availability snapshot.
Calculate optimal number of actors for a stage.
Wait for enough resources to create the baseline-sized actor pool.
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:
ProcessingStage — ProcessingStage to adapt
The adapter class to inherit from
Returns: ActorClass[ RayActorPoolStageAdapter | RayActorPoolRAFTAdapter ]
A ray.remote decorated class that can be used to create actors
Return currently available CPU/GPU resources after executor reservations.
Update a CPU/GPU high-water mark from current availability.