o
    $i                  	   @   sV   d dl mZmZ deeeeeef  deeeef deeeef fddZdd Zd	S )
    )OptionalUnionvalconvert_typereturnc              
   C   s  | du rdS t | |u r| S |tu r0zt| } W | S  ty/   td|  dt |  d| w |tu rRzt| } W | S  tyQ   td|  dt |  d| w |tu r| dksb| dksb| dkrfd} | S | d	ksr| d
ksr| dkrvd} | S td|  dt |  d| J d| )zConvert the given value to a convert type.

    If the given val is None, it will just return None without the conversion.

    It supports,
        str -> int/float/bool
        int -> int
        bool -> bool
        float -> float
    NzFailed to convert a value z	 of type z to Falsefalse0FTruetrue1TzUnsupported convert type )typeint
ValueErrorfloatbool)r   r    r   P/home/ubuntu/veenaModal/venv/lib/python3.10/site-packages/ray/util/state/util.pyconvert_string_to_type   sB   

	r   c                  C   s4   dd l } ddlm}m} | dt ||jd d S )Nr   )TagKeyrecord_extra_usage_tagzRay state API is no longer experimental. Please import from `ray.util.state`. instead. Importing from `ray.experimental` will be deprecated in future releases. r   )warningsray._common.usage.usage_libr   r   warnDeprecationWarningEXPERIMENTAL_STATE_API_IMPORT)r   r   r   r   r   r   "record_deprecated_state_api_import2   s   r   N)	typingr   r   strr   r   r   r   r   r   r   r   r   <module>   s    
.