class_docstr: Logs parameter and run information throughout into a file during
  optimization.
  
  Parameters
  ----------
  filepath: str or pathlib.Path
      the path to dump data to
  append: bool
      whether to append the file (otherwise it replaces it)
  order: int
      order of the internal/model parameters to extract
  
  Example
  -------
  
  .. code-block:: python
  
      logger = ParametersLogger(filepath)
      optimizer.register_callback("tell",  logger)
      optimizer.minimize()
      list_of_dict_of_data = logger.load()
  
  Note
  ----
  Arrays are converted to lists
class_docstr_tok: ["Logs","parameter","and","run","information","throughout","into","a","file","during","optimization",".","Parameters","--","--","--","--","--","filepath",":","str","or","pathlib.Path","the","path","to","dump","data","to","append",":","bool","whether","to","append","the","file","(","otherwise","it","replaces","it",")","order",":","int","order","of","the","internal\/model","parameters","to","extract","Example","--","--","--","-","..","code-block",":",":","python","logger","=","ParametersLogger","(","filepath",")","optimizer.register_callback","(","``","tell","''",",","logger",")","optimizer.minimize","(",")","list_of_dict_of_data","=","logger.load","(",")","Note","--","--","Arrays","are","converted","to","lists"]
docstr: Loads data from the log file, and splits lists (arrays) into multiple arguments
  
  Parameters
  ----------
  max_list_elements: int
      Maximum number of elements displayed from the array, each element is given a
      unique id of type list_name#i0_i1_...
code: def load_flattened(
      self, max_list_elements: int = 24
  ) -> tp.List[tp.Dict[str, tp.Any]]:
      """Loads data from the log file, and splits lists (arrays) into multiple arguments
  
      Parameters
      ----------
      max_list_elements: int
          Maximum number of elements displayed from the array, each element is given a
          unique id of type list_name#i0_i1_...
      """
      data = self.load()
      flat_data: tp.List[tp.Dict[str, tp.Any]] = []
      for element in data:
          list_keys = {
              key
              for key, val in element.items()
              if isinstance(val, list)
          }
          flat_data.append(
              {
                  key: val
                  for key, val in element.items()
                  if key not in list_keys
              }
          )
          for key in list_keys:
              for k, (indices, value) in enumerate(
                  np.ndenumerate(element[key])
              ):
                  if k >= max_list_elements:
                      break
                  flat_data[-1][
                      key + "#" + "_".join(str(i) for i in indices)
                  ] = value
      return flat_data
  
imports: import json
  import time
  import warnings
  import inspect
  import datetime
  import logging
  from pathlib import Path
  import numpy
  import nevergrad.common.typing
  from nevergrad.common import errors
  from nevergrad.parametrization import parameter
  from nevergrad.parametrization import helpers
  from .None import base
label_desc: Use image node_id 4 for calling the ParametersLogger obj's underlying member method code with example usage: obj.load_flattened(max_list_elements) and returns: flat_data