Skip to content

Commit

Permalink
fix: Show cumulative iterations, not slowest chain
Browse files Browse the repository at this point in the history
Show cumulative iterations across all chains.
Previously users were shown the progress of the slowest chain.
Cumulative iterations is a better measure of progress.
  • Loading branch information
riddell-stan committed Aug 20, 2020
1 parent a405637 commit 04e3a51
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stan/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,9 @@ async def go():
int, current_and_max_iterations_re.findall(progress_message).pop(0)
)
if not progress_bar.get_max_steps(): # i.e., has not started
progress_bar.start(max=iteration_max)
progress_bar.start(max=iteration_max * num_chains)
current_iterations[operation["name"]] = iteration
progress_bar.set_progress(min(current_iterations.values()))
progress_bar.set_progress(sum(current_iterations.values()))
await asyncio.sleep(0.01)
progress_bar.set_message("Sampling finished.")
progress_bar.finish()
Expand Down

0 comments on commit 04e3a51

Please sign in to comment.