class_docstr: Logs results to progress.csv under the trial directory.
  
  Automatically flattens nested dicts in the result dict before writing
  to csv:
  
      {"a": {"b": 1, "c": 2}} -> {"a/b": 1, "a/c": 2}
class_docstr_tok: ["Logs","results","to","progress.csv","under","the","trial","directory",".","Automatically","flattens","nested","dicts","in","the","result","dict","before","writing","to","csv",":","{","``","a","''",":","{","``","b","''",":","1",",","``","c","''",":","2","}","}","-",">","{","``","a\/b","''",":","1",",","``","a\/c","''",":","2","}"]
docstr: CSV outputted with Headers as first set of results.
docstr_tok: ["CSV","outputted","with","Headers","as","first","set","of","results","."]
code: def _maybe_init(self):
      """CSV outputted with Headers as first set of results."""
      if not self._initialized:
          progress_file = os.path.join(self.logdir, EXPR_PROGRESS_FILE)
          self._continuing = (
              os.path.exists(progress_file)
              and os.path.getsize(progress_file) > 0
          )
          self._file = open(progress_file, "a")
          self._csv_out = None
          self._initialized = True
  
imports: import csv
  import logging
  import os
  from typing import TYPE_CHECKING, Dict, TextIO
  from ray.air.constants import EXPR_PROGRESS_FILE
  from ray.tune.logger.logger import _LOGGER_DEPRECATION_WARNING, Logger, LoggerCallback
  from ray.tune.utils import flatten_dict
  from ray.util.annotations import Deprecated, PublicAPI
label_desc: Use image node_id 2 for calling the CSVLogger obj's underlying member method code with example usage: obj._maybe_init() without return types