Skip to content

Commit c528b6f

Browse files
vertex-sdk-botcopybara-github
authored andcommitted
fix: a bug in the evaluation library where the job crashes if only custom metrics are specified.
PiperOrigin-RevId: 632207470
1 parent 6557d88 commit c528b6f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

vertexai/preview/evaluation/_evaluation.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,8 @@ async def _compute_metrics(
534534
metric_name = metric
535535
tasks_by_metric[metric_name].append(task)
536536

537-
api_request_count = len(tasks_by_metric) * len(next(iter(tasks_by_metric.values())))
537+
api_request_count = (len(api_metrics) + len(custom_metrics)) * len(
538+
evaluation_run_config.dataset)
538539
_LOGGER.info(
539540
f"Computing metrics with a total of {api_request_count} Vertex online"
540541
" evaluation service requests."

0 commit comments

Comments
 (0)