o
    -wi                     @   sz   d Z ddlZddlmZ ddlmZmZ ddlmZ ddl	m
Z
 er.ddlmZ dd	lmZ ed
ZG dd de
ZdS )zInterfaceQueue - Derived from InterfaceShared using queues to send to internal thread.

See interface.py for how interface classes relate to each other.

    N)BaseProcess)TYPE_CHECKINGOptional)Mailbox   )InterfaceShared)Queue)wandb_internal_pb2wandbc                       sh   e Zd Z				dded ded dee dee ddf
 fd	d
Zddddee ddfddZ  Z	S )InterfaceQueueNrecord_qzQueue[pb.Record]result_qzQueue[pb.Result]processmailboxreturnc                    s$   || _ || _|| _t j|d d S )N)r   )r   r   _processsuper__init__)selfr   r   r   r   	__class__ `/home/ubuntu/sommelier/.venv/lib/python3.10/site-packages/wandb/sdk/interface/interface_queue.pyr      s   zInterfaceQueue.__init__recordz	pb.Recordlocalc                 C   s>   | j r| j  std|r||j_| jr| j| d S d S )Nz&The wandb backend process has shutdown)r   is_alive	Exceptioncontrolr   r   put)r   r   r   r   r   r   _publish%   s   zInterfaceQueue._publish)NNNN)N)
__name__
__module____qualname__r   r   r   r   boolr   __classcell__r   r   r   r   r      s"    $r   )__doc__loggingmultiprocessing.processr   typingr   r   wandb.sdk.mailboxr   interface_sharedr   queuer   wandb.protor	   pb	getLoggerloggerr   r   r   r   r   <module>   s    
