Closed
Description
How to control the number of threads used by XGBoost (and most probably its dependency data.table)?
In CRAN submissions, I got
* checking tests ... [41s/4s] NOTE
Running ‘testthat.R’ [41s/4s]
Running R code in ‘testthat.R’ had CPU time 9.4 times elapsed time
Similar for examples.
Consequence:
- All examples -> dontrun
- All unit tests using XGBoost commented out -> low test coverage
There are discussions on the R dev mailing list that CRAN might limit resources per package from their side. But of course, it would be great to fix the problem already now.
What I have tried:
- Set
params = list(nthread = 1)
in all XGBoost tests - Set
nrounds = 1
in all XGBoost tests - Set environment variables in the test script before loading {shapviz}. I think this does not work because the session has already started at that moment.
- Set `data.table::setDTthreads(1) in the test script.
Any hints?