
    &`iy                     r    d dl mZmZmZ d dlZd dlmZ d dlmZ d dl	m
Z
 e
 G d de                      ZdS )    )AnyDictListN)DAGNode)get_dag_node_str)DeveloperAPIc            
            e Zd ZdZ	 d fd	Zdee         deeef         deeef         deeef         fdZ	d	 Z
d
efdZ xZS )FunctionNodez/Represents a bound task node in a Ray task DAG.Nc                 `    || _         t                                          ||||           d S N)other_args_to_resolve)_bodysuper__init__)self	func_body	func_argsfunc_kwargsfunc_optionsr   	__class__s         i/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/ray/dag/function_node.pyr   zFunctionNode.__init__   sC     
"7	 	 	
 	
 	
 	
 	
    new_args
new_kwargsnew_optionsnew_other_args_to_resolvec                 4    t          | j        ||||          S r   )r
   r   )r   r   r   r   r   s        r   
_copy_implzFunctionNode._copy_impl   s,     J";
 
 
 	
r   c                 ~      t          j        | j                  j        di | j        j        | j        i | j        S )a:  Executor of FunctionNode by ray.remote().

        Args and kwargs are to match base class signature, but not in the
        implementation. All args and kwargs should be resolved and replaced
        with value in bound_args and bound_kwargs via bottom-up recursion when
        current node is executed.
         )rayremoter   options_bound_options_bound_args_bound_kwargs)r   argskwargss      r   _execute_implzFunctionNode._execute_impl,   sY     CJtz"", ,*, ,T%=)-);= =	
r   returnc                 F    t          | t          | j                            S N)r   strr   )r   s    r   __str__zFunctionNode.__str__:   s    c$*oo666r   r,   )__name__
__module____qualname____doc__r   r   r   r   r-   r   r)   r.   __classcell__)r   s   @r   r
   r
   	   s        99 #
 
 
 
 
 
 
s)
 cN
 #s(^	

 $(S>
 
 
 

 
 
7 7 7 7 7 7 7 7 7r   r
   )typingr   r   r   r!   ray.dag.dag_noder   ray.dag.format_utilsr   ray.util.annotationsr   r
   r    r   r   <module>r8      s    " " " " " " " " " " 



 $ $ $ $ $ $ 1 1 1 1 1 1 - - - - - - 17 17 17 17 177 17 17 17 17 17r   