class_docstr: The client monitor watches the cluster status.
  
  Attributes:
      status (dict): A dict to store workers status and clients status.
class_docstr_tok: ["The","client","monitor","watches","the","cluster","status",".","Attributes",":","status","(","dict",")",":","A","dict","to","store","workers","status","and","clients","status","."]
docstr: Update a worker status.
  
  Args:
      update_status (dict): worker updated status information 
                          (vacant_memory, used_memory, load_time, load_value).
      worker_address (str): worker ip address.
      vacant_cpus (int): the number of available CPUs.
      total_cpus (int): total cpu number.
      vacant_gpus (int): the number of available GPUs.
      total_gpus (int): total gpu number.
docstr_tok: ["Update","a","worker","status",".","Args",":","update_status","(","dict",")",":","worker","updated","status","information","(","vacant_memory",",","used_memory",",","load_time",",","load_value",")",".","worker_address","(","str",")",":","worker","ip","address",".","vacant_cpus","(","int",")",":","the","number","of","available","CPUs",".","total_cpus","(","int",")",":","total","cpu","number",".","vacant_gpus","(","int",")",":","the","number","of","available","GPUs",".","total_gpus","(","int",")",":","total","gpu","number","."]
code: def update_worker_status(
      self,
      update_status,
      worker_address,
      vacant_cpus,
      total_cpus,
      vacant_gpus,
      total_gpus,
  ):
      """Update a worker status.
  
      Args:
          update_status (dict): worker updated status information
                              (vacant_memory, used_memory, load_time, load_value).
          worker_address (str): worker ip address.
          vacant_cpus (int): the number of available CPUs.
          total_cpus (int): total cpu number.
          vacant_gpus (int): the number of available GPUs.
          total_gpus (int): total gpu number.
      """
      self.lock.acquire()
      worker_status = self.status["workers"][worker_address]
      worker_status["vacant_memory"] = update_status["vacant_memory"]
      worker_status["used_memory"] = update_status["used_memory"]
      worker_status["vacant_gpu_memory"] = update_status[
          "vacant_gpu_memory"
      ]
      worker_status["used_gpu_memory"] = update_status[
          "used_gpu_memory"
      ]
      worker_status["load_time"].append(update_status["load_time"])
      worker_status["load_value"].append(update_status["load_value"])
  
      worker_status["vacant_cpus"] = vacant_cpus
      worker_status["used_cpus"] = total_cpus - vacant_cpus
  
      worker_status["vacant_gpus"] = vacant_gpus
      worker_status["used_gpus"] = total_gpus - vacant_gpus
      self.lock.release()
  
file_path: PARL/parl/remote/cluster_monitor.py
imports: import cloudpickle
  import threading
  from collections import defaultdict, deque
  from parl.utils import to_str
label_desc: Use image node_id 5 for calling the ClusterMonitor obj's underlying member method code with example usage: obj.update_worker_status(update_status, worker_address, vacant_cpus, total_cpus, vacant_gpus, total_gpus) without return types