o
    1 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 )zÂGenerate 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_nameZhexlified_name© r
   úe/home/app/PaddleOCR-VL-test/.venv_paddleocr/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Ú_Z
default_fnr
   r
   r   Úval   s   
zENV.valN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   ZNCCL_USE_MULTISTREAMÚpropertyr   r
   r
   r
   r   r      s
    r   )r   r   r   Úenumr   r   r   r   r
   r
   r
   r   Ú<module>   s    