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

Need to export Flux, Tracker #178

Closed
aviks opened this issue Dec 9, 2019 · 2 comments
Closed

Need to export Flux, Tracker #178

aviks opened this issue Dec 9, 2019 · 2 comments
Assignees

Comments

@aviks
Copy link
Member

aviks commented Dec 9, 2019

TextAnalysis now needs to export the Flux and Tracker symbols. That should not be required.

Without those exports, loading the BSON models throws an error:

 UndefVarError: Flux not defined
  Stacktrace:
   [1] (::BSON.var"#31#32")(::Module, ::String) at /home/aviks/.julia/packages/BSON/Ryxwc/src/extensions.jl:20
   [2] mapfoldl_impl(::typeof(identity), ::BSON.var"#31#32", ::NamedTuple{(:init,),Tuple{Module}}, ::Array{Any,1}) at ./reduce.jl:45
   [3] #mapfoldl#184(::Base.Iterators.Pairs{Symbol,Module,Tuple{Symbol},NamedTuple{(:init,),Tuple{Module}}}, ::typeof(mapfoldl), ::Function, ::Function, ::Array{Any,1}) at ./reduce.jl:72
   [4] #mapfoldl at ./none:0 [inlined]
   [5] _mapreduce_dim at ./reducedim.jl:310 [inlined]
   [6] #mapreduce#582 at ./reducedim.jl:307 [inlined]
   [7] #mapreduce at ./none:0 [inlined]
   [8] #reduce#584 at ./reducedim.jl:352 [inlined]
   [9] (::Base.var"#kw##reduce")(::NamedTuple{(:init,),Tuple{Module}}, ::typeof(reduce), ::Function, ::Array{Any,1}) at ./none:0
   [10] resolve(::Array{Any,1}) at /home/aviks/.julia/packages/BSON/Ryxwc/src/extensions.jl:20
   [11] (::BSON.var"#35#36")(::Dict{Symbol,Any}) at /home/aviks/.julia/packages/BSON/Ryxwc/src/extensions.jl:53
   [12] _raise_recursive(::Dict{Symbol,Any}, ::IdDict{Any,Any}) at /home/aviks/.julia/packages/BSON/Ryxwc/src/read.jl:79   [13] raise_recursive(::Dict{Symbol,Any}, ::IdDict{Any,Any}) at /home/aviks/.julia/packages/BSON/Ryxwc/src/read.jl:89    [14] (::BSON.var"#23#24"{IdDict{Any,Any}})(::Dict{Symbol,Any}) at /home/aviks/.julia/packages/BSON/Ryxwc/src/read.jl:94
   [15] applychildren!(::BSON.var"#23#24"{IdDict{Any,Any}}, ::Array{Any,1}) at /home/aviks/.julia/packages/BSON/Ryxwc/src/BSON.jl:28
   [16] raise_recursive at /home/aviks/.julia/packages/BSON/Ryxwc/src/read.jl:94 [inlined]
   [17] (::BSON.var"#19#21"{IdDict{Any,Any}})(::Array{Any,1}) at /home/aviks/.julia/packages/BSON/Ryxwc/src/read.jl:79     [18] applychildren!(::BSON.var"#19#21"{IdDict{Any,Any}}, ::Dict{Symbol,Any}) at /home/aviks/.julia/packages/BSON/Ryxwc/src/BSON.jl:21
   [19] _raise_recursive(::Dict{Symbol,Any}, ::IdDict{Any,Any}) at /home/aviks/.julia/packages/BSON/Ryxwc/src/read.jl:79   [20] raise_recursive(::Dict{Symbol,Any}, ::IdDict{Any,Any}) at /home/aviks/.julia/packages/BSON/Ryxwc/src/read.jl:89    [21] (::BSON.var"#45#46")(::Dict{Symbol,Any}, ::IdDict{Any,Any}) at /home/aviks/.julia/packages/BSON/Ryxwc/src/extensions.jl:138
   [22] raise_recursive(::Dict{Symbol,Any}, ::IdDict{Any,Any}) at /home/aviks/.julia/packages/BSON/Ryxwc/src/read.jl:88    [23] (::BSON.var"#20#22"{IdDict{Any,Any}})(::Dict{Symbol,Any}) at /home/aviks/.julia/packages/BSON/Ryxwc/src/read.jl:82
   [24] applychildren!(::BSON.var"#20#22"{IdDict{Any,Any}}, ::Dict{Symbol,Any}) at /home/aviks/.julia/packages/BSON/Ryxwc/src/BSON.jl:21
   [25] _raise_recursive(::Dict{Symbol,Any}, ::IdDict{Any,Any}) at /home/aviks/.julia/packages/BSON/Ryxwc/src/read.jl:82   [26] raise_recursive(::Dict{Symbol,Any}, ::IdDict{Any,Any}) at /home/aviks/.julia/packages/BSON/Ryxwc/src/read.jl:89    [27] raise_recursive at /home/aviks/.julia/packages/BSON/Ryxwc/src/read.jl:99 [inlined]
   [28] load at /home/aviks/.julia/packages/BSON/Ryxwc/src/read.jl:104 [inlined]
   [29] TextAnalysis.BiLSTM_CNN_CRF_Model(::Array{String,1}, ::Dict{Char,Int64}, ::Dict{String,Int64}, ::Int64, ::Int64, ::String) at /home/aviks/.julia/dev/TextAnalysis/src/sequence/sequence_models.jl:37
   [30] PoSTagger(::String, ::String) at /home/aviks/.julia/dev/TextAnalysis/src/sequence/pos.jl:14
   [31] PoSTagger() at /home/aviks/.julia/dev/TextAnalysis/src/sequence/pos.jl:10
   [32] top-level scope at /home/aviks/.julia/dev/TextAnalysis/test/pos.jl:4
@Ayushk4
Copy link
Member

Ayushk4 commented Dec 12, 2019

This is being held up by - JuliaIO/BSON.jl#52

@Ayushk4
Copy link
Member

Ayushk4 commented Dec 12, 2019

I am looking for some ways to bypass this bug.

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