From 89af30807b53a4792c58c5f33b78b6534cd887e5 Mon Sep 17 00:00:00 2001 From: William FH <13333726+hinthornw@users.noreply.github.com> Date: Tue, 19 Mar 2024 11:53:50 -0700 Subject: [PATCH] Permit function eval on llm data type (#19287) --- libs/langchain/langchain/smith/evaluation/runner_utils.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/libs/langchain/langchain/smith/evaluation/runner_utils.py b/libs/langchain/langchain/smith/evaluation/runner_utils.py index b4c7ab4a8ef..35c7b8a7e82 100644 --- a/libs/langchain/langchain/smith/evaluation/runner_utils.py +++ b/libs/langchain/langchain/smith/evaluation/runner_utils.py @@ -9,7 +9,6 @@ import inspect import logging import uuid from datetime import datetime, timezone -from enum import Enum from typing import ( TYPE_CHECKING, Any, @@ -430,13 +429,6 @@ def _setup_evaluation( run_type = "llm" else: run_type = "chain" - if data_type in (DataType.chat, DataType.llm): - val = data_type.value if isinstance(data_type, Enum) else data_type - raise ValueError( - "Cannot evaluate a chain on dataset with " - f"data_type={val}. " - "Please specify a dataset with the default 'kv' data type." - ) chain = llm_or_chain_factory() run_inputs = chain.input_keys if isinstance(chain, Chain) else None run_outputs = chain.output_keys if isinstance(chain, Chain) else None