You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've recently upgraded a linux container to use R 4.2.1 and upgraded unix r package to 1.5.5 from 1.5.4.
I noticed after doing so, that certain requests were timing out/never completing. Upon further investigation, it looks like the code is no longer returning when being run under eval_safe. So far, I think I've narrowed it down to the "predict" method when called on an xgboost model.
Old session Info
`R version 4.1.1 (2021-08-10) -- xgboost here is 1.5.0.2
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.3 LTS
Quick update on this. If OMP_NUM_THREADS is set to 1, eval_safe runs fine. It's only when OMP_NUM_THREADS is not set and the predict model is running on all available cpu.
I've tried this at 8 vcpu with OMP_NUM_THREADS set to 1 and had no issue but leaving it unset caused eval_safe to hang. Setting the vcpu down to 1 and leaving OMP_NUM_THREADS unset also had no issue. This seems to be only when multi-cores are used.
Not sure if the issue is with eval_safe or some new threading issue with predict xgboost modeling using multiple cores.
data(agaricus.train, package='xgboost')
data(agaricus.test, package='xgboost')
train <- agaricus.train
test <- agaricus.test
dtrain <- xgb.DMatrix(data = train$data, label = train$label)
bst <- xgboost(data = dtrain, max.depth = 2, eta = 1, nthread = 2, nrounds = 2, objective = "binary:logistic", verbose = 0)
x <- predict(bst, test$data) # this complets
eval_safe(predict(bst, test$data)) # this hangs. if you change nthread=2 to nthead=1 in the training, it completes, OR load the model in and set OMP_NUM_THREADS=1 in environment variables
I've recently upgraded a linux container to use R 4.2.1 and upgraded unix r package to 1.5.5 from 1.5.4.
I noticed after doing so, that certain requests were timing out/never completing. Upon further investigation, it looks like the code is no longer returning when being run under eval_safe. So far, I think I've narrowed it down to the "predict" method when called on an xgboost model.
Old session Info
`R version 4.1.1 (2021-08-10) -- xgboost here is 1.5.0.2
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.3 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0
locale:
[1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8
[4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C
[7] LC_PAPER=C LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=C LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base `
New session info
`R version 4.2.1 (2022-06-23) -- xgboost here is 1.6.0.1
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.5 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0
locale:
[1] C
attached base packages:
[1] stats graphics grDevices utils datasets methods base`
R results
`> predict(m, x, outputmargin=TRUE)
[1] -1.160798
The text was updated successfully, but these errors were encountered: