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

Error with showspeed kwarg with ProgressThresh #236

Closed
KronosTheLate opened this issue Apr 28, 2022 · 1 comment
Closed

Error with showspeed kwarg with ProgressThresh #236

KronosTheLate opened this issue Apr 28, 2022 · 1 comment

Comments

@KronosTheLate
Copy link

I am unable to set the showspeed kwarg when constructing a ProgressThresh:

julia> prog = ProgressThresh(1e-5, "Minimizing:");

julia> for val in exp10.(range(2, stop=-6, length=20))
           ProgressMeter.update!(prog, val)
           sleep(0.1)
       end
Minimizing: Time: 0:00:06 (18 iterations)

julia> prog = ProgressThresh(1e-5, "Minimizing:", showspeed=true);
ERROR: MethodError: no method matching ProgressThresh(::Float64, ::String; showspeed=true)
Closest candidates are:
  ProgressThresh(::Real, ::AbstractString) at C:\Users\Dennis Bal\.julia\packages\ProgressMeter\Vf8un\src\ProgressMeter.jl:168 got unsupported keyword argument "showspeed"
  ProgressThresh(::Real, ::AbstractString, ::Integer) at C:\Users\Dennis Bal\.julia\packages\ProgressMeter\Vf8un\src\ProgressMeter.jl:168 got unsupported keyword argument "showspeed"
  ProgressThresh(::Real; kwargs...) at C:\Users\Dennis Bal\.julia\packages\ProgressMeter\Vf8un\src\ProgressMeter.jl:160
  ...
Stacktrace:
 [1] top-level scope
   @ REPL[172]:1

As a side-note, I am showing the progress of a process that tries to achieve some accuracy. It would be cool to be able to show something like 10/15 iterations at the end of the progress meter. That is what I am trying to do, but I do not think it is possible - the numbers will be evaluated to 0.66666 and shown as iter/maxiter.

@MarcMush
Copy link
Collaborator

MarcMush commented Sep 3, 2023

this is a mix of old and new syntax
it will work by using kwargs for desc too:

prog = ProgressThresh(1e-5, desc="Minimizing:", showspeed=true)

@MarcMush MarcMush closed this as completed Sep 3, 2023
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