Updates from 1.2.0 cran submission (#6077)

* update for 1.2.0 cran submission

* recover cmakelists

* fix unittest from the shap PR

* trigger CI
This commit is contained in:
Tong He
2020-09-02 20:50:23 +08:00
committed by GitHub
parent 9be969cc7a
commit 3912f3de06
23 changed files with 203 additions and 38 deletions

View File

@@ -1,10 +0,0 @@
model_generator_metadata <- function() {
return (list(
kRounds = 2,
kRows = 1000,
kCols = 4,
kForests = 2,
kMaxDepth = 2,
kClasses = 3
))
}

View File

@@ -5,7 +5,14 @@ library(Matrix)
source('./generate_models_params.R')
set.seed(0)
metadata <- model_generator_metadata()
metadata <- list(
kRounds = 2,
kRows = 1000,
kCols = 4,
kForests = 2,
kMaxDepth = 2,
kClasses = 3
)
X <- Matrix(data = rnorm(metadata$kRows * metadata$kCols), nrow = metadata$kRows,
ncol = metadata$kCols, sparse = TRUE)
w <- runif(metadata$kRows)

View File

@@ -1,10 +1,16 @@
require(xgboost)
require(jsonlite)
source('../generate_models_params.R')
context("Models from previous versions of XGBoost can be loaded")
metadata <- model_generator_metadata()
metadata <- list(
kRounds = 2,
kRows = 1000,
kCols = 4,
kForests = 2,
kMaxDepth = 2,
kClasses = 3
)
run_model_param_check <- function (config) {
testthat::expect_equal(config$learner$learner_model_param$num_feature, '4')