class_docstr: XGBoost model
  
  Parameters
  ----------
  extractor : FeatureExtractor
      The feature extractor for the model.
  config : XGBConfig
      The XGBoost model config.
  num_warmup_samples : int
      The number of samples that are used for warmup, i.e., the first few samples are predicted
      with random results.
  early_stopping_rounds : int
      The number of rounds for early stopping.
  verbose_eval : int
      The verbose level when doing evaluation.
  average_peak_n : int
      The number to calculate average peak score.
  adaptive_training : bool
      Whether use adaptive training to reduce tuning time.
class_docstr_tok: ["XGBoost","model","Parameters","--","--","--","--","--","extractor",":","FeatureExtractor","The","feature","extractor","for","the","model",".","config",":","XGBConfig","The","XGBoost","model","config",".","num_warmup_samples",":","int","The","number","of","samples","that","are","used","for","warmup",",","i.e.",",","the","first","few","samples","are","predicted","with","random","results",".","early_stopping_rounds",":","int","The","number","of","rounds","for","early","stopping",".","verbose_eval",":","int","The","verbose","level","when","doing","evaluation",".","average_peak_n",":","int","The","number","to","calculate","average","peak","score",".","adaptive_training",":","bool","Whether","use","adaptive","training","to","reduce","tuning","time","."]
docstr: Evaluate the score of inputs.
  
  Parameters
  ----------
  xs : List[np.ndarray]
      A batch of input samples
  ys : List[float]
      A batch of labels
  
  Returns
  -------
  scores: np.ndarray
      The predicted result for all inputs.
docstr_tok: ["Evaluate","the","score","of","inputs",".","Parameters","--","--","--","--","--","xs",":","List","[","np.ndarray","]","A","batch","of","input","samples","ys",":","List","[","float","]","A","batch","of","labels","Returns","--","--","--","-","scores",":","np.ndarray","The","predicted","result","for","all","inputs","."]
code: def _validate(  # type: ignore # pylint: disable=invalid-name
      self,
      xs: List[np.ndarray],
      ys: np.ndarray,
  ) -> List[Tuple[str, float]]:
      """Evaluate the score of inputs.
  
      Parameters
      ----------
      xs : List[np.ndarray]
          A batch of input samples
      ys : List[float]
          A batch of labels
  
      Returns
      -------
      scores: np.ndarray
          The predicted result for all inputs.
      """
      assert self.booster is not None
  
      d_valid = PackSum(xs=xs, ys=ys)
  
      def average_peak_score(ys_pred: np.ndarray):
          return d_valid.average_peak_score(
              ys_pred, n=self.average_peak_n
          )
  
      ys_pred = self.booster.predict(d_valid.dmatrix)
      eval_result: List[Tuple[str, float]] = [
          feval(ys_pred)
          for feval in (
              average_peak_score,
              d_valid.rmse,
          )
      ]
      eval_result.sort(key=make_metric_sorter("p-rmse"))
      return eval_result
  
imports: import os
  import tempfile
  from collections import OrderedDict
  from itertools import chain
  from typing import TYPE_CHECKING, Any, Callable, Dict, List, NamedTuple, Optional, Tuple
  from typing_extensions import Literal
  import numpy
  from ...contrib.tar import tar, untar
  from ...runtime import NDArray
  from ..cost_model import PyCostModel
  from ..feature_extractor import FeatureExtractor
  from ..logging import get_logger
  from ..runner import RunnerResult
  from ..search_strategy import MeasureCandidate
  from ..utils import cpu_count, derived_object, shash2hex
  from .metric import max_curve
label_desc: Use image node_id 8 for calling the XGBModel obj's underlying member method code with example usage: obj._validate(xs, ys) and returns: eval_result, d_valid