mirror of
https://github.com/vale981/ray
synced 2025-03-06 02:21:39 -05:00
Stop dashboard from erroring when an actor does not have a corresponding core worker (#11870)
This commit is contained in:
parent
2feba4409c
commit
368b14a0da
1 changed files with 14 additions and 13 deletions
|
@ -229,23 +229,24 @@ class DataOrganizer:
|
|||
# TODO(fyrestone): remove this, give a link from actor
|
||||
# info to worker info in front-end.
|
||||
node_id = actor["address"]["rayletId"]
|
||||
pid = core_worker_stats["pid"]
|
||||
pid = core_worker_stats.get("pid")
|
||||
node_physical_stats = DataSource.node_physical_stats.get(node_id, {})
|
||||
|
||||
actor_process_stats = None
|
||||
for process_stats in node_physical_stats.get("workers"):
|
||||
if process_stats["pid"] == pid:
|
||||
actor_process_stats = process_stats
|
||||
break
|
||||
|
||||
actor_process_gpu_stats = None
|
||||
for gpu_stats in node_physical_stats.get("gpus"):
|
||||
for process in gpu_stats.get("processes", []):
|
||||
if process["pid"] == pid:
|
||||
actor_process_gpu_stats = gpu_stats
|
||||
if pid:
|
||||
for process_stats in node_physical_stats.get("workers"):
|
||||
if process_stats["pid"] == pid:
|
||||
actor_process_stats = process_stats
|
||||
break
|
||||
if actor_process_gpu_stats is not None:
|
||||
break
|
||||
|
||||
for gpu_stats in node_physical_stats.get("gpus"):
|
||||
for process in gpu_stats.get("processes", []):
|
||||
if process["pid"] == pid:
|
||||
actor_process_gpu_stats = gpu_stats
|
||||
break
|
||||
if actor_process_gpu_stats is not None:
|
||||
break
|
||||
|
||||
actor["gpus"] = actor_process_gpu_stats
|
||||
actor["processStats"] = actor_process_stats
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue