class_docstr: The acquisition function for Predictive Entropy Search. The code supports
  both single and multiple objectives as well as batching.
  
  This acquisition function approximates the mutual information between the
  observation at a candidate point `X` and the Pareto optimal input using the
  moment-matching procedure known as expectation propagation (EP).
  
  See the Appendix of [Garrido-Merchan2019]_ for the description of the EP
  procedure.
  
  IMPORTANT NOTES:
  (i) The PES acquisition function estimated using EP is sometimes not
  differentiable, and therefore we advise using a finite-difference estimate of
  the gradient as opposed to the gradients identified using automatic
  differentiation, which occasionally outputs `nan` values.
  
  The source of this differentiability is in the `_update_damping` function, which
  finds the damping factor `a` that is used to update the EP parameters
  `a * param_new + (1 - a) * param_old`. The damping factor has to ensure
  that the updated covariance matrices, `a * cov_f_new + (1 - a) cov_f_old`, is
  positive semi-definiteness. We follow the original paper, which identifies
  `a` via a successive halving scheme i.e. we check `a=1` then `a=0.5` etc. This
  procedure means `a` is a function of the test input `X`. This function is not
  differentiable  in `X`.
  
  (ii) EP could potentially fail for a number of reasons:
  
      (a) When the sampled Pareto optimal points `x_p` is poor compared to the
      training or testing data `x_n`.
  
      (b) When the training or testing data `x_n` is close the Pareto optimal
      points `x_p`.
  
      (c) When the convergence threshold is set too small.
  
  
      Problem (a) occurs because we have to compute the variable:
      `alpha = (mean(x_n) - mean(x_p)) / std(x_n - x_p)`, which becomes very
      large when `x_n` is better than `x_p` with high-probability. This leads to a
      log(0) error when we compute `log(1 - cdf(alpha))`. We have preemptively
      clamped some values depending on `1`alpha` in order to mitigate this.
  
      Problem (b) occurs because we have to compute matrix inverses for the
      two-dimensional marginals (x_n, x_p). To address this we manually add jitter
      to the diagonal of the covariance matrix i.e. `ep_jitter` when training and
      `test_jitter` when testing. The default choice is not always appropriate
      because the same jitter is used for the inversion of the covariance
      and precision matrix, which are on different scales.
  
      TODO: come up with strategy to adaptively update the jitter.
  
      Problem (c) occurs because a smaller threshold usually means that more EP
      iterations are required. Running too many EP iterations could lead to
      invertibility problems such as in problem (b). Setting a larger threshold
      or reducing the number of EP iterations could alleviate this.
  
  (iii) The estimated acquisition value could be negative.
class_docstr_tok: ["The","acquisition","function","for","Predictive","Entropy","Search",".","The","code","supports","both","single","and","multiple","objectives","as","well","as","batching",".","This","acquisition","function","approximates","the","mutual","information","between","the","observation","at","a","candidate","point","`","X","`","and","the","Pareto","optimal","input","using","the","moment-matching","procedure","known","as","expectation","propagation","(","EP",")",".","See","the","Appendix","of","[","Garrido-Merchan2019","]","_","for","the","description","of","the","EP","procedure",".","IMPORTANT","NOTES",":","(","i",")","The","PES","acquisition","function","estimated","using","EP","is","sometimes","not","differentiable",",","and","therefore","we","advise","using","a","finite-difference","estimate","of","the","gradient","as","opposed","to","the","gradients","identified","using","automatic","differentiation",",","which","occasionally","outputs","`","nan","`","values",".","The","source","of","this","differentiability","is","in","the","`","_update_damping","`","function",",","which","finds","the","damping","factor","`","a","`","that","is","used","to","update","the","EP","parameters","`","a","*","param_new","+","(","1","-","a",")","*","param_old","`",".","The","damping","factor","has","to","ensure","that","the","updated","covariance","matrices",",","`","a","*","cov_f_new","+","(","1","-","a",")","cov_f_old","`",",","is","positive","semi-definiteness",".","We","follow","the","original","paper",",","which","identifies","`","a","`","via","a","successive","halving","scheme","i.e",".","we","check","`","a=1","`","then","`","a=0.5","`","etc",".","This","procedure","means","`","a","`","is","a","function","of","the","test","input","`","X","`",".","This","function","is","not","differentiable","in","`","X","`",".","(","ii",")","EP","could","potentially","fail","for","a","number","of","reasons",":","(","a",")","When","the","sampled","Pareto","optimal","points","`","x_p","`","is","poor","compared","to","the","training","or","testing","data","`","x_n","`",".","(","b",")","When","the","training","or","testing","data","`","x_n","`","is","close","the","Pareto","optimal","points","`","x_p","`",".","(","c",")","When","the","convergence","threshold","is","set","too","small",".","Problem","(","a",")","occurs","because","we","have","to","compute","the","variable",":","`","alpha","=","(","mean","(","x_n",")","-","mean","(","x_p",")",")","\/","std","(","x_n","-","x_p",")","`",",","which","becomes","very","large","when","`","x_n","`","is","better","than","`","x_p","`","with","high-probability",".","This","leads","to","a","log","(","0",")","error","when","we","compute","`","log","(","1","-","cdf","(","alpha",")",")","`",".","We","have","preemptively","clamped","some","values","depending","on","`","1","`","alpha","`","in","order","to","mitigate","this",".","Problem","(","b",")","occurs","because","we","have","to","compute","matrix","inverses","for","the","two-dimensional","marginals","(","x_n",",","x_p",")",".","To","address","this","we","manually","add","jitter","to","the","diagonal","of","the","covariance","matrix","i.e",".","`","ep_jitter","`","when","training","and","`","test_jitter","`","when","testing",".","The","default","choice","is","not","always","appropriate","because","the","same","jitter","is","used","for","the","inversion","of","the","covariance","and","precision","matrix",",","which","are","on","different","scales",".","TODO",":","come","up","with","strategy","to","adaptively","update","the","jitter",".","Problem","(","c",")","occurs","because","a","smaller","threshold","usually","means","that","more","EP","iterations","are","required",".","Running","too","many","EP","iterations","could","lead","to","invertibility","problems","such","as","in","problem","(","b",")",".","Setting","a","larger","threshold","or","reducing","the","number","of","EP","iterations","could","alleviate","this",".","(","iii",")","The","estimated","acquisition","value","could","be","negative","."]
docstr: Evaluate qMultiObjectivePredictiveEntropySearch on the candidate set `X`.
  
  Args:
      X: A `batch_shape x q x d`-dim Tensor of t-batches with `q` `d`-dim
          design points each.
  
  Returns:
      A `batch_shape'`-dim Tensor of acquisition values at the given design
      points `X`.
docstr_tok: ["Evaluate","qMultiObjectivePredictiveEntropySearch","on","the","candidate","set","`","X","`",".","Args",":","X",":","A","`","batch_shape","x","q","x","d","`","-dim","Tensor","of","t-batches","with","`","q","`","`","d","`","-dim","design","points","each",".","Returns",":","A","`","batch_shape","'","`","-dim","Tensor","of","acquisition","values","at","the","given","design","points","`","X","`","."]
code: def forward(self, X: Tensor) -> Tensor:
      r"""Evaluate qMultiObjectivePredictiveEntropySearch on the candidate set `X`.
  
      Args:
          X: A `batch_shape x q x d`-dim Tensor of t-batches with `q` `d`-dim
              design points each.
  
      Returns:
          A `batch_shape'`-dim Tensor of acquisition values at the given design
          points `X`.
      """
      return self._compute_information_gain(X)
  
imports: from __future__ import annotations
  from typing import Any, Optional, Tuple
  import torch
  from botorch.acquisition.acquisition import AcquisitionFunction
  from botorch.exceptions import InputDataError
  from botorch.exceptions.errors import UnsupportedError
  from botorch.models.model import Model
  from botorch.models.model_list_gp_regression import ModelListGP
  from botorch.models.utils import check_no_nans
  from botorch.utils.transforms import concatenate_pending_points, t_batch_mode_transform
  from torch import Tensor
  from torch.distributions import Normal
label_desc: Use image node_id 4 for calling the qMultiObjectivePredictiveEntropySearch obj's underlying member method code with example usage: obj.forward(X) and returns: self