class_docstr: Scorer that runs a custom metric for the vision classification task.
  
  Custom scorers can be passed to all model evaluation related checks as can be seen in the example below.
  
  Parameters
  ----------
  scorer : t.Union[str, t.Callable]
      sklearn scorer name or deepchecks supported string o rcallable
  
  Returns
  -------
  scorer: DeepcheckScorer
      An initialized DeepcheckScorer.
  
  Examples
  --------
  >>> from sklearn.metrics import make_scorer, cohen_kappa_score
  ... from deepchecks.vision.metrics_utils.custom_scorer import CustomClassificationScorer
  ... from deepchecks.vision.checks.model_evaluation import SingleDatasetPerformance
  ... from deepchecks.vision.datasets.classification import mnist_torch as mnist
  ...
  ... mnist_model = mnist.load_model()
  ... test_ds = mnist.load_dataset(root='Data', object_type='VisionData')
  ...
  >>> ck = CustomClassificationScorer(make_scorer(cohen_kappa_score))
  ...
  >>> check = SingleDatasetPerformance(scorers={'cohen_kappa_score': ck})
  ... check.run(test_ds, mnist_model).value
class_docstr_tok: ["Scorer","that","runs","a","custom","metric","for","the","vision","classification","task",".","Custom","scorers","can","be","passed","to","all","model","evaluation","related","checks","as","can","be","seen","in","the","example","below",".","Parameters","--","--","--","--","--","scorer",":","t.Union","[","str",",","t.Callable","]","sklearn","scorer","name","or","deepchecks","supported","string","o","rcallable","Returns","--","--","--","-","scorer",":","DeepcheckScorer","An","initialized","DeepcheckScorer",".","Examples","--","--","--","--",">",">",">","from","sklearn.metrics","import","make_scorer",",","cohen_kappa_score","...","from","deepchecks.vision.metrics_utils.custom_scorer","import","CustomClassificationScorer","...","from","deepchecks.vision.checks.model_evaluation","import","SingleDatasetPerformance","...","from","deepchecks.vision.datasets.classification","import","mnist_torch","as","mnist","...","...","mnist_model","=","mnist.load_model","(",")","...","test_ds","=","mnist.load_dataset","(","root='Data","'",",","object_type='VisionData","'",")","...",">",">",">","ck","=","CustomClassificationScorer","(","make_scorer","(","cohen_kappa_score",")",")","...",">",">",">","check","=","SingleDatasetPerformance","(","scorers=","{","'cohen_kappa_score","'",":","ck","}",")","...","check.run","(","test_ds",",","mnist_model",")",".value"]
docstr: Update metric with batch of samples.
docstr_tok: ["Update","metric","with","batch","of","samples","."]
code: def update(self, output):
      """Update metric with batch of samples."""
      y_proba, y = output
      self._y_proba.append(object_to_numpy(y_proba))
      self._y.append(object_to_numpy(y))
  
file_path: deepchecks/deepchecks/vision/metrics_utils/custom_scorer.py
imports: import typing
  import numpy
  import pandas
  from ignite.metrics import Metric
  from ignite.metrics.metric import reinit__is_reduced, sync_all_reduce
  from deepchecks.tabular import Dataset
  from deepchecks.tabular.context import _DummyModel
  from deepchecks.tabular.metric_utils import DeepcheckScorer
  from deepchecks.vision.vision_data.utils import object_to_numpy
label_desc: Use image node_id 3 for calling the CustomClassificationScorer obj's underlying member method code with example usage: obj.update(output) without return types