class_docstr: Adapts tunable parameters, namely step size and mass matrix, during the
  warmup phase. This class provides lookup properties to read the latest
  values of ``step_size`` and ``inverse_mass_matrix``. These values are
  periodically updated when adaptation is engaged.
class_docstr_tok: ["Adapts","tunable","parameters",",","namely","step","size","and","mass","matrix",",","during","the","warmup","phase",".","This","class","provides","lookup","properties","to","read","the","latest","values","of","``","step_size","``","and","``","inverse_mass_matrix","``",".","These","values","are","periodically","updated","when","adaptation","is","engaged","."]
docstr: Called at each step during the warmup phase to learn tunable
  parameters.
  
  :param int t: time step, beginning at 0.
  :param dict z: latent variables.
  :param float accept_prob: acceptance probability of the proposal.
docstr_tok: ["Called","at","each","step","during","the","warmup","phase","to","learn","tunable","parameters",".",":","param","int","t",":","time","step",",","beginning","at","0.",":","param","dict","z",":","latent","variables",".",":","param","float","accept_prob",":","acceptance","probability","of","the","proposal","."]
code: def step(self, t, z, accept_prob, z_grad=None):
      r"""
      Called at each step during the warmup phase to learn tunable
      parameters.
  
      :param int t: time step, beginning at 0.
      :param dict z: latent variables.
      :param float accept_prob: acceptance probability of the proposal.
      """
      if t >= self._warmup_steps or self._adaptation_disabled:
          return
      window = self._adaptation_schedule[self._current_window]
      num_windows = len(self._adaptation_schedule)
      mass_matrix_adaptation_phase = self.adapt_mass_matrix and (
          0 < self._current_window < num_windows - 1
      )
      if self.adapt_step_size:
          self._update_step_size(accept_prob.item())
      if mass_matrix_adaptation_phase:
          self.mass_matrix_adapter.update(z, z_grad)
  
      if t == window.end:
          if self._current_window == num_windows - 1:
              self._current_window += 1
              self._end_adaptation()
              return
  
          if self._current_window == 0:
              self._current_window += 1
              return
  
          if mass_matrix_adaptation_phase:
              self.mass_matrix_adapter.end_adaptation()
              if self.adapt_step_size:
                  self.reset_step_size_adaptation(z)
  
          self._current_window += 1
  
imports: import math
  from collections import namedtuple
  import torch
  import pyro
  from pyro.ops.arrowhead import SymmArrowhead, sqrt, triu_gram, triu_inverse, triu_matvecmul
  from pyro.ops.dual_averaging import DualAveraging
  from pyro.ops.welford import WelfordArrowheadCovariance, WelfordCovariance
label_desc: Use image node_id 7 for calling the WarmupAdapter obj's underlying member method code with example usage: obj.step(t, z, accept_prob, z_grad) without return types