o
    wi                     @  s<   d dl mZ d dlmZ d dlmZ G dd dZdgZdS )    )annotations)Any)Apic                   @  s.  e Zd ZdZdddZd	d
 Zdd ZedddZedd Z	edd Z
edd Zedd Zedd ZdddZdd Zdd  Zd!d" Zd#d$ Zd%d& Zd'd( Zd)d* Zdd,d-Zd.d/ Zdd0d1Zd2d3 Zd4d5 Zdd8d9Zdd;d<Zd=d> Zd?d@ ZdAdB ZdCdD Z dEdF Z!dGdH Z"dIdJ Z#dKdL Z$dMdN Z%dOdP Z&dQdR Z'dSdT Z(dUdV Z)dWdX Z*dYdZ Z+d[d\ Z,d]d^ Z-d_d` Z.dadb Z/dcdd Z0dedf Z1dgdh Z2didj Z3dkdl Z4dmdn Z5dodp Z6dqdr Z7dsdt Z8dudv Z9dwdx Z:dydz Z;d{d| Z<d}d~ Z=dd Z>dd Z?dd Z@dd ZAdd ZBdd ZCd+S )r   z,Internal proxy to the official internal API.argsr   kwargsreturnNonec                 O  s   || _ || _d | _d S N)	_api_args_api_kwargs_apiselfr   r    r   G/home/ubuntu/.local/lib/python3.10/site-packages/wandb/apis/internal.py__init__   s   
zApi.__init__c                 C  s   | j  }|d= |S )zUUse for serializing.

        self._api is not serializable, so it's dropped
        r   )__dict__copyr   stater   r   r   __getstate__   s   
zApi.__getstate__c                 C  s   | j | d| _dS )zkUsed for deserializing.

        Don't need to set self._api because it's constructed when needed.
        N)r   updater   r   r   r   r   __setstate__   s   
zApi.__setstate__InternalApic                 C  s$   | j d u rt| ji | j| _ | j S r	   )r   r   r
   r   r   r   r   r   api#   s   
zApi.apic                 C     | j jS r	   )r   api_keyr   r   r   r   r   ,      zApi.api_keyc                 C  s   | j jd up| j jd uS r	   )r   access_tokenr   r   r   r   r   is_authenticated0   s   zApi.is_authenticatedc                 C  r   r	   )r   api_urlr   r   r   r   r!   4   r   zApi.api_urlc                 C  r   r	   )r   app_urlr   r   r   r   r"   8   r   zApi.app_urlc                 C  r   r	   )r   default_entityr   r   r   r   r#   <   r   zApi.default_entityboolc                 C  
   | j  S )z>Returns whether the API key stored on initialization is valid.)r   validate_api_keyr   r   r   r   r&   @   s   
zApi.validate_api_keyc                 G  s   | j j| S r	   )r   file_current)r   r   r   r   r   r'   D      zApi.file_currentc                 O     | j j|i |S r	   )r   download_filer   r   r   r   r*   G      zApi.download_filec                 O  r)   r	   )r   download_write_filer   r   r   r   r,   J   r+   zApi.download_write_filec                 C     | j |S r	   )r   set_current_run_id)r   run_idr   r   r   r.   M   r(   zApi.set_current_run_idc                 C  r%   r	   )r   viewerr   r   r   r   r0   P      
z
Api.viewerc                 C  r%   r	   )r   max_cli_versionr   r   r   r   r2   S   r1   zApi.max_cli_versionc                 C  r%   r	   )r   viewer_server_infor   r   r   r   r3   V   r1   zApi.viewer_server_infoNc                 C  s   | j j|dS )N)entity)r   list_projects)r   r4   r   r   r   r5   Y      zApi.list_projectsc                 C  r-   r	   )r   format_project)r   projectr   r   r   r7   \   r(   zApi.format_projectc                 C  s   | j j||||dS )N)iddescriptionr4   )r   upsert_project)r   r8   r9   r:   r4   r   r   r   r;   _   s   zApi.upsert_projectc                 O  r)   r	   )r   
upsert_runr   r   r   r   r<   d   r+   zApi.upsert_runc                 O  r)   r	   )r   settingsr   r   r   r   r=   g   r+   zApi.settingskeystrc                 C  r-   r	   )r   clear_setting)r   r>   r   r   r   r@   j   r(   zApi.clear_settingvaluec                 C  s   | j ||S r	   )r   set_setting)r   r>   rA   r   r   r   rB   m   r6   zApi.set_settingc                 O  r)   r	   )r   
parse_slugr   r   r   r   rC   p   r+   zApi.parse_slugc                 O  r)   r	   )r   download_urlr   r   r   r   rD   s   r+   zApi.download_urlc                 O  r)   r	   )r   download_urlsr   r   r   r   rE   v   r+   zApi.download_urlsc                 O  r)   r	   )r   pushr   r   r   r   rF   y   r+   zApi.pushc                 O  r)   r	   )r   sweepr   r   r   r   rG   |   r+   z	Api.sweepc                 O  r)   r	   )r   upsert_sweepr   r   r   r   rH      r+   zApi.upsert_sweepc                 O  r)   r	   )r   set_sweep_stater   r   r   r   rI      r+   zApi.set_sweep_statec                 O  r)   r	   )r   get_sweep_stater   r   r   r   rJ      r+   zApi.get_sweep_statec                 O  r)   r	   )r   
stop_sweepr   r   r   r   rK      r+   zApi.stop_sweepc                 O  r)   r	   )r   cancel_sweepr   r   r   r   rL      r+   zApi.cancel_sweepc                 O  r)   r	   )r   pause_sweepr   r   r   r   rM      r+   zApi.pause_sweepc                 O  r)   r	   )r   resume_sweepr   r   r   r   rN      r+   zApi.resume_sweepc                 O  r)   r	   )r   register_agentr   r   r   r   rO      r+   zApi.register_agentc                 O  r)   r	   )r   agent_heartbeatr   r   r   r   rP      r+   zApi.agent_heartbeatc                 O  r)   r	   )r   use_artifactr   r   r   r   rQ      r+   zApi.use_artifactc                 O  r)   r	   )r   create_artifactr   r   r   r   rR      r+   zApi.create_artifactc                 O  r)   r	   )r   "complete_multipart_upload_artifactr   r   r   r   rS      r+   z&Api.complete_multipart_upload_artifactc                 O  r)   r	   )r   
run_configr   r   r   r   rT      r+   zApi.run_configc                 O  r)   r	   )r   upload_file_retryr   r   r   r   rU      r+   zApi.upload_file_retryc                 O  r)   r	   )r   !upload_multipart_file_chunk_retryr   r   r   r   rV      r+   z%Api.upload_multipart_file_chunk_retryc                 O  r)   r	   )r   get_run_infor   r   r   r   rW      r+   zApi.get_run_infoc                 O  r)   r	   )r   get_run_stater   r   r   r   rX      r+   zApi.get_run_statec                 O  r)   r	   )r   entity_is_teamr   r   r   r   rY      r+   zApi.entity_is_teamc                 O  r)   r	   )r   get_project_run_queuesr   r   r   r   rZ      r+   zApi.get_project_run_queuesc                 O  r)   r	   )r   push_to_run_queuer   r   r   r   r[      r+   zApi.push_to_run_queuec                 O  r)   r	   )r   pop_from_run_queuer   r   r   r   r\      r+   zApi.pop_from_run_queuec                 O  r)   r	   )r   ack_run_queue_itemr   r   r   r   r]      r+   zApi.ack_run_queue_itemc                 O  r)   r	   )r   create_launch_agentr   r   r   r   r^      r+   zApi.create_launch_agentc                 O  r)   r	   )r   create_default_resource_configr   r   r   r   r_      r+   z"Api.create_default_resource_configc                 O  r)   r	   )r   create_run_queuer   r   r   r   r`      r+   zApi.create_run_queuec                 O  r)   r	   )r   upsert_run_queuer   r   r   r   ra      r+   zApi.upsert_run_queuec                 O  r)   r	   )r   create_custom_chartr   r   r   r   rb      r+   zApi.create_custom_chartc                 O  r)   r	   )r   update_launch_agent_statusr   r   r   r   rc      r+   zApi.update_launch_agent_statusc                 O  r)   r	   )r   launch_agent_introspectionr   r   r   r   rd      r+   zApi.launch_agent_introspectionc                 O  r)   r	   )r   !fail_run_queue_item_introspectionr   r   r   r   re      r+   z%Api.fail_run_queue_item_introspectionc                 O  r)   r	   )r   fail_run_queue_itemr   r   r   r   rf      r+   zApi.fail_run_queue_itemc                 O  r)   r	   )r   update_run_queue_item_warningr   r   r   r   rg      r+   z!Api.update_run_queue_item_warningc                 O  r)   r	   )r   get_launch_agentr   r   r   r   rh      r+   zApi.get_launch_agentc                 O  r)   r	   )r   stop_runr   r   r   r   ri      r+   zApi.stop_run)r   r   r   r   r   r   )r   r   )r   r$   r	   )NNN)r>   r?   r   r   )r>   r?   rA   r   r   r   )D__name__
__module____qualname____doc__r   r   r   propertyr   r   r    r!   r"   r#   r&   r'   r*   r,   r.   r0   r2   r3   r5   r7   r;   r<   r=   r@   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rU   rV   rW   rX   rY   rZ   r[   r\   r]   r^   r_   r`   ra   rb   rc   rd   re   rf   rg   rh   ri   r   r   r   r   r      s    
	









r   N)
__future__r   typingr   wandb.sdk.internal.internal_apir   r   __all__r   r   r   r   <module>   s     
_