From a9d8d16b6baf9ed215174e73507afabd8f00041c Mon Sep 17 00:00:00 2001 From: Nick Matthews <41437605+nmatthews-asapp@users.noreply.github.com> Date: Thu, 23 Apr 2020 00:29:18 -0400 Subject: [PATCH] Change memory monitor warning to a logging call (#8137) --- python/ray/memory_monitor.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/ray/memory_monitor.py b/python/ray/memory_monitor.py index e383ea9a6..b9c780209 100644 --- a/python/ray/memory_monitor.py +++ b/python/ray/memory_monitor.py @@ -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