class_docstr: Convenience wrapper for sampling a function from a GP prior.
  
  This wrapper implicitly defines the GP sample as a self-updating function by keeping
  track of the evaluated points and respective base samples used during the
  evaluation.
  
  This does not yet support multi-output models.
class_docstr_tok: ["Convenience","wrapper","for","sampling","a","function","from","a","GP","prior",".","This","wrapper","implicitly","defines","the","GP","sample","as","a","self-updating","function","by","keeping","track","of","the","evaluated","points","and","respective","base","samples","used","during","the","evaluation",".","This","does","not","yet","support","multi-output","models","."]
docstr: Construct a GP function sampler.
  
  Args:
      model: The Model defining the GP prior.
docstr_tok: ["Construct","a","GP","function","sampler",".","Args",":","model",":","The","Model","defining","the","GP","prior","."]
code: def __init__(self, model: Model, seed: Optional[int] = None) -> None:
      r"""Construct a GP function sampler.
  
      Args:
          model: The Model defining the GP prior.
      """
      super().__init__()
      self._model = deepcopy(model)
      self._num_outputs = self._model.num_outputs
      seed = torch.tensor(
          seed
          if seed is not None
          else torch.randint(0, 1000000, (1,)).item()
      )
      self.register_buffer("_seed", seed)
  
imports: from __future__ import annotations
  from copy import deepcopy
  from math import pi
  from typing import List, Optional
  import torch
  from botorch.models.converter import batched_to_model_list
  from botorch.models.deterministic import GenericDeterministicModel
  from botorch.models.model import Model, ModelList
  from botorch.models.model_list_gp_regression import ModelListGP
  from botorch.models.multitask import MultiTaskGP
  from botorch.utils.sampling import manual_seed
  from botorch.utils.transforms import is_ensemble
  from gpytorch.kernels import Kernel, MaternKernel, RBFKernel, ScaleKernel
  from linear_operator.utils.cholesky import psd_safe_cholesky
  from torch import Tensor
  from torch.distributions import MultivariateNormal
  from torch.nn import Module
label_desc: Use image node_id 1 to create a new GPDraw object from inherited base classes: Module with example: obj = GPDraw(model, seed)