Skip to content

Commit

Permalink
[autoscaler] fix too many values to unpack (expected 2) bug (#36231) (#…
Browse files Browse the repository at this point in the history
…36482)

Signed-off-by: Lonnie Liu <[email protected]>
  • Loading branch information
aslonnie committed Jun 16, 2023
1 parent 128cf37 commit 142b462
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions python/ray/autoscaler/_private/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,11 +399,15 @@ def _run(self):
self.autoscaler.update()
status["autoscaler_update_time"] = time.time() - update_start_time
autoscaler_summary = self.autoscaler.summary()
self.emit_metrics(
load_metrics_summary,
autoscaler_summary,
self.autoscaler.all_node_types,
)
try:
self.emit_metrics(
load_metrics_summary,
autoscaler_summary,
self.autoscaler.all_node_types,
)
except Exception:
logger.exception("Error emitting metrics")

if autoscaler_summary:
status["autoscaler_report"] = asdict(autoscaler_summary)
status[
Expand Down Expand Up @@ -463,7 +467,7 @@ def emit_metrics(self, load_metrics_summary, autoscaler_summary, node_types):
for _, node_type, _ in autoscaler_summary.pending_nodes:
pending_node_count[node_type] += 1

for node_type, count in autoscaler_summary.pending_launches:
for node_type, count in autoscaler_summary.pending_launches.items():
pending_node_count[node_type] += count

for node_type in node_types:
Expand Down

0 comments on commit 142b462

Please sign in to comment.