[R] Ignore auto-generated config.h, ensure tests run without 'vcd' (#10688)
This commit is contained in:
parent
7bccc1ea2c
commit
e02b376bf7
1
.gitignore
vendored
1
.gitignore
vendored
@ -97,6 +97,7 @@ metastore_db
|
|||||||
|
|
||||||
# files from R-package source install
|
# files from R-package source install
|
||||||
**/config.status
|
**/config.status
|
||||||
|
R-package/config.h
|
||||||
R-package/src/Makevars
|
R-package/src/Makevars
|
||||||
*.lib
|
*.lib
|
||||||
|
|
||||||
|
|||||||
@ -36,6 +36,10 @@ if (isTRUE(VCD_AVAILABLE)) {
|
|||||||
base_score = 0.5)
|
base_score = 0.5)
|
||||||
|
|
||||||
feature.names <- colnames(sparse_matrix)
|
feature.names <- colnames(sparse_matrix)
|
||||||
|
|
||||||
|
# without feature names
|
||||||
|
bst.Tree.unnamed <- xgb.copy.Booster(bst.Tree)
|
||||||
|
setinfo(bst.Tree.unnamed, "feature_name", NULL)
|
||||||
}
|
}
|
||||||
|
|
||||||
# multiclass
|
# 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,
|
booster = "gblinear", eta = 0.1, nthread = 1, nrounds = nrounds,
|
||||||
objective = "multi:softprob", num_class = nclass, base_score = 0)
|
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", {
|
test_that("xgb.dump works", {
|
||||||
.skip_if_vcd_not_available()
|
.skip_if_vcd_not_available()
|
||||||
if (!flag_32bit)
|
if (!flag_32bit)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user