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 method for local calculation.
  
  Override this method to run its local calculation.  Otherwise,
  results are calculated with original target and test dataset.
  
  Args:
      args:
          Result of converter when it is tuple.
      kwargs:
          Result of converter when it is dict.
  
  Returns:
      Arbrary value may be returned, but must not be ``None``.
docstr_tok: ["A","generic","method","for","local","calculation",".","Override","this","method","to","run","its","local","calculation",".","Otherwise",",","results","are","calculated","with","original","target","and","test","dataset",".","Args",":","args",":","Result","of","converter","when","it","is","tuple",".","kwargs",":","Result","of","converter","when","it","is","dict",".","Returns",":","Arbrary","value","may","be","returned",",","but","must","not","be","``","None","``","."]
code: def calc_local(self, *args, **kwargs):
      """A generic method for local calculation.
  
      Override this method to run its local calculation.  Otherwise,
      results are calculated with original target and test dataset.
  
      Args:
          args:
              Result of converter when it is tuple.
          kwargs:
              Result of converter when it is dict.
  
      Returns:
          Arbrary value may be returned, but must not be ``None``.
  
      """
      target = self._targets["main"]
      return target(*args, **kwargs)
  
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 3 for calling the GenericMultiNodeEvaluator obj's underlying member method code with example usage: obj.calc_local() and returns: target