Ë
    Z²j˜E  ã                   óV  — 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 d dl	m
Z
mZ d dlmZ  G d„ d	ee«      Ze G d
„ d«      «       Ze G d„ d«      «       Ze G d„ d«      «       Ze G d„ d«      «       Ze G d„ d«      «       Ze G d„ d«      «       Ze G d„ d«      «       Ze G d„ d«      «       Ze G d„ d«      «       Ze G d„ d«      «       Ze G d„ d«      «       Zd d d!œd"ed#ee   d$eeef   d z  d%eeef   d z  d&e
d z  d'eez  ez  d z  d(eeef   d z  d)ee   d z  d*eeef   fd+„Zy ),é    )Ú	dataclass)Údatetime)ÚEnum)ÚAny)Ú	constants)ÚSpaceHardwareÚVolume)Úparse_datetimec                   ó(   — e Zd ZdZdZdZdZdZdZdZ	y)	ÚJobStageav  
    Enumeration of possible stage of a Job on the Hub.

    Value can be compared to a string:
    ```py
    assert JobStage.COMPLETED == "COMPLETED"
    ```
    Possible values are: `COMPLETED`, `CANCELED`, `ERROR`, `DELETED`, `SCHEDULING`, `RUNNING`.
    Taken from https://github.com/huggingface/moon-landing/blob/main/server/job_types/JobInfo.ts#L61 (private url).
    Ú	COMPLETEDÚCANCELEDÚERRORÚDELETEDÚ
SCHEDULINGÚRUNNINGN)
Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r   © ó    úX/var/www/html/ia-enhanced/venv/lib/python3.12/site-packages/huggingface_hub/_jobs_api.pyr   r      s'   „ ñ	ð €IØ€HØ€EØ€GØ€JØ�Gr   r   c                   ó(   — e Zd ZU eed<   edz  ed<   y)Ú	JobStatusÚstageNÚmessage)r   r   r   r   Ú__annotations__Ústrr   r   r   r   r   -   s   … àƒOØ�4‰ZÔr   r   c                   ó,   — e Zd ZU eed<   eed<   eed<   y)ÚJobOwnerÚidÚnameÚtypeN)r   r   r   r   r   r   r   r   r!   r!   3   s   … àƒGØ
ƒIØ
„Ir   r!   c                   óJ   — e Zd ZU dZedz  ed<   edz  ed<   edz  ed<   dd„Zy)ÚJobDurationsau  
    Timing breakdown for a Job, computed server-side.

    Args:
        scheduling_secs (`int` or `None`):
            Seconds the job spent in the scheduling stage before starting to run.
            `None` if the job never reached the running stage.
        running_secs (`int` or `None`):
            Seconds the job has been or was running. Recomputed on each request
            while the job is in progress. `None` if the job never started running.
        total_secs (`int` or `None`):
            Total seconds elapsed since the job was created. Recomputed on each
            request while the job is in progress.
    NÚscheduling_secsÚrunning_secsÚ
total_secsc                 óè   — |j                  d|j                  d«      «      | _        |j                  d|j                  d«      «      | _        |j                  d|j                  d«      «      | _        y )NÚschedulingSecsr'   ÚrunningSecsr(   Ú	totalSecsr)   )Úgetr'   r(   r)   ©ÚselfÚkwargss     r   Ú__init__zJobDurations.__init__O   sW   € Ø%Ÿz™zÐ*:¸F¿J¹JÐGXÓ<YÓZˆÔØ"ŸJ™J }°f·j±jÀÓ6PÓQˆÔØ Ÿ*™* [°&·*±*¸\Ó2JÓKˆ�r   ©ÚreturnN)r   r   r   r   Úintr   r2   r   r   r   r&   r&   :   s-   … ñð ˜4‘ZÓØ˜‘*ÓØ�d‘
ÓôLr   r&   c                   ó:   — e Zd ZU dZeed<   eed<   dZedz  ed<   y)ÚJobInitiatoraJ  
    Contains information about what triggered a Job.

    Args:
        type (`str`): Initiator kind, for example `"user"`, `"org"`, `"scheduled-job"`, or `"duplicated-job"`.
        id (`str`): Identifier of the initiator.
        name (`str` or `None`): Human-readable name when available, usually for user/org initiators.
    r$   r"   Nr#   )r   r   r   r   r   r   r#   r   r   r   r7   r7   U   s!   … ñð ƒIØƒGØ€Dˆ#�‰*Ôr   r7   c                   ó\  — e Zd ZU dZeed<   edz  ed<   edz  ed<   edz  ed<   edz  ed<   edz  ed<   ee   dz  ed	<   ee   dz  ed
<   eee	f   dz  ed<   eee	f   dz  ed<   e
dz  ed<   eeef   dz  ed<   ee   dz  ed<   eed<   edz  ed<   eed<   edz  ed<   eed<   eed<   dd„Zy)ÚJobInfoaN  
    Contains information about a Job.

    Args:
        id (`str`):
            Job ID.
        created_at (`datetime` or `None`):
            When the Job was created.
        started_at (`datetime` or `None`):
            When the Job started running. None while the Job is still scheduling.
        finished_at (`datetime` or `None`):
            When the Job finished. None while the Job is still scheduling or running.
        docker_image (`str` or `None`):
            The Docker image from Docker Hub used for the Job.
            Can be None if space_id is present instead.
        space_id (`str` or `None`):
            The Docker image from Hugging Face Spaces used for the Job.
            Can be None if docker_image is present instead.
        command (`list[str]` or `None`):
            Command of the Job, e.g. `["python", "-c", "print('hello world')"]`
        arguments (`list[str]` or `None`):
            Arguments passed to the command
        environment (`dict[str]` or `None`):
            Environment variables of the Job as a dictionary.
        secrets (`dict[str]` or `None`):
            Secret environment variables of the Job (encrypted).
        flavor (`str` or `None`):
            Flavor for the hardware, as in Hugging Face Spaces. See [`SpaceHardware`] for possible values.
            E.g. `"cpu-basic"`.
        labels (`dict[str, str]` or `None`):
            Labels to attach to the job (key-value pairs).
        volumes (`list[Volume]` or `None`):
            Volumes mounted in the job container (buckets, models, datasets, spaces).
        status: (`JobStatus` or `None`):
            Status of the Job, e.g. `JobStatus(stage="RUNNING", message=None)`
            See [`JobStage`] for possible stage values.
        durations (`JobDurations` or `None`):
            Timing breakdown of the Job. Present for all job states including SCHEDULING.
        owner: (`JobOwner` or `None`):
            Owner of the Job, e.g. `JobOwner(id="5e9ecfc04957053f60648a3e", name="lhoestq", type="user")`
        initiator (`JobInitiator` or `None`):
            What triggered the Job, e.g. `JobInitiator(type="scheduled-job", id="...")` for a cron-triggered run.

    Example:

    ```python
    >>> from huggingface_hub import run_job
    >>> job = run_job(
    ...     image="python:3.12",
    ...     command=["python", "-c", "print('Hello from the cloud!')"]
    ... )
    >>> job
    JobInfo(id='687fb701029421ae5549d998', created_at=datetime.datetime(2025, 7, 22, 16, 6, 25, 79000, tzinfo=datetime.timezone.utc), started_at=datetime.datetime(2025, 7, 22, 16, 6, 31, 79000, tzinfo=datetime.timezone.utc), finished_at=None, docker_image='python:3.12', space_id=None, command=['python', '-c', "print('Hello from the cloud!')"], arguments=[], environment={}, secrets={}, flavor='cpu-basic', labels=None, status=JobStatus(stage='RUNNING', message=None), durations=JobDurations(scheduling_secs=6, running_secs=2, total_secs=8), owner=JobOwner(id='5e9ecfc04957053f60648a3e', name='lhoestq', type='user'), initiator=JobInitiator(type='user', id='5e9ecfc04957053f60648a3e', name='lhoestq'), endpoint='https://huggingface.co', url='https://huggingface.co/jobs/lhoestq/687fb701029421ae5549d998')
    >>> job.id
    '687fb701029421ae5549d998'
    >>> job.url
    'https://huggingface.co/jobs/lhoestq/687fb701029421ae5549d998'
    >>> job.status.stage
    'RUNNING'
    ```
    r"   NÚ
created_atÚ
started_atÚfinished_atÚdocker_imageÚspace_idÚcommandÚ	argumentsÚenvironmentÚsecretsÚflavorÚlabelsÚvolumesÚstatusÚ	durationsÚownerÚ	initiatorÚendpointÚurlc                 óÈ  — |d   | _         |j                  d«      xs |j                  d«      }|rt        |«      nd | _        |j                  d«      xs |j                  d«      }|rt        |«      nd | _        |j                  d«      xs |j                  d«      }|rt        |«      nd | _        |j                  d«      xs |j                  d	«      | _        |j                  d
«      xs |j                  d«      | _        |j                  di «      }t        |d   |d   |d   ¬«      | _	        |j                  d«      | _
        |j                  d«      | _        |j                  d«      | _        |j                  d«      | _        |j                  d«      | _        |j                  d«      | _        |j                  d«      }|r|D �cg c]  }t!        d!i |¤Ž‘Œ c}nd | _        |j                  di «      }t%        |d   |j                  d«      ¬«      | _        |j                  d«      }	|	rt)        d!i |	¤Žnd | _        |j                  d«      }
|
r#t-        |
d   |
d   |
j                  d«      ¬«      nd | _        |j                  dt0        j2                  «      | _        | j4                  › d| j                  j6                  › d | j                   › �| _        y c c}w )"Nr"   Ú	createdAtr:   Ú	startedAtr;   Ú
finishedAtr<   ÚdockerImager=   ÚspaceIdr>   rH   r#   r$   ©r"   r#   r$   r?   r@   rA   rB   rC   rD   rE   rF   r   r   )r   r   rG   rI   )r$   r"   r#   rJ   z/jobs/ú/r   )r"   r.   r
   r:   r;   r<   r=   r>   r!   rH   r?   r@   rA   rB   rC   rD   r	   rE   r   rF   r&   rG   r7   rI   r   ÚENDPOINTrJ   r#   rK   )r0   r1   r:   r;   r<   rH   rE   ÚvrF   rG   rI   s              r   r2   zJobInfo.__init__»   sS  € Ø˜‘,ˆŒØ—Z‘Z Ó,ÒH°·
±
¸<Ó0Hˆ
Ù8Bœ.¨Ô4ÈˆŒØ—Z‘Z Ó,ÒH°·
±
¸<Ó0Hˆ
Ù8Bœ.¨Ô4ÈˆŒØ—j‘j Ó.ÒK°&·*±*¸]Ó2KˆÙ:Eœ>¨+Ô6È4ˆÔØ"ŸJ™J }Ó5ÒS¸¿¹ÀNÓ9SˆÔØŸ
™
 9Ó-ÒG°·±¸JÓ1GˆŒØ—
‘
˜7 BÓ'ˆÜ  t¡°5¸±=ÀuÈVÁ}ÔUˆŒ
Ø—z‘z )Ó,ˆŒØŸ™ KÓ0ˆŒØ!Ÿ:™: mÓ4ˆÔØ—z‘z )Ó,ˆŒØ—j‘j Ó*ˆŒØ—j‘j Ó*ˆŒØ—*‘*˜YÓ'ˆÙ9@¨WÖ5¨œ™ ›Ó5ÀdˆŒØ—‘˜H bÓ)ˆÜ f¨W¡o¸v¿z¹zÈ)Ó?TÔUˆŒØ—J‘J˜{Ó+ˆ	Ù6?œÑ2¨	Ò2ÀTˆŒØ—J‘J˜{Ó+ˆ	ádmŒL˜i¨Ñ/°I¸d±OÈ)Ï-É-ÐX^ÓJ_Õ`Ðswð 	Œð
 Ÿ
™
 :¬y×/AÑ/AÓBˆŒØ—m‘m�_ F¨4¯:©:¯?©?Ð*;¸1¸T¿W¹W¸IÐFˆ�ùò 6s   ÇKr3   )r   r   r   r   r   r   r   ÚlistÚdictr   r   r	   r   r&   r!   r7   r2   r   r   r   r9   r9   e   så   … ñ<ð| 	ƒGØ˜4‘ÓØ˜4‘ÓØ˜D‘Ó Ø˜‘*ÓØ�D‰jÓØ�#‰Y˜ÑÓØ�C‰y˜4ÑÓØ�c˜3�h‘ $Ñ&Ó&Ø�#�s�(‰^˜dÑ"Ó"Ø˜DÑ Ó Ø��c�‰N˜TÑ!Ó!Ø�&‰\˜DÑ Ó ØÓØ˜dÑ"Ó"ØƒOØ˜dÑ"Ó"ð ƒMØ	ƒHôGr   r9   c                   ó  — e Zd ZU edz  ed<   edz  ed<   ee   dz  ed<   ee   dz  ed<   eeef   dz  ed<   eeef   dz  ed<   edz  ed<   e	dz  ed	<   ee   dz  ed
<   edz  ed<   eeef   dz  ed<   ee
   dz  ed<   dd„Zy)ÚJobSpecNr=   r>   r?   r@   rA   rB   rC   ÚtimeoutÚtagsÚarchrD   rE   c                 ó°  — |j                  d«      xs |j                  d«      | _        |j                  d«      xs |j                  d«      | _        |j                  d«      | _        |j                  d«      | _        |j                  d«      | _        |j                  d«      | _        |j                  d	«      | _        |j                  d
«      | _        |j                  d«      | _	        |j                  d«      | _
        |j                  d«      | _        |j                  d«      }|r|D �cg c]  }t        di |¤Ž‘Œ c}| _        y d | _        y c c}w )NrP   r=   rQ   r>   r?   r@   rA   rB   rC   rZ   r[   r\   rD   rE   r   )r.   r=   r>   r?   r@   rA   rB   rC   rZ   r[   r\   rD   r	   rE   )r0   r1   rE   rU   s       r   r2   zJobSpec.__init__ì   s  € Ø"ŸJ™J }Ó5ÒS¸¿¹ÀNÓ9SˆÔØŸ
™
 9Ó-ÒG°·±¸JÓ1GˆŒØ—z‘z )Ó,ˆŒØŸ™ KÓ0ˆŒØ!Ÿ:™: mÓ4ˆÔØ—z‘z )Ó,ˆŒØ—j‘j Ó*ˆŒØ—z‘z )Ó,ˆŒØ—J‘J˜vÓ&ˆŒ	Ø—J‘J˜vÓ&ˆŒ	Ø—j‘j Ó*ˆŒØ—*‘*˜YÓ'ˆÙ9@¨WÖ5¨œ™ ›Ò5ˆ�Àdˆ�ùÒ5s   Ä0Er3   )r   r   r   r   r   rV   rW   r   r   r5   r	   r2   r   r   r   rY   rY   Ý   s°   … à˜‘*ÓØ�D‰jÓØ�#‰Y˜ÑÓØ�C‰y˜4ÑÓØ�c˜3�h‘ $Ñ&Ó&Ø�#�s�(‰^˜dÑ"Ó"Ø˜DÑ Ó Ø�4‰ZÓØ
ˆs‰)�dÑ
ÓØ
�‰*ÓØ��c�‰N˜TÑ!Ó!Ø�&‰\˜DÑ Ó ôKr   rY   c                   ó*   — e Zd ZU eed<   eed<   dd„Zy)ÚLastJobInfor"   ÚatNc                 ó>   — |d   | _         t        |d   «      | _        y )Nr"   r`   )r"   r
   r`   r/   s     r   r2   zLastJobInfo.__init__  s   € Ø˜‘,ˆŒÜ  ¨¡Ó.ˆ�r   r3   )r   r   r   r   r   r   r2   r   r   r   r_   r_   ü   s   … àƒGØƒLô/r   r_   c                   ó6   — e Zd ZU edz  ed<   edz  ed<   dd„Zy)ÚScheduledJobStatusNÚlast_jobÚnext_job_run_atc                 ó  — |j                  d«      xs |j                  d«      }|rt        di |¤Žnd | _        |j                  d«      xs |j                  d«      }|rt        t	        |«      «      | _        y d | _        y )NÚlastJobrd   ÚnextJobRunAtre   r   )r.   r_   rd   r
   r   re   )r0   r1   rd   re   s       r   r2   zScheduledJobStatus.__init__  sj   € Ø—:‘:˜iÓ(ÒB¨F¯J©J°zÓ,BˆÙ3;œÑ/ hÒ/ÀˆŒØ Ÿ*™* ^Ó4ÒU¸¿
¹
ÐCTÓ8UˆÙGVœ~¬c°/Ó.BÓCˆÕÐ\`ˆÕr   r3   )r   r   r   r_   r   r   r2   r   r   r   rc   rc     s   … à˜DÑ Ó Ø ‘_Ó$ôar   rc   c                   ó‚   — e Zd ZU dZeed<   edz  ed<   eed<   edz  ed<   edz  ed<   edz  ed<   e	ed	<   e
ed
<   dd„Zy)ÚScheduledJobInfoaÅ  
    Contains information about a Job.

    Args:
        id (`str`):
            Scheduled Job ID.
        created_at (`datetime` or `None`):
            When the scheduled Job was created.
        tags (`list[str]` or `None`):
            The tags of the scheduled Job.
        schedule (`str` or `None`):
            One of "@annually", "@yearly", "@monthly", "@weekly", "@daily", "@hourly", or a
            CRON schedule expression (e.g., '0 9 * * 1' for 9 AM every Monday).
        suspend (`bool` or `None`):
            Whether the scheduled job is suspended (paused).
        concurrency (`bool` or `None`):
            Whether multiple instances of this Job can run concurrently.
        status (`ScheduledJobStatus` or `None`):
            Status of the scheduled Job.
        owner: (`JobOwner` or `None`):
            Owner of the scheduled Job, e.g. `JobOwner(id="5e9ecfc04957053f60648a3e", name="lhoestq", type="user")`
        job_spec: (`JobSpec` or `None`):
            Specifications of the Job.

    Example:

    ```python
    >>> from huggingface_hub import run_job
    >>> scheduled_job = create_scheduled_job(
    ...     image="python:3.12",
    ...     command=["python", "-c", "print('Hello from the cloud!')"],
    ...     schedule="@hourly",
    ... )
    >>> scheduled_job.id
    '687fb701029421ae5549d999'
    >>> scheduled_job.status.next_job_run_at
    datetime.datetime(2025, 7, 22, 17, 6, 25, 79000, tzinfo=datetime.timezone.utc)
    ```
    r"   Nr:   Újob_specÚscheduleÚsuspendÚconcurrencyrF   rH   c                 óž  — |d   | _         |j                  d«      xs |j                  d«      }|rt        |«      nd | _        t	        di |j                  d«      xs |j                  di «      ¤Ž| _        |j                  d«      | _        |j                  d«      | _        |j                  d«      | _        |j                  d	i «      }t        |j                  d
«      xs |j                  d«      |j                  d«      xs |j                  d«      ¬«      | _
        |j                  di «      }t        |d   |d   |d   ¬«      | _        y )Nr"   rM   r:   rk   ÚjobSpecrl   rm   rn   rF   rd   rg   re   rh   )rd   re   rH   r#   r$   rR   r   )r"   r.   r
   r:   rY   rk   rl   rm   rn   rc   rF   r!   rH   )r0   r1   r:   rF   rH   s        r   r2   zScheduledJobInfo.__init__E  s  € Ø˜‘,ˆŒØ—Z‘Z Ó,ÒH°·
±
¸<Ó0Hˆ
Ù8Bœ.¨Ô4ÈˆŒÜÑX 6§:¡:¨jÓ#9Ò#V¸V¿Z¹ZÈ	ÐSUÓ=VÑXˆŒØŸ
™
 :Ó.ˆŒØ—z‘z )Ó,ˆŒØ!Ÿ:™: mÓ4ˆÔØ—‘˜H bÓ)ˆÜ(Ø—Z‘Z 
Ó+ÒD¨v¯z©z¸)Ó/DØ"ŸJ™JÐ'8Ó9ÒW¸V¿Z¹ZÈÓ=Wô
ˆŒð —
‘
˜7 BÓ'ˆÜ  t¡°5¸±=ÀuÈVÁ}ÔUˆ�
r   r3   )r   r   r   r   r   r   r   rY   Úboolrc   r!   r2   r   r   r   rj   rj     sN   … ñ&ðP 	ƒGØ˜4‘ÓØÓØ�D‰jÓØ�D‰[ÓØ˜‘ÓØÓØƒOôVr   rj   c                   óL   — e Zd ZU dZeed<   eed<   eed<   eed<   eed<   d	d„Zy)
ÚJobAcceleratoraý  
    Contains information about a Job accelerator (GPU).

    Args:
        type (`str`):
            Type of accelerator, e.g. `"gpu"`.
        model (`str`):
            Model of accelerator, e.g. `"T4"`, `"A10G"`, `"A100"`, `"L4"`, `"L40S"`.
        quantity (`str`):
            Number of accelerators, e.g. `"1"`, `"2"`, `"4"`, `"8"`.
        vram (`str`):
            Total VRAM, e.g. `"16 GB"`, `"24 GB"`.
        manufacturer (`str`):
            Manufacturer of the accelerator, e.g. `"Nvidia"`.
    r$   ÚmodelÚquantityÚvramÚmanufacturerNc                 óh   — |d   | _         |d   | _        |d   | _        |d   | _        |d   | _        y )Nr$   rt   ru   rv   rw   )r$   rt   ru   rv   rw   r/   s     r   r2   zJobAccelerator.__init__n  s<   € Ø˜6‘NˆŒ	Ø˜G‘_ˆŒ
Ø˜zÑ*ˆŒØ˜6‘NˆŒ	Ø" >Ñ2ˆÕr   r3   )r   r   r   r   r   r   r2   r   r   r   rs   rs   V  s(   … ñð  ƒIØƒJØƒMØ
ƒIØÓô3r   rs   c                   óz   — e Zd ZU dZeed<   eed<   eed<   eed<   eed<   edz  ed<   eed	<   eed
<   eed<   dd„Z	y)ÚJobHardwarea   
    Contains information about available Job hardware.

    Args:
        name (`str`):
            Machine identifier, e.g. `"cpu-basic"`, `"a10g-large"`.
        pretty_name (`str`):
            Human-readable name, e.g. `"CPU Basic"`, `"Nvidia A10G - large"`.
        cpu (`str`):
            CPU specification, e.g. `"2 vCPU"`, `"12 vCPU"`.
        ram (`str`):
            RAM specification, e.g. `"16 GB"`, `"46 GB"`.
        ephemeral_storage (`str`):
            Ephemeral storage specification, e.g. `"20 GB"`, `"100 GB"`.
        accelerator (`JobAccelerator` or `None`):
            GPU/accelerator details if available.
        unit_cost_micro_usd (`int`):
            Cost in micro-dollars per unit, e.g. `167` (= $0.000167).
        unit_cost_usd (`float`):
            Cost in USD per unit, e.g. `0.000167`.
        unit_label (`str`):
            Cost unit period, e.g. `"minute"`.

    Example:

    ```python
    >>> from huggingface_hub import list_jobs_hardware
    >>> hardware_list = list_jobs_hardware()
    >>> hardware_list[0]
    JobHardware(name='cpu-basic', pretty_name='CPU Basic', cpu='2 vCPU', ram='16 GB', ephemeral_storage='20 GB', accelerator=None, unit_cost_micro_usd=167, unit_cost_usd=0.000167, unit_label='minute')
    >>> hardware_list[0].name
    'cpu-basic'
    ```
    r#   Úpretty_nameÚcpuÚramÚephemeral_storageNÚacceleratorÚunit_cost_micro_usdÚunit_cost_usdÚ
unit_labelc                 ó  — |d   | _         |d   | _        |d   | _        |d   | _        |j	                  dd«      | _        |j	                  d«      }|rt        di |¤Žnd | _        |d   | _        |d	   | _	        |d
   | _
        y )Nr#   Ú
prettyNamer|   r}   ÚephemeralStoragezN/Ar   ÚunitCostMicroUSDÚunitCostUSDÚ	unitLabelr   )r#   r{   r|   r}   r.   r~   rs   r   r€   r�   r‚   )r0   r1   r   s      r   r2   zJobHardware.__init__¥  s�   € Ø˜6‘NˆŒ	Ø! ,Ñ/ˆÔØ˜%‘=ˆŒØ˜%‘=ˆŒØ!'§¡Ð,>ÀÓ!FˆÔØ—j‘j Ó/ˆÙ<Gœ>Ñ8¨KÒ8ÈTˆÔØ#)Ð*<Ñ#=ˆÔ Ø# MÑ2ˆÔØ  Ñ-ˆ�r   r3   )
r   r   r   r   r   r   rs   r5   Úfloatr2   r   r   r   rz   rz   v  sF   … ñ!ðF ƒIØÓØ	ƒHØ	ƒHØÓØ $Ñ&Ó&ØÓØÓØƒOô
.r   rz   N)rD   rE   Úimager?   ÚenvrB   rC   rZ   rD   rE   r4   c                 ó²  — |g |xs i |xs t         j                  dœ}|r||d<   |rPdddddœ}	t        |t        «      r+|d   |	v r$t	        t        |d d «      |	|d      z  «      |d	<   nt	        |«      |d	<   |r||d
<   |r!|D �
cg c]  }
|
j                  «       ‘Œ c}
|d<   dD ]'  }| j                  |«      sŒ| t        |«      d  |d<    |S  | |d<   |S c c}
w )N)r?   r@   rA   rC   rB   é   é<   i  i€Q )ÚsÚmÚhÚdéÿÿÿÿÚtimeoutSecondsrD   rE   )zhttps://huggingface.co/spaces/zhttps://hf.co/spaces/zhuggingface.co/spaces/zhf.co/spaces/rQ   rP   )	r   Ú	CPU_BASICÚ
isinstancer   r5   r‰   Úto_dictÚ
startswithÚlen)rŠ   r?   r‹   rB   rC   rZ   rD   rE   rk   Útime_units_factorsÚvolÚprefixs               r   Ú_create_job_specr�   ²  s  € ð ØØ’y˜bØÒ3œM×3Ñ3ñ	 €Hñ Ø%ˆ�ÑáØ#$¨2°D¸yÑIÐÜ�gœsÔ#¨°©Ð7IÑ(IÜ),¬U°7¸3¸B°<Ó-@ÐCUÐV]Ð^`ÑVaÑCbÑ-bÓ)cˆHÐ%Ò&ä),¨W«ˆHÐ%Ñ&áØ#ˆ�ÑáØ8?Ö@°˜sŸ{™{�}Ò@ˆ�Ñðò 
(ˆð ×Ñ˜FÕ#Ø"'¬¨F«¨Ð"6ˆH�YÑØð €Oð
(ð #(ˆ�ÑØ€Oùò As   ÂC) Údataclassesr   r   Úenumr   Útypingr   Úhuggingface_hubr   Úhuggingface_hub._space_apir   r	   Úhuggingface_hub.utils._datetimer
   r   r   r   r!   r&   r7   r9   rY   r_   rc   rj   rs   rz   rV   rW   r5   r‰   r�   r   r   r   ú<module>r¤      s	  ðõ "Ý Ý Ý å %ß <Ý :ôˆs�Dô ð* ÷ð ó ðð
 ÷ð ó ðð ÷Lð Ló ðLð4 ÷ð ó ðð ÷tGð tGó ðtGðn ÷Kð Kó ðKð< ÷/ð /ó ð/ð ÷að aó ðað ÷@Vð @Vó ð@VðF ÷3ð 3ó ð3ð> ÷8.ð 8.ó ð8.ðF %)Ø#'ò.àð.ð �#‰Yð.ð 
ˆc�3ˆh‰˜$Ñ	ð	.ð
 �#�s�(‰^˜dÑ"ð.ð ˜DÑ ð.ð �5‰[˜3Ñ Ñ%ð.ð ��c�‰N˜TÑ!ð.ð �&‰\˜DÑ ð.ð 
ˆ#ˆsˆ(�^ô.r   