Ë
    æÿæi‰o  ã                   ór  — d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
m
Z
 ddlmZ ddlmZmZmZmZmZ ddlmZ 	 e 	 ddlZddlmZ dd	lmZ dd
lm Z  ddl!m"Z" ddl#m$Z$m%Z%m&Z& dZ' e(d«      Z)ejT                  ejV                  z  ejX                  z  Z-ejT                  ejV                  z  Z. e/«       Z0d„ Z1d„ Z2d„ Z3e3e"jh                  d<    G d„ d«      Z5d„ Z6d d„Z7d„ Z8d„ Z9d„ Z:d„ Z; G d„ de<«      Z=	 	 	 	 	 	 	 	 d!d„Z> G d„ de<«      Z?y# e$ r  ed«      ZY ŒÞw xY w# e$ r dZY Œàw xY w)"z/
Reducer using memory mapping for numpy arrays
é    N)Úmmap)Úutil)ÚHIGHEST_PROTOCOLÚPicklingErrorÚdumpsÚloadsÚwhichmodule)Úuuid4)Ú
as_stridedé   )Úmake_memmap)Údelete_folder)Úresource_tracker)ÚdumpÚloadÚload_temporary_memmapz/dev/shmg    eÍÝAc                 óÜ   — ddl m} t        j                  dj	                  t
        j                  j                  | «      t        j                  «       «      «       |j                  | d«       y )Nr   )Ú_resource_trackerzj[FINALIZER CALL] object mapping to {} about to be deleted, decrementing the refcount of the file (pid: {})Úfile)
Ú'externals.loky.backend.resource_trackerr   r   ÚdebugÚformatÚosÚpathÚbasenameÚgetpidÚmaybe_unlink)Úfilenamer   s     úo/Volumes/fast/ai/experiments/voice-extract-mac/.venv/lib/python3.12/site-packages/joblib/_memmapping_reducer.pyÚ_log_and_unlinkr    ;   sL   € ÝJä‡J�Jð	;ß;A¹6Ü�G‰G×Ñ˜XÓ&¬¯	©	«ó<
ôð ×"Ñ" 8¨VÕ4ó    c           	      ó2  — t        j                  dj                  t        | «      t	        | «      t
        j                  j                  | j                  «      t        j                  «       «      «       t        j                  | t        | j                  «       y )NzD[FINALIZER ADD] adding finalizer to {} (id {}, filename {}, pid  {}))r   r   r   ÚtypeÚidr   r   r   r   r   ÚweakrefÚfinalizer    )Úmemmaps    r   Úadd_maybe_unlink_finalizerr(   G   s^   € Ü‡J�JØN×UÑUÜ�‹Lœ"˜V›*¤b§g¡g×&6Ñ&6°v·±Ó&GÌÏÉËó	
ôô
 ×Ñ�Vœ_¨f¯o©oÕ>r!   c                 ó  — d}t        d|dz   «      D ]  }	 t        j                  | «        y y# t        $ rB t	        j
                  dj                  | «      «       ||k(  r‚ t        j                  d«       Y Œgt        $ r Y Œqw xY w)a=  Wrapper around os.unlink with a retry mechanism.

    The retry mechanism has been implemented primarily to overcome a race
    condition happening during the finalizer of a np.memmap: when a process
    holding the last reference to a mmap-backed np.memmap/np.array is about to
    delete this array (and close the reference), it sends a maybe_unlink
    request to the resource_tracker. This request can be processed faster than
    it takes for the last reference of the memmap to be closed, yielding (on
    Windows) a PermissionError in the resource_tracker loop.
    é
   r   z9[ResourceTracker] tried to unlink {}, got PermissionErrorgš™™™™™É?N)
Úranger   ÚunlinkÚPermissionErrorr   r   r   ÚtimeÚsleepÚFileNotFoundError)r   ÚNUM_RETRIESÚretry_nos      r   Úunlink_filer3   P   s…   € ð €KÜ˜!˜[¨1™_Ö-ˆð	Ü�I‰I�hÔÙñ .øô ò 		 Ü�J‰JØK×RÑRØóôð
 ˜;Ò&Øä—
‘
˜3–Ü ò 	ñ ð	ús   –/¯ABÁ9BÂBr   c                   ó(   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zy)Ú_WeakArrayKeyMapa  A variant of weakref.WeakKeyDictionary for unhashable numpy arrays.

    This datastructure will be used with numpy arrays as obj keys, therefore we
    do not use the __get__ / __set__ methods to avoid any conflict with the
    numpy fancy indexing syntax.
    c                 ó   — i | _         y ©N©Ú_data©Úselfs    r   Ú__init__z_WeakArrayKeyMap.__init__{   s	   € Øˆ�
r!   c                 ód   — | j                   t        |«         \  }} |«       |urt        |«      ‚|S r7   )r9   r$   ÚKeyError)r;   ÚobjÚrefÚvals       r   Úgetz_WeakArrayKeyMap.get~   s3   € Ø—:‘:œb ›gÑ&‰ˆˆSÙ‹5˜Ñô ˜3“-ÐØˆ
r!   c                 óæ   ‡ ‡— t        |«      Š	 ‰ j                  ‰   \  }} |«       |urt        |«      ‚	 ||f‰ j                  ‰<   y # t        $ r ˆˆ fd„}t        j                  ||«      }Y Œ9w xY w)Nc                 ó    •— ‰j                   ‰= y r7   r8   )Ú_Úkeyr;   s    €€r   Ú
on_destroyz(_WeakArrayKeyMap.set.<locals>.on_destroy’   s   ø€ Ø—J‘J˜s‘Or!   )r$   r9   r>   r%   r@   )r;   r?   Úvaluer@   rE   rG   rF   s   `     @r   Úsetz_WeakArrayKeyMap.set†   sx   ù€ Ü�‹gˆð	/Ø—Z‘Z ‘_‰FˆC�Ù‹u˜CÑô ˜s“mÐ#ð  ð ˜u˜*ˆ�
‰
�3Šøô ò 	/õ$ô —+‘+˜c :Ó.ŠCð	/ús   �&A Á%A0Á/A0c                 ó   — t        d«      ‚)Nz"_WeakArrayKeyMap is not pickleable)r   r:   s    r   Ú__getstate__z_WeakArrayKeyMap.__getstate__˜   s   € ÜÐ@ÓAÐAr!   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r<   rB   rI   rK   © r!   r   r5   r5   s   s   „ ñòòò%ó$Br!   r5   c                 ó\   — t        | dd«      }|€yt        |t        «      r| S t        |«      S )z@Recursively look up the original np.memmap instance base if any.ÚbaseN)ÚgetattrÚ
isinstancer   Ú_get_backing_memmap)ÚaÚbs     r   rU   rU       s6   € ä��6˜4Ó €AØ€yð ä	�A”tÔ	àˆô # 1Ó%Ð%r!   c                 óþ  — d}|€ t         j                  j                  dd«      }|€Ët         j                  j	                  t
        «      r¨t        t         d«      r˜	 t        j                  t
        «      }|j                  |j                  z  }|t        kD  r\t
        }t         j                  j                  || «      }t         j                  j	                  |«      st        j                  |«       d}|€t        j                   «       }t         j                  j#                  t         j                  j%                  |«      «      }t         j                  j                  || «      }||fS # t        t        f$ r d}Y Œ‰w xY w)a  Get the full path to a subfolder inside the temporary folder.

    Parameters
    ----------
    pool_folder_name : str
        Sub-folder name used for the serialization of a pool instance.

    temp_folder: str, optional
        Folder to be used by the pool for memmapping large arrays
        for sharing memory with worker processes. If None, this will try in
        order:

        - a folder pointed by the JOBLIB_TEMP_FOLDER environment
          variable,
        - /dev/shm if the folder exists and is writable: this is a
          RAMdisk filesystem available by default on modern Linux
          distributions,
        - the default system temporary folder that can be
          overridden with TMP, TMPDIR or TEMP environment
          variables, typically /tmp under Unix operating systems.

    Returns
    -------
    pool_folder : str
       full path to the temporary folder
    use_shared_mem : bool
       whether the temporary folder is written to the system shared memory
       folder or some other temporary folder.
    FNÚJOBLIB_TEMP_FOLDERÚstatvfsT)r   ÚenvironrB   r   ÚexistsÚSYSTEM_SHARED_MEM_FSÚhasattrrZ   Úf_bsizeÚf_bavailÚSYSTEM_SHARED_MEM_FS_MIN_SIZEÚjoinÚmakedirsÚIOErrorÚOSErrorÚtempfileÚ
gettempdirÚabspathÚ
expanduser)Úpool_folder_nameÚtemp_folderÚuse_shared_memÚ	shm_statsÚavailable_nbytesÚpool_folders         r   Ú_get_temp_dirrp   ±   s)  € ð< €NØÐÜ—j‘j—n‘nÐ%9¸4Ó@ˆØÐÜ�7‰7�>‰>Ô.Ô/´G¼BÀ	Ô4Jð#ÜŸJ™JÔ';Ó<�	Ø#,×#4Ñ#4°y×7IÑ7IÑ#IÐ Ø#Ô&CÒCô #7�KÜ"$§'¡'§,¡,¨{Ð<LÓ"M�KÜŸ7™7Ÿ>™>¨+Ô6ÜŸ™ KÔ0Ø%)�Nð
 Ðä×)Ñ)Ó+ˆÜ—'‘'—/‘/¤"§'¡'×"4Ñ"4°[Ó"AÓB€KÜ—'‘'—,‘,˜{Ð,<Ó=€KØ˜Ð&Ð&øô œWÐ%ò #ð #’ð#ús   ÁBE( Å(E<Å;E<c                 ó   — t        | «      duS )z?Return True if a is backed by some mmap buffer directly or not.N)rU   )rV   s    r   Úhas_shareable_memoryrr   ì   s   € ä˜qÓ!¨Ð-Ð-r!   c	           	      óx   — |dk(  rd}|€t        | ||||||¬«      S t        | ||||||¬«      }	t        |	||¬«      S )z2Reconstruct an array view on a memory mapped file.zw+zr+)ÚdtypeÚshapeÚmodeÚoffsetÚorderÚunlink_on_gc_collect)rt   ru   rw   rv   rx   ry   )ru   Ústrides)r   r   )
r   rt   rv   rw   rx   ru   rz   Útotal_buffer_lenry   rR   s
             r   Ú_strided_from_memmapr|   ñ   si   € ð ˆt‚|àˆà€äØØØØØØØ!5ô
ð 	
ô ØØØ"ØØØØ!5ô
ˆô ˜$ e°WÔ=Ð=r!   c           
      óV  — t        j                  dj                  | j                  t	        j
                  «       «      «       	 ddlm}  || «      \  }} ||«      d   }||z
  }||j                  z  }|j                  dkD  r|j                  d   rd}nd}| j                  d   s| j                  d   rd	}d	}	n| j                  }||z
  | j                  z  }	t         |j"                  | j$                  |j&                  ||| j                  ||	d
f	fS # t        t        f$ r	 ddl
m} Y ŒÞw xY w)a  Pickling reduction for memmap backed arrays.

    a is expected to be an instance of np.ndarray (or np.memmap)
    m is expected to be an instance of np.memmap on the top of the ``base``
    attribute ancestry of a. ``m.base`` should be the real python mmap object.
    zC[MEMMAP REDUCE] reducing a memmap-backed array (shape, {}, pid: {})r   )Úbyte_boundsr   ÚF_CONTIGUOUSÚFÚCÚC_CONTIGUOUSNF)r   r   r   ru   r   r   Únumpy.lib.array_utilsr~   ÚModuleNotFoundErrorÚImportErrorÚnumpyrw   ÚndimÚflagsrz   Úitemsizer|   r   rt   rv   )
rV   Úmr~   Úa_startÚa_endÚm_startrw   rx   rz   r{   s
             r   Ú_reduce_memmap_backedrŽ     s(  € ô 	‡J�JØM×TÑTØ�G‰G”R—Y‘Y“[ó	
ôð
&Ý5ñ ! “^�N€GˆUÙ˜!‹n˜QÑ€GØ�wÑ€Fð ˆa�h‰hÑ€Fð 	‡v�v�‚z�a—g‘g˜nÒ-Ø‰ð ˆà‡w�wˆ~Ò !§'¡'¨.Ò"9àˆØÑð —)‘)ˆØ! G™O°·
±
Ñ:Ðô 	à�J‰JØ�G‰GØ�F‰FØØØ�G‰GØØØð
	
ðð øô;  ¤Ð-ò &ç%ð&ús   ÁD ÄD(Ä'D(c                 óÞ   — t        | «      }t        |t        j                  «      r|j                  t
        vrt        | |«      S t        t        t        j                  | «      t        ¬«      ffS )z5reduce a np.array or a np.memmap from a child process©Úprotocol)rU   rT   Únpr'   r   ÚJOBLIB_MMAPSrŽ   r   r   Úasarrayr   )rV   rŠ   s     r   Úreduce_array_memmap_backwardr•   W  sT   € ä˜AÓ€AÜ�!”R—Y‘YÔ A§J¡J´lÑ$Bô % Q¨Ó*Ð*ô œœbŸj™j¨›mÔ6FÔGÐIÐJÐJr!   c                   ó8   — e Zd ZdZ	 	 dd„Zed„ «       Zd„ Zd„ Zy)ÚArrayMemmapForwardReducera#  Reducer callable to dump large arrays to memmap files.

    Parameters
    ----------
    max_nbytes: int
        Threshold to trigger memmapping of large arrays to files created
        a folder.
    temp_folder_resolver: callable
        An callable in charge of resolving a temporary folder name where files
        for backing memmapped arrays are created.
    mmap_mode: 'r', 'r+' or 'c'
        Mode for the created memmap datastructure. See the documentation of
        numpy.memmap for more details. Note: 'w+' is coerced to 'r+'
        automatically to avoid zeroing the data on unpickling.
    verbose: int, optional, 0 by default
        If verbose > 0, memmap creations are logged.
        If verbose > 1, both memmap creations, reuse and array pickling are
        logged.
    prewarm: bool, optional, False by default.
        Force a read on newly memmapped array to make sure that OS pre-cache it
        memory. This can be useful to avoid concurrent disk access when the
        same data array is passed to different worker processes.
    c                 ó
  — || _         || _        || _        t        |«      | _        |dk(  r&| j
                  j                  t        «       | _        n|| _        || _        t        «       | _
        t        «       | _        || _        y )NÚauto)Ú_max_nbytesÚ_temp_folder_resolverÚ
_mmap_modeÚintÚverboseÚ_temp_folderÚ
startswithr]   Ú_prewarmr5   Ú_memmaped_arraysrI   Ú_temporary_memmaped_filenamesÚ_unlink_on_gc_collect)r;   Ú
max_nbytesÚtemp_folder_resolverÚ	mmap_modery   rž   Úprewarms          r   r<   z"ArrayMemmapForwardReducer.__init__�  su   € ð &ˆÔØ%9ˆÔ"Ø#ˆŒÜ˜7“|ˆŒØ�fÒØ $× 1Ñ 1× <Ñ <Ô=QÓ RÐRˆD�Mà#ˆDŒMØˆŒÜ 0Ó 2ˆÔÜ-0«UˆÔ*Ø%9ˆÕ"r!   c                 ó"   — | j                  «       S r7   )r›   r:   s    r   rŸ   z&ArrayMemmapForwardReducer._temp_folder—  s   € à×)Ñ)Ó+Ð+r!   c                 óŽ   — | j                   d | j                  | j                  f}| j                  | j                  dœ}t
        ||fS )N)rž   r¨   )rš   rœ   r¤   rž   r¡   r—   )r;   ÚargsÚkwargss      r   Ú
__reduce__z$ArrayMemmapForwardReducer.__reduce__›  sF   € ð × Ñ  $¨¯©¸×9SÑ9SÐTˆà—|‘|Ø—}‘}ñ
ˆô )¨$°Ð6Ð6r!   c           	      ó   — t        |«      }|�&t        |t        j                  «      rt	        ||«      S |j
                  j                  �s@| j                  ��3|j                  | j                  kD  �r	 t        j                  | j                  «       t        j                  | j                  t        «       	 | j"                  j%                  |«      }t        j8                  j;                  | j                  |«      }|| j<                  v}| j<                  j?                  |«       | j@                  rtC        jD                  |d«       |rtC        jD                  |d«       t        j8                  jG                  |«      s—tI        jJ                  dj)                  |jL                  |j
                  |«      «       tO        ||«      D ]  }t        j                  |tP        «       Œ | jR                  r}tU        || jV                  ¬«      jY                  «        nWtI        jJ                  dj)                  |jL                  |j
                  t        j8                  j[                  |«      «      «       t\        || jV                  | j@                  ffS tI        jJ                  dj)                  |jL                  |j
                  «      «       t^        ta        |tb        ¬«      ffS # t        $ r*}|j                  t        j                   k7  r|‚Y d }~�ŒTd }~ww xY w# t&        $ rr dj)                  t        j*                  «       t-        t/        j0                  «       «      t3        «       j4                  «      }| j"                  j7                  ||«       Y �Œºw xY w)Nz{}-{}-{}.pklr   zP[ARRAY DUMP] Pickling new array (shape={}, dtype={}) creating a new memmap at {})r§   zN[ARRAY DUMP] Pickling known array (shape={}, dtype={}) reusing memmap file: {}zB[ARRAY DUMP] Pickling array (NO MEMMAPPING) (shape={},  dtype={}).r�   )2rU   rT   r’   r'   rŽ   rt   Ú	hasobjectrš   Únbytesr   rc   rŸ   ÚchmodÚFOLDER_PERMISSIONSre   ÚerrnoÚEEXISTr¢   rB   r>   r   r   r$   Ú	threadingÚcurrent_threadr
   ÚhexrI   r   rb   r£   Úaddr¤   r   Úregisterr\   r   r   ru   r   ÚFILE_PERMISSIONSr¡   r   rœ   Úmaxr   r   r   r   r   )r;   rV   rŠ   Úer   r   Úis_new_memmapÚdumped_filenames           r   Ú__call__z"ArrayMemmapForwardReducer.__call__¬  s³  € Ü Ó"ˆØˆ=œZ¨¬2¯9©9Ô5ä(¨¨AÓ.Ð.ð —‘×!Ó!Ø× Ñ Ñ,Ø—‘˜4×+Ñ+Ó+ðÜ—‘˜D×-Ñ-Ô.Ü—‘˜×*Ñ*Ô,>Ô?ð

7Ø×0Ñ0×4Ñ4°QÓ7�ô —w‘w—|‘| D×$5Ñ$5°xÓ@ˆHð
 %¨D×,NÑ,NÐNˆMð ×.Ñ.×2Ñ2°8Ô<à×)Ò)ô !×)Ñ)¨(°FÔ;áô !×)Ñ)¨(°FÔ;ä—7‘7—>‘> (Ô+Ü—
‘
ð2ß28±&¸¿¹À!Ç'Á'È8Ó2Tôô (,¨A¨xÖ'8�OÜ—H‘H˜_Ô.>Õ?ð (9ð —=’=ô ˜¨T¯_©_Ô=×AÑAÕCô —
‘
ð.ß.4©fØŸ™ §¡¬"¯'©'×*:Ñ*:¸8Ó*Dó/ôô &Ø˜4Ÿ?™?¨D×,FÑ,FÐGðð ô �J‰Jðß$™f Q§W¡W¨a¯g©gÓ6ôô œE !Ô.>Ô?ÐAÐBÐBøôi ò Ø—7‘7œeŸl™lÒ*Ø�Gõ +ûðûô ò 7ð
 *×0Ñ0Ü—I‘I“K¤¤I×$<Ñ$<Ó$>Ó!?ÄÃÇÁó�ð ×%Ñ%×)Ñ)¨!¨X×6ð7ús,   Á3AK Â7L Ë	LË%L
Ì
LÌA7NÎNN)r   T)	rL   rM   rN   rO   r<   ÚpropertyrŸ   r­   r¿   rP   r!   r   r—   r—   h  s4   „ ñð< Øó:ð, ñ,ó ð,ò7ó"dCr!   r—   c                 ó  — | €
t        «       } |€
t        «       }t        �et        ||||||¬«      }	|	| t        j                  <   |	| t        j                  <   t
        |t        j                  <   t
        |t        j                  <   | |fS )a	  Construct a pair of memmapping reducer linked to a tmpdir.

    This function manage the creation and the clean up of the temporary folders
    underlying the memory maps and should be use to get the reducers necessary
    to construct joblib pool or executor.
    )r¨   )Údictr’   r—   Úndarrayr'   r•   )
Úforward_reducersÚbackward_reducersr¦   r¥   r§   rž   r¨   ry   r¬   Úforward_reduce_ndarrays
             r   Úget_memmapping_reducersrÇ     s‘   € ð" ÐÜ›6ÐØÐ Ü ›FÐä	€~ô ";ØØ ØØ ØØô"
Ðð (>ÐœŸ™Ñ$Ø&<ÐœŸ™Ñ#ô )EÐœ"Ÿ*™*Ñ%Ü'CÐœ"Ÿ)™)Ñ$àÐ.Ð.Ð.r!   c                   ó:   — e Zd ZdZd	d„Zd„ Zd„ Zd„ Zd„ Z	 d
d„Z	y)ÚTemporaryResourcesManagera9  Stateful object able to manage temporary folder and pickles

    It exposes:
    - a per-context folder name resolving API that memmap-based reducers will
      rely on to know where to pickle the temporary memmaps
    - a temporary file/folder management API that internally uses the
      resource_tracker.
    Nc                 óÚ   — d | _         || _        d | _        t        «       | _        t        «       j                  | _        i | _        |€t        «       j                  }| j                  |«       y r7   )
Ú_current_temp_folderÚ_temp_folder_rootÚ_use_shared_memrÂ   Ú_cached_temp_foldersr
   r·   Ú_idÚ_finalizersÚset_current_context)r;   Útemp_folder_rootÚ
context_ids      r   r<   z"TemporaryResourcesManager.__init__L  sZ   € Ø$(ˆÔ!Ø!1ˆÔØ#ˆÔÜ$(£FˆÔ!Ü“7—;‘;ˆŒØˆÔØÐô
 ›Ÿ™ˆJØ× Ñ  Õ,r!   c                 ó4   — || _         | j                  |«       y r7   )Ú_current_context_idÚregister_new_context)r;   rÓ   s     r   rÑ   z-TemporaryResourcesManager.set_current_context[  s   € Ø#-ˆÔ Ø×!Ñ! *Õ-r!   c                 óô   — || j                   v ry dj                  t        j                  «       | j                  |«      }t        || j                  «      \  }}| j                  ||«       || j                   |<   y )Nz!joblib_memmapping_folder_{}_{}_{})rÎ   r   r   r   rÏ   rp   rÌ   Úregister_folder_finalizer)r;   rÓ   Únew_folder_nameÚnew_folder_pathrE   s        r   rÖ   z.TemporaryResourcesManager.register_new_context_  sr   € ð ˜×2Ñ2Ñ2Øð B×HÑHÜ—	‘	“˜TŸX™X zóˆOô "/¨À×@VÑ@VÓ!WÑˆO˜QØ×*Ñ*¨?¸JÔGØ4CˆD×%Ñ% jÒ1r!   c                 ó4   — | j                   | j                     S )z@Return a folder name specific to the currently activated context)rÎ   rÕ   r:   s    r   Úresolve_temp_folder_namez2TemporaryResourcesManager.resolve_temp_folder_namev  s   € à×(Ñ(¨×)AÑ)AÑBÐBr!   c                 ó¤   ‡‡— t        t        d«      Št        j                  ‰d«       ˆˆfd„}t	        j                  |«      | j
                  |<   y )Nr   Úfolderc                  óÞ   •— t        ‰dg¬«      j                  } 	  | ‰d¬«       t        j                  ‰d«       y # t        $ r' t        j                  dj                  ‰«      «       Y y w xY w)Nr   )ÚfromlistT©Úallow_non_emptyrÞ   z%Failed to delete temporary folder: {})Ú
__import__r   r   Ú
unregisterre   ÚwarningsÚwarnr   )r   Úpool_module_nameÚpool_subfolders    €€r   Ú_cleanupzETemporaryResourcesManager.register_folder_finalizer.<locals>._cleanup…  sg   ø€ ô 'Ø ¨OÐ+<ôç‰mð ðÙ˜n¸dÕCÜ ×+Ñ+¨N¸HÕEøÜò Ü—‘Ø;×BÑBÀ>ÓRöðús   › < ¼-A,Á+A,)r	   r   r   r¹   ÚatexitrÐ   )r;   rè   rÓ   ré   rç   s    `  @r   rØ   z3TemporaryResourcesManager.register_folder_finalizer|  sB   ù€ ô '¤}°oÓFÐÜ×!Ñ! .°(Ô;õ	ô( (.§¡°xÓ'@ˆ×Ñ˜Ò$r!   c                 óþ  — |€/t        | j                  «      D ]  }| j                  |||¬«       Œ y| j                  j                  |«      }|�rt        j
                  j                  |«      rÿt	        j                  |«      D ]m  }|r5t        j                  t        j
                  j                  ||«      d«       Œ:t        j                  t        j
                  j                  ||«      d«       Œo ||z  }	 t        ||¬«       | j                  j                  |d«       t        j                  |d«       | j                  j                  |d«      }|�t        j                  |«       yyyy# t         $ r Y yw xY w)z9Clean temporary resources created by a process-based poolN)Úforcerâ   r   rá   rÞ   )ÚlistrÎ   Ú_clean_temporary_resourcesrB   r   r   r\   Úlistdirr   rä   rb   r   r   ÚpoprÐ   rê   re   )r;   rÓ   rì   râ   rk   r   Ú	finalizers          r   rî   z4TemporaryResourcesManager._clean_temporary_resources›  sT  € ð Ðô # 4×#<Ñ#<Ö=�
Ø×/Ñ/Ø e¸_ð 0õ ñ >ð
 ×3Ñ3×7Ñ7¸
ÓCˆKÚœrŸw™wŸ~™~¨kÔ:Ü "§
¡
¨;Ö 7�HÙô )×3Ñ3ÜŸG™GŸL™L¨°hÓ?Àõô )×5Ñ5ÜŸG™GŸL™L¨°hÓ?Àõð !8ð   5Ñ(�ðÜ! +¸ÕOà×-Ñ-×1Ñ1°*¸dÔCÜ$×/Ñ/°¸XÔFð !%× 0Ñ 0× 4Ñ 4°ZÀÓ F�IØ Ð,Ü×)Ñ)¨)Õ4ð -ð9  ;ˆ{øô> ò ñ ð	ús   Ã:A2E0 Å0	E<Å;E<)NN)NFF)
rL   rM   rN   rO   r<   rÑ   rÖ   rÜ   rØ   rî   rP   r!   r   rÉ   rÉ   B  s/   „ ñó-ò.òDò.CòAð@ =Bô0r!   rÉ   r7   )NNNg    €„.AÚrr   FT)@rO   rê   r³   r   Ústatrf   rµ   r.   rå   r%   r   Úmultiprocessingr   Úpickler   r   r   r   r	   Úuuidr
   ÚWindowsErrorÚ	NameErrorr#   r†   r’   Únumpy.lib.stride_tricksr   r…   Ú	backportsr   Údiskr   Úexternals.loky.backendr   Únumpy_pickler   r   r   r]   r�   ra   ÚS_IRUSRÚS_IWUSRÚS_IXUSRr²   rº   rI   r“   r    r(   r3   Ú_CLEANUP_FUNCSr5   rU   rp   rr   r|   rŽ   r•   Úobjectr—   rÇ   rÉ   rP   r!   r   Ú<module>r     si  ðñó Û Û 	Û Û Û Û Û Û Ý Ý  ß MÕ MÝ ðÙðÛÝ2õ #Ý Ý 4ß ;Ñ ;ð "Ð ñ !$ C£Ð ð
 —\‘\ D§L¡LÑ0°4·<±<Ñ?Ð Ø—<‘< $§,¡,Ñ.Ð ñ ‹u€ò	5ò?òð@ +6Ð × Ñ  Ñ '÷&Bñ &BòZ&ó"8'òv.ò
'>òT9òxKô"hC ô hCðX ØØØØØØØó,/ô^I õ IøðU ò Ù˜“:‚Lðûð ò Ø	‚Bðús$   ÁD Á
D, ÄD)Ä(D)Ä,D6Ä5D6