
    .`i
              
          d dl Z d dlZd dlmZ d dlmZ  ee          Zej        Z	ej
                            e	d          Z	 ej
                            e          r= ee          5 Z e e j        e                    Zddd           n# 1 swxY w Y   n
 e            Zn0# e j        $ r# e                    de            e            ZY nw xY w	 	 	 d
dee         dz  dee         dz  dedz  dee         fd	ZdS )    N)init_loggerz ray_non_carry_over_env_vars.jsonzCFailed to parse %s. Using an empty set for non-carry-over env vars.exclude_varsadditional_varsdestinationreturnc                      pt                       |pt                      } fdt          t          j                                      |          D             }|d|z   nd}t                              dt                     t                              d|d |D                        t                              dt                     |S )	a  
    Get the environment variables to copy to downstream Ray actors.

    Example use cases:
    - Copy environment variables from RayDistributedExecutor to Ray workers.
    - Copy environment variables from RayDPClient to Ray DPEngineCoreActor.

    Args:
        exclude_vars: A set of vllm defined environment variables to exclude
            from copying.
        additional_vars: A set of additional environment variables to copy.
            If a variable is in both exclude_vars and additional_vars, it will
            be excluded.
        destination: The destination of the environment variables.
    Returns:
        A set of environment variables to copy.
    c                 .    h | ]}|v|t           v|S  )RAY_NON_CARRY_OVER_ENV_VARS).0vr   s     d/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/vllm/ray/ray_env.py	<setcomp>z'get_env_vars_to_copy.<locals>.<setcomp>:   s9       L  Q.I%I%I 	
%I%I%I    Nz to  z+RAY_NON_CARRY_OVER_ENV_VARS from config: %sz1Copying the following environment variables%s: %sc                 .    g | ]}|t           j        v |S r
   )osenviron)r   r   s     r   
<listcomp>z(get_env_vars_to_copy.<locals>.<listcomp>H   s    888qRZr   z=If certain env vars should NOT be copied, add them to %s file)setenvsenvironment_variablesunionloggerinfor    RAY_NON_CARRY_OVER_ENV_VARS_FILE)r   r   r   env_vars_to_copyto_destinations   `    r   get_env_vars_to_copyr   !   s    ,  (355L%.O   T/0066GG   .9-DVk))"N
KK57R   KK;88$888  
 KKG(  
 r   )NNN)jsonr   	vllm.envsr   vllm.loggerr   __name__r   VLLM_CONFIG_ROOTCONFIG_HOMEpathjoinr   existsopenfr   loadr   JSONDecodeErrorwarningstrr   r
   r   r   <module>r/      s    				       # # # # # #	X		# $&7<<3$ $  (	w~~677 ,T233 	<q*-#idill*;*;'	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< '*cee# ( ( (
NNM(   #&#%%( %)'+". .c(T/.X_. t. 	X	. . . . . .s6   %B% (BB% BB% BB% %*CC