o
    .wÖi?  ã                   @   s0   d dl mZmZ d dlmZ G dd„ deƒZdS )é    )ÚAnyÚCallable)ÚMetricc                   @   sJ   e Zd ZdZdedefdd„Zdedefdd„Zd	ed
edefdd„ZdS )ÚWrapperMetrica0  Abstract base class for wrapper metrics.

    Wrapper metrics are characterized by them wrapping another metric, and forwarding all calls to the wrapped metric.
    This means that all logic regarding synchronization etc. is handled by the wrapped metric, and the wrapper metric
    should not do anything in this regard.

    This class therefore overwrites all methods that are related to synchronization, and does nothing in them.

    Additionally, the forward method is not implemented by default as custom logic is required for each wrapper metric.

    ÚupdateÚreturnc                 C   ó   |S ©zdOverwrite to do nothing, because the default wrapped functionality is handled by the wrapped metric.© )Úselfr   r
   r
   ú[/home/ubuntu/sommelier/.venv/lib/python3.10/site-packages/torchmetrics/wrappers/abstract.pyÚ_wrap_update    ó   zWrapperMetric._wrap_updateÚcomputec                 C   r   r	   r
   )r   r   r
   r
   r   Ú_wrap_compute$   r   zWrapperMetric._wrap_computeÚargsÚkwargsc                 O   s   t ‚r	   )ÚNotImplementedError)r   r   r   r
   r
   r   Úforward(   r   zWrapperMetric.forwardN)	Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r
   r
   r
   r   r      s
    r   N)Útypingr   r   Útorchmetrics.metricr   r   r
   r
   r
   r   Ú<module>   s   