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: Advance progress bar by one result.
  
  All arguments are ignored.
  
  Args:
    new_chain_state: A (possibly nested) structure of incoming chain state(s)
      with shape and dtype compatible with those used to initialize the
      `TracingState`.
    current_reducer_state: `TracingState`s representing all previously traced
      results.
    previous_kernel_results: A (possibly nested) structure of `Tensor`s
      representing internal calculations made in a related
      `TransitionKernel`.
  
  Returns:
    new_reducer_state: empty list.
docstr_tok: ["Advance","progress","bar","by","one","result",".","All","arguments","are","ignored",".","Args",":","new_chain_state",":","A","(","possibly","nested",")","structure","of","incoming","chain","state","(","s",")","with","shape","and","dtype","compatible","with","those","used","to","initialize","the","`","TracingState","`",".","current_reducer_state",":","`","TracingState","`","s","representing","all","previously","traced","results",".","previous_kernel_results",":","A","(","possibly","nested",")","structure","of","`","Tensor","`","s","representing","internal","calculations","made","in","a","related","`","TransitionKernel","`",".","Returns",":","new_reducer_state",":","empty","list","."]
code: def one_step(
      self,
      new_chain_state,
      current_reducer_state,
      previous_kernel_results,
  ):  # pylint: disable=unused-argument
      """Advance progress bar by one result.
  
      All arguments are ignored.
  
      Args:
        new_chain_state: A (possibly nested) structure of incoming chain state(s)
          with shape and dtype compatible with those used to initialize the
          `TracingState`.
        current_reducer_state: `TracingState`s representing all previously traced
          results.
        previous_kernel_results: A (possibly nested) structure of `Tensor`s
          representing internal calculations made in a related
          `TransitionKernel`.
  
      Returns:
        new_reducer_state: empty list.
      """
  
      def update_bar():
          try:
              next(self.bar)
          except StopIteration:
              pass
  
      tf.py_function(update_bar, (), ())
      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 3 for calling the ProgressBarReducer obj's underlying member method code with example usage: obj.one_step(new_chain_state, current_reducer_state, previous_kernel_results) and returns: list