o
    1 i                     @   s   d dl Z d dlZd dlmZ d dlmZmZmZmZm	Z	m
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 e eZeG dd deZdS )	    N)	dataclass)AnyDictListOptionalTupleUnion)Result)TrainingFailedError)
Deprecated	PublicAPIc                       s   e Zd ZU ed ed< ee ed< dZeeede	e
ef f   ed< eddde
d	e
d
ed f fddZe	ddee
ejf deejj d
d fddZeed
ee	e
ef  fddZ  ZS )r	   zray.train.Checkpoint
checkpointerrorNbest_checkpointsalpha)Z	stabilitymetricmodereturnc                    s   t  ||S N)superget_best_checkpoint)selfr   r   	__class__ c/home/app/PaddleOCR-VL-test/.venv_paddleocr/lib/python3.10/site-packages/ray/train/v2/api/result.pyr      s   zResult.get_best_checkpointpathstorage_filesystemc                 C      t d)Nz*`Result.from_path` is not implemented yet.)NotImplementedError)clsr   r   r   r   r   	from_path   s   zResult.from_pathc                 C   r   )NzsThe `config` property for a `ray.train.Result` is deprecated, since it is only relevant in the context of Ray Tune.)DeprecationWarning)r   r   r   r   config&   s   zResult.configr   )__name__
__module____qualname__r   __annotations__r
   r   r   r   r   strr   r   r   classmethodr   osPathLikepyarrowfsZ
FileSystemr!   propertyr   r#   __classcell__r   r   r   r   r	      s6   
 
&r	   )loggingr*   dataclassesr   typingr   r   r   r   r   r   r,   ZrayZray.air.resultr	   ZResultV1Zray.train.v2.api.exceptionsr
   Zray.util.annotationsr   r   	getLoggerr$   loggerr   r   r   r   <module>   s     
