|
|
@ -5,7 +5,6 @@ from __future__ import annotations
|
|
|
|
import functools
|
|
|
|
import functools
|
|
|
|
import inspect
|
|
|
|
import inspect
|
|
|
|
import logging
|
|
|
|
import logging
|
|
|
|
import warnings
|
|
|
|
|
|
|
|
from enum import Enum
|
|
|
|
from enum import Enum
|
|
|
|
from typing import (
|
|
|
|
from typing import (
|
|
|
|
TYPE_CHECKING,
|
|
|
|
TYPE_CHECKING,
|
|
|
@ -23,6 +22,7 @@ from typing import (
|
|
|
|
from langsmith import Client, RunEvaluator
|
|
|
|
from langsmith import Client, RunEvaluator
|
|
|
|
from langsmith.schemas import Dataset, DataType, Example
|
|
|
|
from langsmith.schemas import Dataset, DataType, Example
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
from langchain._api import warn_deprecated
|
|
|
|
from langchain.callbacks.manager import Callbacks
|
|
|
|
from langchain.callbacks.manager import Callbacks
|
|
|
|
from langchain.callbacks.tracers.evaluation import (
|
|
|
|
from langchain.callbacks.tracers.evaluation import (
|
|
|
|
EvaluatorCallbackHandler,
|
|
|
|
EvaluatorCallbackHandler,
|
|
|
@ -998,17 +998,15 @@ async def arun_on_dataset(
|
|
|
|
) -> Dict[str, Any]:
|
|
|
|
) -> Dict[str, Any]:
|
|
|
|
input_mapper = kwargs.pop("input_mapper", None)
|
|
|
|
input_mapper = kwargs.pop("input_mapper", None)
|
|
|
|
if input_mapper:
|
|
|
|
if input_mapper:
|
|
|
|
warnings.warn(
|
|
|
|
warn_deprecated("0.0.305", message=_INPUT_MAPPER_DEP_WARNING, pending=True)
|
|
|
|
_INPUT_MAPPER_DEP_WARNING,
|
|
|
|
|
|
|
|
DeprecationWarning,
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if kwargs:
|
|
|
|
if kwargs:
|
|
|
|
warnings.warn(
|
|
|
|
warn_deprecated(
|
|
|
|
"The following arguments are deprecated and "
|
|
|
|
"0.0.305",
|
|
|
|
|
|
|
|
message="The following arguments are deprecated and "
|
|
|
|
"will be removed in a future release: "
|
|
|
|
"will be removed in a future release: "
|
|
|
|
f"{kwargs.keys()}.",
|
|
|
|
f"{kwargs.keys()}.",
|
|
|
|
DeprecationWarning,
|
|
|
|
removal="0.0.305",
|
|
|
|
)
|
|
|
|
)
|
|
|
|
client = client or Client()
|
|
|
|
client = client or Client()
|
|
|
|
wrapped_model, project_name, examples, configs = _prepare_run_on_dataset(
|
|
|
|
wrapped_model, project_name, examples, configs = _prepare_run_on_dataset(
|
|
|
@ -1061,16 +1059,15 @@ def run_on_dataset(
|
|
|
|
) -> Dict[str, Any]:
|
|
|
|
) -> Dict[str, Any]:
|
|
|
|
input_mapper = kwargs.pop("input_mapper", None)
|
|
|
|
input_mapper = kwargs.pop("input_mapper", None)
|
|
|
|
if input_mapper:
|
|
|
|
if input_mapper:
|
|
|
|
warnings.warn(
|
|
|
|
warn_deprecated("0.0.305", message=_INPUT_MAPPER_DEP_WARNING, pending=True)
|
|
|
|
_INPUT_MAPPER_DEP_WARNING,
|
|
|
|
|
|
|
|
DeprecationWarning,
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
if kwargs:
|
|
|
|
if kwargs:
|
|
|
|
warnings.warn(
|
|
|
|
warn_deprecated(
|
|
|
|
"The following arguments are deprecated and "
|
|
|
|
"0.0.305",
|
|
|
|
|
|
|
|
message="The following arguments are deprecated and "
|
|
|
|
"will be removed in a future release: "
|
|
|
|
"will be removed in a future release: "
|
|
|
|
f"{kwargs.keys()}.",
|
|
|
|
f"{kwargs.keys()}.",
|
|
|
|
DeprecationWarning,
|
|
|
|
removal="0.0.305",
|
|
|
|
)
|
|
|
|
)
|
|
|
|
client = client or Client()
|
|
|
|
client = client or Client()
|
|
|
|
wrapped_model, project_name, examples, configs = _prepare_run_on_dataset(
|
|
|
|
wrapped_model, project_name, examples, configs = _prepare_run_on_dataset(
|
|
|
|