Home / Class/ EvalError Class — langchain Architecture

EvalError Class — langchain Architecture

Architecture documentation for the EvalError class in runner_utils.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  81476294_823b_1810_f20c_d97f2fdbfa71["EvalError"]
  8253c602_7d0c_9195_a7e1_3e9b19304131["runner_utils.py"]
  81476294_823b_1810_f20c_d97f2fdbfa71 -->|defined in| 8253c602_7d0c_9195_a7e1_3e9b19304131
  82d581c9_c76a_ff03_5238_dcc0cc9ecf22["__init__()"]
  81476294_823b_1810_f20c_d97f2fdbfa71 -->|method| 82d581c9_c76a_ff03_5238_dcc0cc9ecf22
  592f29b1_24ac_158c_3d57_5293a7a473d6["__getattr__()"]
  81476294_823b_1810_f20c_d97f2fdbfa71 -->|method| 592f29b1_24ac_158c_3d57_5293a7a473d6

Relationship Graph

Source Code

libs/langchain/langchain_classic/smith/evaluation/runner_utils.py lines 152–180

class EvalError(dict):
    """Your architecture raised an error."""

    def __init__(self, Error: BaseException, **kwargs: Any) -> None:  # noqa: N803
        """Initialize the `EvalError` with an error and additional attributes.

        Args:
            Error: The error that occurred.
            **kwargs: Additional attributes to include in the error.
        """
        super().__init__(Error=Error, **kwargs)

    def __getattr__(self, name: str) -> Any:
        """Get an attribute from the `EvalError`.

        Args:
            name: The name of the attribute to get.

        Returns:
            The value of the attribute.

        Raises:
            AttributeError: If the attribute does not exist.
        """
        try:
            return self[name]
        except KeyError as e:
            msg = f"'EvalError' object has no attribute '{name}'"
            raise AttributeError(msg) from e

Frequently Asked Questions

What is the EvalError class?
EvalError is a class in the langchain codebase, defined in libs/langchain/langchain_classic/smith/evaluation/runner_utils.py.
Where is EvalError defined?
EvalError is defined in libs/langchain/langchain_classic/smith/evaluation/runner_utils.py at line 152.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free