joshday / OnlineStats.jl

⚡ Single-pass algorithms for statistics
https://joshday.github.io/OnlineStats.jl/latest/
MIT License
831 stars 62 forks source link

OnlineStats can't be precompiled #225

Closed ElvisCasco closed 3 years ago

ElvisCasco commented 3 years ago

I have a question: I've tried to install the OnlineStats package for the last version of Julia, however it gives me an error due to LearnBase, I already have installed the last version of LearnBase and it still doesn't work:

using OnlineStats [ Info: Precompiling OnlineStats [a15396b6-48d5-5d58-9928-6d29437db91e] WARNING: could not import LearnBase.fit! into OnlineStats WARNING: could not import LearnBase.nobs into OnlineStats WARNING: could not import LearnBase.predict into OnlineStats ERROR: LoadError: LoadError: TypeError: in Type{...} expression, expected UnionAll, got a value of type typeof(LossFunctions.ScaledDistanceLoss) Stacktrace: [1] top-level scope at C:\Users\ec109004.julia\packages\OnlineStats\8twTF\src\stats\statlearn.jl:156 [2] include(::Function, ::Module, ::String) at .\Base.jl:380 [3] include at .\Base.jl:368 [inlined] [4] include(::String) at C:\Users\ec109004.julia\packages\OnlineStats\8twTF\src\OnlineStats.jl:1 [5] top-level scope at C:\Users\ec109004.julia\packages\OnlineStats\8twTF\src\OnlineStats.jl:61 [6] include(::Function, ::Module, ::String) at .\Base.jl:380 [7] include(::Module, ::String) at .\Base.jl:368 [8] top-level scope at none:2 [9] eval at .\boot.jl:347 [inlined] [10] eval(::Expr) at .\client.jl:467 [11] top-level scope at .\none:3 in expression starting at C:\Users\ec109004.julia\packages\OnlineStats\8twTF\src\stats\statlearn.jl:156 in expression starting at C:\Users\ec109004.julia\packages\OnlineStats\8twTF\src\OnlineStats.jl:61 ERROR: Failed to precompile OnlineStats [a15396b6-48d5-5d58-9928-6d29437db91e] to C:\Users\ec109004.julia\compiled\v1.5\OnlineStats\G3mU6_xUViy.ji. Stacktrace: [1] error(::String) at .\error.jl:33 [2] compilecache(::Base.PkgId, ::String) at .\loading.jl:1305 [3] _require(::Base.PkgId) at .\loading.jl:1030 [4] require(::Base.PkgId) at .\loading.jl:928 [5] require(::Module, ::Symbol) at .\loading.jl:923

joshday commented 3 years ago

Can you provide what you get from Pkg.status("OnlineStats")?

It sounds like you're stuck on an old version, since OnlineStats does not import LearnBase (anymore).