
    &`i                     V   d dl mZ d dlmZmZmZ d dlmZmZ d dl	m
Z
 d dlmZ dZe G d dee                      Ze G d	 d
ee                      Ze G d de                      Ze G d de                      Ze G d de                      Z G d de          Ze G d de                      Ze G d de                      Ze G d de                      Ze G d de                      Ze G d de                      Ze G d de                      ZdS )     )Enum)DictListOptional)	BaseModelField)
JobDetails)DeveloperAPIiP  c                   &    e Zd ZdZdZdZdZdZdZdS )RunStatusEnumz*Enumeration for the status of a train run.STARTEDRUNNINGFINISHEDERROREDABORTEDN)	__name__
__module____qualname____doc__r   r   r   r   r        t/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/ray/train/_internal/state/schema.pyr   r      s/        44 GGHGGGGr   r   c                       e Zd ZdZdZdS )ActorStatusEnumDEADALIVEN)r   r   r   r   r   r   r   r   r   r      s        DEEEr   r   c                      e Zd ZU dZ ed          Zeed<    ed          Ze	ed<    ed          Z
e	ed<    ed	          Ze	ed
<    ed          Zeed<    ed          Zeed<    ed          Ze	ed<    ed          Zee	         ed<    ed          Zeed<    ed          Zeeef         ed<   dS )TrainWorkerInfoMetadata of a Ray Train worker.zActor ID of the worker.descriptionactor_idzWorld rank of the worker.
world_rankzLocal rank of the worker.
local_rankzNode rank of the worker.	node_rankz-ID of the node that the worker is running on.node_idz5IP address of the node that the worker is running on.node_ipzProcess ID of the worker.pidz+A list of GPU ids allocated to that worker.gpu_idsz>The status of the train worker actor. It can be ALIVE or DEAD.status&The resources allocated to the worker.	resourcesN)r   r   r   r   r   r"   str__annotations__r#   intr$   r%   r&   r'   r(   r)   r   r*   r   r,   r   floatr   r   r   r   r   "   s        ))E&?@@@Hc@@@e(CDDDJDDDe(CDDDJDDDU'ABBBIsBBB5%TUUUGSUUU5K  GS    u!<===C===A  GT#Y    $eT  FO    #(%<# # #ItCJ     r   r   c                   P    e Zd ZU eed<   eed<   ee         ed<   ee         ed<   dS )
MemoryInforssvmspfaultspageinsN)r   r   r   r/   r.   r   r   r   r   r2   r2   :   sD         	HHH	HHHc]c]r   r2   c                   F    e Zd ZU eed<   eee                  ed<   eed<   dS )ProcessStats
cpuPercentmem
memoryInfoN)	r   r   r   r0   r.   r   r   r/   r2   r   r   r   r8   r8   B   s?         	$s)	r   r8   c                   $    e Zd ZU eed<   eed<   dS )ProcessGPUUsager(   gpuMemoryUsageN)r   r   r   r/   r.   r   r   r   r=   r=   J   s'         	HHHr   r=   c                   b    e Zd ZU eed<   eed<   eed<   ee         ed<   eed<   eed<   eed<   dS )	GPUStatsuuidindexnameutilizationGpu
memoryUsedmemoryTotalprocessInfoN)	r   r   r   r-   r.   r/   r   r0   r=   r   r   r   r@   r@   P   sa         
IIIJJJ
IIIUO###      r   r@   c                   t    e Zd ZU dZ edd          Zee         ed<    ee	d          Z
ee         ed<   dS )	TrainWorkerInfoWithDetailsr   NzProcess stats of the worker.r    processStatszSGPU stats of the worker. Only returns GPUs that are attached to the worker process.)default_factoryr!   gpus)r   r   r   r   r   rJ   r   r8   r.   listrL   r   r@   r   r   r   rI   rI   [   s         ))+058, , ,L(<(    !5I  D$x.     r   rI   c                       e Zd ZU  ed          Zeed<    ed          Zeed<    ed          Ze	e         ed<   dS )	TrainDatasetInfoz;The key of the dataset dict specified in Ray Train Trainer.r    rC   zThe uuid of the dataset.dataset_uuidzThe name of the dataset.dataset_nameN)
r   r   r   r   rC   r-   r.   rP   rQ   r   r   r   r   rO   rO   k   s~         Q  D#    *DEEEL#EEE"'%4N"O"O"OL(3-OOOOOr   rO   c                      e Zd ZU dZ ed          Zeed<    ed          Zeed<    ed          Z	eed<    ed	          Z
eed
<    ed          Zee         ed<    ed          Zee         ed<    ed          Zeed<    ed          Zeed<    ed          Zeed<    ed          Zee         ed<    ed          Zeeeef                  ed<   dS )TrainRunInfo?Metadata for a Ray Train run and information about its workers.zThe name of the Train run.r    rC   z)The unique identifier for each Train run.idzThe Ray Job ID.job_idz!Actor Id of the Train controller.controller_actor_id/A List of Train workers sorted by global ranks.workersz*A List of dataset info for this Train run.datasetszlThe current status of the train run. It can be one of the following: RUNNING, FINISHED, ERRORED, or ABORTED.
run_statuszJDetailed information about the current run status, such as error messages.status_detailz7The UNIX timestamp of the start time of this Train run.start_time_msz_The UNIX timestamp of the end time of this Train run. If null, the Train run has not ended yet.end_time_msr+   r,   N)r   r   r   r   r   rC   r-   r.   rU   rV   rW   rY   r   r   rZ   rO   r[   r   r\   r]   r/   r^   r   r,   r   r0   r   r   r   rS   rS   t   s        II">???D#???e KLLLBLLL%$5666FC666$u1TUUUUUU%*UE& & &GT/"    (-u@( ( (Hd#$    !&=! ! !J    "  M3    M  M3    "'4" " "K#    ).<) ) )ItDe$%     r   rS   c                   r    e Zd ZU dZ ed          Zee         ed<    edd          Z	e
e         ed<   dS )TrainRunInfoWithDetailsrT   rX   r    rY   Nz/Details of the job that started this Train run.job_details)r   r   r   r   r   rY   r   rI   r.   ra   r   r	   r   r   r   r`   r`      s         II05E1 1 1GT,-    ).K) ) )K*%     r   r`   c                   &    e Zd ZU ee         ed<   dS )TrainRunsResponse
train_runsN)r   r   r   r   r`   r.   r   r   r   rc   rc      s$         ,------r   rc   N)enumr   typingr   r   r   ray._common.pydantic_compatr   r   )ray.dashboard.modules.job.pydantic_modelsr	   ray.util.annotationsr
   MAX_ERROR_STACK_TRACE_LENGTHr-   r   r   r   r2   r8   r=   r@   rI   rO   rS   r`   rc   r   r   r   <module>rk      s
         ' ' ' ' ' ' ' ' ' ' 8 8 8 8 8 8 8 8 @ @ @ @ @ @ - - - - - -$      C         c4   
     i   .             9       i    ! ! ! ! !y ! ! !         P P P P Py P P P     9   B     l    . . . . .	 . . . . .r   