class_docstr: PyTorch Ignite handler to prune unpromising trials.
  
  See `the example <https://github.com/optuna/optuna-examples/blob/main/
  pytorch/pytorch_ignite_simple.py>`__
  if you want to add a pruning handler which observes validation accuracy.
  
  Args:
      trial:
          A :class:`~optuna.trial.Trial` corresponding to the current evaluation of the
          objective function.
      metric:
          A name of metric for pruning, e.g., ``accuracy`` and ``loss``.
      trainer:
          A trainer engine of PyTorch Ignite. Please refer to `ignite.engine.Engine reference
          <https://pytorch.org/ignite/engine.html#ignite.engine.Engine>`_ for further details.
class_docstr_tok: ["PyTorch","Ignite","handler","to","prune","unpromising","trials",".","See","`","the","example","<","https",":","\/\/github.com\/optuna\/optuna-examples\/blob\/main\/","pytorch\/pytorch_ignite_simple.py",">","`","__","if","you","want","to","add","a","pruning","handler","which","observes","validation","accuracy",".","Args",":","trial",":","A",":","class",":","`","~optuna.trial.Trial","`","corresponding","to","the","current","evaluation","of","the","objective","function",".","metric",":","A","name","of","metric","for","pruning",",","e.g.",",","``","accuracy","``","and","``","loss","``",".","trainer",":","A","trainer","engine","of","PyTorch","Ignite",".","Please","refer","to","`","ignite.engine.Engine","reference","<","https",":","\/\/pytorch.org\/ignite\/engine.html","#","ignite.engine.Engine",">","`","_","for","further","details","."]
code: def __call__(self, engine: "Engine") -> None:
      score = engine.state.metrics[self._metric]
      self._trial.report(score, self._trainer.state.epoch)
      if self._trial.should_prune():
          message = "Trial was pruned at {} epoch.".format(
              self._trainer.state.epoch
          )
          raise optuna.TrialPruned(message)
  
imports: import optuna
  from optuna.trial import Trial
label_desc: Use image node_id 2 for calling the PyTorchIgnitePruningHandler obj's underlying member method code with example usage: obj.__call__(engine) without return types