class_docstr: Performs Bayesian Optimization using a Gaussian Process as an
  emulator for the unknown function.
class_docstr_tok: ["Performs","Bayesian","Optimization","using","a","Gaussian","Process","as","an","emulator","for","the","unknown","function","."]
code: def update_posterior(self, X, y):
      X = torch.cat([self.gpmodel.X, X])
      y = torch.cat([self.gpmodel.y, y])
      self.gpmodel.set_data(X, y)
      optimizer = torch.optim.Adam(self.gpmodel.parameters(), lr=0.001)
      gp.util.train(
          self.gpmodel,
          optimizer,
          loss_fn=TraceEnum_ELBO(
              strict_enumeration_warning=False
          ).differentiable_loss,
          retain_graph=True,
      )
  
file_path: pyro/examples/contrib/oed/gp_bayes_opt.py
imports: import torch
  import torch.autograd
  import torch.optim
  from torch.distributions import transform_to
  import pyro.contrib.gp
  import pyro.optim
  from pyro.infer import TraceEnum_ELBO
label_desc: Use image node_id 2 for calling the GPBayesOptimizer obj's underlying member method code with example usage: obj.update_posterior(X, y) without return types