o
    "Õjì  ã                   @   s.   d dl mZ ddlmZ g ZG dd„ dƒZdS )é   )ÚTheOnePSRuntimeé   )ÚCollectiveRuntimec                   @   s   e Zd Zdd„ Zdd„ ZdS )ÚRuntimeFactoryc                 C   s   d S )N© )Úselfr   r   ún/var/www/html/Deteccion_Ine/venv/lib/python3.10/site-packages/paddle/distributed/fleet/base/runtime_factory.pyÚ__init__   s   zRuntimeFactory.__init__c                 C   s~   d|v r|d rt ƒ }| |¡ |S |d jr!tƒ }| |¡ |S |d jd }|d js;|dkr=t ƒ }| |¡ |S d S d S )NZuse_fleet_psZ
role_makerZvalid_strategyÚk_stepsé    )r   Z_set_basic_infoZ_is_collectiver   Za_sync_configs)r   ÚcontextZ
ps_runtimeZcollective_runtimer
   r   r   r   Ú_create_runtime   s   



ýzRuntimeFactory._create_runtimeN)Ú__name__Ú
__module__Ú__qualname__r	   r   r   r   r   r   r      s    r   N)Zps.the_one_psr   Zruntime.collective_runtimer   Ú__all__r   r   r   r   r   Ú<module>   s   