-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
Crash on Windows when CUDA_VISIBLE_DEVICES
is set to -1
#11283
Comments
May I ask why do you need to set that environment variable to -1? |
It's part of a dependency that uses TensorFlow and which is used before the dependency that uses XGBoost. In short, it's a pipeline that combines multiple machine learning predictors, each with their own purpose. As a simple workaround we can definitely remove the environment variable before predicting with XGBoost. Nevertheless, it seemed sensible to report the issue. |
Thank you for sharing, I will try to look into it. Not familiar with debugging on Windows ... |
In a project where we combine XGBoost with Tensorflow within the same process, we ran into the following issue:
When the environment variable
CUDA_VISIBLE_DEVICES
is set to-1
, the XGBoost predict step function crashes after about a minute of predicting. Strangely enough, it seems to happen stochastically. The crash only occurs after predicting for a while, either by settingnthread
to a low value, or by repeating the same predict step many times. Doing the predict step once usually works without the crash, but not always.The crash does not produce any error messages and only happens on Windows, as far as I can tell.
Here's a script to reproduce:
Comment out the first two lines makes it work again.
pip freeze output:
And with optional
rich
install for the progress bar (does not change the crash behavior):Files used: https://1drv.ms/u/c/cc884c602a30d109/ET6oclsK3PpLqnj6p4W0h40BU2vIMXQzQnOWRLl5SfecFw?e=eCoexz
The text was updated successfully, but these errors were encountered: