Ë
    Z^(h  ã                   ó<   — d dl Z d dlZd dlmZ dgZ G d„ de«      Zy)é    N)ÚIterDataPipeÚIterableWrapperIterDataPipec                   ó$   — e Zd ZdZdd„Zd„ Zd„ Zy)r   añ  
    Wraps an iterable object to create an IterDataPipe.

    Args:
        iterable: Iterable object to be wrapped into an IterDataPipe
        deepcopy: Option to deepcopy input iterable object for each
            iterator. The copy is made when the first element is read in ``iter()``.

    .. note::
        If ``deepcopy`` is explicitly set to ``False``, users should ensure
        that the data pipeline doesn't contain any in-place operations over
        the iterable instance to prevent data inconsistency across iterations.

    Example:
        >>> # xdoctest: +SKIP
        >>> from torchdata.datapipes.iter import IterableWrapper
        >>> dp = IterableWrapper(range(10))
        >>> list(dp)
        [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
    c                 ó    — || _         || _        y ©N)ÚiterableÚdeepcopy)Úselfr   r	   s      úc/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/torch/utils/data/datapipes/iter/utils.pyÚ__init__z$IterableWrapperIterDataPipe.__init__!   s   € Ø ˆŒØ ˆ�ó    c              #   óÜ   K  — | j                   }| j                  r 	 t        j                  | j                   «      }|E d {  –—†  y # t        $ r t	        j
                  d«       Y Œ+w xY w7 Œ)­w)NzlThe input iterable can not be deepcopied, please be aware of in-place modification would affect source data.)r   r	   ÚcopyÚ	TypeErrorÚwarningsÚwarn)r
   Úsource_datas     r   Ú__iter__z$IterableWrapperIterDataPipe.__iter__%   s`   è ø€ Ø—m‘mˆØ�=Š=ð
Ü"Ÿm™m¨D¯M©MÓ:�ð ×Ñøô ò Ü—‘ðYöðúð
 	ús3   ‚A,œA »A,Á A*ÁA,ÁA'Á$A,Á&A'Á'A,c                 ó,   — t        | j                  «      S r   )Úlenr   )r
   s    r   Ú__len__z#IterableWrapperIterDataPipe.__len__5   s   € Ü�4—=‘=Ó!Ð!r   N)T)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   © r   r   r   r      s   „ ñó*!òó "r   )r   r   Ú#torch.utils.data.datapipes.datapiper   Ú__all__r   r   r   r   ú<module>r      s$   ðã Û å <ð )Ð
)€ô+" ,õ +"r   