Skip to content

Method ambiguity for simple Thunks #314

Open
@DrChainsaw

Description

@DrChainsaw
Contributor

Maybe this is a bug in Base? I will try look into it some more later tonight.

julia> t = Dagger.@par (() -> 1)()
Thunk[6](#17, ())

julia> collect(t)
ERROR: MethodError: defalg(::Vector{Union{}}) is ambiguous. Candidates:
  defalg(v::AbstractArray{<:Union{Missing, Number}}) in Base.Sort at sort.jl:658
  defalg(::AbstractArray{<:Union{Missing, InlineStrings.String1, InlineStrings.String15, InlineStrings.String3, InlineStrings.String7}}) in InlineStrings at \.julia\packages\InlineStrings\C5tOh\src\InlineStrings.jl:656
Possible fix, define
  defalg(::AbstractArray{<:Missing})
Stacktrace:
 [1] order(node::Thunk, ndeps::Dict{Thunk, Int64})
   @ Dagger \.julia\packages\Dagger\tbgym\src\compute.jl:169
 [2] compute_dag(ctx::Context, d::Thunk; options::Nothing)
   @ Dagger.Sch \.julia\packages\Dagger\tbgym\src\sch\Sch.jl:346
 [3] compute(ctx::Context, d::Thunk; options::Nothing)
   @ Dagger \.julia\packages\Dagger\tbgym\src\compute.jl:31
 [4] collect(ctx::Context, t::Thunk; options::Nothing)
   @ Dagger \.julia\packages\Dagger\tbgym\src\compute.jl:8
 [5] #collect#136
   @ \.julia\packages\Dagger\tbgym\src\compute.jl:10 [inlined]
 [6] collect(d::Thunk)
   @ Dagger \.julia\packages\Dagger\tbgym\src\compute.jl:10
 [7] top-level scope
   @ REPL[21]:1

julia> versioninfo()
Julia Version 1.7.0
Commit 3bf9d17731 (2021-11-30 12:12 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, skylake)
Environment:
  JULIA_EDITOR = code
  JULIA_NUM_THREADS = 8

Activity

linked a pull request that will close this issuedon't sort! parents when empty in order() #315on Dec 7, 2021
krynju

krynju commented on Dec 18, 2021

@krynju
Member

This still happens in other places in the Dagger codebase, but it's a Base/InlineStrings thing to resolve.
Mostly happens due to having CSV.jl loaded

Reopening until fully resolved
JuliaLang/julia#43426

reopened this on Dec 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @krynju@DrChainsaw

      Issue actions

        Method ambiguity for simple Thunks · Issue #314 · JuliaParallel/Dagger.jl