Skip to content

Commit

Permalink
[Dashboard] Fix dashboard NodeHead._update_node_stats check failure (#…
Browse files Browse the repository at this point in the history
…48746)

Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com>
  • Loading branch information
jjyao authored Nov 14, 2024
1 parent 0b38051 commit 2e953d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
9 changes: 3 additions & 6 deletions python/ray/dashboard/modules/node/node_head.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,18 +442,15 @@ async def _update_node_stats(self):
# from another async task)
current_stub_node_id_tuples = list(self._stubs.items())

if current_stub_node_id_tuples:
node_ids, _ = zip(*current_stub_node_id_tuples)
else:
node_ids = []

node_ids = []
get_node_stats_tasks = []

for i, (node_id, stub) in enumerate(current_stub_node_id_tuples):
for _, (node_id, stub) in enumerate(current_stub_node_id_tuples):
node_info = DataSource.nodes.get(node_id)
if node_info["state"] != "ALIVE":
continue

node_ids.append(node_id)
get_node_stats_tasks.append(
stub.GetNodeStats(
node_manager_pb2.GetNodeStatsRequest(
Expand Down
1 change: 1 addition & 0 deletions python/ray/dashboard/modules/node/tests/test_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ def _check_nodes():
assert detail["raylet"]["state"] == "ALIVE"
else:
assert detail["raylet"]["state"] == "DEAD"
assert detail["raylet"].get("objectStoreAvailableMemory", 0) == 0
response = requests.get(webui_url + "/test/dump?key=agents")
response.raise_for_status()
agents = response.json()
Expand Down

0 comments on commit 2e953d3

Please sign in to comment.