class_docstr: Manager that fetches ray cluster resources info. This class should only be used within a ray cluster.
class_docstr_tok: ["Manager","that","fetches","ray","cluster","resources","info",".","This","class","should","only","be","used","within","a","ray","cluster","."]
docstr: Get value of resources available in the cluster.
  
  Parameter
  ---------
  key: str
      The key of the value you want to get, i.e. CPU
  default_val: Union[int, float]
      Default value to get if key not available in the cluster
docstr_tok: ["Get","value","of","resources","available","in","the","cluster",".","Parameter","--","--","--","--","-","key",":","str","The","key","of","the","value","you","want","to","get",",","i.e",".","CPU","default_val",":","Union","[","int",",","float","]","Default","value","to","get","if","key","not","available","in","the","cluster"]
code: def _get_cluster_resources(
      key: str, default_val: Union[int, float] = 0
  ):
      """
      Get value of resources available in the cluster.
  
      Parameter
      ---------
      key: str
          The key of the value you want to get, i.e. CPU
      default_val: Union[int, float]
          Default value to get if key not available in the cluster
      """
      try_import_ray()
      import ray
  
      RayResourceManager._init_ray()
      return ray.cluster_resources().get(key, default_val)
  
imports: import logging
  import multiprocessing
  import os
  import shutil
  import subprocess
  from typing import Union
  from autogluon.common.utils.try_import import try_import_ray
  from .distribute_utils import DistributedContext
  from .lite import disable_if_lite_mode
  from .utils import bytes_to_mega_bytes
label_desc: Use image node_id 2 for calling the RayResourceManager obj's underlying member method code with example usage: obj._get_cluster_resources(key, default_val) and returns: ray