mirror of
https://github.com/vale981/ray
synced 2025-03-06 02:21:39 -05:00
[Dashboard] Defensive change to make sure we do not iterate over "None" in the case that workers is not present in node physical stats for a given node (#12358)
This commit is contained in:
parent
dc55f6ba3a
commit
2e95552f0c
1 changed files with 2 additions and 2 deletions
|
@ -240,12 +240,12 @@ class DataOrganizer:
|
|||
actor_process_stats = None
|
||||
actor_process_gpu_stats = None
|
||||
if pid:
|
||||
for process_stats in node_physical_stats.get("workers"):
|
||||
for process_stats in node_physical_stats.get("workers", []):
|
||||
if process_stats["pid"] == pid:
|
||||
actor_process_stats = process_stats
|
||||
break
|
||||
|
||||
for gpu_stats in node_physical_stats.get("gpus"):
|
||||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue