+
    QV-jw  ã                   óJ   € ^ RI tR R ltR R ltR R ltR R	 ltR
 R ltR# )é    Nc                ó0   € V ^8„  d   QhR\         R\        /# )é   Ú
gen_kwargsÚreturn)ÚdictÚint)Úformats   "Úh/Volumes/fast/ai/experiments/ui-tars-smoke/.venv/lib/python3.14/site-packages/datasets/utils/sharding.pyÚ__annotate__r      s   € ÷ ñ ´ð ¼ñ ó    c                ó¼  € V P                  4        UUu/ uF)  w  r\        V\        4      '       g   K  V\        V4      bK+  	  ppp\        \	        VP                  4       4      4      ^8”  dE   \        RRP                  R VP                  4        4       4      ,           R,           R,           4      h\        VP                  4       ^ R7      p\        ^V4      # u uppi )zFReturn the number of possible shards according to the input gen_kwargsÚ
c              3   ó6   "  € T F  w  rR V RV 2x € K  	  R# 5i)z	- key z has length N© )Ú.0ÚkeyÚlengths   &  r
   Ú	<genexpr>Ú2_number_of_shards_in_gen_kwargs.<locals>.<genexpr>   s!   é € ÐfÑPeÁÀ˜( 3 % |°F°8Õ<ÓPeùs   ‚zW
To fix this, check the 'gen_kwargs' and make sure to use lists only for data sources, zqand use tuples otherwise. In the end there should only be one single list, or several lists with the same length.)Údefaultz›Sharding is ambiguous for this dataset: we found several data sources lists of different lengths, and we don't know over which list we should parallelize:
)	ÚitemsÚ
isinstanceÚlistÚlenÚsetÚvaluesÚRuntimeErrorÚjoinÚmax)r   r   ÚvalueÚlists_lengthsÚ
max_lengths   &    r
   Ú_number_of_shards_in_gen_kwargsr#      sÍ   € ð 8B×7GÑ7GÔ7IÔeÑ7I©¨ÌZÐX]Ô_c×Md”_�Sœ#˜e›*’_Ñ7I€MÑeÜ
Œ3ˆ}×#Ñ#Ó%Ó&Ó'¨!Ô+ÜðEà�i‰iÑfÐP]×PcÑPcÔPeÓfÓfõgð iõið Bõ	Bó
ð 	
ô �]×)Ñ)Ó+°QÔ7€JÜˆq�*ÓÐùó fs
   ”C³Cc                óR   € V ^8„  d   QhR\         R\         R\        \        ,          /# )r   Ú
num_shardsÚmax_num_jobsr   )r   r   Úrange)r	   s   "r
   r   r      s%   € ÷ $ñ $¤3ð $´cð $¼dÄ5½kñ $r   c                óò   € . p\        V4       Fe  pW,          W0V,          8  ,           pV^ 8X  d    V# V'       d   VR,          P                  M^ p\        WUV,           4      pVP                  V4       Kg  	  V# )aÏ  
Get the range of shard indices per job.
If num_shards<max_num_jobs, then num_shards jobs are given a range of one shard.
The shards indices order is preserved: e.g. all the first shards are given the first job.
Moreover all the jobs are given approximately the same number of shards.

Example:

```python
>>> _distribute_shards(2, max_num_jobs=4)
[range(0, 1), range(1, 2)]
>>> _distribute_shards(10, max_num_jobs=3)
[range(0, 4), range(4, 7), range(7, 10)]
```
éÿÿÿÿ)r'   ÚstopÚappend)r%   r&   Úshards_indices_per_groupÚ	group_idxÚnum_shards_to_addÚstartÚshard_indicess   &&     r
   Ú_distribute_shardsr1      s‚   € ð   "ÐÜ˜<Ö(ˆ	Ø&Õ6¸)ÐT`ÕG`Ñ:aÕbÐØ Ô!Øð $Ð#÷ 6NÐ(¨Õ,×1Ò1ÐSTˆÜ˜eÐ->Õ%>Ó?ˆØ ×'Ñ'¨Ö6ñ )ð $Ð#r   c                óR   € V ^8„  d   QhR\         R\        R\        \         ,          /# )r   r   r&   r   )r   r   r   )r	   s   "r
   r   r   0   s%   € ÷ 
ñ 
¤$ð 
´cð 
¼dÄ4½jñ 
r   c                ó„  € \        V 4      pV^8X  d   \        V 4      .# \        W!R7      p\        \	        V4      4       UUUUu. uF^  pV P                  4        UUUu/ uF<  w  rVT\        V\        4      '       d   W4,           Uu. uF  qvV,          NK  	  upMTbK>  	  upppNK`  	  upppp# u upi u upppi u uppppi )z2Split the gen_kwargs into `max_num_job` gen_kwargs)r%   r&   )r#   r   r1   r'   r   r   r   r   )r   r&   r%   Úshard_indices_per_groupr-   r   r    Ú	shard_idxs   &&      r
   Ú_split_gen_kwargsr6   0   sÊ   € ô 1°Ó<€JØ�Q„Ü�ZÓ Ð!Ð!ä"4À
Ô"fÐô #¤3Ð'>Ó#?Ô@ö
ñ A�	ð #-×"2Ñ"2Ô"4õ	ñ #5‘J�Cð Ü˜e¤T×*Ò*ð 9PÖ8ZÓ[Ñ8Z¨9˜I×&Ð&Ñ8ZÒ[àòñ #5ö	ñ Aô
ð 	
ùâ[ùôùõ
s*   ÁB:
Á(B3ÂB.Â	B3Â	B:
Â.B3Â3B:
c                óF   € V ^8„  d   QhR\         \        ,          R\        /# )r   Úgen_kwargs_listr   )r   r   )r	   s   "r
   r   r   C   s   € ÷ ñ ¤t¬D¥zð ´dñ r   c                 ó   € V ^ ,           UUUu/ uFZ  pT\        V ^ ,          V,          \        4      '       d#   V  UUu. uF  q"V,           F  q3NK  	  K  	  uppMV ^ ,          V,          bK\  	  uppp# u uppi u upppi )r   )r   r   )r8   r   r   r    s   &   r
   Ú_merge_gen_kwargsr:   C   s~   € ð
 # 1Ö%õ	ñ &ˆCð 	Ü�o aÕ(¨Õ-¬t×4Ò4ñ '6ÔS¡o˜
ÈcÇ?À?¸%ŠeÁ?‰e¡oÓSà˜QÕ Õ$ò	%ñ &ó	ð ùÛSùôs   Ž/A9½A3ÁA9Á3A9c                ód   € V ^8„  d   QhR\         P                  P                  R\        R\        /# )r   Úrngr   r   )ÚnpÚrandomÚ	Generatorr   )r	   s   "r
   r   r   L   s+   € ÷ ñ œRŸY™Y×0Ñ0ð ¼dð Ätñ r   c                óÖ  € VP                  4        Uu0 uF&  p\        V\        4      '       g   K  \        V4      kK(  	  pp/ pV F0  p\        \	        V4      4      WE&   V P                  WE,          4       K2  	  \        V4      pVP                  4        FG  w  rr\        V\        4      '       g   K  V\        V4      ,           Uu. uF  q‚V,          NK  	  upWg&   KI  	  V# u upi u upi )z.Return a shuffled copy of the input gen_kwargs)r   r   r   r   r'   Úshuffler   r   )	r<   r   r    Ú
list_sizesÚindices_per_sizeÚsizeÚshuffled_kwargsr   Úis	   &&       r
   Ú_shuffle_gen_kwargsrG   L   sÍ   € ð +5×*;Ñ*;Ô*=ÓYÑ*= ÄÈEÔSW×AX”*”#�e–*Ñ*=€JÐYØÐÛˆÜ!%¤e¨D£kÓ!2ÐÑØ�‰Ð$Õ*Ö+ñ ô ˜:Ó&€OØ%×+Ñ+Ö-‰
ˆÜ�eœT×"Ô"Ø6FÄsÈ5ÃzÖ6RÓ#SÑ6R°¨!§H HÑ6RÑ#SˆOÓ ñ .ð Ðùò Zùò $Ts   “C!°C!ÃC&)Únumpyr=   r#   r1   r6   r:   rG   r   r   r
   Ú<module>rI      s!   ðÛ õõ"$õ6
õ&÷r   