o
    x¡·iÝ  ã                   @   s´   d Z ddlZddlZddlZddlZddlmZ ej ej e 	e 
¡ ¡d¡¡r.dej anej ej e 	e 
¡ ¡d¡¡rDdej andae ¡ e_ddd„Zdd	„ Zg d
¢ZdS )z½Core variables, functions, and classes that we want in the wandb
module but are also used in modules that import the wandb module.

The purpose of this module is to break circular imports.
é    N)Úenvz.wandbÚwandbc                 C   s¨   | d u s| dkr&zt  ¡ }W n ty    t d¡ t ¡ }Y nw t |¡} t j	 
| tp0dt j ¡}t  | t j¡sRtjd|› ddd t j	 
t ¡ tpPdt j ¡}|S )NÚ z9os.getcwd() no longer exists, using system temp directoryr   zPath z- wasn't writable, using system temp directoryF)Úrepeat)ÚosÚgetcwdÚOSErrorr   ÚtermwarnÚtempfileÚ
gettempdirr   Úget_dirÚpathÚjoinÚ__stage_dir__ÚsepÚaccessÚW_OK)Úroot_dirÚcwdr   © r   úB/home/ubuntu/.local/lib/python3.10/site-packages/wandb/old/core.pyÚ	wandb_dir   s   
þ
ÿr   c                 C   s   | a d S ©N)r   )Ú	stage_dirr   r   r   Ú_set_stage_dir*   s   r   )r   Ú
START_TIMEr   r   r   )Ú__doc__r   r
   Útimer   r   r   Úexistsr   r   r   r   r   r   r   r   Ú__all__r   r   r   r   Ú<module>   s      

