o
    -wi                     @  sZ   d dl mZ d dlmZ d dlZd dlmZ d dlmZ er$d dlm	Z	 	ddddZ
dS )    )annotations)TYPE_CHECKINGN)DEPRECATED_FEATURES)	telemetry)	wandb_run
field_namer   warning_messagestrrunwandb_run.Run | NonereturnNonec                 C  sV   |pt j}tj|d}t|j| d W d   n1 sw   Y  t j|dd dS )ai  Warn the user that a feature has been deprecated.

    If a run is provided, the given field on its telemetry is updated.
    Otherwise, the global run is used.

    Args:
        field_name: The field on the Deprecated proto for this deprecation.
        warning_message: The message to display to the user.
        run: The run whose telemetry to update.
    )r
   TNF)repeat)wandbr
   r   contextsetattr
deprecatedtermwarn)r   r   r
   _runtel r   T/home/ubuntu/sommelier/.venv/lib/python3.10/site-packages/wandb/sdk/lib/deprecate.py	deprecate   s
   
r   )N)r   r   r   r	   r
   r   r   r   )
__future__r   typingr   r   wandb.proto.wandb_deprecatedr   wandb.sdk.libr   r   r   r   r   r   r   <module>   s    