class_docstr: MVaR Approximation based on Random Scalarizations as introduced
  in [Daulton2022MARS]_.
  
  This approximates MVaR via VaR of Chebyshev scalarizations, where each
  scalarization corresponds to a point in the MVaR set. As implemented,
  this uses one set of scalarization weights to approximate a single MVaR value.
  Note that due to the normalization within the Chebyshev scalarization,
  the output of this risk measure may not be on the same scale as its inputs.
docstr: Set the `baseline_Y` based on the MVaR predictions of the `model`
  for `X_baseline`.
  
  Args:
      model: The model being used for MARS optimization. Must have a compatible
          `InputPerturbation` transform attached. Ignored if `Y_samples` is given.
      X_baseline: An `n x d`-dim tensor of previously evaluated points.
          Ignored if `Y_samples` is given.
      Y_samples: An optional `(n * n_w) x d`-dim tensor of predictions. If given,
          instead of sampling from the model, these are used.
docstr_tok: ["Set","the","`","baseline_Y","`","based","on","the","MVaR","predictions","of","the","`","model","`","for","`","X_baseline","`",".","Args",":","model",":","The","model","being","used","for","MARS","optimization",".","Must","have","a","compatible","`","InputPerturbation","`","transform","attached",".","Ignored","if","`","Y_samples","`","is","given",".","X_baseline",":","An","`","n","x","d","`","-dim","tensor","of","previously","evaluated","points",".","Ignored","if","`","Y_samples","`","is","given",".","Y_samples",":","An","optional","`","(","n","*","n_w",")","x","d","`","-dim","tensor","of","predictions",".","If","given",",","instead","of","sampling","from","the","model",",","these","are","used","."]
code: def set_baseline_Y(
      self,
      model: Optional[Model],
      X_baseline: Optional[Tensor],
      Y_samples: Optional[Tensor] = None,
  ) -> None:
      r"""Set the `baseline_Y` based on the MVaR predictions of the `model`
      for `X_baseline`.
  
      Args:
          model: The model being used for MARS optimization. Must have a compatible
              `InputPerturbation` transform attached. Ignored if `Y_samples` is given.
          X_baseline: An `n x d`-dim tensor of previously evaluated points.
              Ignored if `Y_samples` is given.
          Y_samples: An optional `(n * n_w) x d`-dim tensor of predictions. If given,
              instead of sampling from the model, these are used.
      """
      if Y_samples is None:
          with torch.no_grad():
              Y = model.posterior(
                  X_baseline.unsqueeze(-2)
              ).mean.squeeze(-2)
      else:
          if model is not None or X_baseline is not None:
              warnings.warn(
                  "`model` and `X_baseline` are ignored when `Y_samples` is "
                  "provided to `MARS.set_baseline_Y`.",
                  BotorchWarning,
                  stacklevel=2,
              )
          Y = Y_samples
      Y = self.preprocessing_function(Y)
      Y = self.mvar(Y).view(-1, Y.shape[-1])
      Y = Y[is_non_dominated(Y)]
      self.baseline_Y = Y
  
imports: import warnings
  from abc import ABC, abstractmethod
  from math import ceil
  from typing import Callable, List, Optional, Union
  import torch
  from botorch.acquisition.multi_objective.objective import IdentityMCMultiOutputObjective, MCMultiOutputObjective
  from botorch.acquisition.risk_measures import CVaR, RiskMeasureMCObjective, VaR
  from botorch.exceptions.errors import UnsupportedError
  from botorch.exceptions.warnings import BotorchWarning
  from botorch.models.model import Model
  from botorch.utils.multi_objective.pareto import is_non_dominated
  from botorch.utils.transforms import normalize
  from torch import Tensor
label_desc: Use image node_id 2 for calling the MARS obj's underlying member method code with example usage: obj.set_baseline_Y(model, X_baseline, Y_samples) without return types