-
-
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
High memory consumption in python xgboost #5474
Comments
@pplonski, we implemented reducing memory consumption on CPU also in this PR #5334, but for 'hist' method only. It's included in master only for now, but I hope it will be a part of the future release.
Agree with @trivialfis, there are many things to do in the area. |
Hi, I have recently faced a similar high memory problem with xgboost. I am using 'gpu_hist' for training. I notice large system memory spikes when
|
The memory usage has since improved a lot with inplace predict and |
xgboost.train() also consume a lot of memory(not gpu memory) when making a copy of Booster as returned model , in my case 9GB before bst.copy() and 34G after. |
I'm working on it. |
I am not really sure whether Booter.save_model() would produce exactly the same model file If bst.copy() is ommited when Booster.train() return. Would it be safe that Bootsr.train() simply return bst directly without copy If nothing happen between Bootster.train() and Bootser.save_model()? I' m hoping that it won't make any difference on making prediction on the model produced. xgboost-1.5.1 @trivialfis |
Copy is exact, no change happens during the copy. |
Thanks for the reply, really appreciate it. Looking forward for the upcoming release! |
We have implemented |
I'm working on python AutoML package and one of my users reported very high memory usage while using xgboost.
I've made an investigation to show memory consumption by xgboost. You can find the notebook here. From the code, you can see that the model allocate over 7GB of RAM memory. When I save the model to hard disk (5 kB !) and then load it back I can save a huge amount of RAM.
For me, it look's like xgboost is storing the copy of data in its structure? Am I right?
Is there any way to slim down memory usage by xgboost? Do you think that saving model to the hard drive and then loading it back is way to handle this issue?
The text was updated successfully, but these errors were encountered: