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

tcollect on withprogress now fails on v0.4.76 #557

Open
sethaxen opened this issue Jun 23, 2023 · 2 comments
Open

tcollect on withprogress now fails on v0.4.76 #557

sethaxen opened this issue Jun 23, 2023 · 2 comments

Comments

@sethaxen
Copy link

The following is a new failure on v0.4.76:

using Transducers

Transducers.tcollect(Map(identity), withprogress(1:5; interval=1e-3))

On v0.4.75:

5-element Vector{Int64}:
 1
 2
 3
 4
 5

On v0.4.76:

julia> Transducers.tcollect(Map(identity), withprogress(1:5; interval=1e-3))
ERROR: MethodError: no method matching iterate(::Transducers.ProgressLoggingFoldable{UnitRange{Int64}})

Closest candidates are:
  iterate(::Union{LinRange, StepRangeLen})
   @ Base range.jl:880
  iterate(::Union{LinRange, StepRangeLen}, ::Integer)
   @ Base range.jl:880
  iterate(::T) where T<:Union{Base.KeySet{<:Any, <:Dict}, Base.ValueIterator{<:Dict}}
   @ Base dict.jl:698
  ...

Stacktrace:
  [1] iterate(::Base.Iterators.PartitionIterator{Transducers.ProgressLoggingFoldable{UnitRange{Int64}}})
    @ Base.Iterators ./iterators.jl:1319
  [2] copyto!(dest::Vector{Vector{Int64}}, src::Base.Iterators.PartitionIterator{Transducers.ProgressLoggingFoldable{UnitRange{Int64}}})
    @ Base ./abstractarray.jl:946
  [3] _collect(cont::UnitRange{Int64}, itr::Base.Iterators.PartitionIterator{Transducers.ProgressLoggingFoldable{UnitRange{Int64}}}, #unused#::Base.HasEltype, isz::Base.HasLength)
    @ Base ./array.jl:713
  [4] collect(itr::Base.Iterators.PartitionIterator{Transducers.ProgressLoggingFoldable{UnitRange{Int64}}})
    @ Base ./array.jl:707
  [5] split_into_chunks(coll::Transducers.ProgressLoggingFoldable{UnitRange{Int64}}, sz::Int64)
    @ Transducers ~/.julia/packages/Transducers/IWhZW/src/reduce.jl:364
  [6] _tcopy(xf::Map{typeof(identity)}, ::Type{Vector}, reducible::Transducers.ProgressLoggingFoldable{UnitRange{Int64}}, ::Transducers.SizeStable, ::Base.HasShape{1}; basesize::Int64, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Transducers ~/.julia/packages/Transducers/IWhZW/src/reduce.jl:358
  [7] _tcopy(xf::Map{typeof(identity)}, ::Type{Vector}, reducible::Transducers.ProgressLoggingFoldable{UnitRange{Int64}}, ::Transducers.SizeStable, ::Base.HasShape{1})
    @ Transducers ~/.julia/packages/Transducers/IWhZW/src/reduce.jl:356
  [8] tcopy(xf::Map{typeof(identity)}, T::Type, reducible::Transducers.ProgressLoggingFoldable{UnitRange{Int64}}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Transducers ~/.julia/packages/Transducers/IWhZW/src/reduce.jl:354
  [9] tcopy(xf::Map{typeof(identity)}, T::Type, reducible::Transducers.ProgressLoggingFoldable{UnitRange{Int64}})
    @ Transducers ~/.julia/packages/Transducers/IWhZW/src/reduce.jl:354
 [10] tcollect(xf::Map{typeof(identity)}, reducible::Transducers.ProgressLoggingFoldable{UnitRange{Int64}}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Transducers ~/.julia/packages/Transducers/IWhZW/src/reduce.jl:434
 [11] tcollect(xf::Map{typeof(identity)}, reducible::Transducers.ProgressLoggingFoldable{UnitRange{Int64}})
    @ Transducers ~/.julia/packages/Transducers/IWhZW/src/reduce.jl:434
 [12] top-level scope
    @ REPL[14]:1
@MasonProtter
Copy link
Member

Crap, this is caused by #553

I think I'll have to figure out a good way to set up this halve-ing proceedure instead of using Iterators.partition`.


Note that this branch is no longer maintained. All work is continuing at https://github.com/JuliaFolds2/Transducers.jl so issues should be filed there.

@sethaxen
Copy link
Author

Hi @MasonProtter , has there been any work toward fixing this in https://github.com/JuliaFolds2/Transducers.jl?

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