mirror of
https://github.com/wassname/ray.git
synced 2026-06-29 06:33:06 +08:00
Fixed: missing brackets when appending proc info on OutOfMemory (#5530)
* Fixed: missing brackets when appending proc info on OutOfMemory proc_stats.append was missing the set of brackets when adding a tuple to the list, which resulted in runtime error instead of correct Out of Memory message display. * Update memory_monitor.py
This commit is contained in:
@@ -43,7 +43,8 @@ class RayOutOfMemoryError(Exception):
|
||||
proc_stats = []
|
||||
for pid in pids:
|
||||
proc = psutil.Process(pid)
|
||||
proc_stats.append(get_rss(proc.memory_info()), pid, proc.cmdline())
|
||||
proc_stats.append((get_rss(proc.memory_info()), pid,
|
||||
proc.cmdline()))
|
||||
proc_str = "PID\tMEM\tCOMMAND"
|
||||
for rss, pid, cmdline in sorted(proc_stats, reverse=True)[:10]:
|
||||
proc_str += "\n{}\t{}GiB\t{}".format(
|
||||
|
||||
Reference in New Issue
Block a user