o
    bi                     @   sz   d dl Z d dlmZ d dlmZmZ d dlmZmZ d dl	m
Z
 eG dd dZG dd	 d	eZG d
d de jdZdS )    N)	dataclass)AnyList)Block	DataBatch)	ObjectRefc                   @   "   e Zd ZU dZeed< eed< dS )BatchzA batch of data with a corresponding index.

    Attributes:
        batch_idx: The global index of this batch so that downstream operations can
            maintain ordering.
        data: The batch of data.
    	batch_idxdataN)__name__
__module____qualname____doc__int__annotations__r    r   r   `/home/ubuntu/.local/lib/python3.10/site-packages/ray/data/_internal/block_batching/interfaces.pyr	   	   s   
 r	   c                   @   r   )CollatedBatchaH  A batch of collated data with a corresponding index.

    Attributes:
        batch_idx: The global index of this batch so that downstream operations can
            maintain ordering.
        data: The batch of data which is the output of a user provided collate_fn
            Therefore, the type of this data can be Any.
    r
   r   N)r   r   r   r   r   r   r   r   r   r   r   r      s   
 	r   c                   @   s4   e Zd ZdZejdeee  fddZ	dd Z
dS )BlockPrefetcherz!Interface for prefetching blocks.blocksc                 C      dS )z*Prefetch the provided blocks to this node.Nr   )selfr   r   r   r   prefetch_blocks(   s   zBlockPrefetcher.prefetch_blocksc                 C   r   )z'Stop prefetching and release resources.Nr   )r   r   r   r   stop-   s   zBlockPrefetcher.stopN)r   r   r   r   abcabstractmethodr   r   r   r   r   r   r   r   r   r   %   s
    r   )	metaclass)r   dataclassesr   typingr   r   ray.data.blockr   r   	ray.typesr   r	   r   ABCMetar   r   r   r   r   <module>   s    