class_docstr: Keeper of structured log for intermediate values during sampling.
class_docstr_tok: ["Keeper","of","structured","log","for","intermediate","values","during","sampling","."]
docstr: Save the log to an npz file.
  
  Stores the log in structured form in an npz file. The resulting file can be
  extracted using unzip, which will write every leaf node to its own file in
  an equivalent directory structure.
  
  Args:
    path: the path of the npz file to which to save.
docstr_tok: ["Save","the","log","to","an","npz","file",".","Stores","the","log","in","structured","form","in","an","npz","file",".","The","resulting","file","can","be","extracted","using","unzip",",","which","will","write","every","leaf","node","to","its","own","file","in","an","equivalent","directory","structure",".","Args",":","path",":","the","path","of","the","npz","file","to","which","to","save","."]
code: def dump(self, path):
      """Save the log to an npz file.
  
      Stores the log in structured form in an npz file. The resulting file can be
      extracted using unzip, which will write every leaf node to its own file in
      an equivalent directory structure.
  
      Args:
        path: the path of the npz file to which to save.
      """
      dikt = {}
  
      def _compile_npz_dict(item, path):
          i, node = item
          if isinstance(node, _Section):
              for subitem in node.items:
                  _compile_npz_dict(
                      subitem,
                      os.path.join(path, "%s_%s" % (i, node.label)),
                  )
          else:
              for k, v in node.items():
                  dikt[os.path.join(path, "%s_%s" % (i, k))] = v
  
      _compile_npz_dict((0, self.root), "")
      with lib_util.atomic_file(path) as p:
          np.savez_compressed(p, **dikt)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import contextlib
  import os
  from magenta.models.coconet import lib_util
  import numpy
label_desc: Use image node_id 4 for calling the Logger obj's underlying member method code with example usage: obj.dump(path) without return types