Skip to content
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

Problems with p.check_iterations #209

Closed
ablaom opened this issue Jun 1, 2021 · 4 comments
Closed

Problems with p.check_iterations #209

ablaom opened this issue Jun 1, 2021 · 4 comments
Assignees

Comments

@ablaom
Copy link

ablaom commented Jun 1, 2021

Newer versions of ProgressMeter have been intermittently crashing code in several MLJ repositories that use it. See for example this failing build and this issue. Version 1.5 is fine, but the new check_iterations apparatus is what is causing the problem.

Here's the beginning of the stack trace:

ERROR: InexactErr
or: trunc(Int64, NaN)                                                             
Stacktrace:
  [1] trunc
    @ ./float.jl:716 [inlined]
  [2] round
    @ ./float.jl:296 [inlined]
  [3] calc_check_iterations
    @ ~/.julia/packages/ProgressMeter/l7LEt/src/ProgressMeter.jl:246 [inlined]
  [4] updateProgress!(p::ProgressMeter.Progress; showvalues::Tuple{}, truncate_lines::Bool, 
valuecolor::Symbol, offset::Int64, keep::Bool, desc::Nothing, ignore_predictor::Bool)      
    @ ProgressMeter ~/.julia/packages/ProgressMeter/l7LEt/src/ProgressMeter.jl:293
  [5] updateProgress!
    @ ~/.julia/packages/ProgressMeter/l7LEt/src/ProgressMeter.jl:253 [inlined]

It could be that the error is on our side, but we would certainly appreciate some clues as to what we might be doing to create the NaN.

cc @OkonSamuel

@IanButterworth
Copy link
Collaborator

I believe this should fix the issue, but it would be great if you could check this PR if you have a repro #210

IanButterworth added a commit to IanButterworth/ProgressMeter.jl that referenced this issue Jun 1, 2021
IanButterworth added a commit that referenced this issue Jun 1, 2021
* avoid NaN in calc_check_iterations

* add test for #209

* fix test

* more fix
@IanButterworth
Copy link
Collaborator

I've merged and released #210 in v.1.7.1 given avoiding the NaN is a good idea, and likely to fix this. Can you confirm whether that new release fixes the issue. Thanks

@ablaom
Copy link
Author

ablaom commented Jun 1, 2021

Thanks so much for the prompt attention! Having a hard time reproducing the original error (one of the reasons for reaching out) but see here.

@ablaom
Copy link
Author

ablaom commented Jun 1, 2021

I am no longer seeing a problem in our builds, and the poster of the original issue alan-turing-institute/MLJ.jl#788 (comment) is unable to reproduce. So closing.

@IanButterworth Again many thanks for the extremely prompt resolution!

@ablaom ablaom closed this as completed Jun 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants