Hi I am new to this and unsure if this should be an issue to load in GitHub, but I’m not highly skilled in this level of computing.
I am using Windows 11 Pro and XGBoost.jl (with MLJXGBoostInterface) and it was working okay with Julia 1.8 until I upgraded to 1.9.0.
I have spent days searching reading articles and trying to figure it out including completely uninstalling Julia, removing all packages, reinstalling earlier versions I had used (Julia 1.8 through to 1.9), XGBoost (2.2.5 and 2.3.0), not using MLJ, etc., with no joy.
Here’s my Stacktrace which TBH is not something I really understand.
using XGBoost
ERROR: InitError: UndefVarError: libxgboost not defined
Stacktrace:
[1] XGBRegisterLogCallback
@ C:\Users\frank.julia\packages\XGBoost\sa5Xe\src\Lib.jl:56 [inlined]
[2] init()
@ XGBoost C:\Users\frank.julia\packages\XGBoost\sa5Xe\src\XGBoost.jl:41
[3] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
@ Base .\loading.jl:1115
[4] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any})
@ Base .\loading.jl:1061
[5] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128)
@ Base .\loading.jl:1506
[6] _require(pkg::Base.PkgId, env::String)
@ Base .\loading.jl:1783
[7] _require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base .\loading.jl:1660
[8] macro expansion
@ .\loading.jl:1648 [inlined]
[9] macro expansion
@ .\lock.jl:267 [inlined]
[10] require(into::Module, mod::Symbol)
@ Base .\loading.jl:1611
during initialization of module XGBoost
I don’t think the issue you’re experiencing is the one mentioned by @simsurace because the symptom would be completely different (a crash at runtime). That’d still be a problem in Julia v1.9.0-1.9.1, but that’s not what you’re reporting.
Thanks Mosē; I have two versions installed because I was trying the version I was using oringally along with the latest and neither work.
Output is:
Windows x86_64 {cxxstring_abi=cxx11, julia_version=1.8.0, libgfortran_version=5.0.0}
and
Windows x86_64 {cxxstring_abi=cxx11, julia_version=1.9.1, libgfortran_version=5.0.0}
I gave this a go and sadly didn’t work. I wasn’t that surprised as I had previously done a complete uninstall & removal of Julia and had reinstalled the original Julia version 1.80) that had worked for me before but now has the same problem regardless of Julia or XGBoost version.
@giordano & @simsurace - FYI I have also tried installing libxgboost via conda, using Julia in project environments and coding in Visual Studio, Julia REPL , Pluto and JupyterLab…
Thank you for helping provide me a very +ve first time use of Julia Discourse
I am assuming a long term fix means a package change, is there any chance you or @tylerjthomas9 can provide me a hack, perhaps in a .jl file or something?
Can you try the nightly julia build and see if it works. Also, using XGBoost_jll@1.7.4 should have no cuda tag on the windows build. It was added as part of the refactor to support multiple CUDA versions. I can take a look at it tonight and check.
Apologies for taking so long to reply, my environment was messy with different versions of julia and packages so uninstalled and cleaned it all up first.
YES , your suggestion of overnight build and XGBoost_jll@1.7.4 worked.
Here is what I am using;
(@v1.10) pkg> status
Status `C:\Users\frank\.julia\environments\v1.10\Project.toml`
[009559a3] XGBoost v2.3.0
⌃ [a5c6f535] XGBoost_jll v1.7.4+0
Info Packages marked with ⌃ have new versions available and may be upgradable.
Tested with example previously mentioned from Home · XGBoost.jl and now my own code is running fine.
Huge relief.
Thanks
Frank
I had the same issue here. I tried the nightly build and XGBoost_jll@1.7.4 and can verify that it works! Thank you very much!!
XGBoost_jll.host_platform:
julia> versioninfo()
Julia Version 1.10.0-DEV.1510
Commit 690a5f67c1 (2023-06-19 19:23 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: 16 × AMD Ryzen 7 3700X 8-Core Processor
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-15.0.7 (ORCJIT, znver2)
Threads: 23 on 16 virtual cores
Environment:
JULIA_NUM_THREADS = auto
(@v1.10) pkg> st
Status `C:\Users\Daymond\.julia\environments\v1.10\Project.toml`
[009559a3] XGBoost v2.3.0
⌃ [a5c6f535] XGBoost_jll v1.7.4+0
Info Packages marked with ⌃ have new versions available and may be upgradable.
julia> using XGBoost_jll
julia> XGBoost_jll.host_platform
Windows x86_64 {cuda=12.1, cxxstring_abi=cxx11, julia_version=1.10.0, libgfortran_version=5.0.0}