o
    $ia                     @   s@   d Z ddlZddlZddlmZmZ dd ZG dd deZdS )zA
Constants.

Contains constants used to setup collective groups.
    N)Enumautoc                 C   s"   | st dt|   }|S )zGenerate the unique name for the NCCLUniqueID store (named actor).

    Args:
        group_name: unique user name for the store.
    Return:
        str: SHA1-hexlified name for the store.
    zgroup_name is None.)
ValueErrorhashlibsha1encode	hexdigest)
group_namehexlified_name r   V/home/ubuntu/veenaModal/venv/lib/python3.10/site-packages/ray/util/collective/const.pyget_store_name   s   r   c                   @   s*   e Zd ZdZe dd fZedd ZdS )ENVz*ray.util.collective environment variables.c                 C   s   | pddkS )NTruer   )vr   r   r   <lambda>   s    zENV.<lambda>c                 C   s   | j \}}|t| jS )z?Return the output of the lambda against the system's env value.)valueosgetenvname)self_
default_fnr   r   r   val   s   
zENV.valN)__name__
__module____qualname____doc__r   NCCL_USE_MULTISTREAMpropertyr   r   r   r   r   r      s
    r   )r   r   r   enumr   r   r   r   r   r   r   r   <module>   s    