class_docstr: `Reducer` that displays a progress bar.
  
  Note this is not XLA-compatible (`tf.function(jit_compile=True)`).
  Numpy and JAX substrates are not supported.
  
  Example usage:
  
  ```
  kernel = ...
  current_state = ...
  num_results = ...
  pbar = tfp.experimental.mcmc.ProgressBarReducer(num_results)
  _, final_state, kernel_results = tfp.experimental.mcmc.sample_fold(
      num_steps=num_results,
      current_state=current_state,
      kernel=kernel,
      reducer=pbar,
  )
  ```
class_docstr_tok: ["`","Reducer","`","that","displays","a","progress","bar",".","Note","this","is","not","XLA-compatible","(","`","tf.function","(","jit_compile=True",")","`",")",".","Numpy","and","JAX","substrates","are","not","supported",".","Example","usage",":","``","`","kernel","=","...","current_state","=","...","num_results","=","...","pbar","=","tfp.experimental.mcmc.ProgressBarReducer","(","num_results",")","_",",","final_state",",","kernel_results","=","tfp.experimental.mcmc.sample_fold","(","num_steps=num_results",",","current_state=current_state",",","kernel=kernel",",","reducer=pbar",",",")","``","`"]
docstr: Initialize progress bars.
  
  All arguments are ignored.
  
  Args:
    initial_chain_state: A (possibly nested) structure of `Tensor`s or Python
      `list`s of `Tensor`s representing the current state(s) of the Markov
      chain(s). It is used to infer the structure of future trace results.
    initial_kernel_results: A (possibly nested) structure of `Tensor`s
      representing internal calculations made in a related `TransitionKernel`.
      It is used to infer the structure of future trace results.
  
  Returns:
    state: empty list.
docstr_tok: ["Initialize","progress","bars",".","All","arguments","are","ignored",".","Args",":","initial_chain_state",":","A","(","possibly","nested",")","structure","of","`","Tensor","`","s","or","Python","`","list","`","s","of","`","Tensor","`","s","representing","the","current","state","(","s",")","of","the","Markov","chain","(","s",")",".","It","is","used","to","infer","the","structure","of","future","trace","results",".","initial_kernel_results",":","A","(","possibly","nested",")","structure","of","`","Tensor","`","s","representing","internal","calculations","made","in","a","related","`","TransitionKernel","`",".","It","is","used","to","infer","the","structure","of","future","trace","results",".","Returns",":","state",":","empty","list","."]
code: def initialize(
      self, initial_chain_state, initial_kernel_results=None
  ):  # pylint: disable=unused-argument
      """Initialize progress bars.
  
      All arguments are ignored.
  
      Args:
        initial_chain_state: A (possibly nested) structure of `Tensor`s or Python
          `list`s of `Tensor`s representing the current state(s) of the Markov
          chain(s). It is used to infer the structure of future trace results.
        initial_kernel_results: A (possibly nested) structure of `Tensor`s
          representing internal calculations made in a related `TransitionKernel`.
          It is used to infer the structure of future trace results.
  
      Returns:
        state: empty list.
      """
      num_results = tf.convert_to_tensor(self.num_results)
  
      def init_bar(num_results):
          self.bar = self.progress_bar_fn(int(num_results))
  
      tf.py_function(init_bar, (num_results,), ())
      return []
  
file_path: probability/tensorflow_probability/python/experimental/mcmc/progress_bar_reducer.py
imports: import tensorflow.compat.v2
  from tensorflow_probability.python.experimental.mcmc import reducer
label_desc: Use image node_id 2 for calling the ProgressBarReducer obj's underlying member method code with example usage: obj.initialize(initial_chain_state, initial_kernel_results) and returns: list