I have been using Folds.jl
for some computations and wanted to add a progress bar. I founds a withprogress
function in Transducers.jl
but it doesn’t seem to work with Folds.jl
, at least not directly. This works
using Folds, Transducers
1:100 |> Map(x -> begin sleep(0.05); x; end) |> Folds.collect
but if I add withprogress
1:100 |> withprogress |> Map(x -> begin sleep(0.05); x; end) |> Folds.collect
I get an error
ERROR: MethodError: no method matching size(::Transducers.ProgressLoggingFoldable{UnitRange{Int64}})
Is there some way to get the progress meter to work with Folds.jl
? From what I can tell I could switch to using Transducers.jl
directly and have it work, but I prefer the API of Folds.jl
.