From 97a1508498b591f1d4431d1ea346fea203e8c83c Mon Sep 17 00:00:00 2001 From: Yicheng Wu Date: Fri, 24 Nov 2023 17:21:56 +0800 Subject: [PATCH] fix --- Project.toml | 2 +- src/showprogress.jl | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Project.toml b/Project.toml index 77e42d7c..bbfaf6ca 100644 --- a/Project.toml +++ b/Project.toml @@ -25,7 +25,7 @@ Optimisers = "3bd65402-5787-11e9-1adc-39752487f4e2" Optimization = "7f7a1694-90dd-40f0-9382-eb1efda571ba" OptimizationOptimisers = "42dfb2eb-d2b4-4451-abcd-913932933ac1" Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" -ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca" +ProgressBars = "49802e3a-d2f1-5c88-81d8-b72133a6f568" QuasiMonteCarlo = "8a4e6c94-4038-4cdc-81c3-7e6ffdb2a71b" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" Requires = "ae029012-a4dd-5104-9daa-d747884805df" diff --git a/src/showprogress.jl b/src/showprogress.jl index c0454dcc..02099cf0 100644 --- a/src/showprogress.jl +++ b/src/showprogress.jl @@ -1,5 +1,5 @@ using MacroTools -using ProgressMeter +using ProgressBars using Printf macro showprogress(expr) @@ -19,14 +19,14 @@ macro showprogress(expr) end iter_var = gensym(:iter) - progress_expr = :($iter_var = Sophon.ProgressMeter.ProgressBar(1:$maxiters)) + progress_expr = :($iter_var = ProgressBars.ProgressBar(1:$maxiters)) if isnothing(callback) callback_var = gensym(:callback) callback_def = quote function $callback_var(p, l) update($iter_var) - set_description($iter_var, string(Sophon.Printf.@sprintf("%.6e", l))) + set_description($iter_var, string(Printf.@sprintf("%.6e", l))) return false end end