
    jd                     n    d dl mZ d dlmZmZmZmZ d dlmZ  ed      Z	 G d dej                        Zy)    )abstractmethod)AnyDictOptionalTypeVar)base_metricConfigTc                   t    e Zd ZdZedefd       Zee	 	 	 d
dedede	e
   de	ee
ef      dd f
d	              Zy)BaseSuiteEvaluatora  
    Base class for suite evaluators.

    Suite evaluators are designed for use with evaluation suites and provide
    serialization support via `to_config()` and `from_config()` methods for
    compatibility with the backend's online evaluation system.

    Subclasses must implement:
        - `to_config()`: Serialize the evaluator to a configuration object
        - `from_config()`: Create an evaluator instance from a configuration
    returnc                      y)z
        Serialize the evaluator configuration.

        Returns:
            A configuration object that can be used to reconstruct this evaluator.
        N )selfs    ~/Users/manta/Documents/Projects/TheRoad-I1/backend/.venv/lib/python3.12/site-packages/opik/evaluation/suite_evaluators/base.py	to_configzBaseSuiteEvaluator.to_config   s     	    Nconfigtrackproject_nameinit_kwargsc                      y)a  
        Create an evaluator instance from a configuration.

        Args:
            config: The configuration object.
            track: Whether to track the evaluator.
            project_name: Optional project name for tracking.
            init_kwargs: Optional dictionary to override __init__ parameters.
                For LLMJudge, this can include 'model' to specify the model name.

        Returns:
            A new evaluator instance.
        Nr   )clsr   r   r   r   s        r   from_configzBaseSuiteEvaluator.from_config    s    , 	r   )TNN)__name__
__module____qualname____doc__r   r   r   classmethodboolr   strr   r   r   r   r   r   r   	   s    
 3    &*04  sm	
 d38n- 
  r   r   N)abcr   typingr   r   r   r   opik.evaluation.metricsr   r	   
BaseMetricr   r   r   r   <module>r%      s-     / / /
)
-// -r   