> 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.stages.resources

## Module Contents

### Classes

| Name                                                    | Description                                          |
| ------------------------------------------------------- | ---------------------------------------------------- |
| [`Resources`](#nemo_curator-stages-resources-Resources) | Define resource requirements for a processing stage. |

### Functions

| Name                                                                      | Description                                  |
| ------------------------------------------------------------------------- | -------------------------------------------- |
| [`_get_gpu_memory_gb`](#nemo_curator-stages-resources-_get_gpu_memory_gb) | Get GPU memory in GB for the current device. |

### API

<Anchor id="nemo_curator-stages-resources-Resources">
  <CodeBlock showLineNumbers={false} wordWrap={true}>
    ```python
    class nemo_curator.stages.resources.Resources(
        cpus: float = 1.0,
        gpu_memory_gb: float = 0.0,
        gpus: float = 0.0
    )
    ```
  </CodeBlock>
</Anchor>

<Indent>
  <Badge>
    Dataclass
  </Badge>

  Define resource requirements for a processing stage.

  <ParamField path="cpus" type="float = 1.0" />

  <ParamField path="gpu_memory_gb" type="float = 0.0" />

  <ParamField path="gpus" type="float = 0.0" />

  <ParamField path="requires_gpu" type="bool">
    Check if this stage requires GPU resources.
  </ParamField>

  <Anchor id="nemo_curator-stages-resources-Resources-__post_init__">
    <CodeBlock showLineNumbers={false} wordWrap={true}>
      ```python
      nemo_curator.stages.resources.Resources.__post_init__()
      ```
    </CodeBlock>
  </Anchor>

  <Indent>
    Calculate GPU count based on memory requirements.
  </Indent>
</Indent>

<Anchor id="nemo_curator-stages-resources-_get_gpu_memory_gb">
  <CodeBlock showLineNumbers={false} wordWrap={true}>
    ```python
    nemo_curator.stages.resources._get_gpu_memory_gb() -> float
    ```
  </CodeBlock>
</Anchor>

<Indent>
  Get GPU memory in GB for the current device.
</Indent>