Change memory monitor warning to a logging call (#8137)

This commit is contained in:
Nick Matthews
2020-04-23 00:29:18 -04:00
committed by GitHub
parent 51559c08b9
commit a9d8d16b6b
+4 -4
View File
@@ -92,10 +92,10 @@ class MemoryMonitor:
except IOError:
self.cgroup_memory_limit_gb = sys.maxsize / (1024**3)
if not psutil:
print("WARNING: Not monitoring node memory since `psutil` is not "
"installed. Install this with `pip install psutil` "
"(or ray[debug]) to enable debugging of memory-related "
"crashes.")
logger.warn("WARNING: Not monitoring node memory since `psutil` "
"is not installed. Install this with "
"`pip install psutil` (or ray[debug]) to enable "
"debugging of memory-related crashes.")
def set_heap_limit(self, worker_name, limit_bytes):
self.heap_limit = limit_bytes