U
    9%e
                     @   s  d dl Z d dlZd dlZd dlmZmZ d dlZe eZ	e
 rHdZnJejejedkr~ejejejeZnejejeZeedddZeeddd	Zeed
ddZedd
ddZeed
ddZeeeeef dddZdd ZdZdZdZdZdS )    N)AnyDict Zshared)path_componentsreturnc                  G   s   t jjtf|  S N)ospathjointorch_parentr    r   T/var/www/html/Darija-Ai-API/env/lib/python3.8/site-packages/torch/_utils_internal.pyget_file_path   s    r   c                  G   s   t jj|  S r   )r   r	   r
   r   r   r   r   get_file_path_2    s    r   )r	   r   c                 C   s&   t | t jr| S tjt j| dS )N)suffix)r   accessW_OKtempfilemkdtempr	   basenamer	   r   r   r   get_writable_path$   s    r   c                 C   s   d S r   r   r   r   r   r   #prepare_multiprocessing_environment*   s    r   c                 C   s   t j| S r   )r   r	   realpathr   r   r   r   resolve_library_path.   s    r   categoryname
parametersc                 C   s   t d| || d S )Nz	%s %s: %rloginfor   r   r   r   signpost_event?   s    r#   c                 C   s   t d|  d S )Nz%sr    )Zmetricsr   r   r   log_compilation_eventC   s    r$   z	127.0.0.1i<s  TF)loggingr   r   typingr   r   Ztorch	getLogger__name__r!   Z_running_with_deployr   r	   r   dirname__file__strr   r   r   r   r   r#   r$   ZTEST_MASTER_ADDRZTEST_MASTER_PORTZUSE_GLOBAL_DEPSZUSE_RTLD_GLOBAL_WITH_LIBTORCHr   r   r   r   <module>   s*   
