class_docstr: PyMC model-fitting backend.
class_docstr_tok: ["PyMC","model-fitting","backend","."]
docstr: Run PyMC sampler.
docstr_tok: ["Run","PyMC","sampler","."]
code: def run(
      self,
      draws=1000,
      tune=1000,
      discard_tuned_samples=True,
      omit_offsets=True,
      include_mean=False,
      inference_method="mcmc",
      init="auto",
      n_init=50000,
      chains=None,
      cores=None,
      random_seed=None,
      **kwargs,
  ):
      """Run PyMC sampler."""
      inference_method = inference_method.lower()
      # NOTE: Methods return different types of objects (idata, approximation, and dictionary)
      if inference_method in ["mcmc", "nuts_numpyro", "nuts_blackjax"]:
          result = self._run_mcmc(
              draws,
              tune,
              discard_tuned_samples,
              omit_offsets,
              include_mean,
              init,
              n_init,
              chains,
              cores,
              random_seed,
              inference_method,
              **kwargs,
          )
      elif inference_method == "vi":
          result = self._run_vi(**kwargs)
      elif inference_method == "laplace":
          result = self._run_laplace(draws, omit_offsets, include_mean)
      else:
          raise NotImplementedError(
              f"'{inference_method}' method has not been implemented"
          )
  
      self.fit = True
      return result
  
imports: import functools
  import logging
  import traceback
  from copy import deepcopy
  from importlib.metadata import version
  import numpy
  import pymc
  import pytensor.tensor
  from pytensor.tensor.special import softmax
  from bambi.backend.links import cloglog, identity, inverse_squared, logit, probit, arctan_2
  from bambi.backend.model_components import ConstantComponent, DistributionalComponent
  from bambi.utils import get_aliased_name
label_desc: Use image node_id 3 for calling the PyMCModel obj's underlying member method code with example usage: obj.run(draws, tune, discard_tuned_samples, omit_offsets, include_mean, inference_method, init, n_init, chains, cores, random_seed) and returns: result