+
    ˜°³j´  ã                   ó  € ^ RI t ^ RIt^ RIHt ^ RIHt ^ RIt^ RIHtH	t	 ^ RI
HtHtHt . ROtR R ltR R	 ltR
 R lt]	P$                  3R R lltR R ltRR R llt]! R]R7      R R l4       tR R ltR R ltR# )é    N)ÚAny)Ú
deprecated)Ú_ShardingIterDataPipeÚSHARDING_PRIORITIES)ÚDataPipeÚDataPipeGraphÚtraverse_dpsc                óF   € V ^8„  d   QhR\         R\        \        ,          /# )é   ÚgraphÚreturn)r   Úlistr   )Úformats   "Ú`/home/luca/screen-checking/.venv/lib/python3.14/site-packages/torch/utils/data/graph_settings.pyÚ__annotate__r      s   € ÷ 5ñ 5œ}ð 5´´hµñ 5ó    c                 ó*   € \        V \        4       4      # ©N)Ú_get_all_graph_pipes_helperÚset)r   s   &r   Úget_all_graph_pipesr      s   € Ü& u¬c«eÓ4Ð4r   c                óh   € V ^8„  d   QhR\         R\        \        ,          R\        \        ,          /# )r   r   Úid_cacher   )r   r   Úintr   r   )r   s   "r   r   r      s,   € ÷ 
ñ 
Üð
Ü$'¬¥Hð
ä	Œ(…^ñ
r   c                 óÊ   € . pV P                  4        FL  w  pw  rEW19   d   K  VP                  V4       VP                  V4       VP                  \	        WQ4      4       KN  	  V# r   )ÚitemsÚaddÚappendÚextendr   )r   r   ÚresultsÚdp_idÚdatapipeÚ	sub_graphs   &&    r   r   r      s[   € ð !€GØ(-¯©®Ñ$ˆÑ$�ØÔÙØ�‰�UÔØ�‰�xÔ Ø�‰Ô2°9ÓGÖHñ )6ð €Nr   c                ó0   € V ^8„  d   QhR\         R\        /# ©r   r"   r   ©r   Úbool)r   s   "r   r   r   )   s   € ÷ ñ ¤Hð ´ñ r   c                 óš   € \        V \        4      ;'       g5    \        V R 4      ;'       d!    \        P                  ! V P
                  4      # )Úapply_sharding)Ú
isinstancer   ÚhasattrÚinspectÚismethodr)   ©r"   s   &r   Ú_is_sharding_datapiper/   )   sE   € Ü�hÔ 5Ó6÷ ð Ü�Ð*Ó+÷ 	6ð 	6Ü×Ò˜X×4Ñ4Ó5ðr   c                óH   € V ^8„  d   QhR\         R\        R\        R\         /# )r   r"   Únum_of_instancesÚinstance_idr   )r   r   )r   s   "r   r   r   0   s0   € ÷ %ñ %Üð%äð%ô ð%ô
 ñ%r   c                óP   aaaa€ \        V 4      pRR VVVV3R llloS! V4       V # )zÅ
Apply dynamic sharding over the ``sharding_filter`` DataPipe that has a method ``apply_sharding``.

RuntimeError will be raised when multiple ``sharding_filter`` are presented in the same branch.
c                ó   € V ^8„  d   QhRR/# )r   r   N© )r   s   "r   r   Ú$apply_sharding.<locals>.__annotate__=   s   € ÷ (ñ (¨Tñ (r   c                 ól  <€ V P                  4        Fž  w  r#R p\        V4      '       dy   Ve   \        RV RV 24      h\        P                  ! VP
                  4      p\        VP                  4      ^8  d   VP                  SS4       MVP                  SSS	R7       TpVf   TpS! W44       K   	  R # )NzoSharding twice on a single pipeline is likely unintended and will cause data loss. Sharding already applied to z while trying to apply to )Úsharding_group)Úvaluesr/   ÚRuntimeErrorr,   Ú	signaturer)   ÚlenÚ
parameters)
r   Úprev_appliedÚdpr#   ÚappliedÚsigÚ_helperr2   r1   r8   s
   &&    €€€€r   rB   Úapply_sharding.<locals>._helper=   s¾   ø€ Ø"Ÿ\™\ž^‰MˆBØˆGÜ$ R×(Ò(ØÒ+Ü&ð7Ø7C°nÐD^Ð_aÐ^bðdóð ô
 ×'Ò'¨×(9Ñ(9Ó:�Ü�s—~‘~Ó&¨Ô*Ø×%Ñ%Ð&6¸ÕDà×%Ñ%Ø(¨+Ànð &ô ð �ØŠØ&�Ù�IÖ'ó' ,r   r   )r	   )r"   r1   r2   r8   r   rB   s   &fff @r   r)   r)   0   s'   û€ ô ˜Ó"€E÷(õ (ñ, ˆE„Nà€Or   c                ó0   € V ^8„  d   QhR\         R\        /# r%   r&   )r   s   "r   r   r   X   s   € ÷ ñ ¤8ð ´ñ r   c                 óâ   € \        V R 4      ;'       d]    \        V R4      ;'       dI    \        P                  ! V P                  4      ;'       d!    \        P                  ! V P                  4      # )Úset_shuffleÚset_seed)r+   r,   r-   rF   rG   r.   s   &r   Ú_is_shuffle_datapiperH   X   sc   € ä�˜-Ó(÷ 	0ð 	0Ü�H˜jÓ)÷	0ð 	0ä×Ò˜X×1Ñ1Ó2÷	0ð 	0ô ×Ò˜X×.Ñ.Ó/ð	r   c                óJ   € V ^8„  d   QhR\         R\        R,          R\         /# )r   r"   ÚshuffleNr   r&   )r   s   "r   r   r   a   s%   € ÷ ñ ¤Xð ¼¸t½ð Ìxñ r   c                ó:  € Vf   V # \        V 4      p\        V4      pV Uu. uF  p\        V4      '       g   K  VNK  	  ppV'       g4   V'       d,   \        P                  ! R^R7       V P                  4       p V .pV F  pVP                  V4       K  	  V # u upi )a)  
Traverse the graph of ``DataPipes`` to find and set shuffle attribute.

Apply the method to each `DataPipe` that has APIs of ``set_shuffle``
and ``set_seed``.

Args:
    datapipe: DataPipe that needs to set shuffle attribute
    shuffle: Shuffle option (default: ``None`` and no-op to the graph)
z«`shuffle=True` was set, but the datapipe does not contain a `Shuffler`. Adding one at the end. Be aware that the default buffer size might not be sufficient for your task.)Ú
stacklevel)r	   r   rH   ÚwarningsÚwarnrJ   rF   )r"   rJ   r   Ú	all_pipesÚpipeÚ	shufflersÚshufflers   &&     r   Úapply_shuffle_settingsrS   a   s›   € ð ‚Øˆä˜Ó"€EÜ# EÓ*€IÙ"+ÓJ¡)˜$Ô/CÀD×/I—�¡)€IÐJßŸÜ�Šð[àõ	
ð
 ×#Ñ#Ó%ˆàð
ˆ	ó ˆØ×Ñ˜WÖ%ñ ð €Oùò Ks
   ¡B¹Bz�`apply_shuffle_seed` is deprecated since 1.12 and will be removed in the future releases. Please use `apply_random_seed` instead.)Úcategoryc                ó<   € V ^8„  d   QhR\         R\        R\         /# ©r   r"   Úrngr   )r   r   )r   s   "r   r   r   ˆ   s!   € ÷ ,ñ ,¤ð ,´ð ,¼ñ ,r   c                 ó   € \        W4      # r   )Úapply_random_seed)r"   rW   s   &&r   Úapply_shuffle_seedrZ   ƒ   s   € ô ˜XÓ+Ð+r   c                ó0   € V ^8„  d   QhR\         R\        /# r%   r&   )r   s   "r   r   r   Œ   s   € ÷ Qñ Q¤(ð Q¬tñ Qr   c                 ój   € \        V R 4      ;'       d!    \        P                  ! V P                  4      # )rG   )r+   r,   r-   rG   r.   s   &r   Ú_is_random_datapiper]   Œ   s(   € Ü�8˜ZÓ(×PÐP¬W×-=Ò-=¸h×>OÑ>OÓ-PÐPr   c                óP   € V ^8„  d   QhR\         R\        P                  R\         /# rV   )r   ÚtorchÚ	Generator)r   s   "r   r   r   �   s%   € ÷ ñ ¤ð ¬u¯©ð Ä8ñ r   c                óÊ  € \        V 4      p\        V4      p\        4       p. pV FS  p\        V4      V9   d   K  \	        V4      '       g   K(  VP                  V4       VP                  \        V4      4       KU  	  V Fa  p\        \        P                  ! R\        P                  R7      P                  VR7      P                  4       4      pVP                  V4       Kc  	  V # )a  
Traverse the graph of ``DataPipes`` to find random ``DataPipe`` with an API of ``set_seed``.

Then set the random seed based on the provided RNG to those ``DataPipe``.

Args:
    datapipe: DataPipe that needs to set randomness
    rng: Random number generator to generate random seeds
)Údtype)Ú	generatorr5   )r	   r   r   Úidr]   r   r   r   r_   ÚemptyÚint64Úrandom_ÚitemrG   )r"   rW   r   rO   ÚcacheÚrandom_datapipesrP   Úrandom_seeds   &&      r   rY   rY   �   s½   € ô ˜Ó"€EÜ# EÓ*€Iô ‹E€EØÐÛˆÜˆd‹8�uÔÙÜ˜t×$Ô$Ø×#Ñ# DÔ)Ø�I‰I”b˜“hÖñ ó !ˆÜÜ�KŠK˜¤%§+¡+Ô.×6Ñ6ÀÐ6ÓE×JÑJÓLó
ˆð 	�‰�kÖ"ñ	 !ð €Or   )rY   r)   rZ   rS   r   r   )r,   rM   Útypingr   Útyping_extensionsr   r_   Ú(torch.utils.data.datapipes.iter.shardingr   r   Útorch.utils.data.graphr   r   r	   Ú__all__r   r   r/   ÚDEFAULTr)   rH   rS   ÚFutureWarningrZ   r]   rY   r5   r   r   Ú<module>rs      s€   ðã Û Ý Ý (ã ÷÷ IÑ Hò€õ5õ
õð '×.Ñ.÷	%õP÷ñD ð.àôô
,óð
,õQ÷r   