class_docstr: Abstract base class for MC-based objectives.
  
  Args:
      _verify_output_shape: If True and `X` is given, check that the q-batch
          shape of the objectives agrees with that of X.
      _is_mo: A boolean denoting whether the objectives are multi-output.
  
  :meta private:
class_docstr_tok: ["Abstract","base","class","for","MC-based","objectives",".","Args",":","_verify_output_shape",":","If","True","and","`","X","`","is","given",",","check","that","the","q-batch","shape","of","the","objectives","agrees","with","that","of","X",".","_is_mo",":","A","boolean","denoting","whether","the","objectives","are","multi-output",".",":","meta","private",":"]
docstr: Evaluate the objective on the samples.
  
  Args:
      samples: A `sample_shape x batch_shape x q x m`-dim Tensors of
          samples from a model posterior.
      X: A `batch_shape x q x d`-dim tensor of inputs. Relevant only if
          the objective depends on the inputs explicitly.
  
  Returns:
      Tensor: A `sample_shape x batch_shape x q`-dim Tensor of objective
      values (assuming maximization).
  
  This method is usually not called directly, but via the objectives.
  
  Example:
      >>> # `__call__` method:
      >>> samples = sampler(posterior)
      >>> outcome = mc_obj(samples)
code: def forward(
      self, samples: Tensor, X: Optional[Tensor] = None
  ) -> Tensor:
      r"""Evaluate the objective on the samples.
  
      Args:
          samples: A `sample_shape x batch_shape x q x m`-dim Tensors of
              samples from a model posterior.
          X: A `batch_shape x q x d`-dim tensor of inputs. Relevant only if
              the objective depends on the inputs explicitly.
  
      Returns:
          Tensor: A `sample_shape x batch_shape x q`-dim Tensor of objective
          values (assuming maximization).
  
      This method is usually not called directly, but via the objectives.
  
      Example:
          >>> # `__call__` method:
          >>> samples = sampler(posterior)
          >>> outcome = mc_obj(samples)
      """
      pass
  
imports: from __future__ import annotations
  import inspect
  import warnings
  from abc import ABC, abstractmethod
  from typing import Callable, List, Optional, TYPE_CHECKING, Union
  import torch
  from botorch.exceptions.errors import BotorchTensorDimensionError, UnsupportedError
  from botorch.exceptions.warnings import InputDataWarning
  from botorch.models.model import Model
  from botorch.models.transforms.outcome import Standardize
  from botorch.posteriors.gpytorch import GPyTorchPosterior, scalarize_posterior
  from botorch.sampling import IIDNormalSampler
  from botorch.utils import apply_constraints
  from gpytorch.distributions import MultitaskMultivariateNormal, MultivariateNormal
  from linear_operator.operators.dense_linear_operator import to_linear_operator
  from torch import Tensor
  from torch.nn import Module
  from botorch.models.deterministic import DeterministicModel
label_desc: Use image node_id 1 for calling the MCAcquisitionObjective obj's underlying member method code with example usage: obj.forward(samples, X) without return types