parameters: (self)
return_statement: return self.devices
docstring: Return a dictionary of device information
  
          :return:
docstring_summary: Return a dictionary of device information
docstring_tokens: Return a dictionary of device information
function: def __get_devices_info(self):
          """
          Return a dictionary of device information
  
          :return:
          """
          import cpuinfo
          gpu_devices = []
          try:
              nvidia = NvidiaGPUs()
              for gpu_info in nvidia.probe_all_gpus():
                  gpu_info['type'] = 'nvidia'
                  gpu_devices.append(gpu_info)
          except FileNotFoundError as e:
              # self._log("NVIDIA GPU support not available", level="debug")
              pass
          if not self.devices:
              self.devices = {
                  "cpu_info": cpuinfo.get_cpu_info(),
                  "gpu_info": gpu_devices,
              }
          return self.devices
function_tokens: def __get_devices_info ( self ) : import cpuinfo gpu_devices = [ ] try : nvidia = NvidiaGPUs ( ) for gpu_info in nvidia . probe_all_gpus ( ) : gpu_info [ 'type' ] = 'nvidia' gpu_devices . append ( gpu_info ) except FileNotFoundError as e : # self._log("NVIDIA GPU support not available", level="debug") pass if not self . devices : self . devices = { "cpu_info" : cpuinfo . get_cpu_info ( ) , "gpu_info" : gpu_devices , } return self . devices