class_docstr: Class for system usage utilization monitoring.
  
  It keeps track of CPU, RAM, GPU, VRAM usage (each gpu separately) by
  pinging for information every x seconds in a separate thread.
  
  Requires psutil and GPUtil to be installed. Can be enabled with
  Tuner(param_space={"log_sys_usage": True}).
class_docstr_tok: ["Class","for","system","usage","utilization","monitoring",".","It","keeps","track","of","CPU",",","RAM",",","GPU",",","VRAM","usage","(","each","gpu","separately",")","by","pinging","for","information","every","x","seconds","in","a","separate","thread",".","Requires","psutil","and","GPUtil","to","be","installed",".","Can","be","enabled","with","Tuner","(","param_space=","{","``","log_sys_usage","''",":","True","}",")","."]
code: def __init__(self, start=True, delay=0.7):
      self.stopped = True
      GPUtil = _import_gputil()
      self.GPUtil = GPUtil
      if GPUtil is None and start:
          logger.warning("Install gputil for GPU system monitoring.")
  
      if psutil is None and start:
          logger.warning(
              "Install psutil to monitor system performance."
          )
  
      if GPUtil is None and psutil is None:
          return
  
      super(UtilMonitor, self).__init__()
      self.delay = delay  # Time between calls to GPUtil
      self.values = defaultdict(list)
      self.lock = threading.Lock()
      self.daemon = True
      if start:
          self.start()
  
imports: import copy
  import glob
  import inspect
  import logging
  import os
  import threading
  import time
  from collections import defaultdict
  from datetime import datetime
  from numbers import Number
  from threading import Thread
  from typing import Any, Callable, Dict, List, Optional, Sequence, Type, Union
  import numpy
  import psutil
  import ray
  from ray.util.annotations import DeveloperAPI, PublicAPI
  from ray.air._internal.json import SafeFallbackEncoder
  from ray.air._internal.util import is_nan, is_nan_or_inf
  from ray._private.dict import merge_dicts, deep_update, flatten_dict, unflatten_dict, unflatten_list_dict, unflattened_lookup
label_desc: Use image node_id 1 to create a new UtilMonitor object from inherited base classes: Thread with example: obj = UtilMonitor(start, delay)