[R] Don't cap global number of threads for serialization (#10028)

This commit is contained in:
david-cortes
2024-02-20 04:13:00 +01:00
committed by GitHub
parent edf501d227
commit 6e3c899ba7
18 changed files with 37 additions and 20 deletions

View File

@@ -496,6 +496,9 @@ An interesting test to see how identical our saved model is to the original one
```{r loadModel, message=F, warning=F}
# load binary model to R
# Note that the number of threads for 'xgb.load' is taken from global config,
# can be modified like this:
RhpcBLASctl::omp_set_num_threads(1)
bst2 <- xgb.load(fname)
xgb.parameters(bst2) <- list(nthread = 2)
pred2 <- predict(bst2, test$data)