-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a progress meter for LMM fits #539
Conversation
The CI failures seem to be a problem with the Windows VMs. |
I think I had looked at making the iterations clear and print in the same spot, but then got sidetracked: timholy/ProgressMeter.jl#204 |
CI is failing for Julia 1.4 on Windows because it can't download packages correctly. Should we switch the CI to julia 1.6 only? (Until we are able to run tests on 1.7 and later.) |
Since this is for the breaking 4.0 release, let's just go ahead and make support start at 1.6. Can you also update Project.toml? (And even though it's not a feature, a note to NEWS?) |
Will the changes re CI on version 1.6 (and, sigh!, add a news item - I feel like a surly teenager rolling his eyes about the stupid rules his parents have) when I get back from a walk. |
@dmbates I'll take care of it while you're out -- I have a minute while a computation runs. 😄 |
Codecov Report
@@ Coverage Diff @@
## main #539 +/- ##
==========================================
+ Coverage 94.28% 94.29% +0.01%
==========================================
Files 26 26
Lines 2308 2313 +5
==========================================
+ Hits 2176 2181 +5
Misses 132 132
Continue to review full report at Codecov.
|
Should the default value of |
There is a problem with using the optional argument |
What does verbose output look like now for a quick fit like |
For different machines it could be that nothing shows up or just the final summary. Perhaps we should change the optional argument name to By the way, I looked in the ProgressMeter package for a NEWS.md file to check on what version is needed for which capabilities and there isn't a NEWS.md file. So there! |
I like the idea of changing the argument name to
😁 |
@palday Can you take another look, please? |
I think it's nearly there -- what do you think of my comments for |
Co-authored-by: Phillip Alday <[email protected]>
Co-authored-by: Phillip Alday <[email protected]>
Those look good, thanks. Both committed now. |
@palday Took a bit longer than I imagined as I needed to add a default to refit! methods as well. I chose |
@dmbates while you were writing that comment, I was already commenting on the choice of default for |
My reasoning was that for a refit! the user has already had the chance to see the progress meter for the optimization so the novelty may have worn off. I would be okay with changing the default to |
I had a similar thought -- typically the user knows better what to expect with We could take a middle ground that will make things easier in the future if we expose more options to the user: have a |
@palday the |
yep, will do |
test/pirls.jl
Outdated
refit!(gm2r, 1 .- gm2.y; fast=true) | ||
@test gm2r.β ≈ -gm2.β atol=1e-3 | ||
|
||
refit!(gm2r; fast=true, progress=false) | ||
@test length(gm2r.optsum.final) == 1 | ||
@test gm2r.θ ≈ gm2.θ atol=1e-3 | ||
|
||
refit!(gm2r, 1 .- gm2.y; fast=false) | ||
# swapping successes and failures to give us the same model | ||
# but with opposite signs. healthy ≈ 1 - response(gm2r) | ||
# but defining it in terms of the original values avoids some | ||
# nasty floating point issues | ||
healthy = @. (cbpp.hsz - cbpp.incid) / cbpp.hsz | ||
refit!(gm2r, healthy; fast=false, progress=false) | ||
@test length(gm2r.optsum.final) == 5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dmbates going the kwargs...
route made me realize that we weren't passing all the arguments here ... which then lead to the discovery that the "flipped" response was numerically pathological for fast fits. Hence the changes here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As soon as the CIs pass, please merge. 😄
@palday I seem to be playing "whack-a-mole" again trying to track down all the instances of Does it seem that we are going about this the wrong way? I don't mind a bit of whack-a-mole but this seems to be going on longer than is wise. By the way, the Mac tests seem to be slower and hence better at finding cases where the progress meter kicks in. |
Interesting on the Mac tests .... I agree that I think there's not much to be done about the whack-a-mole -- that's just what happens when you change defaults. 🤷 I have a somewhat slower computer I can also run the tests on and see if that reveals any more cases. |
During the iterations the current objective is displayed below the Progress line,
Time: 0
ends up in that line.