class_docstr: An observer that collects and accumulates scalars from env's info.
class_docstr_tok: ["An","observer","that","collects","and","accumulates","scalars","from","env","'s","info","."]
code: def _accumulate_metrics(self, env: dm_env.Environment) -> None:
      if not hasattr(env, "get_info"):
          return
      info = getattr(env, "get_info")()
      if not info:
          return
      for k, v in info.items():
          if np.isscalar(v):
              self._metrics[k] = self._metrics.get(k, 0) + v
  
file_path: acme/acme/utils/observers/env_info.py
imports: from typing import Dict
  from acme.utils.observers import base
  import dm_env
  import numpy
label_desc: Use image node_id 2 for calling the EnvInfoObserver obj's underlying member method code with example usage: obj._accumulate_metrics(env) without return types