Fix off-by-one progress bar bugs#8201
Merged
Merged
Conversation
Documentation build overview
Show files changed (2 files in total): 📝 2 modified | ➕ 0 added | ➖ 0 deleted
|
648f4b1 to
6902890
Compare
Member
Author
|
Failures look unrelated? |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8201 +/- ##
==========================================
- Coverage 91.49% 91.46% -0.04%
==========================================
Files 124 124
Lines 19868 19865 -3
==========================================
- Hits 18179 18170 -9
- Misses 1689 1695 +6
🚀 New features to boost your workflow:
|
fonnesbeck
approved these changes
Mar 17, 2026
6902890 to
cab545a
Compare
Member
|
The failures was due to patches on main that are not in V3 yet. I changed the branch of both PRs to main (@fonnesbeck 's a few days ago, which is how they "magically" went away) |
Member
|
Magic! |
69767f0 to
cab545a
Compare
Member
|
It's hanging in the |
Member
|
@fonnesbeck merged |
Member
Author
Any sufficiently advanced Ricardo PR is indistinguishable from magic |
ricardoV94
pushed a commit
to ricardoV94/pymc
that referenced
this pull request
Mar 17, 2026
* Fix off-by-one progress bug * Simplify is_last logic * Add marimo tests for off-by-one bug
9 tasks
zaxtax
pushed a commit
to zaxtax/pymc
that referenced
this pull request
Mar 21, 2026
* Fix off-by-one progress bug * Simplify is_last logic * Add marimo tests for off-by-one bug
ricardoV94
pushed a commit
to ricardoV94/pymc
that referenced
this pull request
Mar 23, 2026
* Fix off-by-one progress bug * Simplify is_last logic * Add marimo tests for off-by-one bug
ricardoV94
pushed a commit
to ricardoV94/pymc
that referenced
this pull request
Mar 23, 2026
* Fix off-by-one progress bug * Simplify is_last logic * Add marimo tests for off-by-one bug
ricardoV94
pushed a commit
that referenced
this pull request
Mar 23, 2026
* Fix off-by-one progress bug * Simplify is_last logic * Add marimo tests for off-by-one bug
Closed
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Progress bar is currently off by one when it completes, and @ricardoV94 is bullying me about it. The issue was we added a
-1factor to the total at some point when we shouldn't have. This caused the samplers to stop atn-1 / n(for which I was bullied). In the case of SMC sampling, it caused the progressbar maximum to be 0, so progress immediately stopped and no timing info is given.I also re-wrote the test_manager tests. They weren't testing anything, just type checks and deterministic code paths. I added some tests that would have caught these off-by-one bugs.
I also simplified the
is_lastlogic. Previously it was trying to calculate the remaining steps then advancing by that much, then doing a cleanup step. Now we just directly set the total completed to the expected total. This should be 100% bulletproof against embarrassing off-by-one bugs.