class_docstr: This class specifies the interface for a torch-based model.
  
  These methods should be implemented to have access to all of the features
  of Ax.
docstr: Do cross validation with the given training and test sets.
  
  Training set is given in the same format as to fit. Test set is given
  in the same format as to predict.
  
  Args:
      datasets: A list of ``SupervisedDataset`` containers, each
          corresponding to the data of one metric (outcome).
      metric_names: A list of metric names, with the i-th metric
          corresponding to the i-th dataset.
      X_test: (j x d) tensor of the j points at which to make predictions.
      search_space_digest: A SearchSpaceDigest object containing
          metadata on the features in X.
  
  Returns:
      2-element tuple containing
  
      - (j x m) tensor of outcome predictions at X.
      - (j x m x m) tensor of predictive covariances at X.
        cov[j, m1, m2] is Cov[m1@j, m2@j].
docstr_tok: ["Do","cross","validation","with","the","given","training","and","test","sets",".","Training","set","is","given","in","the","same","format","as","to","fit",".","Test","set","is","given","in","the","same","format","as","to","predict",".","Args",":","datasets",":","A","list","of","``","SupervisedDataset","``","containers",",","each","corresponding","to","the","data","of","one","metric","(","outcome",")",".","metric_names",":","A","list","of","metric","names",",","with","the","i-th","metric","corresponding","to","the","i-th","dataset",".","X_test",":","(","j","x","d",")","tensor","of","the","j","points","at","which","to","make","predictions",".","search_space_digest",":","A","SearchSpaceDigest","object","containing","metadata","on","the","features","in","X",".","Returns",":","2-element","tuple","containing","-","(","j","x","m",")","tensor","of","outcome","predictions","at","X",".","-","(","j","x","m","x","m",")","tensor","of","predictive","covariances","at","X.","cov","[","j",",","m1",",","m2","]","is","Cov","[","m1","@","j",",","m2","@","j","]","."]
code: def cross_validate(
      self,
      datasets: List[SupervisedDataset],
      metric_names: List[str],
      X_test: Tensor,
      search_space_digest: SearchSpaceDigest,
  ) -> Tuple[Tensor, Tensor]:
      """Do cross validation with the given training and test sets.
  
      Training set is given in the same format as to fit. Test set is given
      in the same format as to predict.
  
      Args:
          datasets: A list of ``SupervisedDataset`` containers, each
              corresponding to the data of one metric (outcome).
          metric_names: A list of metric names, with the i-th metric
              corresponding to the i-th dataset.
          X_test: (j x d) tensor of the j points at which to make predictions.
          search_space_digest: A SearchSpaceDigest object containing
              metadata on the features in X.
  
      Returns:
          2-element tuple containing
  
          - (j x m) tensor of outcome predictions at X.
          - (j x m x m) tensor of predictive covariances at X.
            cov[j, m1, m2] is Cov[m1@j, m2@j].
      """
      raise NotImplementedError
  
imports: from __future__ import annotations
  from dataclasses import dataclass, field
  from typing import Any, Callable, Dict, List, Optional, Tuple
  import torch
  from ax.core.metric import Metric
  from ax.core.search_space import SearchSpaceDigest
  from ax.core.types import TCandidateMetadata
  from ax.models.base import Model
  from ax.models.types import TConfig
  from botorch.acquisition.risk_measures import RiskMeasureMCObjective
  from botorch.utils.datasets import SupervisedDataset
  from torch import Tensor
label_desc: Use image node_id 5 for calling the TorchModel obj's underlying member method code with example usage: obj.cross_validate(datasets, metric_names, X_test, search_space_digest) without return types