class_docstr: Generic multi-node evaluator for non-allreducable evaluation.
  
  This is to evaluate a Dataset that cannot evenly divided across
  all processes in the communicator, for evaluation calculation that
  is not applicable to a simple add-and-devide style averaging among
  processes.
  
  Users are recommeneded to implement its own local calculation
  ``calc_local()`` (e.g.  at each distributed GPU) and aggregation
  ``aggregate()`` of its results. Although it has built-in
  implementaiton of those two methods.
  
  It has several drawbacks; 1) Additional implementation of
  aggregation required to users, and 2) no compatibility with
  :class:`~chainer.training.extensions.Evaluator`.
  
  .. note:: No automatic support of Reporter is provided; Set it up
     at ``initialize()`` method
  
  Args:
      comm:
          ChainerMN communicator object
      iterator:
          An iterator for test dataset. Must be non-repeated.
      target (callable):
          A model to evaluate with test dataset
      device (int or chainer.backend.Device):
          A device indicator to send data with converter. Not used
          when the converter is not using any devices.
      converter (callable):
          A converter. Default value is
          :func:`chainer.dataset.concat_examples` .
      root (int):
          Rank number of root process to run bcast and gather with.
      progress_hook (callable):
          A callable that receives single argument for indicators. The
          callable is only callled at root process.
class_docstr_tok: ["Generic","multi-node","evaluator","for","non-allreducable","evaluation",".","This","is","to","evaluate","a","Dataset","that","can","not","evenly","divided","across","all","processes","in","the","communicator",",","for","evaluation","calculation","that","is","not","applicable","to","a","simple","add-and-devide","style","averaging","among","processes",".","Users","are","recommeneded","to","implement","its","own","local","calculation","``","calc_local","(",")","``","(","e.g",".","at","each","distributed","GPU",")","and","aggregation","``","aggregate","(",")","``","of","its","results",".","Although","it","has","built-in","implementaiton","of","those","two","methods",".","It","has","several","drawbacks",";","1",")","Additional","implementation","of","aggregation","required","to","users",",","and","2",")","no","compatibility","with",":","class",":","`","~chainer.training.extensions.Evaluator","`",".","..","note",":",":","No","automatic","support","of","Reporter","is","provided",";","Set","it","up","at","``","initialize","(",")","``","method","Args",":","comm",":","ChainerMN","communicator","object","iterator",":","An","iterator","for","test","dataset",".","Must","be","non-repeated",".","target","(","callable",")",":","A","model","to","evaluate","with","test","dataset","device","(","int","or","chainer.backend.Device",")",":","A","device","indicator","to","send","data","with","converter",".","Not","used","when","the","converter","is","not","using","any","devices",".","converter","(","callable",")",":","A","converter",".","Default","value","is",":","func",":","`","chainer.dataset.concat_examples","`",".","root","(","int",")",":","Rank","number","of","root","process","to","run","bcast","and","gather","with",".","progress_hook","(","callable",")",":","A","callable","that","receives","single","argument","for","indicators",".","The","callable","is","only","callled","at","root","process","."]
docstr: A generic aggregation method.
  
  Override this method for original aggregation calculation. By
  default, it just does nothing but returns the input. This
  method is called once and only once across the cluster, at
  root process. Reporting can be run here.
  
  Args:
      results (list):
          List of return value of ``calc_local()`` obtained from
          all nodes..
docstr_tok: ["A","generic","aggregation","method",".","Override","this","method","for","original","aggregation","calculation",".","By","default",",","it","just","does","nothing","but","returns","the","input",".","This","method","is","called","once","and","only","once","across","the","cluster",",","at","root","process",".","Reporting","can","be","run","here",".","Args",":","results","(","list",")",":","List","of","return","value","of","``","calc_local","(",")","``","obtained","from","all","nodes",".."]
code: def aggregate(self, results):
      """A generic aggregation method.
  
      Override this method for original aggregation calculation. By
      default, it just does nothing but returns the input. This
      method is called once and only once across the cluster, at
      root process. Reporting can be run here.
  
      Args:
          results (list):
              List of return value of ``calc_local()`` obtained from
              all nodes..
  
      """
      return results
  
file_path: chainer/chainermn/extensions/multi_node_evaluator.py
imports: import copy
  import six
  from chainer.training import extension
  from chainer import backend
  from chainer.dataset import convert
  from chainer import function
  from chainer.utils import argument
  import chainerx
label_desc: Use image node_id 4 for calling the GenericMultiNodeEvaluator obj's underlying member method code with example usage: obj.aggregate(results) and returns: results