_compare_run_with_error() — langchain Function Reference
Architecture documentation for the _compare_run_with_error() function in test_async_base_tracer.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 0964cd32_f826_4bb4_e380_fe8ef2770b89["_compare_run_with_error()"] a49e8dc2_b2f8_294c_51a9_1a3ea21182fb["test_async_base_tracer.py"] 0964cd32_f826_4bb4_e380_fe8ef2770b89 -->|defined in| a49e8dc2_b2f8_294c_51a9_1a3ea21182fb c2afec64_3b27_4ceb_ef91_c2c80fed6311["test_tracer_llm_run_on_error()"] c2afec64_3b27_4ceb_ef91_c2c80fed6311 -->|calls| 0964cd32_f826_4bb4_e380_fe8ef2770b89 02a299a7_642f_417b_97f3_e86e920de478["test_tracer_llm_run_on_error_callback()"] 02a299a7_642f_417b_97f3_e86e920de478 -->|calls| 0964cd32_f826_4bb4_e380_fe8ef2770b89 3777e972_11fc_3e8c_ee32_7f5a86ed6ae6["test_tracer_chain_run_on_error()"] 3777e972_11fc_3e8c_ee32_7f5a86ed6ae6 -->|calls| 0964cd32_f826_4bb4_e380_fe8ef2770b89 da60ea08_1883_7791_77a3_237d7ab52696["test_tracer_tool_run_on_error()"] da60ea08_1883_7791_77a3_237d7ab52696 -->|calls| 0964cd32_f826_4bb4_e380_fe8ef2770b89 41a4bd7d_deff_2989_1743_667f750eba0f["test_tracer_nested_runs_on_error()"] 41a4bd7d_deff_2989_1743_667f750eba0f -->|calls| 0964cd32_f826_4bb4_e380_fe8ef2770b89 style 0964cd32_f826_4bb4_e380_fe8ef2770b89 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/tracers/test_async_base_tracer.py lines 36–53
def _compare_run_with_error(run: Any, expected_run: Any) -> None:
if run.child_runs:
assert len(expected_run.child_runs) == len(run.child_runs)
for received, expected in zip(
run.child_runs, expected_run.child_runs, strict=False
):
_compare_run_with_error(received, expected)
received = pydantic_to_dict(run, exclude={"child_runs"})
received_err = received.pop("error")
expected = pydantic_to_dict(expected_run, exclude={"child_runs"})
expected_err = expected.pop("error")
assert received == expected
if expected_err is not None:
assert received_err is not None
assert expected_err in received_err
else:
assert received_err is None
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does _compare_run_with_error() do?
_compare_run_with_error() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/tracers/test_async_base_tracer.py.
Where is _compare_run_with_error() defined?
_compare_run_with_error() is defined in libs/core/tests/unit_tests/tracers/test_async_base_tracer.py at line 36.
What calls _compare_run_with_error()?
_compare_run_with_error() is called by 5 function(s): test_tracer_chain_run_on_error, test_tracer_llm_run_on_error, test_tracer_llm_run_on_error_callback, test_tracer_nested_runs_on_error, test_tracer_tool_run_on_error.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free