Skip to content

Commit

Permalink
Merge branch 'main' into fix/cartesian-product-in-autoscaling-rule-query
Browse files Browse the repository at this point in the history
  • Loading branch information
fregataa committed Feb 19, 2025
2 parents b55666f + 5df3ade commit fc337fa
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/ai/backend/manager/scheduler/dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -1418,7 +1418,7 @@ async def _autoscale_endpoints(
)
for kernel in kernel_rows:
kernels_by_session_id[kernel.session_id].append(kernel)
metric_requested_kernels.append(kernel)
metric_requested_kernels.append(kernel.id)

# to speed up and lower the pressure to the redis we must load every metrics
# in bulk, not querying each key at once
Expand Down Expand Up @@ -1460,9 +1460,7 @@ async def _autoscale_endpoints(
if rule.metric_name not in live_stat:
continue
metric_found_kernel_count += 1
metric_aggregated_value += Decimal(
live_stat[rule.metric_name]["current"]
)
metric_aggregated_value += Decimal(live_stat[rule.metric_name]["pct"])
if metric_found_kernel_count == 0:
log_skip_due_to_missing_metric(rule)
continue
Expand Down

0 comments on commit fc337fa

Please sign in to comment.