[R] Ignore auto-generated config.h, ensure tests run without 'vcd' (#10688)

This commit is contained in:
James Lamb 2024-08-09 04:23:27 -05:00 committed by GitHub
parent 7bccc1ea2c
commit e02b376bf7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 4 deletions

1
.gitignore vendored
View File

@ -97,6 +97,7 @@ metastore_db
# files from R-package source install
**/config.status
R-package/config.h
R-package/src/Makevars
*.lib

View File

@ -36,6 +36,10 @@ if (isTRUE(VCD_AVAILABLE)) {
base_score = 0.5)
feature.names <- colnames(sparse_matrix)
# without feature names
bst.Tree.unnamed <- xgb.copy.Booster(bst.Tree)
setinfo(bst.Tree.unnamed, "feature_name", NULL)
}
# multiclass
@ -49,10 +53,6 @@ mbst.GLM <- xgb.train(data = xgb.DMatrix(as.matrix(iris[, -5]), label = mlabel),
booster = "gblinear", eta = 0.1, nthread = 1, nrounds = nrounds,
objective = "multi:softprob", num_class = nclass, base_score = 0)
# without feature names
bst.Tree.unnamed <- xgb.copy.Booster(bst.Tree)
setinfo(bst.Tree.unnamed, "feature_name", NULL)
test_that("xgb.dump works", {
.skip_if_vcd_not_available()
if (!flag_32bit)