class_docstr: Abstract base class for Monte-Carlo based batch acquisition functions.
  
  :meta private:
class_docstr_tok: ["Abstract","base","class","for","Monte-Carlo","based","batch","acquisition","functions",".",":","meta","private",":"]
docstr: Args:
      model: A fitted model.
      sampler: The sampler used to draw base samples. If not given,
          a sampler is generated on the fly within the
          `get_posterior_samples` method using
          `botorch.sampling.get_sampler`.
          NOTE: For posteriors that do not support base samples,
          a sampler compatible with intended use case must be provided.
          See `ForkedRNGSampler` and `StochasticSampler` as examples.
      objective: The MCAcquisitionObjective under which the samples are
          evaluated. Defaults to `IdentityMCObjective()`.
      posterior_transform: A PosteriorTransform (optional).
      X_pending: A `batch_shape, m x d`-dim Tensor of `m` design points
          that have points that have been submitted for function evaluation
          but have not yet been evaluated.
docstr_tok: ["Args",":","model",":","A","fitted","model",".","sampler",":","The","sampler","used","to","draw","base","samples",".","If","not","given",",","a","sampler","is","generated","on","the","fly","within","the","`","get_posterior_samples","`","method","using","`","botorch.sampling.get_sampler","`",".","NOTE",":","For","posteriors","that","do","not","support","base","samples",",","a","sampler","compatible","with","intended","use","case","must","be","provided",".","See","`","ForkedRNGSampler","`","and","`","StochasticSampler","`","as","examples",".","objective",":","The","MCAcquisitionObjective","under","which","the","samples","are","evaluated",".","Defaults","to","`","IdentityMCObjective","(",")","`",".","posterior_transform",":","A","PosteriorTransform","(","optional",")",".","X_pending",":","A","`","batch_shape",",","m","x","d","`","-dim","Tensor","of","`","m","`","design","points","that","have","points","that","have","been","submitted","for","function","evaluation","but","have","not","yet","been","evaluated","."]
code: def __init__(
      self,
      model: Model,
      sampler: Optional[MCSampler] = None,
      objective: Optional[MCAcquisitionObjective] = None,
      posterior_transform: Optional[PosteriorTransform] = None,
      X_pending: Optional[Tensor] = None,
  ) -> None:
      r"""
      Args:
          model: A fitted model.
          sampler: The sampler used to draw base samples. If not given,
              a sampler is generated on the fly within the
              `get_posterior_samples` method using
              `botorch.sampling.get_sampler`.
              NOTE: For posteriors that do not support base samples,
              a sampler compatible with intended use case must be provided.
              See `ForkedRNGSampler` and `StochasticSampler` as examples.
          objective: The MCAcquisitionObjective under which the samples are
              evaluated. Defaults to `IdentityMCObjective()`.
          posterior_transform: A PosteriorTransform (optional).
          X_pending: A `batch_shape, m x d`-dim Tensor of `m` design points
              that have points that have been submitted for function evaluation
              but have not yet been evaluated.
      """
      super().__init__(model=model)
      MCSamplerMixin.__init__(self, sampler=sampler)
      if objective is None and model.num_outputs != 1:
          if posterior_transform is None:
              raise UnsupportedError(
                  "Must specify an objective or a posterior transform when using "
                  "a multi-output model."
              )
          elif not posterior_transform.scalarize:
              raise UnsupportedError(
                  "If using a multi-output model without an objective, "
                  "posterior_transform must scalarize the output."
              )
      if objective is None:
          objective = IdentityMCObjective()
      self.posterior_transform = posterior_transform
      self.objective: MCAcquisitionObjective = objective
      self.set_X_pending(X_pending)
  
imports: from __future__ import annotations
  import math
  from abc import ABC, abstractmethod
  from copy import deepcopy
  from functools import partial
  from typing import Callable, List, Optional, Protocol, Tuple, Union
  import torch
  from botorch.acquisition.acquisition import AcquisitionFunction, MCSamplerMixin
  from botorch.acquisition.cached_cholesky import CachedCholeskyMCSamplerMixin
  from botorch.acquisition.objective import ConstrainedMCObjective, IdentityMCObjective, MCAcquisitionObjective, PosteriorTransform
  from botorch.acquisition.utils import compute_best_feasible_objective, prune_inferior_points, repeat_to_match_aug_dim
  from botorch.exceptions.errors import UnsupportedError
  from botorch.models.model import Model
  from botorch.sampling.base import MCSampler
  from botorch.utils.objective import compute_smoothed_feasibility_indicator
  from botorch.utils.transforms import concatenate_pending_points, match_batch_shape, t_batch_mode_transform
  from torch import Tensor
label_desc: Use image node_id 1 to create a new MCAcquisitionFunction object from inherited base classes: AcquisitionFunction, MCSamplerMixin, ABC with example: obj = MCAcquisitionFunction(model, sampler, objective, posterior_transform, X_pending)