_check_evaluation_args() — langchain Function Reference
Architecture documentation for the _check_evaluation_args() function in schema.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 7026853a_ec84_d1d0_4656_2bb45a043e17["_check_evaluation_args()"] c3049278_87a9_b830_293b_a3dcf7ed9dd3["_EvalArgsMixin"] 7026853a_ec84_d1d0_4656_2bb45a043e17 -->|defined in| c3049278_87a9_b830_293b_a3dcf7ed9dd3 89b45341_33d2_f0e2_5126_1ae243434a47["evaluate_strings()"] 89b45341_33d2_f0e2_5126_1ae243434a47 -->|calls| 7026853a_ec84_d1d0_4656_2bb45a043e17 7005c138_072e_7038_918d_35c947f2e4ac["aevaluate_strings()"] 7005c138_072e_7038_918d_35c947f2e4ac -->|calls| 7026853a_ec84_d1d0_4656_2bb45a043e17 3ea3b093_5648_88aa_046a_77ffd66a2814["evaluate_string_pairs()"] 3ea3b093_5648_88aa_046a_77ffd66a2814 -->|calls| 7026853a_ec84_d1d0_4656_2bb45a043e17 d7002ca7_f638_ad53_b56f_74502f453dd5["aevaluate_string_pairs()"] d7002ca7_f638_ad53_b56f_74502f453dd5 -->|calls| 7026853a_ec84_d1d0_4656_2bb45a043e17 f9083201_751d_03a7_715e_48b36d32dabf["evaluate_agent_trajectory()"] f9083201_751d_03a7_715e_48b36d32dabf -->|calls| 7026853a_ec84_d1d0_4656_2bb45a043e17 b659b7f6_5fb9_1be0_d430_ab613252fe80["aevaluate_agent_trajectory()"] b659b7f6_5fb9_1be0_d430_ab613252fe80 -->|calls| 7026853a_ec84_d1d0_4656_2bb45a043e17 style 7026853a_ec84_d1d0_4656_2bb45a043e17 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/langchain_classic/evaluation/schema.py lines 109–133
def _check_evaluation_args(
self,
reference: str | None = None,
input_: str | None = None,
) -> None:
"""Check if the evaluation arguments are valid.
Args:
reference: The reference label.
input_: The input string.
Raises:
ValueError: If the evaluator requires an input string but none is provided,
or if the evaluator requires a reference label but none is provided.
"""
if self.requires_input and input_ is None:
msg = f"{self.__class__.__name__} requires an input string."
raise ValueError(msg)
if input_ is not None and not self.requires_input:
warn(self._skip_input_warning, stacklevel=3)
if self.requires_reference and reference is None:
msg = f"{self.__class__.__name__} requires a reference string."
raise ValueError(msg)
if reference is not None and not self.requires_reference:
warn(self._skip_reference_warning, stacklevel=3)
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does _check_evaluation_args() do?
_check_evaluation_args() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/evaluation/schema.py.
Where is _check_evaluation_args() defined?
_check_evaluation_args() is defined in libs/langchain/langchain_classic/evaluation/schema.py at line 109.
What calls _check_evaluation_args()?
_check_evaluation_args() is called by 6 function(s): aevaluate_agent_trajectory, aevaluate_string_pairs, aevaluate_strings, evaluate_agent_trajectory, evaluate_string_pairs, evaluate_strings.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free