Skip to content

Commit d839e64

Browse files
authored
docs(evals): mark batch evaluation as legacy (#1867)
1 parent 8786515 commit d839e64

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

‎langfuse/_client/client.py‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3272,7 +3272,7 @@ def run_batched_evaluation(
32723272
resume_from: Optional[BatchEvaluationResumeToken] = None,
32733273
verbose: bool = False,
32743274
) -> BatchEvaluationResult:
3275-
"""Fetch traces or observations and run evaluations on each item.
3275+
"""Fetch traces or observations using legacy read APIs and evaluate each item.
32763276
32773277
This method provides a powerful way to evaluate existing data in Langfuse at scale.
32783278
It fetches items based on filters, transforms them using a mapper function, runs
@@ -3288,6 +3288,11 @@ def run_batched_evaluation(
32883288
it memory-efficient for large datasets. It includes comprehensive error handling,
32893289
retry logic, and resume capability for long-running evaluations.
32903290
3291+
Legacy platform compatibility:
3292+
This method reads traces from `GET /api/public/traces` and observations
3293+
from the legacy `GET /api/public/observations` endpoint. It is supported
3294+
with Langfuse platform v3 and is not yet supported with platform v4.
3295+
32913296
Args:
32923297
scope: The type of items to evaluate. Must be one of:
32933298
- "traces": Evaluate complete traces with all their observations

‎langfuse/batch_evaluation.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -855,12 +855,16 @@ async def run_async(
855855
verbose: bool = False,
856856
resume_from: Optional[BatchEvaluationResumeToken] = None,
857857
) -> BatchEvaluationResult:
858-
"""Run batch evaluation asynchronously.
858+
"""Run batch evaluation asynchronously using legacy read APIs.
859859
860860
This is the main implementation method that orchestrates the entire batch
861861
evaluation process: fetching items, mapping, evaluating, creating scores,
862862
and tracking statistics.
863863
864+
This runner reads traces from `GET /api/public/traces` and observations
865+
from the legacy `GET /api/public/observations` endpoint. It is supported
866+
with Langfuse platform v3 and is not yet supported with platform v4.
867+
864868
Args:
865869
scope: The type of items to evaluate ("traces", "observations").
866870
mapper: Function to transform API response items to evaluator inputs.

0 commit comments

Comments
 (0)