Search code examples
rubuntuxgboosttidymodels

R tidymodels xgboost Ubuntu 20.04 Error: C stack usage 7975188 is too close to the limit


I am trying to run an xgboost model through tidymodels on an Ubuntu server but am getting the following error: Resample01: preprocessor 1/1: Error: C stack usage 7977188 is too close to the limit

I've tried all the solutions suggested from googling C Stack usage errors (most of them say to remove unnecessary recursion and to set ulimit -s unlimited, but nothing has helped. I'm essentially following this guide for tuning the model. My dataset is about 2000 rows by 900 columns, and I'm just using a group_vfold_cv() cross validation with 10 groups, so nothing crazy. The server has 30gb of ram, 300gb ssd and 4 cores. The exact same code works on my windows 10 laptop with far less ram, so it must have something to do with the operating system.

All packages are up to date, and I've tried installing xgboost from source, nothing has helped.

Any help would be greatly appreciated.


Solution

  • Well it seems the error is actually due to the recipe() function using a recursive function fun_calls() with known errors see here. The solution is to use update_role() rather than a formula to specify the model.