class_docstr: Memory profiler hook recording memory information including virtual
  memory, swap memory, and the memory of the current process.
  
  Args:
      interval (int): Checking interval (every k iterations).
          Default: 50.
class_docstr_tok: ["Memory","profiler","hook","recording","memory","information","including","virtual","memory",",","swap","memory",",","and","the","memory","of","the","current","process",".","Args",":","interval","(","int",")",":","Checking","interval","(","every","k","iterations",")",".","Default",":","50","."]
docstr: Regularly record memory information.
  
  Args:
      runner (:obj:`Runner`): The runner of the training or evaluation
          process.
docstr_tok: ["Regularly","record","memory","information",".","Args",":","runner","(",":","obj",":","`","Runner","`",")",":","The","runner","of","the","training","or","evaluation","process","."]
code: def _record_memory_information(self, runner: Runner) -> None:
      """Regularly record memory information.
  
      Args:
          runner (:obj:`Runner`): The runner of the training or evaluation
              process.
      """
      # in Byte
      virtual_memory = self._virtual_memory()
      swap_memory = self._swap_memory()
      # in MB
      process_memory = self._memory_usage()[0]
      factor = 1024 * 1024
      runner.logger.info(
          "Memory information "
          "available_memory: "
          f"{round(virtual_memory.available / factor)} MB, "
          "used_memory: "
          f"{round(virtual_memory.used / factor)} MB, "
          f"memory_utilization: {virtual_memory.percent} %, "
          "available_swap_memory: "
          f"{round((swap_memory.total - swap_memory.used) / factor)}"
          " MB, "
          f"used_swap_memory: {round(swap_memory.used / factor)} MB, "
          f"swap_memory_utilization: {swap_memory.percent} %, "
          "current_process_memory: "
          f"{round(process_memory)} MB"
      )
  
file_path: mmdetection/mmdet/engine/hooks/memory_profiler_hook.py
imports: from typing import Optional, Sequence
  from mmengine.hooks import Hook
  from mmengine.runner import Runner
  from mmdet.registry import HOOKS
  from mmdet.structures import DetDataSample
label_desc: Use image node_id 2 for calling the MemoryProfilerHook obj's underlying member method code with example usage: obj._record_memory_information(runner) without return types