JuliaAI / MLJ.jl

A Julia machine learning framework
https://juliaai.github.io/MLJ.jl/
Other
1.79k stars 158 forks source link

Evaluation error logs on loading model #433

Closed darrencl closed 4 years ago

darrencl commented 4 years ago

Describe the bug

On loading the LDA model as below, I got this evaluation error. I think the model is working fine as I can initiate the object lda_model = LDA(). This also happens when loading other models, e.g. DecisionTreeClassifier.

To Reproduce

Here's what it looks like

julia> @load LDA pkg=MultivariateStats
┌ Error: evaluation error starting at /home/darren/.julia/packages/MLJBase/t7MaX/src/mlj_model_macro.jl:179
│   mod = MLJModels.MultivariateStats_
│   ex =
│    quote
│        #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:34 =#
│        #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:43 =# @mlj_model mutable struct RidgeRegressor <: MLJBase.Deterministic
│                #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:44 =#
│                lambda::Real = 1.0::(_ ≥ 0)
│            end
│    end
│   exception =
│    type GlobalRef has no field args
│    Stacktrace:
│     [1] getproperty(::Any, ::Symbol) at ./sysimg.jl:18
│     [2] #methods_by_execution!#20(::Bool, ::Bool, ::Function, ::Any, ::Revise.CodeTrackingMethodInfo, ::Dict{Module,Array{Expr,1}}, ::JuliaInterpreter.Frame, ::BitArray{1}) at /home/darren/.julia/packages/Revise/S7mrl/src/lowered.jl:159
└ @ Revise ~/.julia/packages/Revise/S7mrl/src/lowered.jl:105
┌ Error: evaluation error starting at /home/darren/.julia/packages/MLJBase/t7MaX/src/mlj_model_macro.jl:179
│   mod = MLJModels.MultivariateStats_
│   ex =
│    quote
│        #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:75 =#
│        #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:87 =# @mlj_model mutable struct PCA <: MLJBase.Unsupervised
│                #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:88 =#
│                maxoutdim::Union{Nothing, Int} = nothing::(_ === nothing || _ ≥ 1)
│                #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:89 =#
│                method::Symbol = :auto::(_ in (:auto, :cov, :svd))
│                #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:90 =#
│                pratio::Float64 = 0.99::(0.0 < _ ≤ 1.0)
│                #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:91 =#
│                mean::Union{Nothing, Real, Vector{Float64}} = nothing::(_ === nothing || (_ isa Real && iszero(_) || true))
│            end
│    end
│   exception =
│    type GlobalRef has no field args
│    Stacktrace:
│     [1] getproperty(::Any, ::Symbol) at ./sysimg.jl:18
│     [2] #methods_by_execution!#20(::Bool, ::Bool, ::Function, ::Any, ::Revise.CodeTrackingMethodInfo, ::Dict{Module,Array{Expr,1}}, ::JuliaInterpreter.Frame, ::BitArray{1}) at /home/darren/.julia/packages/Revise/S7mrl/src/lowered.jl:159
└ @ Revise ~/.julia/packages/Revise/S7mrl/src/lowered.jl:105
LDA┌ Error: evaluation error starting at /home/darren/.julia/packages/MLJBase/t7MaX/src/mlj_model_macro.jl:179
│   mod = MLJModels.MultivariateStats_
│   ex =
│    quote
│        #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:137 =#
│        #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:152 =# @mlj_model mutable struct KernelPCA <: MLJBase.Unsupervised
│                #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:153 =#
│                maxoutdim::Union{Nothing, Int} = nothing::(_ === nothing || _ ≥ 1)
│                #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:154 =#
│                kernel::Function = default_kernel
│                #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:155 =#
│                solver::Symbol = :eig::(_ in (:eig, :eigs))
│                #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:156 =#
│                inverse::Bool = false
│                #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:157 =#
│                beta::Real = 1.0::(_ ≥ 0.0)
│                #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:158 =#
│                tol::Real = 1.0e-6::(_ ≥ 0.0)
│                #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:159 =#
│                maxiter::Int = 300::(_ ≥ 1)
│            end
│    end
│   exception =
│    type GlobalRef has no field args
│    Stacktrace:
│     [1] getproperty(::Any, ::Symbol) at ./sysimg.jl:18
│     [2] #methods_by_execution!#20(::Bool, ::Bool, ::Function, ::Any, ::Revise.CodeTrackingMethodInfo, ::Dict{Module,Array{Expr,1}}, ::JuliaInterpreter.Frame, ::BitArray{1}) at /home/darren/.julia/packages/Revise/S7mrl/src/lowered.jl:159
└ @ Revise ~/.julia/packages/Revise/S7mrl/src/lowered.jl:105
(┌ Error: evaluation error starting at /home/darren/.julia/packages/MLJBase/t7MaX/src/mlj_model_macro.jl:179
│   mod = MLJModels.MultivariateStats_
│   ex =
│    quote
│        #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:201 =#
│        #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:218 =# @mlj_model mutable struct ICA <: MLJBase.Unsupervised
│                #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:219 =#
│                k::Int = 0::(_ ≥ 0)
│                #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:220 =#
│                alg::Symbol = :fastica::(_ in (:fastica,))
│                #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:221 =#
│                fun::Symbol = :tanh::(_ in (:tanh, :gaus))
│                #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:222 =#
│                do_whiten::Bool = true
│                #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:223 =#
│                maxiter::Int = 100
│                #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:224 =#
│                tol::Real = 1.0e-6::(_ ≥ 0.0)
│                #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:225 =#
│                winit::Union{Nothing, Matrix{<:Real}} = nothing
│                #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:226 =#
│                mean::Union{Nothing, Real, Vector{Float64}} = nothing::(_ === nothing || (_ isa Real && iszero(_) || true))
│            end
│    end
│   exception =
│    type GlobalRef has no field args
│    Stacktrace:
│     [1] getproperty(::Any, ::Symbol) at ./sysimg.jl:18
│     [2] #methods_by_execution!#20(::Bool, ::Bool, ::Function, ::Any, ::Revise.CodeTrackingMethodInfo, ::Dict{Module,Array{Expr,1}}, ::JuliaInterpreter.Frame, ::BitArray{1}) at /home/darren/.julia/packages/Revise/S7mrl/src/lowered.jl:159
└ @ Revise ~/.julia/packages/Revise/S7mrl/src/lowered.jl:105

    ┌ Error: evaluation error starting at /home/darren/.julia/packages/MLJBase/t7MaX/src/mlj_model_macro.jl:179
│   mod = MLJModels.MultivariateStats_
│   ex =
│    quote
│        #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:266 =#
│        #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:283 =# @mlj_model mutable struct LDA <: MLJBase.Probabilistic
│                #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:284 =#
│                method::Symbol = :gevd::(_ in (:gevd, :whiten))
│                #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:285 =#
│                cov_w::CovarianceEstimator = MS.SimpleCovariance()
│                #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:286 =#
│                cov_b::CovarianceEstimator = MS.SimpleCovariance()
│                #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:287 =#
│                out_dim::Int = 0::(_ ≥ 0)
│                #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:288 =#
│                regcoef::Real = 0.0::(_ ≥ 0)
│                #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:289 =#
│                dist::SemiMetric = SqEuclidean()
│            end
│    end
│   exception =
│    type GlobalRef has no field args
│    Stacktrace:
│     [1] getproperty(::Any, ::Symbol) at ./sysimg.jl:18
│     [2] #methods_by_execution!#20(::Bool, ::Bool, ::Function, ::Any, ::Revise.CodeTrackingMethodInfo, ::Dict{Module,Array{Expr,1}}, ::JuliaInterpreter.Frame, ::BitArray{1}) at /home/darren/.julia/packages/Revise/S7mrl/src/lowered.jl:159
└ @ Revise ~/.julia/packages/Revise/S7mrl/src/lowered.jl:105
method = ┌ Error: evaluation error starting at /home/darren/.julia/packages/MLJBase/t7MaX/src/mlj_model_macro.jl:179
│   mod = MLJModels.MultivariateStats_
│   ex =
│    quote
│        #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:351 =#
│        #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:367 =# @mlj_model mutable struct BayesianLDA <: MLJBase.Probabilistic
│                #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:368 =#
│                method::Symbol = :gevd::(_ in (:gevd, :whiten))
│                #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:369 =#
│                cov_w::CovarianceEstimator = MS.SimpleCovariance()
│                #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:370 =#
│                cov_b::CovarianceEstimator = MS.SimpleCovariance()
│                #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:371 =#
│                out_dim::Int = 0::(_ ≥ 0)
│                #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:372 =#
│                regcoef::Real = 0.0::(_ ≥ 0)
│                #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:373 =#
│                priors::Union{Nothing, MLJBase.UnivariateFinite} = nothing
│            end
│    end
│   exception =
│    type GlobalRef has no field args
│    Stacktrace:
│     [1] getproperty(::Any, ::Symbol) at ./sysimg.jl:18
│     [2] #methods_by_execution!#20(::Bool, ::Bool, ::Function, ::Any, ::Revise.CodeTrackingMethodInfo, ::Dict{Module,Array{Expr,1}}, ::JuliaInterpreter.Frame, ::BitArray{1}) at /home/darren/.julia/packages/Revise/S7mrl/src/lowered.jl:159
└ @ Revise ~/.julia/packages/Revise/S7mrl/src/lowered.jl:105
:┌ Error: evaluation error starting at /home/darren/.julia/packages/MLJBase/t7MaX/src/mlj_model_macro.jl:179
│   mod = MLJModels.MultivariateStats_
│   ex =
│    quote
│        #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:458 =#
│        #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:471 =# @mlj_model mutable struct BayesianSubspaceLDA <: MLJBase.Probabilistic
│                #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:472 =#
│                normalize::Bool = true
│                #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:473 =#
│                out_dim::Int = 0::(_ ≥ 0)
│                #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:474 =#
│                priors::Union{Nothing, MLJBase.UnivariateFinite} = nothing
│            end
│    end
│   exception =
│    type GlobalRef has no field args
│    Stacktrace:
│     [1] getproperty(::Any, ::Symbol) at ./sysimg.jl:18
│     [2] #methods_by_execution!#20(::Bool, ::Bool, ::Function, ::Any, ::Revise.CodeTrackingMethodInfo, ::Dict{Module,Array{Expr,1}}, ::JuliaInterpreter.Frame, ::BitArray{1}) at /home/darren/.julia/packages/Revise/S7mrl/src/lowered.jl:159
└ @ Revise ~/.julia/packages/Revise/S7mrl/src/lowered.jl:105
gevd┌ Error: evaluation error starting at /home/darren/.julia/packages/MLJBase/t7MaX/src/mlj_model_macro.jl:179
│   mod = MLJModels.MultivariateStats_
│   ex =
│    quote
│        #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:574 =#
│        #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:588 =# @mlj_model mutable struct SubspaceLDA <: MLJBase.Probabilistic
│                #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:589 =#
│                normalize::Bool = true
│                #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:590 =#
│                out_dim::Int = 0::(_ ≥ 0)
│                #= /home/darren/.julia/packages/MLJModels/nWDbp/src/MultivariateStats.jl:591 =#
│                dist::SemiMetric = SqEuclidean()
│            end
│    end
│   exception =
│    type GlobalRef has no field args
│    Stacktrace:
│     [1] getproperty(::Any, ::Symbol) at ./sysimg.jl:18
│     [2] #methods_by_execution!#20(::Bool, ::Bool, ::Function, ::Any, ::Revise.CodeTrackingMethodInfo, ::Dict{Module,Array{Expr,1}}, ::JuliaInterpreter.Frame, ::BitArray{1}) at /home/darren/.julia/packages/Revise/S7mrl/src/lowered.jl:159
└ @ Revise ~/.julia/packages/Revise/S7mrl/src/lowered.jl:105
,
    cov_w = StatsBase.SimpleCovariance(false),
    cov_b = StatsBase.SimpleCovariance(false),
    out_dim = 0,
    regcoef = 0.0,
    dist = Distances.SqEuclidean(0.0)) @ 1…53

Expected behavior

No error logs

Additional context

Versions

julia> Pkg.installed()["MLJ"]
v"0.7.0"
OkonSamuel commented 4 years ago

These error messages are not MLJ related but shows up due to an issue with Revise.jl package. Downgrading your Revise package version to v"2.3.1" seems to suppress those error messages. You could choose to open up a issue at Revise.jl.

darrencl commented 4 years ago

@OkonSamuel I'm closing this issue since it's unrelated.