class_docstr: Abstract Mixin class for acquisition functions using a cached Cholesky.
  
  Specifically, this is for acquisition functions that require sampling from
  the posterior P(f(X_baseline, X) | D). The Cholesky of the posterior
  covariance over f(X_baseline) is cached.
  
  :meta private:
docstr: Set class attributes and perform compatibility checks.
  
  Args:
      model: A model.
      cache_root: A boolean indicating whether to cache the Cholesky.
          This might be overridden in the model is not compatible.
      sampler: An optional MCSampler object.
docstr_tok: ["Set","class","attributes","and","perform","compatibility","checks",".","Args",":","model",":","A","model",".","cache_root",":","A","boolean","indicating","whether","to","cache","the","Cholesky",".","This","might","be","overridden","in","the","model","is","not","compatible",".","sampler",":","An","optional","MCSampler","object","."]
code: def __init__(
      self,
      model: Model,
      cache_root: bool = False,
      sampler: Optional[MCSampler] = None,
  ) -> None:
      r"""Set class attributes and perform compatibility checks.
  
      Args:
          model: A model.
          cache_root: A boolean indicating whether to cache the Cholesky.
              This might be overridden in the model is not compatible.
          sampler: An optional MCSampler object.
      """
      MCSamplerMixin.__init__(self, sampler=sampler)
      if cache_root and not supports_cache_root(model):
          warnings.warn(
              _get_cache_root_not_supported_message(type(model)),
              RuntimeWarning,
          )
          cache_root = False
      self._cache_root = cache_root
  
imports: from __future__ import annotations
  import warnings
  from typing import Optional
  import torch
  from botorch.acquisition.acquisition import MCSamplerMixin
  from botorch.exceptions.warnings import BotorchWarning
  from botorch.models.gpytorch import GPyTorchModel
  from botorch.models.higher_order_gp import HigherOrderGP
  from botorch.models.model import Model
  from botorch.models.model_list_gp_regression import ModelListGP
  from botorch.models.multitask import KroneckerMultiTaskGP, MultiTaskGP
  from botorch.posteriors.gpytorch import GPyTorchPosterior
  from botorch.posteriors.posterior import Posterior
  from botorch.sampling.base import MCSampler
  from botorch.utils.low_rank import extract_batch_covar, sample_cached_cholesky
  from gpytorch.distributions.multitask_multivariate_normal import MultitaskMultivariateNormal
  from linear_operator.utils.errors import NanError, NotPSDError
  from torch import Tensor
label_desc: Use image node_id 1 to create a new CachedCholeskyMCSamplerMixin object from inherited base classes: MCSamplerMixin with example: obj = CachedCholeskyMCSamplerMixin(model, cache_root, sampler)