class_docstr: Simple logger that buffers data in-memory.
  
  Example:
          from torchtnt.utils.loggers import InMemoryLogger
          logger = InMemoryLogger()
          logger.log("accuracy", 23.56, 10)
          logger.close()
class_docstr_tok: ["Simple","logger","that","buffers","data","in-memory",".","Example",":","from","torchtnt.utils.loggers","import","InMemoryLogger","logger","=","InMemoryLogger","(",")","logger.log","(","``","accuracy","''",",","23.56",",","10",")","logger.close","(",")"]
docstr: Directly access the buffer.
docstr_tok: ["Directly","access","the","buffer","."]
code: def log_buffer(self) -> Dict[int, Dict[str, float]]:
      """Directly access the buffer."""
  
      return self._log_buffer
  
file_path: tnt/torchtnt/utils/loggers/in_memory.py
imports: import atexit
  import logging
  from collections import OrderedDict
  from time import monotonic
  from typing import Dict, Mapping
  from torchtnt.utils.loggers.logger import MetricLogger, Scalar
  from torchtnt.utils.loggers.utils import scalar_to_float
label_desc: Use image node_id 2 for calling the InMemoryLogger obj's underlying member method code with example usage: obj.log_buffer() and returns: self