class_docstr: The `TextLogger` class provides logging facilities
  printed to a user specified file. The logger writes
  metric results after each training epoch, evaluation
  experience and at the end of the entire evaluation stream.
  
  .. note::
      To avoid an excessive amount of printed lines,
      this logger will **not** print results after
      each iteration. If the user is monitoring
      metrics which emit results after each minibatch
      (e.g., `MinibatchAccuracy`), only the last recorded
      value of such metrics will be reported at the end
      of the epoch.
  
  .. note::
      Since this logger works on the standard output,
      metrics producing images or more complex visualizations
      will be converted to a textual format suitable for
      console printing. You may want to add more loggers
      to your `EvaluationPlugin` to better support
      different formats.
class_docstr_tok: ["The","`","TextLogger","`","class","provides","logging","facilities","printed","to","a","user","specified","file",".","The","logger","writes","metric","results","after","each","training","epoch",",","evaluation","experience","and","at","the","end","of","the","entire","evaluation","stream",".","..","note",":",":","To","avoid","an","excessive","amount","of","printed","lines",",","this","logger","will","*","*","not","*","*","print","results","after","each","iteration",".","If","the","user","is","monitoring","metrics","which","emit","results","after","each","minibatch","(","e.g.",",","`","MinibatchAccuracy","`",")",",","only","the","last","recorded","value","of","such","metrics","will","be","reported","at","the","end","of","the","epoch",".","..","note",":",":","Since","this","logger","works","on","the","standard","output",",","metrics","producing","images","or","more","complex","visualizations","will","be","converted","to","a","textual","format","suitable","for","console","printing",".","You","may","want","to","add","more","loggers","to","your","`","EvaluationPlugin","`","to","better","support","different","formats","."]
code: def after_training_epoch(
      self,
      strategy: "SupervisedTemplate",
      metric_values: List["MetricValue"],
      **kwargs,
  ):
      super().after_training_epoch(strategy, metric_values, **kwargs)
      print(
          f"Epoch {strategy.clock.train_exp_epochs} ended.",
          file=self.file,
      )
      self.print_current_metrics()
      self.metric_vals = {}
  
imports: import datetime
  import sys
  import warnings
  from typing import List, TYPE_CHECKING, Tuple, Type, Optional, TextIO
  import torch
  from avalanche.core import SupervisedPlugin
  from avalanche.evaluation.metric_results import MetricValue, TensorImage
  from avalanche.logging import BaseLogger
  from avalanche.evaluation.metric_utils import stream_type, phase_and_task
label_desc: Use image node_id 7 for calling the TextLogger obj's underlying member method code with example usage: obj.after_training_epoch(strategy, metric_values) without return types