cstjean / ScikitLearn.jl

Julia implementation of the scikit-learn API https://cstjean.github.io/ScikitLearn.jl/dev/
Other
546 stars 75 forks source link

Error loading ScikitLearn #44

Closed kraftpunk97-zz closed 6 years ago

kraftpunk97-zz commented 6 years ago

I get the following error when inputting using ScikitLearn after installing the package. using Julia 1.0.0

julia> using ScikitLearn
[ Info: Precompiling ScikitLearn [3646fa90-6ef7-5e7e-9f22-8aca16db6324]
ERROR: LoadError: LoadError: syntax: extra token "ScikitLearnBase" after end of expression
Stacktrace:
 [1] include at ./boot.jl:317 [inlined]
 [2] include_relative(::Module, ::String) at ./loading.jl:1038
 [3] include at ./sysimg.jl:29 [inlined]
 [4] include(::String) at /Users/kartikeygupta/.julia/packages/ScikitLearn/ILHSi/src/ScikitLearn.jl:10
 [5] top-level scope at none:0
 [6] include at ./boot.jl:317 [inlined]
 [7] include_relative(::Module, ::String) at ./loading.jl:1038
 [8] include(::Module, ::String) at ./sysimg.jl:29
 [9] top-level scope at none:2
 [10] eval at ./boot.jl:319 [inlined]
 [11] eval(::Expr) at ./client.jl:389
 [12] top-level scope at ./none:3
in expression starting at /Users/kartikeygupta/.julia/packages/ScikitLearn/ILHSi/src/Skcore.jl:15
in expression starting at /Users/kartikeygupta/.julia/packages/ScikitLearn/ILHSi/src/ScikitLearn.jl:12
ERROR: Failed to precompile ScikitLearn [3646fa90-6ef7-5e7e-9f22-8aca16db6324] to /Users/kartikeygupta/.julia/compiled/v1.0/ScikitLearn/tbUuI.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] macro expansion at ./logging.jl:313 [inlined]
 [3] compilecache(::Base.PkgId, ::String) at ./loading.jl:1184
 [4] macro expansion at ./logging.jl:311 [inlined]
 [5] _require(::Base.PkgId) at ./loading.jl:941
 [6] require(::Base.PkgId) at ./loading.jl:852
 [7] macro expansion at ./logging.jl:311 [inlined]
 [8] require(::Module, ::Symbol) at ./loading.jl:834
cstjean commented 6 years ago

Could you please try after add ScikitLearn#master and restarting Julia? Transition to 1.0 is in progress.

SimonAB commented 6 years ago

I am seeing the same thing here (identical Stacktrace output), even after add ScikitLearn#master and restarting Julia 1.0...

cstjean commented 6 years ago

Thank you for checking. It looks like it's not quite ready for 1.0. I should get to it soon.

In the meanwhile, may I recommend using Julia 0.7? It's essentially identical to 1.0, but many, many more packages work on Julia 0.7 (including ScikitLearn).

kraftpunk97-zz commented 6 years ago

Sorry if I seem impatient, but do we know how will it take to migrate to 1.0?

cstjean commented 6 years ago

Next weekend is a long weekend in Canada, and I assume that I'll find some time to do it then. In the meantime, any help is appreciated. The package should already be very close to 1.0-ready, so if anyone wants to figure out where the above message comes from (and why), that'd be appreciated.

kraftpunk97-zz commented 6 years ago

@cstjean Things aren't looking too good in 0.7 either... EDIT - I just realised that @theogf referenced this issue as well.

julia> using ScikitLearn
[ Info: Precompiling ScikitLearn [3646fa90-6ef7-5e7e-9f22-8aca16db6324]
┌ Warning: Deprecated syntax `type` at /Users/kartikeygupta/.julia/packages/ScikitLearn/ILHSi/src/sk_utils.jl:229.
│ Use `mutable struct` instead.
└ @ ~/.julia/packages/ScikitLearn/ILHSi/src/sk_utils.jl:229
┌ Warning: `importall` is deprecated, use `using` or individual `import` statements instead
│   caller = ip:0x0
└ @ Core :-1
┌ Warning: Deprecated syntax `parametric method syntax ndgrid{T}(v1::AbstractVector{T}, v2::AbstractVector{T})` around /Users/kartikeygupta/.julia/packages/ScikitLearn/ILHSi/src/Ndgrid.jl:6.
│ Use `ndgrid(v1::AbstractVector{T}, v2::AbstractVector{T}) where T` instead.
└ @ ~/.julia/packages/ScikitLearn/ILHSi/src/Ndgrid.jl:6
┌ Warning: Deprecated syntax `parametric method syntax ndgrid{T}(vs::AbstractVector{T}...)` around /Users/kartikeygupta/.julia/packages/ScikitLearn/ILHSi/src/Ndgrid.jl:19.
│ Use `ndgrid(vs::AbstractVector{T}...) where T` instead.
└ @ ~/.julia/packages/ScikitLearn/ILHSi/src/Ndgrid.jl:19
┌ Warning: Deprecated syntax `parametric method syntax meshgrid{T}(vx::AbstractVector{T}, vy::AbstractVector{T})` around /Users/kartikeygupta/.julia/packages/ScikitLearn/ILHSi/src/Ndgrid.jl:36.
│ Use `meshgrid(vx::AbstractVector{T}, vy::AbstractVector{T}) where T` instead.
└ @ ~/.julia/packages/ScikitLearn/ILHSi/src/Ndgrid.jl:36
┌ Warning: Deprecated syntax `parametric method syntax meshgrid{T}(vx::AbstractVector{T}, vy::AbstractVector{T}, vz::AbstractVector{T})` around /Users/kartikeygupta/.julia/packages/ScikitLearn/ILHSi/src/Ndgrid.jl:44.
│ Use `meshgrid(vx::AbstractVector{T}, vy::AbstractVector{T}, vz::AbstractVector{T}) where T` instead.
└ @ ~/.julia/packages/ScikitLearn/ILHSi/src/Ndgrid.jl:44
WARNING: importing deprecated binding Base.Associative into Skcore.
WARNING: Base.Associative is deprecated, use AbstractDict instead.
  likely near /Users/kartikeygupta/.julia/packages/ScikitLearn/ILHSi/src/sk_utils.jl:100
WARNING: Base.Associative is deprecated, use AbstractDict instead.
  likely near /Users/kartikeygupta/.julia/packages/ScikitLearn/ILHSi/src/sk_utils.jl:100
┌ Warning: Deprecated syntax `parametric method syntax is_multilabel{T}(y::AbstractArray{T})` around /Users/kartikeygupta/.julia/packages/ScikitLearn/ILHSi/src/sk_utils.jl:132.
│ Use `is_multilabel(y::AbstractArray{T}) where T` instead.
└ @ ~/.julia/packages/ScikitLearn/ILHSi/src/sk_utils.jl:132
┌ Warning: Deprecated syntax `parametric method syntax type_of_target{T}(y::AbstractArray{T})` around /Users/kartikeygupta/.julia/packages/ScikitLearn/ILHSi/src/sk_utils.jl:193.
│ Use `type_of_target(y::AbstractArray{T}) where T` instead.
└ @ ~/.julia/packages/ScikitLearn/ILHSi/src/sk_utils.jl:193
ERROR: LoadError: LoadError: LoadError: LoadError: type QuoteNode has no field args
Stacktrace:
 [1] getproperty(::Any, ::Symbol) at ./sysimg.jl:18
 [2] @delegate(::LineNumberNode, ::Module, ::Any, ::Any) at /Users/kartikeygupta/.julia/packages/ScikitLearn/ILHSi/src/sk_utils.jl:73
 [3] include at ./boot.jl:317 [inlined]
 [4] include_relative(::Module, ::String) at ./loading.jl:1038
 [5] include at ./sysimg.jl:29 [inlined]
 [6] include(::String) at /Users/kartikeygupta/.julia/packages/ScikitLearn/ILHSi/src/Skcore.jl:5
 [7] top-level scope at none:0
 [8] include at ./boot.jl:317 [inlined]
 [9] include_relative(::Module, ::String) at ./loading.jl:1038
 [10] include at ./sysimg.jl:29 [inlined]
 [11] include(::String) at /Users/kartikeygupta/.julia/packages/ScikitLearn/ILHSi/src/ScikitLearn.jl:10
 [12] top-level scope at none:0
 [13] include at ./boot.jl:317 [inlined]
 [14] include_relative(::Module, ::String) at ./loading.jl:1038
 [15] include(::Module, ::String) at ./sysimg.jl:29
 [16] top-level scope at none:2
 [17] eval at ./boot.jl:319 [inlined]
 [18] eval(::Expr) at ./client.jl:399
 [19] top-level scope at ./none:3
in expression starting at /Users/kartikeygupta/.julia/packages/ScikitLearn/ILHSi/src/sk_utils.jl:236
in expression starting at /Users/kartikeygupta/.julia/packages/ScikitLearn/ILHSi/src/sk_utils.jl:236
in expression starting at /Users/kartikeygupta/.julia/packages/ScikitLearn/ILHSi/src/Skcore.jl:13
in expression starting at /Users/kartikeygupta/.julia/packages/ScikitLearn/ILHSi/src/ScikitLearn.jl:12
ERROR: Failed to precompile ScikitLearn [3646fa90-6ef7-5e7e-9f22-8aca16db6324] to /Users/kartikeygupta/.julia/compiled/v0.7/ScikitLearn/tbUuI.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] macro expansion at ./logging.jl:313 [inlined]
 [3] compilecache(::Base.PkgId, ::String) at ./loading.jl:1185
 [4] _require(::Base.PkgId) at ./logging.jl:311
 [5] require(::Base.PkgId) at ./loading.jl:852
 [6] macro expansion at ./logging.jl:311 [inlined]
 [7] require(::Module, ::Symbol) at ./loading.jl:834
cstjean commented 6 years ago

You need to pkg"add ScikitLearn#master" first. I already tagged it, but we're waiting for METADATA reviewers to look at it.

cstjean commented 6 years ago

I updated the code; if you pkg"add ScikitLearn#master", you should be able to load ScikitLearn.jl on Julia 1.0. The tests do not all pass because both PyCall.jl and RDatasets.jl are not 1.0-ready yet. Therefore, you will likely find that some functionality doesn't work, but please file an issue if you do.

SimonAB commented 6 years ago

Brilliant, thanks! PyCall seems mostly OK (for now...). I'll start porting things over to 1.0 gingerly.

ajaychat3 commented 6 years ago

I tried doing as suggest by pkg"add ScikitLearn#master" but this does not work either on Julia 1.0. Here is the error log

Updating registry at C:\Users\chatura\.julia\registries\General

Updating git-repo https://github.com/JuliaRegistries/General.git Cloning git-repo https://github.com/cstjean/ScikitLearn.jl.git Updating git-repo https://github.com/cstjean/ScikitLearn.jl.git Resolving package versions... ERROR: Unsatisfiable requirements detected for package DataFrames [a93c6f00]: DataFrames [a93c6f00] log: ├─possible versions are: [0.1.0, 0.2.0-0.2.5, 0.3.0-0.3.16, 0.4.0-0.4.3, 0.5.0-0.5.12, 0.6.0-0.6.11, 0.7.0-0.7.8, 0.8.0-0.8.5, 0.9.0-0.9.1, 0.10.0-0.10.1, 0.11.0-0.11.7, 0.12.0, 0.13.0-0.13.1] or uninstalled ├─restricted to versions 0.11.0- by ScikitLearn [3646fa90], leaving only versions [0.11.0-0.11.7, 0.12.0, 0.13.0-0.13.1] │ └─ScikitLearn [3646fa90] log: │ ├─possible versions are: 0.5.0 or uninstalled │ └─ScikitLearn [3646fa90] is fixed to version 0.5.0+ └─restricted by compatibility requirements with MachineLearning [850e97f4] to versions: [0.1.0, 0.2.0-0.2.5, 0.3.0-0.3.16, 0.4.0-0.4.3, 0.5.0-0.5.12, 0.6.0-0.6.11, 0.7.0-0.7.8, 0.8.0-0.8.5, 0.9.0-0.9.1, 0.10.0-0.10.1] — no versions left └─MachineLearning [850e97f4] log: ├─possible versions are: 0.0.1-0.0.3 or uninstalled └─restricted to versions by an explicit requirement, leaving only versions 0.0.1-0.0.3

cstjean commented 6 years ago

There was a breaking change in DataFrames.jl at the beginning of the year. ScikiLearn is only compatible with the newest versions (0.11+), while MachineLearning is only compatible with older versions. Either bug MachineLearning people to upgrade, or make a choice about which package you want to use (... in this environment; you could still activate a new environment, then add ScikitLearn).

cstjean commented 6 years ago

ScikitLearn was tagged. Everyone can now Pkg.add("ScikitLearn") on 1.0. If you used #master, you can Pkg.free("ScikitLearn"). Thank you for everyone's patience! Please file bug reports appropriately.