Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xgboost failing with julia 1.8.5 #179

Closed
naveenpalli opened this issue May 10, 2023 · 22 comments
Closed

xgboost failing with julia 1.8.5 #179

naveenpalli opened this issue May 10, 2023 · 22 comments

Comments

@naveenpalli
Copy link

XGBoost version 2.2.5
Julia Version 1.8.5
Commit 17cfb8e65e (2023-01-08 06:45 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: 8 × Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-13.0.1 (ORCJIT, skylake)
Threads: 1 on 8 virtual cores

--- sample code below crashes at the last line

using XGBoost
using DataFrames

(X,y) = (DataFrame(randn(100,3), [:l, :r, :u]), randn(100))

b = xgboost((X,y), max_depth=4)

@hcho3 hcho3 transferred this issue from dmlc/xgboost May 10, 2023
@ExpandingMan
Copy link
Collaborator

Can you show the full stack trace? I can't reproduce any error.

@ablaom
Copy link
Contributor

ablaom commented May 10, 2023

Yes, please post stack trace, but my guess is JuliaLang/julia#48187 . Only workaround I know of is downgrade julia to < 1.8.4 or use non-windows machine

@naveenpalli
Copy link
Author

How do I generate the full stack trace? Running on Windows 11

@ExpandingMan
Copy link
Collaborator

Oh, I didn't notice this was windows, yeah it's probably that. Also Julia 1.9 just came out today so that might work (and it's best to upgrade anyway).

How do I generate the full stack trace? Running on Windows 11

What appears when you see the error?

@jeremiedb
Copy link

Unfortunately the problem hasn't been resolved with Julia v1.9.
AFAIK, the most active thread discussing the issue is: https://discourse.julialang.org/t/issue-with-xgboost-jl-and-libsvm-jl-when-julia-1-8-4/92396/46

@naveenpalli
Copy link
Author

Yeah, didn't fix the issue when I tried in 1.9.0 as well. Seems to be ongoing since 1.8.4.
No errors are generated it silently crashes. The REPL dies when you run the four lines above and if you put in a script nothing prints.

@ExpandingMan
Copy link
Collaborator

I'm getting the sense that there are a lack of windows people around to debug the issue. I don't think any of us who have made recent commits to this package are capable of debugging the issue. Probably something JLL related but 🤷

@jd-foster
Copy link

As discussed in the linked discourse thread, it seems to be an incompatibility arising after an update to building julia under gcc 12 since v1.8.4, and the libgomp (OpenMP) library. A possible work-around is to use your own system's version of libgomp, but not a good long-term solution. And, yes, it needs someone who knows how to debug windows crashes.

@ExpandingMan
Copy link
Collaborator

Do we know what library that xgboost relies on has libgomp as a build dependency? I'm wondering if it could be as simple as updating a jll build script, but I don't even know which one my specify this as a dependency.

@jd-foster
Copy link

@naveenpalli
Copy link
Author

Ok, quick and dirty fix to at least avoid crashes. As noted above, offending library seems to be libgomp-1.dll that is installed in the bin directory. Replacing with the 1.8.3 version seems to fix the crashes.

Mode LastWriteTime Length Name


-a--- 11/14/2022 1:07 PM 1761059 libgomp-1.dll
-a--- 5/8/2023 6:28 AM 1511051 libgomp-1.dll.installed_1_9_0

the 1_9_0 version (second one) comes with 1.8.5 and 1.9.0, the first one is from 1.8.3. For now, just replace this one if you need to use XGBoost. Of course, someone needs to figure out why libgomp-1.dll.installed_1_9_0 crashes.

@devmotion
Copy link
Contributor

Seems like a duplicate of #153?

@giordano
Copy link

Fixed in Julia master by JuliaLang/julia#50135 (and yes, this is a duplicate)

@ExpandingMan
Copy link
Collaborator

Thanks so much for your efforts on this @giordano .

@giordano
Copy link

I merely executed the solution found by @jd-foster 🙂

@ExpandingMan
Copy link
Collaborator

Ok, well thanks @jd-foster then!

@giordano
Copy link

I reported the fact that this issue has been fixed (at least on Julia master) because maybe you want to close this ticket (and #153) 🙂

@ExpandingMan
Copy link
Collaborator

I'll wait until 1.9.2 is out and we see CI/CD pass to close them.

@giordano
Copy link

For CI you can check it works on nightly, like JuliaApproximation/FastTransforms.jl#222

@naveenpalli
Copy link
Author

Issue fixed in latest nightly 👍 . Great job @jd-foster and @giordano.

julia> b = xgboost((X,y), max_depth=4)
[ Info: XGBoost: starting training.
[ Info: [1] train-rmse:0.92113782176854342
[ Info: [2] train-rmse:0.86453193144589746
[ Info: [3] train-rmse:0.81174178860290347
[ Info: [4] train-rmse:0.77007250879661970
[ Info: [5] train-rmse:0.70126246007321902
[ Info: [6] train-rmse:0.64168739063396085
[ Info: [7] train-rmse:0.61086880841385705
[ Info: [8] train-rmse:0.56906845909755754
[ Info: [9] train-rmse:0.54034384738000574
[ Info: [10] train-rmse:0.51089554296834572
[ Info: Training rounds complete.

@tylerjthomas9
Copy link
Contributor

We should be good to go. All the tests are now green thanks to Julia v1.9.2

#184

@ExpandingMan
Copy link
Collaborator

As with #153, I believe this is now resolved on 1.9.2. Please re-open if this is not the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants