class_docstr: Logs to terminal.
class_docstr_tok: ["Logs","to","terminal","."]
docstr: Initializes the logger.
  
  Args:
    label: label string to use when logging.
    print_fn: function to call which acts like print.
    serialize_fn: function to call which transforms values into a str.
    time_delta: How often (in seconds) to write values. This can be used to
      minimize terminal spam, but is 0 by default---ie everything is written.
docstr_tok: ["Initializes","the","logger",".","Args",":","label",":","label","string","to","use","when","logging",".","print_fn",":","function","to","call","which","acts","like","print",".","serialize_fn",":","function","to","call","which","transforms","values","into","a","str",".","time_delta",":","How","often","(","in","seconds",")","to","write","values",".","This","can","be","used","to","minimize","terminal","spam",",","but","is","0","by","default","--","-ie","everything","is","written","."]
code: def __init__(
      self,
      label: str = "",
      print_fn: Callable[[str], None] = logging.info,
      serialize_fn: Callable[[base.LoggingData], str] = serialize,
      time_delta: float = 0.0,
  ):
      """Initializes the logger.
  
      Args:
        label: label string to use when logging.
        print_fn: function to call which acts like print.
        serialize_fn: function to call which transforms values into a str.
        time_delta: How often (in seconds) to write values. This can be used to
          minimize terminal spam, but is 0 by default---ie everything is written.
      """
  
      self._print_fn = print_fn
      self._serialize_fn = serialize_fn
      self._label = label and f"[{_format_key(label)}] "
      self._time = time.time()
      self._time_delta = time_delta
  
file_path: acme/acme/utils/loggers/terminal.py
imports: import logging
  import time
  from typing import Any, Callable
  from acme.utils.loggers import base
  import numpy
label_desc: Use image node_id 1 to create a new TerminalLogger object from inherited base classes: base with example: obj = TerminalLogger(label, print_fn, serialize_fn, time_delta)