Ë
      çi:	  ã                   óf   — d dl Z d dlZd dlmZ d dlmZ  e j                  e«      Z G d„ de«      Z	y)é    N)Úoverride)ÚClusterEnvironmentc                   ó  — e Zd ZdZeedefd„«       «       Zeedefd„«       «       Z	eede
fd„«       «       Zeedefd„«       «       Zede
fd„«       Zede
dd	fd
„«       Zede
fd„«       Zede
dd	fd„«       Zede
fd„«       Zede
fd„«       Zy	)ÚKubeflowEnvironmentau  Environment for distributed training using the `PyTorchJob`_ operator from `Kubeflow`_.

    This environment, unlike others, does not get auto-detected and needs to be passed to the Fabric/Trainer
    constructor manually.

    .. _PyTorchJob: https://www.kubeflow.org/docs/components/trainer/legacy-v1/user-guides/pytorch/
    .. _Kubeflow: https://www.kubeflow.org

    Úreturnc                  ó   — y)NT© ©Úselfs    úƒ/Volumes/fast/ai/experiments/voice-extract-mac/.venv/lib/python3.12/site-packages/lightning_fabric/plugins/environments/kubeflow.pyÚcreates_processes_externallyz0KubeflowEnvironment.creates_processes_externally$   s   € ð ó    c                 ó(   — t         j                  d   S )NÚMASTER_ADDR)ÚosÚenvironr
   s    r   Úmain_addressz KubeflowEnvironment.main_address)   s   € ô �z‰z˜-Ñ(Ð(r   c                 ó:   — t        t        j                  d   «      S )NÚMASTER_PORT©Úintr   r   r
   s    r   Ú	main_portzKubeflowEnvironment.main_port.   s   € ô ”2—:‘:˜mÑ,Ó-Ð-r   c                  ó   — t        d«      ‚)Nz9The Kubeflow environment can't be detected automatically.)ÚNotImplementedErrorr	   r   r   ÚdetectzKubeflowEnvironment.detect3   s   € ô "Ð"]Ó^Ð^r   c                 ó:   — t        t        j                  d   «      S )NÚ
WORLD_SIZEr   r
   s    r   Ú
world_sizezKubeflowEnvironment.world_size8   s   € ä”2—:‘:˜lÑ+Ó,Ð,r   ÚsizeNc                 ó.   — t         j                  d«       y )Nz^KubeflowEnvironment.set_world_size was called, but setting world size is not allowed. Ignored.©ÚlogÚdebug)r   r   s     r   Úset_world_sizez"KubeflowEnvironment.set_world_size<   s   € ä�	‰	ÐrÕsr   c                 ó:   — t        t        j                  d   «      S )NÚRANKr   r
   s    r   Úglobal_rankzKubeflowEnvironment.global_rank@   s   € ä”2—:‘:˜fÑ%Ó&Ð&r   Úrankc                 ó.   — t         j                  d«       y )Nz`KubeflowEnvironment.set_global_rank was called, but setting global rank is not allowed. Ignored.r!   )r   r(   s     r   Úset_global_rankz#KubeflowEnvironment.set_global_rankD   s   € ä�	‰	ÐtÕur   c                  ó   — y)Nr   r	   r
   s    r   Ú
local_rankzKubeflowEnvironment.local_rankH   s   € àr   c                 ó"   — | j                  «       S )N)r'   r
   s    r   Ú	node_rankzKubeflowEnvironment.node_rankL   s   € à×ÑÓ!Ð!r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úpropertyr   Úboolr   Ústrr   r   r   Ústaticmethodr   r   r$   r'   r*   r,   r.   r	   r   r   r   r      sN  „ ñð Øð¨dò ó ó ðð Øð)˜cò )ó ó ð)ð Øð.˜3ò .ó ó ð.ð Øð_�Dò _ó ó ð_ð ð-˜Cò -ó ð-ð ðt 3ð t¨4ò tó ðtð ð'˜Sò 'ó ð'ð ðv Cð v¨Dò vó ðvð ð˜Cò ó ðð ð"˜3ò "ó ñ"r   r   )
Úloggingr   Útyping_extensionsr   Ú9lightning_fabric.plugins.environments.cluster_environmentr   Ú	getLoggerr/   r"   r   r	   r   r   Ú<module>r;      s2   ðó Û 	å &å Xà€g×Ñ˜Ó!€ô5"Ð,õ 5"r   