class_docstr: Base class for scoring.
  
  Subclass and implement an ``on_*`` method before using.
class_docstr_tok: ["Base","class","for","scoring",".","Subclass","and","implement","an","``","on_","*","``","method","before","using","."]
docstr: Resolve scoring and apply it to data. Use cached prediction
  instead of running inference again, if available.
docstr_tok: ["Resolve","scoring","and","apply","it","to","data",".","Use","cached","prediction","instead","of","running","inference","again",",","if","available","."]
code: def _scoring(self, net, X_test, y_test):
      """Resolve scoring and apply it to data. Use cached prediction
      instead of running inference again, if available."""
      scorer = check_scoring(net, self.scoring_)
      return scorer(net, X_test, y_test)
  
imports: from contextlib import contextmanager
  from contextlib import suppress
  from functools import partial
  import warnings
  import numpy
  import sklearn
  from sklearn.metrics import make_scorer, check_scoring
  from skorch.callbacks import Callback
  from skorch.dataset import unpack_data
  from sklearn.metrics._scorer import _BaseScorer
  from skorch.utils import data_from_dataset
  from skorch.utils import is_skorch_dataset
  from skorch.utils import to_numpy
  from skorch.utils import check_indexing
  from skorch.utils import to_device
label_desc: Use image node_id 5 for calling the ScoringBase obj's underlying member method code with example usage: obj._scoring(net, X_test, y_test) and returns: scorer