chengchingwen / Transformers.jl

Julia Implementation of Transformer models
MIT License
526 stars 75 forks source link

Error in test #36

Closed gdkrmr closed 4 years ago

gdkrmr commented 4 years ago

On Julia master and Transformers master I get an error when running the tests:

[ Info: Test EMBED
Gather: Error During Test at /home/gkraemer/.julia/dev/Transformers/test/embed/gather.jl:1
  Got exception outside of a @test
  MethodError: no method matching Core.Compiler.IRCode(::Vector{Any}, ::Vector{Any}, ::Vector{Int32}, ::Vector{UInt8}, ::Core.Compiler.CFG, ::Vector{Core.LineInfoNode}, ::Vector{Any}, ::Vector{Any}, ::Vector{Any})
  Stacktrace:
    [1] Core.Compiler.IRCode(ir::IRTools.Inner.IR)
      @ IRTools.Inner.Wrap ~/.julia/packages/IRTools/GVPoj/src/ir/wrap.jl:55
    [2] update!(ci::Core.CodeInfo, ir::IRTools.Inner.IR)
      @ IRTools.Inner ~/.julia/packages/IRTools/GVPoj/src/reflection/utils.jl:143
    [3] #s2812#1248
      @ ~/.julia/packages/Zygote/jQK65/src/compiler/interface2.jl:34 [inlined]
    [4] var"#s2812#1248"(::Any, ctx::Any, f::Any, args::Any)
      @ Zygote ./none:0
    [5] (::Core.GeneratedFunctionStub)(::Any, ::Vararg{Any, N} where N)
      @ Core ./boot.jl:571
    [6] _pullback(f::Function, args::Matrix{Float64})
      @ Zygote ~/.julia/packages/Zygote/jQK65/src/compiler/interface.jl:38
    [7] pullback(f::Function, args::Matrix{Float64})
      @ Zygote ~/.julia/packages/Zygote/jQK65/src/compiler/interface.jl:44
    [8] gradient(f::Function, args::Matrix{Float64})
      @ Zygote ~/.julia/packages/Zygote/jQK65/src/compiler/interface.jl:53
    [9] macro expansion
      @ ~/.julia/dev/Transformers/test/embed/gather.jl:25 [inlined]
   [10] macro expansion
      @ ~/progs/julia/julia-master/usr/share/julia/stdlib/v1.6/Test/src/Test.jl:1144 [inlined]
   [11] top-level scope
      @ ~/.julia/dev/Transformers/test/embed/gather.jl:2
   [12] include(fname::String)
      @ Base.MainInclude ./client.jl:444
   [13] macro expansion
      @ ~/.julia/dev/Transformers/test/test_embed.jl:3 [inlined]
   [14] macro expansion
      @ ~/progs/julia/julia-master/usr/share/julia/stdlib/v1.6/Test/src/Test.jl:1144 [inlined]
   [15] top-level scope
      @ ~/.julia/dev/Transformers/test/test_embed.jl:2
   [16] include(fname::String)
      @ Base.MainInclude ./client.jl:444
   [17] macro expansion
      @ ~/.julia/dev/Transformers/test/runtests.jl:39 [inlined]
   [18] macro expansion
      @ ~/progs/julia/julia-master/usr/share/julia/stdlib/v1.6/Test/src/Test.jl:1144 [inlined]
   [19] top-level scope
      @ ~/.julia/dev/Transformers/test/runtests.jl:29
   [20] include(fname::String)
      @ Base.MainInclude ./client.jl:444
   [21] top-level scope
      @ none:6
   [22] eval(m::Module, e::Any)
      @ Core ./boot.jl:360
   [23] exec_options(opts::Base.JLOptions)
      @ Base ./client.jl:261
   [24] _start()
      @ Base ./client.jl:485
┌ Warning: concat OneHot{10} along dimension 1.
└ @ Transformers.Basic ~/.julia/dev/Transformers/src/basic/embeds/onehot.jl:156
┌ Warning: concat OneHot{10} along dimension 1.
└ @ Transformers.Basic ~/.julia/dev/Transformers/src/basic/embeds/onehot.jl:156
┌ Warning: concat OneHotArray{10} along dimension 1.
└ @ Transformers.Basic ~/.julia/dev/Transformers/src/basic/embeds/onehot.jl:173
┌ Warning: concat OneHotArray{10} along dimension 1.
└ @ Transformers.Basic ~/.julia/dev/Transformers/src/basic/embeds/onehot.jl:173

I have tried updating Zygote.jl to latest master without success.

gdkrmr commented 4 years ago

That is a Zygote issue: https://github.com/FluxML/Zygote.jl/issues/818