Skip to content

Controlling threads #109

Closed
Closed
@mayer79

Description

@mayer79

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:

  1. Set params = list(nthread = 1) in all XGBoost tests
  2. Set nrounds = 1 in all XGBoost tests
  3. 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.
  4. Set `data.table::setDTthreads(1) in the test script.

Any hints?

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions