runner_utils.py — langchain Source File
Architecture documentation for runner_utils.py, a python file in the langchain codebase. 33 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 32fa0f45_2297_fc63_1e0c_9e764755d3d9["runner_utils.py"] 082415a8_067b_221f_7984_07d87009267d["concurrent.futures"] 32fa0f45_2297_fc63_1e0c_9e764755d3d9 --> 082415a8_067b_221f_7984_07d87009267d aac5f8ad_7f2a_3a8e_3b4b_b07d681cbdcf["dataclasses"] 32fa0f45_2297_fc63_1e0c_9e764755d3d9 --> aac5f8ad_7f2a_3a8e_3b4b_b07d681cbdcf c990f2d7_9509_7cea_ca95_51ad57dbe5c6["functools"] 32fa0f45_2297_fc63_1e0c_9e764755d3d9 --> c990f2d7_9509_7cea_ca95_51ad57dbe5c6 614e7b9f_ed51_0780_749c_ff40b74963fc["inspect"] 32fa0f45_2297_fc63_1e0c_9e764755d3d9 --> 614e7b9f_ed51_0780_749c_ff40b74963fc 2a7f66a7_8738_3d47_375b_70fcaa6ac169["logging"] 32fa0f45_2297_fc63_1e0c_9e764755d3d9 --> 2a7f66a7_8738_3d47_375b_70fcaa6ac169 8dfa0cac_d802_3ccd_f710_43a5e70da3a5["uuid"] 32fa0f45_2297_fc63_1e0c_9e764755d3d9 --> 8dfa0cac_d802_3ccd_f710_43a5e70da3a5 cfe2bde5_180e_e3b0_df2b_55b3ebaca8e7["collections.abc"] 32fa0f45_2297_fc63_1e0c_9e764755d3d9 --> cfe2bde5_180e_e3b0_df2b_55b3ebaca8e7 af34f08b_0ede_2b87_0db6_983d74ed0249["datetime"] 32fa0f45_2297_fc63_1e0c_9e764755d3d9 --> af34f08b_0ede_2b87_0db6_983d74ed0249 8e2034b7_ceb8_963f_29fc_2ea6b50ef9b3["typing"] 32fa0f45_2297_fc63_1e0c_9e764755d3d9 --> 8e2034b7_ceb8_963f_29fc_2ea6b50ef9b3 b19a8b7e_fbee_95b1_65b8_509a1ed3cad7["langchain_core._api"] 32fa0f45_2297_fc63_1e0c_9e764755d3d9 --> b19a8b7e_fbee_95b1_65b8_509a1ed3cad7 f3bc7443_c889_119d_0744_aacc3620d8d2["langchain_core.callbacks"] 32fa0f45_2297_fc63_1e0c_9e764755d3d9 --> f3bc7443_c889_119d_0744_aacc3620d8d2 ba43b74d_3099_7e1c_aac3_cf594720469e["langchain_core.language_models"] 32fa0f45_2297_fc63_1e0c_9e764755d3d9 --> ba43b74d_3099_7e1c_aac3_cf594720469e d758344f_537f_649e_f467_b9d7442e86df["langchain_core.messages"] 32fa0f45_2297_fc63_1e0c_9e764755d3d9 --> d758344f_537f_649e_f467_b9d7442e86df ac2a9b92_4484_491e_1b48_ec85e71e1d58["langchain_core.outputs"] 32fa0f45_2297_fc63_1e0c_9e764755d3d9 --> ac2a9b92_4484_491e_1b48_ec85e71e1d58 style 32fa0f45_2297_fc63_1e0c_9e764755d3d9 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
"""Utilities for running language models or Chains over datasets."""
from __future__ import annotations
import concurrent.futures
import dataclasses
import functools
import inspect
import logging
import uuid
from collections.abc import Callable
from datetime import datetime, timezone
from typing import (
TYPE_CHECKING,
Any,
cast,
)
from langchain_core._api import warn_deprecated
from langchain_core.callbacks import Callbacks
from langchain_core.language_models import BaseLanguageModel
from langchain_core.messages import BaseMessage, messages_from_dict
from langchain_core.outputs import ChatResult, LLMResult
from langchain_core.runnables import Runnable, RunnableConfig, RunnableLambda
from langchain_core.runnables import config as runnable_config
from langchain_core.runnables import utils as runnable_utils
from langchain_core.tracers.evaluation import (
EvaluatorCallbackHandler,
wait_for_all_evaluators,
)
from langchain_core.tracers.langchain import LangChainTracer
from langsmith.client import Client
from langsmith.env import get_git_info, get_langchain_env_var_metadata
from langsmith.evaluation import (
EvaluationResult,
RunEvaluator,
)
from langsmith.evaluation import (
run_evaluator as run_evaluator_dec,
)
from langsmith.run_helpers import as_runnable, is_traceable_function
from langsmith.schemas import Dataset, DataType, Example, Run, TracerSession
from langsmith.utils import LangSmithError
from requests import HTTPError
from typing_extensions import TypedDict
from langchain_classic.chains.base import Chain
from langchain_classic.evaluation.loading import load_evaluator
from langchain_classic.evaluation.schema import (
EvaluatorType,
PairwiseStringEvaluator,
StringEvaluator,
)
from langchain_classic.smith import evaluation as smith_eval
from langchain_classic.smith.evaluation import config as smith_eval_config
from langchain_classic.smith.evaluation import name_generation, progress
if TYPE_CHECKING:
import pandas as pd
// ... (1639 more lines)
Domain
Subdomains
Functions
- _arun_chain()
- _arun_llm()
- _arun_llm_or_chain()
- _construct_run_evaluator()
- _determine_input_key()
- _determine_prediction_key()
- _determine_reference_key()
- _display_aggregate_results()
- _get_keys()
- _get_messages()
- _get_prompt()
- _is_jupyter_environment()
- _load_run_evaluators()
- _prepare_eval_run()
- _run_chain()
- _run_llm()
- _run_llm_or_chain()
- _setup_evaluation()
- _validate_example_inputs()
- _validate_example_inputs_for_chain()
- _validate_example_inputs_for_language_model()
- _wrap_in_chain_factory()
- arun_on_dataset()
- pandas()
- run_on_dataset()
Dependencies
- IPython.core.getipython
- IPython.display
- collections.abc
- concurrent.futures
- dataclasses
- datetime
- functools
- inspect
- langchain_classic.chains.base
- langchain_classic.evaluation.loading
- langchain_classic.evaluation.schema
- langchain_classic.smith
- langchain_classic.smith.evaluation
- langchain_core._api
- langchain_core.callbacks
- langchain_core.language_models
- langchain_core.messages
- langchain_core.outputs
- langchain_core.runnables
- langchain_core.tracers.evaluation
- langchain_core.tracers.langchain
- langsmith.client
- langsmith.env
- langsmith.evaluation
- langsmith.run_helpers
- langsmith.schemas
- langsmith.utils
- logging
- pandas
- requests
- typing
- typing_extensions
- uuid
Source
Frequently Asked Questions
What does runner_utils.py do?
runner_utils.py is a source file in the langchain codebase, written in python. It belongs to the CoreAbstractions domain, Serialization subdomain.
What functions are defined in runner_utils.py?
runner_utils.py defines 25 function(s): _arun_chain, _arun_llm, _arun_llm_or_chain, _construct_run_evaluator, _determine_input_key, _determine_prediction_key, _determine_reference_key, _display_aggregate_results, _get_keys, _get_messages, and 15 more.
What does runner_utils.py depend on?
runner_utils.py imports 33 module(s): IPython.core.getipython, IPython.display, collections.abc, concurrent.futures, dataclasses, datetime, functools, inspect, and 25 more.
Where is runner_utils.py in the architecture?
runner_utils.py is located at libs/langchain/langchain_classic/smith/evaluation/runner_utils.py (domain: CoreAbstractions, subdomain: Serialization, directory: libs/langchain/langchain_classic/smith/evaluation).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free