title: How to set the r_bar part of tqdm
body: <p>I use tqdm to print a progress bar for a long running optimization process with hyperopt.
  The process calls a function say 500 times and each call will take around 10 to 20 minutes, so I started to make the progress display a bit more fine granular and added some <code>tqdm.update</code>-statements in the loop, advancing the progress bar fraction-wise to avoid having two nested progress bars while still beeing able to immediately see how many function calls have been performed so far.</p>
  
  <p>Now the ugly result looks like this:</p>
  
  <pre><code> 15%|███▌                    | 73.69999999999993/500 [7:40:31&lt;102:54:08, 868.98s/it, evaluating fold 2 of  2 folds...]Iteration 1, loss = 2.50358388
  </code></pre>
  
  <p>You can see above, it is the 73th call of the function and this 73th function call is about 70% finished. In fact I just estimated the number of substeps <code>m</code> in the function (which might vary from call to call) and used the fraction <code>1/m</code> to update the progress bar. Then after the function call I just synchronize the progress bar back to a full integer to avoid adding rounding errors.</p>
  
  <p>Of course accuracy is not an issue at all here. But I would like to display 73.70 rather than 73.69999999999993.
  I already tried to round my update value to two decimal places, which  doesn't fix the problem, because of precision issues in float, if a number is not exactly representable by a float, then it gets ugly-long again.
  According to the <a href="https://tqdm.github.io/docs/tqdm/" rel="noreferrer">documentation of tqdm</a> this part is hidden in the in the part <code>r_bar</code> of the whole format string, but I couldn't find a way to set it. Can you help me with this?</p>
  
  <p>According to the docs <code>r_bar</code> defaults to:</p>
  
  <pre><code>r_bar='| {n_fmt}/{total_fmt} [{elapsed}&lt;{remaining}, '
  </code></pre>
  
  <p>Here is my code:</p>
  
  <pre><code>with tqdm(iterable=None, initial=num_trials, maxinterval=maxinterval, total=max_evals, ascii=False, disable=show_progressbar is False) as progress_bar:
      def fn_to_minimize(*args, **kwargs):
          return fn(*args, **kwargs, _progress_bar=progress_bar)
  
      for num_trials in range(num_trials, max_evals):
          progress_bar.n=float(num_trials)
          progress_bar.refresh()
          best = fmin(**kwargs, fn=fn_to_minimize, trials=trials, max_evals=num_trials+1)
  
  # do some other stuff here
  </code></pre>
  
  <p>In the called function (one of the entries in <code>kwargs</code> btw) I update the progress bar just like this:</p>
  
  <pre><code>_progress_bar.update(round(update_value, 2))
  </code></pre>