You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I provided an improper data structure for labels to and got the following error. I was providing a vector of tuples instead of what it expects. I think validating the types of the inputs and providing a better error message would be helpful.
julia> bst = xgboost(s, 20, label = labels, eta = 1, max_depth = 2)
ERROR: MethodError: no method matching (::getfield(XGBoost, Symbol("#_setinfo#8")))(::Ptr{Nothing}, ::String, ::Array{Tuple{Vararg{String,N} where N},1})
Closest candidates are:
_setinfo(::Ptr{Nothing}, ::String, ::Array{#s12,1} where #s12<:Number) at /Users/viral/.julia/packages/XGBoost/udvqz/src/xgboost_lib.jl:10
Stacktrace:
[1] (::getfield(XGBoost, Symbol("##DMatrix#6#10")){getfield(XGBoost, Symbol("#_setinfo#8"))})(::Base.Iterators.Pairs{Symbol,Array{Tuple{Vararg{String,N} where N},1},Tuple{Symbol},NamedTuple{(:label,),Tuple{Array{Tuple{Vararg{String,N} where N},1}}}}, ::Type, ::SparseMatrixCSC{Float64,Int64}, ::Bool) at /Users/viral/.julia/packages/XGBoost/udvqz/src/xgboost_lib.jl:40
[2] (::getfield(Core, Symbol("#kw#Type")))(::NamedTuple{(:label,),Tuple{Array{Tuple{Vararg{String,N} where N},1}}}, ::Type{DMatrix}, ::SparseMatrixCSC{Float64,Int64}, ::Bool) at ./none:0 (repeats 2 times)
[3] makeDMatrix(::SparseMatrixCSC{Float64,Int64}, ::Array{Tuple{Vararg{String,N} where N},1}) at /Users/viral/.julia/packages/XGBoost/udvqz/src/xgboost_lib.jl:137
[4] #xgboost#20(::Array{Tuple{Vararg{String,N} where N},1}, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Type, ::Type, ::Array{Any,1}, ::Base.Iterators.Pairs{Symbol,Int64,Tuple{Symbol,Symbol},NamedTuple{(:eta, :max_depth),Tuple{Int64,Int64}}}, ::typeof(xgboost), ::SparseMatrixCSC{Float64,Int64}, ::Int64) at /Users/viral/.julia/packages/XGBoost/udvqz/src/xgboost_lib.jl:147
[5] (::getfield(XGBoost, Symbol("#kw##xgboost")))(::NamedTuple{(:label, :eta, :max_depth),Tuple{Array{Tuple{Vararg{String,N} where N},1},Int64,Int64}}, ::typeof(xgboost), ::SparseMatrixCSC{Float64,Int64}, ::Int64) at ./none:0
[6] top-level scope at none:0
The text was updated successfully, but these errors were encountered:
I provided an improper data structure for
labels
to and got the following error. I was providing a vector of tuples instead of what it expects. I think validating the types of the inputs and providing a better error message would be helpful.The text was updated successfully, but these errors were encountered: