class_docstr: Channel defines how to format and report the result of a PyText job to an output
  stream.
  
  Attributes:
      stages: in which stages the report will be triggered, default is all
          stages, which includes train, eval, test
class_docstr_tok: ["Channel","defines","how","to","format","and","report","the","result","of","a","PyText","job","to","an","output","stream",".","Attributes",":","stages",":","in","which","stages","the","report","will","be","triggered",",","default","is","all","stages",",","which","includes","train",",","eval",",","test"]
docstr: Defines how to format and report data to the output channel.
  
  Args:
      stage (Stage): train, eval or test
      epoch (int): current epoch
      metrics (Any): all metrics
      model_select_metric (double): a single numeric metric to pick best model
      loss (double): average loss
      preds (List[Any]): list of predictions
      targets (List[Any]): list of targets
      scores (List[Any]): list of scores
      context (Dict[str, List[Any]]): dict of any additional context data,
          each context is a list of data that maps to each example
docstr_tok: ["Defines","how","to","format","and","report","data","to","the","output","channel",".","Args",":","stage","(","Stage",")",":","train",",","eval","or","test","epoch","(","int",")",":","current","epoch","metrics","(","Any",")",":","all","metrics","model_select_metric","(","double",")",":","a","single","numeric","metric","to","pick","best","model","loss","(","double",")",":","average","loss","preds","(","List","[","Any","]",")",":","list","of","predictions","targets","(","List","[","Any","]",")",":","list","of","targets","scores","(","List","[","Any","]",")",":","list","of","scores","context","(","Dict","[","str",",","List","[","Any","]","]",")",":","dict","of","any","additional","context","data",",","each","context","is","a","list","of","data","that","maps","to","each","example"]
code: def report(
      self,
      stage,
      epoch,
      metrics,
      model_select_metric,
      loss,
      preds,
      targets,
      scores,
      context,
      *args,
  ):
      """
      Defines how to format and report data to the output channel.
  
      Args:
          stage (Stage): train, eval or test
          epoch (int): current epoch
          metrics (Any): all metrics
          model_select_metric (double): a single numeric metric to pick best model
          loss (double): average loss
          preds (List[Any]): list of predictions
          targets (List[Any]): list of targets
          scores (List[Any]): list of scores
          context (Dict[str, List[Any]]): dict of any additional context data,
              each context is a list of data that maps to each example
      """
      raise NotImplementedError()
  
imports: import csv
  import sys
  import traceback
  from typing import Tuple
  import numpy
  import torch
  from numpy import linalg
  from pytext.common.constants import Stage
  from pytext.utils.file_io import PathManager
  from torch.utils.tensorboard import SummaryWriter
label_desc: Use image node_id 2 for calling the Channel obj's underlying member method code with example usage: obj.report(stage, epoch, metrics, model_select_metric, loss, preds, targets, scores, context) without return types