
    Pi                     J    d dl mZ  G d de          Z G d de          ZdS )    )Listc                       e Zd ZdZdS )InstantiationErrorzU
    Raised when a `_component_` field in a config is unable to be instantiated.
    N)__name__
__module____qualname____doc__     l/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/torchtune/config/_errors.pyr   r   
   s          	Dr   r   c                   0    e Zd ZdZdee         fdZd ZdS )ConfigErrorz
    Raised when the yaml config is not well-formed. Prints all the collected
    errors at once.

    Args:
        errors (List[Exception]): exceptions found when validating `_component_`
            fields in the config
    errorsc                     || _         d S )N)r   )selfr   s     r   __init__zConfigError.__init__   s    r   c                 T    d | j         D             }dd                    |          z   S )Nc                 Z    g | ](}t          |          j         d t          |           )S )z: )typer   str).0es     r   
<listcomp>z'ConfigError.__str__.<locals>.<listcomp>    s5    OOOaT!WW-99Q99OOOr   z8Config is not well-formed, found the following errors: 

)r   join)r   error_messagess     r   __str__zConfigError.__str__   s9    OO4;OOOJTYYN
 N
 
 	
r   N)r   r   r   r	   r   	Exceptionr   r   r
   r   r   r   r      sL         tI    
 
 
 
 
r   r   N)typingr   r   r   r   r
   r   r   <module>r       sw         	 	 	 	 	 	 	 	
 
 
 
 
) 
 
 
 
 
r   