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: Update the sampler to use the original base samples for X_baseline.
  
  Args:
      q_in: The effective input batch size. This is typically equal to the
          q-batch size of `X`. However, if using a one-to-many input transform,
          e.g., `InputPerturbation` with `n_w` perturbations, the posterior will
          have `n_w` points on the q-batch for each point on the q-batch of `X`.
          In which case, `q_in = q * n_w` is used.
      posterior: The posterior.
docstr_tok: ["Update","the","sampler","to","use","the","original","base","samples","for","X_baseline",".","Args",":","q_in",":","The","effective","input","batch","size",".","This","is","typically","equal","to","the","q-batch","size","of","`","X","`",".","However",",","if","using","a","one-to-many","input","transform",",","e.g.",",","`","InputPerturbation","`","with","`","n_w","`","perturbations",",","the","posterior","will","have","`","n_w","`","points","on","the","q-batch","for","each","point","on","the","q-batch","of","`","X","`",".","In","which","case",",","`","q_in","=","q","*","n_w","`","is","used",".","posterior",":","The","posterior","."]
code: def _set_sampler(
      self,
      q_in: int,
      posterior: Posterior,
  ) -> None:
      r"""Update the sampler to use the original base samples for X_baseline.
  
      Args:
          q_in: The effective input batch size. This is typically equal to the
              q-batch size of `X`. However, if using a one-to-many input transform,
              e.g., `InputPerturbation` with `n_w` perturbations, the posterior will
              have `n_w` points on the q-batch for each point on the q-batch of `X`.
              In which case, `q_in = q * n_w` is used.
          posterior: The posterior.
      """
      if self.q_in != q_in and self.base_sampler is not None:
          self.sampler._update_base_samples(
              posterior=posterior, base_sampler=self.base_sampler
          )
          self.q_in = q_in
  
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 4 for calling the CachedCholeskyMCSamplerMixin obj's underlying member method code with example usage: obj._set_sampler(q_in, posterior) without return types