> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/curator/llms.txt.
> For full documentation content, see https://docs.nvidia.com/nemo/curator/llms-full.txt.

# nemo_curator.backends.ray_actor_pool.adapter

## Module Contents

### Classes

| Name                                                                                                 | Description                                                  |
| ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
| [`RayActorPoolStageAdapter`](#nemo_curator-backends-ray_actor_pool-adapter-RayActorPoolStageAdapter) | Adapts ProcessingStage to Ray actors for use with ActorPool. |

### API

<Anchor id="nemo_curator-backends-ray_actor_pool-adapter-RayActorPoolStageAdapter">
  <CodeBlock links={{"nemo_curator.stages.base.ProcessingStage":"/nemo-curator/nemo_curator/stages/base#nemo_curator-stages-base-ProcessingStage"}} showLineNumbers={false} wordWrap={true}>
    ```python
    class nemo_curator.backends.ray_actor_pool.adapter.RayActorPoolStageAdapter(
        stage: nemo_curator.stages.base.ProcessingStage
    )
    ```
  </CodeBlock>
</Anchor>

<Indent>
  **Bases:** [BaseStageAdapter](/nemo-curator/nemo_curator/backends/base#nemo_curator-backends-base-BaseStageAdapter)

  Adapts ProcessingStage to Ray actors for use with ActorPool.

  This adapter is designed to work with Ray's ActorPool for better
  resource management and load balancing.

  <ParamField path="_batch_size" type="= self.stage.batch_size" />

  <Anchor id="nemo_curator-backends-ray_actor_pool-adapter-RayActorPoolStageAdapter-get_batch_size">
    <CodeBlock showLineNumbers={false} wordWrap={true}>
      ```python
      nemo_curator.backends.ray_actor_pool.adapter.RayActorPoolStageAdapter.get_batch_size() -> int
      ```
    </CodeBlock>
  </Anchor>

  <Indent>
    Get the batch size for this stage.
  </Indent>

  <Anchor id="nemo_curator-backends-ray_actor_pool-adapter-RayActorPoolStageAdapter-setup_on_node">
    <CodeBlock showLineNumbers={false} wordWrap={true}>
      ```python
      nemo_curator.backends.ray_actor_pool.adapter.RayActorPoolStageAdapter.setup_on_node() -> None
      ```
    </CodeBlock>
  </Anchor>

  <Indent>
    Setup method for Ray actors.

    Note: This method is not used in the current implementation since we use
    the Ray Data pattern of calling setup\_on\_node before actor creation.
  </Indent>
</Indent>