Skip to content

Commit b01cbd0

Browse files
committed
push
1 parent 07b17b9 commit b01cbd0

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

langfuse/_client/client.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@
8282
Prompt_Text,
8383
)
8484
from langfuse.experiment import (
85+
Evaluation,
8586
EvaluatorFunction,
8687
ExperimentData,
8788
ExperimentItem,
@@ -2674,7 +2675,7 @@ async def process_item(item: ExperimentItem) -> dict:
26742675
valid_results.append(result) # type: ignore
26752676

26762677
# Run experiment-level evaluators
2677-
run_evaluations = []
2678+
run_evaluations: List[Evaluation] = []
26782679
for run_evaluator in run_evaluators:
26792680
try:
26802681
evaluations = await _run_evaluator(
@@ -2713,10 +2714,11 @@ async def process_item(item: ExperimentItem) -> dict:
27132714
if dataset_run_id:
27142715
self.create_score(
27152716
dataset_run_id=dataset_run_id,
2716-
name=evaluation["name"],
2717-
value=evaluation["value"], # type: ignore
2717+
name=evaluation.get("name") or "<unknown>",
2718+
value=evaluation.get("value"), # type: ignore
27182719
comment=evaluation.get("comment"),
27192720
metadata=evaluation.get("metadata"),
2721+
data_type=evaluation.get("data_type"), # type: ignore
27202722
)
27212723

27222724
except Exception as e:

0 commit comments

Comments
 (0)