class_docstr: A logger to relay information logged by composer models to ray.
  
  This logger allows utilizing all necessary logging and logged data handling provided
  by the Composer library. All the logged information is saved in the data dictionary
  every time a new information is logged, but to reduce unnecessary reporting, the
  most up-to-date logged information is reported as metrics every batch checkpoint and
  epoch checkpoint (see Composer's Event module for more details).
  
  Because ray's metric dataframe will not include new keys that is reported after the
  very first report call, any logged information with the keys not included in the
  first batch checkpoint would not be retrievable after training. In other words, if
  the log level is greater than `LogLevel.BATCH` for some data, they would not be
  present in `Result.metrics_dataframe`. To allow preserving those information, the
  user can provide keys to be always included in the reported data by using `keys`
  argument in the constructor. For `MosaicTrainer`, use
  `trainer_init_config['log_keys']` to populate these keys.
  
  Note that in the Event callback functions, we remove unused variables, as this is
  practiced in Mosaic's composer library.
  
  Args:
      keys: the key values that will be included in the reported metrics.
class_docstr_tok: ["A","logger","to","relay","information","logged","by","composer","models","to","ray",".","This","logger","allows","utilizing","all","necessary","logging","and","logged","data","handling","provided","by","the","Composer","library",".","All","the","logged","information","is","saved","in","the","data","dictionary","every","time","a","new","information","is","logged",",","but","to","reduce","unnecessary","reporting",",","the","most","up-to-date","logged","information","is","reported","as","metrics","every","batch","checkpoint","and","epoch","checkpoint","(","see","Composer","'s","Event","module","for","more","details",")",".","Because","ray","'s","metric","dataframe","will","not","include","new","keys","that","is","reported","after","the","very","first","report","call",",","any","logged","information","with","the","keys","not","included","in","the","first","batch","checkpoint","would","not","be","retrievable","after","training",".","In","other","words",",","if","the","log","level","is","greater","than","`","LogLevel.BATCH","`","for","some","data",",","they","would","not","be","present","in","`","Result.metrics_dataframe","`",".","To","allow","preserving","those","information",",","the","user","can","provide","keys","to","be","always","included","in","the","reported","data","by","using","`","keys","`","argument","in","the","constructor",".","For","`","MosaicTrainer","`",",","use","`","trainer_init_config","[","'log_keys","'","]","`","to","populate","these","keys",".","Note","that","in","the","Event","callback","functions",",","we","remove","unused","variables",",","as","this","is","practiced","in","Mosaic","'s","composer","library",".","Args",":","keys",":","the","key","values","that","will","be","included","in","the","reported","metrics","."]
code: def __init__(self, keys: Optional[List[str]] = None) -> None:
      self.data = {}
      # report at fit end only if there are additional training batches run after the
      # last epoch checkpoint report
      self.should_report_fit_end = False
      if keys:
          for key in keys:
              self.data[key] = None
  
file_path: ray/python/ray/train/mosaic/_mosaic_utils.py
imports: from typing import Any, Dict, List, Optional
  import torch
  from composer.core.state import State
  from composer.loggers import Logger
  from composer.loggers.logger_destination import LoggerDestination
  import ray.train
label_desc: Use image node_id 1 to create a new RayLogger object from inherited base classes: LoggerDestination with example: obj = RayLogger(keys)