Skip to content

Commit 0d32671

Browse files
committed
push
1 parent 366b2c1 commit 0d32671

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

langfuse/_client/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3124,7 +3124,7 @@ def run_batched_evaluation(
31243124
Default: None (fetches all items).
31253125
fetch_batch_size: Number of items to fetch per API call and hold in memory.
31263126
Larger values may be faster but use more memory. Default: 50.
3127-
fetch_trace_fields: Comma-separated list of fields to include in the when fetching traces. Available field groups: 'core' (always included), 'io' (input, output, metadata), 'scores', 'observations', 'metrics'. If not specified, all fields are returned. Example: 'core,scores,metrics'. Note: Excluded 'observations' or 'scores' fields return empty arrays; excluded 'metrics' returns -1 for 'totalCost' and 'latency'. Only relevant if scope is 'traces'.
3127+
fetch_trace_fields: Comma-separated list of fields to include when fetching traces. Available field groups: 'core' (always included), 'io' (input, output, metadata), 'scores', 'observations', 'metrics'. If not specified, all fields are returned. Example: 'core,scores,metrics'. Note: Excluded 'observations' or 'scores' fields return empty arrays; excluded 'metrics' returns -1 for 'totalCost' and 'latency'. Only relevant if scope is 'traces'.
31283128
max_items: Maximum total number of items to process. If None, processes all
31293129
items matching the filter. Useful for testing or limiting evaluation runs.
31303130
Default: None (process all).

langfuse/batch_evaluation.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,7 @@ async def run_async(
867867
evaluators: List of evaluation functions to run on each item.
868868
filter: JSON filter string for querying items.
869869
fetch_batch_size: Number of items to fetch per API call.
870-
fetch_trace_fields: Comma-separated list of fields to include in the when fetching traces. Available field groups: 'core' (always included), 'io' (input, output, metadata), 'scores', 'observations', 'metrics'. If not specified, all fields are returned. Example: 'core,scores,metrics'. Note: Excluded 'observations' or 'scores' fields return empty arrays; excluded 'metrics' returns -1 for 'totalCost' and 'latency'. Only relevant if scope is 'traces'.
870+
fetch_trace_fields: Comma-separated list of fields to include when fetching traces. Available field groups: 'core' (always included), 'io' (input, output, metadata), 'scores', 'observations', 'metrics'. If not specified, all fields are returned. Example: 'core,scores,metrics'. Note: Excluded 'observations' or 'scores' fields return empty arrays; excluded 'metrics' returns -1 for 'totalCost' and 'latency'. Only relevant if scope is 'traces'.
871871
max_items: Maximum number of items to process (None = all).
872872
max_concurrency: Maximum number of concurrent evaluations.
873873
composite_evaluator: Optional function to create composite scores.
@@ -914,6 +914,8 @@ async def run_async(
914914

915915
if verbose:
916916
self._log.info(f"Starting batch evaluation on {scope}")
917+
if scope == "traces" and fetch_trace_fields:
918+
self._log.info(f"Fetching trace fields: {fetch_trace_fields}")
917919
if resume_from:
918920
self._log.info(
919921
f"Resuming from {resume_from.last_processed_timestamp} "

0 commit comments

Comments
 (0)