class_docstr: Fully Bayesian Model that uses NUTS to sample from hyperparameter posterior.
  
  This includes support for using sparse axis-aligned subspace priors (SAAS). See
  [Eriksson2021saasbo]_ for details.
class_docstr_tok: ["Fully","Bayesian","Model","that","uses","NUTS","to","sample","from","hyperparameter","posterior",".","This","includes","support","for","using","sparse","axis-aligned","subspace","priors","(","SAAS",")",".","See","[","Eriksson2021saasbo","]","_","for","details","."]
docstr: Initialize Fully Bayesian Botorch Model.
  
  Args:
      model_constructor: A callable that instantiates and fits a model on data,
          with signature as described below.
      model_predictor: A callable that predicts using the fitted model, with
          signature as described below.
      acqf_constructor: A callable that creates an acquisition function from a
          fitted model, with signature as described below.
      acqf_optimizer: A callable that optimizes the acquisition function, with
          signature as described below.
      best_point_recommender: A callable that recommends the best point, with
          signature as described below.
      refit_on_cv: If True, refit the model for each fold when performing
          cross-validation.
      refit_on_update: If True, refit the model after updating the training
          data using the `update` method.
      warm_start_refitting: If True, start model refitting from previous
          model parameters in order to speed up the fitting process.
      use_input_warping: A boolean indicating whether to use input warping
      use_saas: [deprecated] A boolean indicating whether to use the SAAS model
      num_samples: The number of MCMC samples. Note that with thinning,
          num_samples/thinning samples are retained.
      warmup_steps: The number of burn-in steps for NUTS.
      thinning: The amount of thinning. Every nth sample is retained.
      max_tree_depth: The max_tree_depth for NUTS.
      disable_progbar: A boolean indicating whether to print the progress
          bar and diagnostics during MCMC.
      gp_kernel: The type of ARD base kernel. "matern" corresponds to a Matern-5/2
          kernel and "rbf" corresponds to an RBF kernel.
      verbose: A boolean indicating whether to print summary stats from MCMC.
docstr_tok: ["Initialize","Fully","Bayesian","Botorch","Model",".","Args",":","model_constructor",":","A","callable","that","instantiates","and","fits","a","model","on","data",",","with","signature","as","described","below",".","model_predictor",":","A","callable","that","predicts","using","the","fitted","model",",","with","signature","as","described","below",".","acqf_constructor",":","A","callable","that","creates","an","acquisition","function","from","a","fitted","model",",","with","signature","as","described","below",".","acqf_optimizer",":","A","callable","that","optimizes","the","acquisition","function",",","with","signature","as","described","below",".","best_point_recommender",":","A","callable","that","recommends","the","best","point",",","with","signature","as","described","below",".","refit_on_cv",":","If","True",",","refit","the","model","for","each","fold","when","performing","cross-validation",".","refit_on_update",":","If","True",",","refit","the","model","after","updating","the","training","data","using","the","`","update","`","method",".","warm_start_refitting",":","If","True",",","start","model","refitting","from","previous","model","parameters","in","order","to","speed","up","the","fitting","process",".","use_input_warping",":","A","boolean","indicating","whether","to","use","input","warping","use_saas",":","[","deprecated","]","A","boolean","indicating","whether","to","use","the","SAAS","model","num_samples",":","The","number","of","MCMC","samples",".","Note","that","with","thinning",",","num_samples\/thinning","samples","are","retained",".","warmup_steps",":","The","number","of","burn-in","steps","for","NUTS",".","thinning",":","The","amount","of","thinning",".","Every","nth","sample","is","retained",".","max_tree_depth",":","The","max_tree_depth","for","NUTS",".","disable_progbar",":","A","boolean","indicating","whether","to","print","the","progress","bar","and","diagnostics","during","MCMC",".","gp_kernel",":","The","type","of","ARD","base","kernel",".","``","matern","''","corresponds","to","a","Matern-5\/2","kernel","and","``","rbf","''","corresponds","to","an","RBF","kernel",".","verbose",":","A","boolean","indicating","whether","to","print","summary","stats","from","MCMC","."]
code: def __init__(
      self,
      model_constructor: TModelConstructor = get_and_fit_model_mcmc,
      model_predictor: TModelPredictor = predict_from_model_mcmc,
      acqf_constructor: TAcqfConstructor = get_fully_bayesian_acqf,
      # pyre-fixme[9]: acqf_optimizer declared/used type mismatch
      acqf_optimizer: TOptimizer = scipy_optimizer,
      best_point_recommender: TBestPointRecommender = recommend_best_observed_point,
      refit_on_cv: bool = False,
      refit_on_update: bool = True,
      warm_start_refitting: bool = True,
      use_input_warping: bool = False,
      # use_saas is deprecated. TODO: remove
      use_saas: Optional[bool] = None,
      num_samples: int = 256,
      warmup_steps: int = 512,
      thinning: int = 16,
      max_tree_depth: int = 6,
      disable_progbar: bool = False,
      gp_kernel: str = "matern",
      verbose: bool = False,
      jit_compile: bool = False,
      **kwargs: Any,
  ) -> None:
      """Initialize Fully Bayesian Botorch Model.
  
      Args:
          model_constructor: A callable that instantiates and fits a model on data,
              with signature as described below.
          model_predictor: A callable that predicts using the fitted model, with
              signature as described below.
          acqf_constructor: A callable that creates an acquisition function from a
              fitted model, with signature as described below.
          acqf_optimizer: A callable that optimizes the acquisition function, with
              signature as described below.
          best_point_recommender: A callable that recommends the best point, with
              signature as described below.
          refit_on_cv: If True, refit the model for each fold when performing
              cross-validation.
          refit_on_update: If True, refit the model after updating the training
              data using the `update` method.
          warm_start_refitting: If True, start model refitting from previous
              model parameters in order to speed up the fitting process.
          use_input_warping: A boolean indicating whether to use input warping
          use_saas: [deprecated] A boolean indicating whether to use the SAAS model
          num_samples: The number of MCMC samples. Note that with thinning,
              num_samples/thinning samples are retained.
          warmup_steps: The number of burn-in steps for NUTS.
          thinning: The amount of thinning. Every nth sample is retained.
          max_tree_depth: The max_tree_depth for NUTS.
          disable_progbar: A boolean indicating whether to print the progress
              bar and diagnostics during MCMC.
          gp_kernel: The type of ARD base kernel. "matern" corresponds to a Matern-5/2
              kernel and "rbf" corresponds to an RBF kernel.
          verbose: A boolean indicating whether to print summary stats from MCMC.
      """
      # use_saas is deprecated. TODO: remove
      if use_saas is not None:
          warnings.warn(SAAS_DEPRECATION_MSG, DeprecationWarning)
      BotorchModel.__init__(
          self,
          model_constructor=model_constructor,
          model_predictor=model_predictor,
          acqf_constructor=acqf_constructor,
          acqf_optimizer=acqf_optimizer,
          best_point_recommender=best_point_recommender,
          refit_on_cv=refit_on_cv,
          refit_on_update=refit_on_update,
          warm_start_refitting=warm_start_refitting,
          use_input_warping=use_input_warping,
          num_samples=num_samples,
          warmup_steps=warmup_steps,
          thinning=thinning,
          max_tree_depth=max_tree_depth,
          disable_progbar=disable_progbar,
          gp_kernel=gp_kernel,
          verbose=verbose,
          jit_compile=jit_compile,
      )
  
imports: import math
  import sys
  import time
  import types
  import warnings
  from logging import Logger
  from typing import Any, Callable, Dict, List, Optional, Tuple
  import numpy
  import pyro
  import torch
  from ax.exceptions.core import AxError
  from ax.models.torch.botorch import BotorchModel, TAcqfConstructor, TBestPointRecommender, TModelConstructor, TModelPredictor, TOptimizer
  from ax.models.torch.botorch_defaults import get_qLogNEI, MIN_OBSERVED_NOISE_LEVEL, recommend_best_observed_point, scipy_optimizer
  from ax.models.torch.botorch_moo import MultiObjectiveBotorchModel
  from ax.models.torch.botorch_moo_defaults import get_qLogNEHVI, pareto_frontier_evaluator
  from ax.models.torch.frontier_utils import TFrontierEvaluator
  from ax.models.torch.fully_bayesian_model_utils import _get_single_task_gpytorch_model, load_mcmc_samples_to_model, pyro_sample_input_warping, pyro_sample_mean, pyro_sample_noise, pyro_sample_outputscale, pyro_sample_saas_lengthscales
  from ax.utils.common.docutils import copy_doc
  from ax.utils.common.logger import get_logger
  from ax.utils.common.typeutils import checked_cast
  from botorch.acquisition import AcquisitionFunction
  from botorch.models.gpytorch import GPyTorchModel
  from botorch.models.model import Model
  from botorch.models.model_list_gp_regression import ModelListGP
  from botorch.posteriors.gpytorch import GPyTorchPosterior
  from botorch.utils.safe_math import logmeanexp
  from gpytorch.kernels.kernel import dist
  from torch import Tensor
label_desc: Use image node_id 1 to create a new FullyBayesianBotorchModel object from inherited base classes: FullyBayesianBotorchModelMixin, BotorchModel with example: obj = FullyBayesianBotorchModel(model_constructor, model_predictor, acqf_constructor, acqf_optimizer, best_point_recommender, refit_on_cv, refit_on_update, warm_start_refitting, use_input_warping, use_saas, num_samples, warmup_steps, thinning, max_tree_depth, disable_progbar, gp_kernel, verbose, jit_compile)