dmlc / XGBoost.jl

XGBoost Julia Package
Other
289 stars 110 forks source link

Errors on 32bit systems #92

Closed devmotion closed 3 years ago

devmotion commented 3 years ago

Our test on Ubuntu 32bit (Julia 1.5.3, XGBoost 1.1.1) fails with the following error message:

  Call to XGBoost C function XGDMatrixCreateFromMat failed: 
  Stacktrace:
   [1] error(::String, ::String, ::String, ::String) at ./error.jl:42
   [2] XGDMatrixCreateFromMatT(::Array{Float32,2}, ::Float32) at /home/runner/.julia/packages/XGBoost/fI0vs/src/xgboost_wrapper_h.jl:11
   [3] XGDMatrixCreateFromMat at /home/runner/.julia/packages/XGBoost/fI0vs/src/xgboost_wrapper_h.jl:54 [inlined]
   [4] XGBoost.DMatrix(::Array{Float64,2}, ::Bool, ::Float32; kwargs::Base.Iterators.Pairs{Symbol,Array{UInt32,1},Tuple{Symbol},NamedTuple{(:label,),Tuple{Array{UInt32,1}}}}) at /home/runner/.julia/packages/XGBoost/fI0vs/src/xgboost_lib.jl:49
   [5] makeDMatrix at /home/runner/.julia/packages/XGBoost/fI0vs/src/xgboost_lib.jl:147 [inlined]
   [6] xgboost(::Array{Float64,2}, ::Int32; label::Array{UInt32,1}, param::Array{Any,1}, watchlist::Array{Any,1}, metrics::Array{Any,1}, obj::Type{T} where T, feval::Type{T} where T, group::Array{Any,1}, kwargs::Base.Iterators.Pairs{Symbol,Any,NTuple{35,Symbol},NamedTuple{(:num_class, :booster, :silent, :disable_default_eval_metric, :eta, :gamma, :max_depth, :min_child_weight, :max_delta_step, :subsample, :colsample_bytree, :colsample_bylevel, :lambda, :alpha, :tree_method, :sketch_eps, :scale_pos_weight, :refresh_leaf, :process_type, :grow_policy, :max_leaves, :max_bin, :predictor, :sample_type, :normalize_type, :rate_drop, :one_drop, :skip_drop, :feature_selector, :top_k, :tweedie_variance_power, :objective, :base_score, :eval_metric, :seed),Tuple{Int32,String,Bool,Int32,Float64,Float64,Int32,Float64,Float64,Float64,Float64,Float64,Float64,Float64,String,Float64,Float64,Int32,String,String,Int32,Int32,String,String,String,Float64,Int32,Float64,String,Int32,Float64,String,Float64,String,Int32}}}) at /home/runner/.julia/packages/XGBoost/fI0vs/src/xgboost_lib.jl:157
   [7] fit(::XGBoostClassifier, ::Int32, ::Tables.MatrixTable{Array{Float64,2}}, ::CategoricalArrays.CategoricalArray{Int32,1,UInt32,Int32,CategoricalArrays.CategoricalValue{Int32,UInt32},Union{}}) at /home/runner/.julia/packages/MLJXGBoostInterface/Bdhak/src/MLJXGBoostInterface.jl:618

Ubuntu 64bit works fine. And the same test error can be observed on Ubuntu 32bit with Julia master.

aviks commented 3 years ago

Yeah, unfortunately this package wasn't being tested on 32 bits. I wans't sure anyone cared about 32 bits now. I'll investigate, but can't promise a quick fix.

aviks commented 3 years ago

Well, it looks like the maintainers of XGBoost no longer support 32 bit systems. So the Julia binding unfortunately cannot support x86 either. I'll have to close this as wontfix.

devmotion commented 3 years ago

Ah OK, good to know. Maybe it would be helpful then to not build XGBoost_jll on 32bit systems? Then it would be more obvious that it is not supported.

devmotion commented 3 years ago

The only "problem" with not building future versions of XGBoost_jll on 32bit systems is that it would still be possible to install current and older versions on 32bit systems.

aviks commented 3 years ago

Yeah, I'lll change the next version of the jll not to build x86, but since we cannot represent Pkg dependencies taking CPU arch into account, users will only get a runtime error. Maybe we can check and print a warning at startup?

devmotion commented 3 years ago

Yes, I guess this could be useful.