o
    h
                     @   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
 r$dZn%ejejedkr?ejejejeZn
ejejeZdedefddZdedefd	d
ZdedefddZdeddfddZdedefddZdededeeef fddZdd ZdZdZdZdZdS )    N)AnyDict sharedpath_componentsreturnc                  G   s   t jjtg| R  S N)ospathjointorch_parentr    r   K/var/www/html/ai/venv/lib/python3.10/site-packages/torch/_utils_internal.pyget_file_path      r   c                  G   s   t jj|  S r   )r	   r
   r   r   r   r   r   get_file_path_2       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.   r   r   categoryname
parametersc                 C   s   t d| || d S )Nz	%s %s: %rloginfo)r   r    r!   r   r   r   signpost_event?   r   r%   c                 C   s   t d|  d S )Nz%sr"   )metricsr   r   r   log_compilation_eventC   s   r'   z	127.0.0.1i<s  TF)loggingr	   r   typingr   r   torch	getLogger__name__r#   _running_with_deployr   r
   r   dirname__file__strr   r   r   r   r   r%   r'   TEST_MASTER_ADDRTEST_MASTER_PORTUSE_GLOBAL_DEPSUSE_RTLD_GLOBAL_WITH_LIBTORCHr   r   r   r   <module>   s,    
