Skip to content

Commit

Permalink
fix: a bug in the evaluation library where the job crashes if only cu…
Browse files Browse the repository at this point in the history
…stom metrics are specified.

PiperOrigin-RevId: 632207470
  • Loading branch information
vertex-sdk-bot authored and copybara-github committed May 9, 2024
1 parent 6557d88 commit c528b6f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vertexai/preview/evaluation/_evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,8 @@ async def _compute_metrics(
metric_name = metric
tasks_by_metric[metric_name].append(task)

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

0 comments on commit c528b6f

Please sign in to comment.