dmlc / XGBoost.jl

XGBoost Julia Package
Other
288 stars 111 forks source link

Package now requires a Julia built with GPL libraries enabled #157

Open nickrobinson251 opened 1 year ago

nickrobinson251 commented 1 year ago

...due to the dependency on SparseMatricesCSR.jl (added in https://github.com/dmlc/XGBoost.jl/pull/136)


We're running XGBoost.jl in production but have had to fix the XGBoost.jl version to v2.0.2, as the newer versions depend on SparseMatricesCSR.jl, which requires a Julia built with GPL libraries enabled (at Julia build time), causing the following error on our Julia build:

ERROR: LoadError: UndefVarError: UMFPACK not defined Stacktrace:
 [1] getproperty(x::Module, f::Symbol)
   @ Base ./Base.jl:31
 [2] top-level scope
   @ ~/.julia/packages/SparseMatricesCSR/gQcwh/src/SparseMatrixCSR.jl:143
 [3] include(mod::Module, _path::String)
   @ Base ./Base.jl:420
 [4] include(x::String)
   @ SparseMatricesCSR ~/.julia/packages/SparseMatricesCSR/gQcwh/src/SparseMatricesCSR.jl:1
 [5] top-level scope
   @ ~/.julia/packages/SparseMatricesCSR/gQcwh/src/SparseMatricesCSR.jl:17
 [6] include
   @ ./Base.jl:420 [inlined]
 [7] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
   @ Base ./loading.jl:1554
 [8] top-level scope
   @ stdin:1

I wonder if the SparseMatricesCSR.jl dependency is necessary and e.g. if there might be an alternative way to achieve the functionality added in #136 without taking on this dependency requiring GPL libraries?

nickrobinson251 commented 1 year ago

i also opened https://github.com/gridap/SparseMatricesCSR.jl/pull/21, and with that SparseMatricesCSR branch the XGBoost.jl tests pass locally on a Julia version built with USE_GPL_LIBS=0 (i've no GPU so no GPU tests run)

ExpandingMan commented 1 year ago

I'm not in favor of re-implementing SparseMatricesCSR in this package, though I'm totally agnostic about which dependency it uses for it as long as it works. The package is used because the DMatrix returns data in this form. I would say that either try to resolve this in SparseMatricesCSR.jl, or if if you'd like to re-implement it we could potentially switch dependencies.