class_docstr: CSV logger.
  
  The `CSVLogger` logs accuracy and loss metrics into a csv file.
  Metrics are logged separately for training and evaluation in files
  training_results.csv and eval_results.csv, respectively.
  
  .. note::
  
      This Logger assumes that the user is evaluating
      on only **one** experience
      during training (see below for an example of a `train` call).
  
  Trough the `EvaluationPlugin`, the user should monitor at least
  EpochAccuracy/Loss and ExperienceAccuracy/Loss.
  If monitored, the logger will also record Experience Forgetting.
  In order to monitor the performance on held-out experience
  associated to the current training experience, set
  `eval_every=1` (or larger value) in the strategy constructor
  and pass the eval experience to the `train` method::
  
      `for i, exp in enumerate(benchmark.train_stream):`
          `strategy.train(exp, eval_streams=[benchmark.test_stream[i]])`
  
  The `strategy.eval` method should be called on the entire test stream for
  consistency, even if this is not strictly required.
  
  When not provided, validation loss and validation accuracy
  will be logged as zero.
  
  The training file header is composed of:
  training_exp_id, epoch, training_accuracy, val_accuracy,
  training_loss, val_loss.
  
  The evaluation file header is composed of:
  eval_exp, training_exp, eval_accuracy, eval_loss, forgetting
class_docstr_tok: ["CSV","logger",".","The","`","CSVLogger","`","logs","accuracy","and","loss","metrics","into","a","csv","file",".","Metrics","are","logged","separately","for","training","and","evaluation","in","files","training_results.csv","and","eval_results.csv",",","respectively",".","..","note",":",":","This","Logger","assumes","that","the","user","is","evaluating","on","only","*","*","one","*","*","experience","during","training","(","see","below","for","an","example","of","a","`","train","`","call",")",".","Trough","the","`","EvaluationPlugin","`",",","the","user","should","monitor","at","least","EpochAccuracy\/Loss","and","ExperienceAccuracy\/Loss",".","If","monitored",",","the","logger","will","also","record","Experience","Forgetting",".","In","order","to","monitor","the","performance","on","held-out","experience","associated","to","the","current","training","experience",",","set","`","eval_every=1","`","(","or","larger","value",")","in","the","strategy","constructor","and","pass","the","eval","experience","to","the","`","train","`","method",":",":","`","for","i",",","exp","in","enumerate","(","benchmark.train_stream",")",":","`","`","strategy.train","(","exp",",","eval_streams=","[","benchmark.test_stream","[","i","]","]",")","`","The","`","strategy.eval","`","method","should","be","called","on","the","entire","test","stream","for","consistency",",","even","if","this","is","not","strictly","required",".","When","not","provided",",","validation","loss","and","validation","accuracy","will","be","logged","as","zero",".","The","training","file","header","is","composed","of",":","training_exp_id",",","epoch",",","training_accuracy",",","val_accuracy",",","training_loss",",","val_loss",".","The","evaluation","file","header","is","composed","of",":","eval_exp",",","training_exp",",","eval_accuracy",",","eval_loss",",","forgetting"]
code: def close(self):
      self.training_file.close()
      self.eval_file.close()
  
file_path: avalanche/avalanche/logging/csv_logger.py
imports: from typing import List, TYPE_CHECKING
  import torch
  import os
  from avalanche.evaluation.metric_results import MetricValue
  from avalanche.logging import BaseLogger
  from avalanche.core import SupervisedPlugin
label_desc: Use image node_id 11 for calling the CSVLogger obj's underlying member method code with example usage: obj.close() without return types