STOR-i / GaussianProcesses.jl

A Julia package for Gaussian Processes
https://stor-i.github.io/GaussianProcesses.jl/latest/
Other
308 stars 53 forks source link

Failed to compile GaussianProcesses.jl #123

Closed yusri-dh closed 4 years ago

yusri-dh commented 5 years ago

I found the error when I am loading GaussianProcesses.jl


julia> using GaussianProcesses
[ Info: Recompiling stale cache file /home/yusri/.julia/compiled/v1.2/GaussianProcesses/izlaf.ji for GaussianProcesses [891a1506-143c-57d2-908e-e1f8e92e6de9]
WARNING: could not import ZygoteRules._forward into Zygote
ERROR: LoadError: LoadError: Non-differentiable function mul_int
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] macro expansion at ./none:0 [inlined]
 [3] (::typeof(∂(λ)))(::Int64) at /home/yusri/.julia/packages/Zygote/bdE6T/src/compiler/interface2.jl:19
 [4] * at ./int.jl:54 [inlined]
 [5] (::typeof(∂(*)))(::Int64) at /home/yusri/.julia/packages/Zygote/bdE6T/src/compiler/interface2.jl:0
 [6] pow at /home/yusri/.julia/packages/Zygote/bdE6T/src/precompile.jl:7 [inlined]
 [7] (::typeof(∂(pow)))(::Int64) at /home/yusri/.julia/packages/Zygote/bdE6T/src/compiler/interface2.jl:0
 [8] (::getfield(Zygote, Symbol("##32#33")){typeof(∂(pow))})(::Int64) at /home/yusri/.julia/packages/Zygote/bdE6T/src/compiler/interface.jl:38
 [9] gradient(::Function, ::Int64, ::Vararg{Int64,N} where N) at /home/yusri/.julia/packages/Zygote/bdE6T/src/compiler/interface.jl:47
 [10] top-level scope at /home/yusri/.julia/packages/Zygote/bdE6T/src/precompile.jl:19
 [11] include at ./boot.jl:328 [inlined]
 [12] include_relative(::Module, ::String) at ./loading.jl:1094
 [13] include at ./Base.jl:31 [inlined]
 [14] include(::String) at /home/yusri/.julia/packages/Zygote/bdE6T/src/Zygote.jl:1
 [15] top-level scope at /home/yusri/.julia/packages/Zygote/bdE6T/src/Zygote.jl:45
 [16] include at ./boot.jl:328 [inlined]
 [17] include_relative(::Module, ::String) at ./loading.jl:1094
 [18] include(::Module, ::String) at ./Base.jl:31
 [19] top-level scope at none:2
 [20] eval at ./boot.jl:330 [inlined]
 [21] eval(::Expr) at ./client.jl:432
 [22] top-level scope at ./none:3
in expression starting at /home/yusri/.julia/packages/Zygote/bdE6T/src/precompile.jl:19
in expression starting at /home/yusri/.julia/packages/Zygote/bdE6T/src/Zygote.jl:45
ERROR: LoadError: Failed to precompile Zygote [e88e6eb3-aa80-5325-afca-941959d7151f] to /home/yusri/.julia/compiled/v1.2/Zygote/4kbLI.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1253
 [3] _require(::Base.PkgId) at ./loading.jl:1013
 [4] require(::Base.PkgId) at ./loading.jl:911
 [5] require(::Module, ::Symbol) at ./loading.jl:906
 [6] include at ./boot.jl:328 [inlined]
 [7] include_relative(::Module, ::String) at ./loading.jl:1094
 [8] include(::Module, ::String) at ./Base.jl:31
 [9] top-level scope at none:2
 [10] eval at ./boot.jl:330 [inlined]
 [11] eval(::Expr) at ./client.jl:432
 [12] top-level scope at ./none:3
in expression starting at /home/yusri/.julia/packages/GaussianProcesses/sdvEx/src/GaussianProcesses.jl:3
ERROR: Failed to precompile GaussianProcesses [891a1506-143c-57d2-908e-e1f8e92e6de9] to /home/yusri/.julia/compiled/v1.2/GaussianProcesses/izlaf.ji.
Stacktrace:
 [1] compilecache(::Base.PkgId, ::String) at ./loading.jl:1253
 [2] _require(::Base.PkgId) at ./loading.jl:1013
 [3] require(::Base.PkgId) at ./loading.jl:911
 [4] require(::Module, ::Symbol) at ./loading.jl:906```
jbrea commented 5 years ago

Thanks for reporting! We will have to look into this. For now, you may try if ]add ZygoteRules@v0.1.0 is a useful workaround (see also here).

maximerischard commented 4 years ago

@yusri-dh, are you still getting this problem after updating the package? Please re-open this issue if yes.