a
    þd…  ã                   @   s$   d dl mZmZ G dd„ deƒZdS )é    )ÚABCÚabstractmethodc                   @   sæ   e Zd ZdZeeedœdd„ƒƒZeeedœdd„ƒƒZ	eee
dœdd„ƒƒZeeedœd	d
„ƒƒZee
dœdd„ƒZee
ddœdd„ƒZee
dœdd„ƒZee
ddœdd„ƒZee
dœdd„ƒZee
dœdd„ƒZddœdd„ZdS )ÚClusterEnvironmentz'Specification of a cluster environment.)Úreturnc                 C   s   dS )z8Whether the environment creates the subprocesses or not.N© ©Úselfr   r   ú‚/var/www/html/stable-diffusion-webui/venv/lib/python3.9/site-packages/lightning_fabric/plugins/environments/cluster_environment.pyÚcreates_processes_externally   s    z/ClusterEnvironment.creates_processes_externallyc                 C   s   dS )zEThe main address through which all processes connect and communicate.Nr   r   r   r   r	   Úmain_address   s    zClusterEnvironment.main_addressc                 C   s   dS )zUAn open and configured port in the main node through which all processes communicate.Nr   r   r   r   r	   Ú	main_port   s    zClusterEnvironment.main_portc                   C   s   dS )zbDetects the environment settings corresponding to this cluster and returns ``True`` if they match.Nr   r   r   r   r	   Údetect#   s    zClusterEnvironment.detectc                 C   s   dS )z5The number of processes across all devices and nodes.Nr   r   r   r   r	   Ú
world_size(   s    zClusterEnvironment.world_sizeN)Úsizer   c                 C   s   d S ©Nr   )r   r   r   r   r	   Úset_world_size,   s    z!ClusterEnvironment.set_world_sizec                 C   s   dS )zOThe rank (index) of the currently running process across all nodes and devices.Nr   r   r   r   r	   Úglobal_rank0   s    zClusterEnvironment.global_rank)Úrankr   c                 C   s   d S r   r   )r   r   r   r   r	   Úset_global_rank4   s    z"ClusterEnvironment.set_global_rankc                 C   s   dS )zMThe rank (index) of the currently running process inside of the current node.Nr   r   r   r   r	   Ú
local_rank8   s    zClusterEnvironment.local_rankc                 C   s   dS )z?The rank (index) of the node on which the current process runs.Nr   r   r   r   r	   Ú	node_rank<   s    zClusterEnvironment.node_rankc                 C   s   dS )z0Clean up any state set after execution finishes.Nr   r   r   r   r	   Úteardown@   s    zClusterEnvironment.teardown)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úpropertyr   Úboolr
   Ústrr   Úintr   Ústaticmethodr   r   r   r   r   r   r   r   r   r   r   r	   r      s4   r   N)Úabcr   r   r   r   r   r   r	   Ú<module>   s   