Skip to content

Base Class

Base evaluation frame, enforces the update state and get results methods.

EvaluationBaseFrame

Bases: ABC, Generic[T]

Source code in evaluator/frontend/components/evaluation_frames/evaluation_parent.py
class EvaluationBaseFrame(ABC, Generic[T]):

    @abstractmethod
    def __init__(self, master, app_state: AppState, run_state: RunState, **kwargs):
        pass

    @abstractmethod
    def update_state(self, app_state: AppState, run_state: RunState) -> None:
        """Upate the component state.

        Parameters
        ----------
        app_state : AppState
            The updated app state.
        run_state : RunState
            The updated run state.
        """
        pass

    @abstractmethod
    def get_results(self) -> T:
        """Gets the results for the current state of the evaluation frame.

        Returns
        -------
        T
            The specific evaluation TypedDict for the frame.
        """
        pass

update_state(app_state, run_state) abstractmethod

Upate the component state.

Parameters:

Name Type Description Default
app_state AppState

The updated app state.

required
run_state RunState

The updated run state.

required
Source code in evaluator/frontend/components/evaluation_frames/evaluation_parent.py
@abstractmethod
def update_state(self, app_state: AppState, run_state: RunState) -> None:
    """Upate the component state.

    Parameters
    ----------
    app_state : AppState
        The updated app state.
    run_state : RunState
        The updated run state.
    """
    pass

get_results() abstractmethod

Gets the results for the current state of the evaluation frame.

Returns:

Type Description
T

The specific evaluation TypedDict for the frame.

Source code in evaluator/frontend/components/evaluation_frames/evaluation_parent.py
@abstractmethod
def get_results(self) -> T:
    """Gets the results for the current state of the evaluation frame.

    Returns
    -------
    T
        The specific evaluation TypedDict for the frame.
    """
    pass