***

layout: overview
slug: nemo-curator/nemo\_curator/backends/internal/raft/ray\_comms
title: nemo\_curator.backends.internal.raft.ray\_comms
------------------------------------------------------

## Module Contents

### Classes

| Name                                                            | Description                                                                |
| --------------------------------------------------------------- | -------------------------------------------------------------------------- |
| [`Comms`](#nemo_curator-backends-internal-raft-ray_comms-Comms) | Initializes and manages underlying NCCL comms handles across the a pool of |

### API

<Anchor id="nemo_curator-backends-internal-raft-ray_comms-Comms">
  <CodeBlock showLineNumbers={false} wordWrap={true}>
    ```python
    class nemo_curator.backends.internal.raft.ray_comms.Comms(
        verbose: bool = False,
        nccl_root_location: str = 'ray-actor'
    )
    ```
  </CodeBlock>
</Anchor>

<Indent>
  Initializes and manages underlying NCCL comms handles across the a pool of
  Ray actors. It is expected that `init()` will be called explicitly. It is
  recommended to also call `destroy()` when the comms are no longer needed so
  the underlying resources can be cleaned up. This class is not meant to be
  thread-safe.

  <ParamField path="nccl_root_location" type="= nccl_root_location.lower()" />

  <ParamField path="sessionId" type="= uuid.uuid4().bytes" />

  <ParamField path="valid_nccl_placements" type="= 'ray-actor'" />

  <Anchor id="nemo_curator-backends-internal-raft-ray_comms-Comms-__del__">
    <CodeBlock showLineNumbers={false} wordWrap={true}>
      ```python
      nemo_curator.backends.internal.raft.ray_comms.Comms.__del__() -> None
      ```
    </CodeBlock>
  </Anchor>

  <Indent />

  <Anchor id="nemo_curator-backends-internal-raft-ray_comms-Comms-create_nccl_uniqueid">
    <CodeBlock showLineNumbers={false} wordWrap={true}>
      ```python
      nemo_curator.backends.internal.raft.ray_comms.Comms.create_nccl_uniqueid() -> None
      ```
    </CodeBlock>
  </Anchor>

  <Indent />

  <Anchor id="nemo_curator-backends-internal-raft-ray_comms-Comms-init">
    <CodeBlock showLineNumbers={false} wordWrap={true}>
      ```python
      nemo_curator.backends.internal.raft.ray_comms.Comms.init() -> None
      ```
    </CodeBlock>
  </Anchor>

  <Indent>
    Initializes the underlying comms.
  </Indent>
</Indent>
