
    %`i                         d dl Z d dlZd dlmZmZ er	 d dlZd dlmZ	 d dl
Zd dlmZ d dlmZ  ej        e          Z ej        dd          Zdedefd	ZdS )
    N)TYPE_CHECKINGAny)ray_constants)inspect_serializability.RAY_allow_out_of_band_object_ref_serializationTobj	error_msgc                 t   	 t          j        |           S # t          t          j        j        f$ r}t          j                    }t          | |           | d|	                                 }t          |t                    rt          |          |t          j                            |          d}~ww xY w)zdWrap cloudpickle.dumps to provide better error message
    when the object is not serializable.
    )
print_filez:
N)pickledumps	TypeErrorray
exceptions(OufOfBandObjectRefSerializationExceptionioStringIOr   getvalue
isinstance)r   r	   esiomsgs        m/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/ray/_common/serialization.pypickle_dumpsr      s    	O|C   s~NO O O Okmm4444//s||~~//a## 	OC..a'.II#NNNOs    B7BB22B7)r   loggingtypingr   r   ray._private.utilsr   ray.cloudpicklecloudpickler   ray.exceptionsray._privater   ray.utilr   	getLogger__name__loggerenv_bool*ALLOW_OUT_OF_BAND_OBJECT_REF_SERIALIZATIONstrr        r   <module>r+      s    				  % % % % % % % % 	                     & & & & & & , , , , , ,		8	$	$-C]-C4d. . *
Oc Oc O O O O O Or*   