* using log directory 'd:/RCompile/CRANguest/R-release/xgboost.Rcheck' * using R version 4.1.1 (2021-08-10) * using platform: x86_64-w64-mingw32 (64-bit) * using session charset: ISO8859-1 * checking for file 'xgboost/DESCRIPTION' ... OK * checking extension type ... Package * this is package 'xgboost' version '1.5.0.1' * checking CRAN incoming feasibility ... NOTE Maintainer: 'Jiaming Yuan ' New maintainer: Jiaming Yuan Old maintainer(s): Tong He * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking serialization versions ... OK * checking whether package 'xgboost' can be installed ... OK * checking installed package size ... OK * checking package directory ... OK * checking for future file timestamps ... OK * checking 'build' directory ... OK * checking DESCRIPTION meta-information ... NOTE Maintainer field differs from that derived from Authors@R Maintainer: 'Jiaming Yuan ' Authors@R: 'Tong He ' * checking top-level files ... NOTE Non-standard file/directory found at top level: 'CMakeLists.txt' * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * loading checks for arch 'i386' ** checking whether the package can be loaded ... OK ** checking whether the package can be loaded with stated dependencies ... OK ** checking whether the package can be unloaded cleanly ... OK ** checking whether the namespace can be loaded with stated dependencies ... OK ** checking whether the namespace can be unloaded cleanly ... OK ** checking loading without being on the library search path ... OK ** checking use of S3 registration ... OK * loading checks for arch 'x64' ** checking whether the package can be loaded ... OK ** checking whether the package can be loaded with stated dependencies ... OK ** checking whether the package can be unloaded cleanly ... OK ** checking whether the namespace can be loaded with stated dependencies ... OK ** checking whether the namespace can be unloaded cleanly ... OK ** checking loading without being on the library search path ... OK ** checking use of S3 registration ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... [15s] OK * checking Rd files ... [1s] OK * checking Rd metadata ... OK * checking Rd line widths ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking contents of 'data' directory ... OK * checking data for non-ASCII characters ... OK * checking data for ASCII and uncompressed saves ... OK * checking line endings in shell scripts ... OK * checking line endings in C/C++/Fortran sources/headers ... OK * checking line endings in Makefiles ... OK * checking compilation flags in Makevars ... OK * checking for GNU extensions in Makefiles ... OK * checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK * checking use of PKG_*FLAGS in Makefiles ... OK * checking use of SHLIB_OPENMP_*FLAGS in Makefiles ... OK * checking pragmas in C/C++ headers and code ... OK * checking compiled code ... OK * checking sizes of PDF files under 'inst/doc' ... OK * checking installed files from 'inst/doc' ... OK * checking files in 'vignettes' ... OK * checking examples ... ** running examples for arch 'i386' ... [20s] OK ** running examples for arch 'x64' ... [18s] OK * checking for unstated dependencies in 'tests' ... OK * checking tests ... ** running tests for arch 'i386' ... [54s] ERROR Running 'testthat.R' [54s] Running the tests in 'tests/testthat.R' failed. Complete output: > library(testthat) > library(xgboost) > > test_check("xgboost", reporter = ProgressReporter) v | F W S OK | Context / | 0 | basic / | 0 | basic functions - | 1 | basic functions / | 4 | basic functions [13:52:04] WARNING: amalgamation/../src/c_api/c_api.cc:718: `ntree_limit` is deprecated, use `iteration_range` instead. [1] train-rmse:2.156544 [2] train-rmse:2.156544 [3] train-rmse:2.152381 [4] train-rmse:2.150422 [5] train-rmse:2.150047 [6] train-rmse:2.149188 [7] train-rmse:2.147871 [8] train-rmse:2.148608 [9] train-rmse:2.148293 [10] train-rmse:2.148611 [11] train-rmse:2.148746 [12] train-rmse:2.147184 [13] train-rmse:2.147197 [14] train-rmse:2.147186 [15] train-rmse:2.147396 [16] train-rmse:2.147121 [17] train-rmse:2.147261 [18] train-rmse:2.147445 [19] train-rmse:2.147641 [20] train-rmse:2.147805 [21] train-rmse:2.147837 [22] train-rmse:2.148016 [23] train-rmse:2.148108 [24] train-rmse:2.148174 [25] train-rmse:2.148293 [26] train-rmse:2.148309 [27] train-rmse:2.148383 [28] train-rmse:2.148398 [29] train-rmse:2.148396 [30] train-rmse:2.148506 [31] train-rmse:2.148516 [32] train-rmse:2.148394 [13:52:04] WARNING: amalgamation/../src/c_api/c_api.cc:718: `ntree_limit` is deprecated, use `iteration_range` instead. \ | 14 | basic functions [13:52:04] WARNING: amalgamation/../src/c_api/c_api.cc:718: `ntree_limit` is deprecated, use `iteration_range` instead. - | 1 20 | basic functions [13:52:04] WARNING: amalgamation/../src/c_api/c_api.cc:718: `ntree_limit` is deprecated, use `iteration_range` instead. / | 3 29 | basic functions [1] train-error:0.027944 - | 4 33 | basic functions [13:52:05] WARNING: amalgamation/../src/c_api/c_api.cc:718: `ntree_limit` is deprecated, use `iteration_range` instead. \ | 4 38 | basic functions [13:52:05] WARNING: amalgamation/../src/c_api/c_api.cc:718: `ntree_limit` is deprecated, use `iteration_range` instead. [13:52:05] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'binary:logistic' was changed from 'error' to 'logloss'. Explicitly set eval_metric if you'd like to restore the old behavior. [13:52:05] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'binary:logistic' was changed from 'error' to 'logloss'. Explicitly set eval_metric if you'd like to restore the old behavior. | | 4 47 | basic functions [13:52:05] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'binary:logistic' was changed from 'error' to 'logloss'. Explicitly set eval_metric if you'd like to restore the old behavior. [13:52:05] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'binary:logistic' was changed from 'error' to 'logloss'. Explicitly set eval_metric if you'd like to restore the old behavior. [1] train-logloss:0.439407 [2] train-logloss:0.299257 [3] train-logloss:0.209938 [4] train-logloss:0.150146 / | 4 52 | basic functions - | 4 53 | basic functions [13:52:05] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'binary:logistic' was changed from 'error' to 'logloss'. Explicitly set eval_metric if you'd like to restore the old behavior. [13:52:05] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'binary:logistic' was changed from 'error' to 'logloss'. Explicitly set eval_metric if you'd like to restore the old behavior. [13:52:05] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'binary:logistic' was changed from 'error' to 'logloss'. Explicitly set eval_metric if you'd like to restore the old behavior. [13:52:05] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'binary:logistic' was changed from 'error' to 'logloss'. Explicitly set eval_metric if you'd like to restore the old behavior. [13:52:05] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'binary:logistic' was changed from 'error' to 'logloss'. Explicitly set eval_metric if you'd like to restore the old behavior. [1] train-logloss:0.233470+0.001566 test-logloss:0.233607+0.004929 [2] train-logloss:0.136850+0.001767 test-logloss:0.137010+0.006645 [13:52:05] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'binary:logistic' was changed from 'error' to 'logloss'. Explicitly set eval_metric if you'd like to restore the old behavior. [13:52:05] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'binary:logistic' was changed from 'error' to 'logloss'. Explicitly set eval_metric if you'd like to restore the old behavior. [13:52:05] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'binary:logistic' was changed from 'error' to 'logloss'. Explicitly set eval_metric if you'd like to restore the old behavior. [13:52:05] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'binary:logistic' was changed from 'error' to 'logloss'. Explicitly set eval_metric if you'd like to restore the old behavior. [13:52:05] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'binary:logistic' was changed from 'error' to 'logloss'. Explicitly set eval_metric if you'd like to restore the old behavior. [1] train-logloss:0.233483+0.001762 test-logloss:0.233527+0.005591 [2] train-logloss:0.136860+0.002158 test-logloss:0.136933+0.007299 / | 4 64 | basic functions [13:52:06] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'binary:logistic' was changed from 'error' to 'logloss'. Explicitly set eval_metric if you'd like to restore the old behavior. [13:52:06] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'binary:logistic' was changed from 'error' to 'logloss'. Explicitly set eval_metric if you'd like to restore the old behavior. [13:52:06] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'binary:logistic' was changed from 'error' to 'logloss'. Explicitly set eval_metric if you'd like to restore the old behavior. \ | 4 70 | basic functions [1] train-logloss:0.380601 [2] train-logloss:0.247327 [3] train-logloss:0.175046 [4] train-logloss:0.122303 [5] train-logloss:0.089890 [1] train-logloss:0.497351 [2] train-logloss:0.357289 [3] train-logloss:0.257217 [4] train-logloss:0.184524 [5] train-logloss:0.132112 - | 5 76 | basic functions [1] train-error:0.046522 train-auc:0.958228 train-logloss:0.233366 [2] train-error:0.022263 train-auc:0.981413 train-logloss:0.136656 [1] train-merror:0.613333 [2] train-merror:0.613333 [1] train-error:0.046522 train-auc:0.958228 train-logloss:0.482554 [2] train-error:0.046522 train-auc:0.987161 train-logloss:0.359534 | | 5 86 | basic functions x | 5 90 | basic functions [8.1s] -------------------------------------------------------------------------------- Failure (test_basic.R:133:3): train and predict softprob bst$evaluation_log[, min(train_merror)] is not strictly less than 0.025. Difference: 0.588 Failure (test_basic.R:144:3): train and predict softprob bst$evaluation_log[5, train_merror] not equal to `err`. 1/1 mismatches [1] 0.613 - 0.667 == -0.0533 Failure (test_basic.R:149:3): train and predict softprob bst$evaluation_log[1, train_merror] not equal to `err`. 1/1 mismatches [1] 0.613 - 0.553 == 0.06 Failure (test_basic.R:179:3): train and predict softmax bst$evaluation_log[, min(train_merror)] is not strictly less than 0.025. Difference: 0.588 Failure (test_basic.R:396:3): colsample_bytree works nrow(xgb.importance(model = bst)) is not more than 30. Difference: -30 -------------------------------------------------------------------------------- / | 0 | callbacks / | 0 | callbacks - | 1 | callbacks [1] train-auc:0.900000 test-auc:0.800000 \ | 26 | callbacks \ | 34 | callbacks | | 39 | callbacks \ | 1 49 | callbacks / | 1 51 | callbacks - | 1 60 | callbacks [13:52:13] WARNING: amalgamation/../src/c_api/c_api.cc:718: `ntree_limit` is deprecated, use `iteration_range` instead. [1] train-auc:0.539170 Will train until train_auc hasn't improved in 3 rounds. [2] train-auc:0.539170 [3] train-auc:0.539170 [4] train-auc:0.539170 Stopping. Best iteration: [1] train-auc:0.539170 - | 1 68 | callbacks \ | 1 69 | callbacks | | 1 74 | callbacks | | 1 78 | callbacks - | 1 84 | callbacks [13:52:15] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'multi:softprob' was changed from 'merror' to 'mlogloss'. Explicitly set eval_metric if you'd like to restore the old behavior. [13:52:15] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'multi:softprob' was changed from 'merror' to 'mlogloss'. Explicitly set eval_metric if you'd like to restore the old behavior. [13:52:15] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'multi:softprob' was changed from 'merror' to 'mlogloss'. Explicitly set eval_metric if you'd like to restore the old behavior. [13:52:15] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'multi:softprob' was changed from 'merror' to 'mlogloss'. Explicitly set eval_metric if you'd like to restore the old behavior. v | 1 95 | callbacks [2.5s] -------------------------------------------------------------------------------- Warning (test_callbacks.R:196:3): cb.save.model works as expected one argument not used by format 'xgboost.json' Backtrace: 1. xgboost::xgb.train(...) test_callbacks.R:196:2 2. xgboost:::f() 4. base::sprintf(save_name, env$iteration) -------------------------------------------------------------------------------- / | 0 | config / | 0 | Test global configuration v | 8 | Test global configuration / | 0 | custom_objective / | 0 | Test models with custom objective [1] eval-error:0.042831 train-error:0.046522 [2] eval-error:0.021726 train-error:0.022263 - | 1 | Test models with custom objective - | 5 | Test models with custom objective [1] eval-error:0.042831 train-error:0.046522 [2] eval-error:0.021726 train-error:0.022263 [3] eval-error:0.018001 train-error:0.015200 [4] eval-error:0.018001 train-error:0.015200 [5] eval-error:0.006207 train-error:0.007063 [6] eval-error:0.000000 train-error:0.001228 [7] eval-error:0.000000 train-error:0.001228 [8] eval-error:0.000000 train-error:0.001228 [9] eval-error:0.000000 train-error:0.001228 [10] eval-error:0.000000 train-error:0.000000 / | 8 | Test models with custom objective [1] eval-error:0.042831 train-error:0.046522 [2] eval-error:0.021726 train-error:0.022263 v | 12 | Test models with custom objective [0.6s] / | 0 | dmatrix / | 0 | testing xgb.DMatrix functionality / | 16 | testing xgb.DMatrix functionality \ | 1 29 | testing xgb.DMatrix functionality v | 1 37 | testing xgb.DMatrix functionality [0.3s] -------------------------------------------------------------------------------- Warning (test_dmatrix.R:68:3): xgb.DMatrix: getinfo & setinfo NAs introduced by coercion Backtrace: 1. testthat::expect_error(setinfo(dtest, "weight", rep("a", nrow(test_data)))) test_dmatrix.R:68:2 7. xgboost:::setinfo.xgb.DMatrix(dtest, "weight", rep("a", nrow(test_data))) -------------------------------------------------------------------------------- / | 0 | gc_safety / | 0 | Garbage Collection Safety Check [13:52:26] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'binary:logistic' was changed from 'error' to 'logloss'. Explicitly set eval_metric if you'd like to restore the old behavior. [1] train-logloss:0.233366 [2] train-logloss:0.136656 - | 1 | Garbage Collection Safety Check v | 1 | Garbage Collection Safety Check [31.5s] / | 0 | glm / | 0 | Test generalized linear models - | 1 | Test generalized linear models | | 7 | Test generalized linear models / | 8 | Test generalized linear models v | 11 | Test generalized linear models [0.4s] / | 0 | helpers / | 0 | Test helper functions [13:52:48] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'binary:logistic' was changed from 'error' to 'logloss'. Explicitly set eval_metric if you'd like to restore the old behavior. [13:52:48] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'binary:logistic' was changed from 'error' to 'logloss'. Explicitly set eval_metric if you'd like to restore the old behavior. [13:52:48] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'multi:softprob' was changed from 'merror' to 'mlogloss'. Explicitly set eval_metric if you'd like to restore the old behavior. [13:52:48] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'multi:softprob' was changed from 'merror' to 'mlogloss'. Explicitly set eval_metric if you'd like to restore the old behavior. - | 1 | Test helper functions [13:52:48] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'binary:logistic' was changed from 'error' to 'logloss'. Explicitly set eval_metric if you'd like to restore the old behavior. [1] train-logloss:0.636592 | | 27 | Test helper functions [1] train-rmse:2.232339 [2] train-rmse:2.099354 [3] train-rmse:2.024595 [4] train-rmse:1.982377 [5] train-rmse:1.957963 [6] train-rmse:1.943576 [7] train-rmse:1.934593 [8] train-rmse:1.928827 [9] train-rmse:1.925038 [10] train-rmse:1.922479 [11] train-rmse:1.920719 [12] train-rmse:1.919510 [13] train-rmse:1.918640 [14] train-rmse:1.918022 [15] train-rmse:1.917581 [16] train-rmse:1.917265 [17] train-rmse:1.917038 [18] train-rmse:1.916875 [19] train-rmse:1.916757 [20] train-rmse:1.916672 [21] train-rmse:1.916611 [22] train-rmse:1.916567 [23] train-rmse:1.916535 [24] train-rmse:1.916512 [25] train-rmse:1.916496 [26] train-rmse:1.916484 [27] train-rmse:1.916475 [28] train-rmse:1.916469 [29] train-rmse:1.916464 [30] train-rmse:1.916461 \ | 3 43 | Test helper functions / | 3 93 | Test helper functions | | 3 140 | Test helper functions - | 3 186 | Test helper functions / | 3 237 | Test helper functions [1] train-rmse:2.232339 [2] train-rmse:2.130526 [3] train-rmse:2.063321 [4] train-rmse:2.018815 [5] train-rmse:1.989656 [6] train-rmse:1.969789 [7] train-rmse:1.956415 [8] train-rmse:1.946854 [9] train-rmse:1.940154 [10] train-rmse:1.935110 [11] train-rmse:1.931258 [12] train-rmse:1.928420 [13] train-rmse:1.926229 [14] train-rmse:1.924435 [15] train-rmse:1.923102 [16] train-rmse:1.921919 [17] train-rmse:1.920878 [18] train-rmse:1.920530 [19] train-rmse:1.919936 [20] train-rmse:1.919344 [21] train-rmse:1.919010 [22] train-rmse:1.918570 [23] train-rmse:1.918308 [24] train-rmse:1.918022 [25] train-rmse:1.917761 [26] train-rmse:1.917720 [27] train-rmse:1.917543 [28] train-rmse:1.917544 [29] train-rmse:1.917377 [30] train-rmse:1.917225 / | 3 245 | Test helper functions \ | 3 291 | Test helper functions | | 3 332 | Test helper functions / | 3 369 | Test helper functions - | 3 414 | Test helper functions | | 3 452 | Test helper functions / | 3 473 | Test helper functions - | 3 498 | Test helper functions | | 3 520 | Test helper functions / | 3 553 | Test helper functions - | 3 590 | Test helper functions - | 3 630 | Test helper functions \ | 3 663 | Test helper functions | | 3 668 | Test helper functions / | 3 677 | Test helper functions - | 3 678 | Test helper functions \ | 4 678 | Test helper functions [13:52:51] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'binary:logistic' was changed from 'error' to 'logloss'. Explicitly set eval_metric if you'd like to restore the old behavior. - | 4 689 | Test helper functions \ | 4 690 | Test helper functions | | 4 1 690 | Test helper functions / | 4 1 691 | Test helper functions - | 4 1 692 | Test helper functions / | 6 1 705 | Test helper functions | | 6 1 736 | Test helper functions x | 6 1 736 | Test helper functions [6.9s] -------------------------------------------------------------------------------- Failure (test_helpers.R:144:5): predict feature contributions works as.numeric(pred_contr[[g]]) not equal to as.numeric(pred_contr_manual). 568/750 mismatches (average diff: 1.65) [9] 0 - 0.749 == -0.749 [10] 0 - 0.834 == -0.834 [11] 0 - 0.919 == -0.919 [12] 0 - 0.817 == -0.817 [13] 0 - 0.817 == -0.817 [14] 0 - 0.731 == -0.731 [15] 0 - 0.987 == -0.987 [16] 0 - 0.970 == -0.970 [17] 0 - 0.919 == -0.919 ... Failure (test_helpers.R:144:5): predict feature contributions works as.numeric(pred_contr[[g]]) not equal to as.numeric(pred_contr_manual). 568/750 mismatches (average diff: 1.35) [9] 0 - -0.610 == 0.610 [10] 0 - -0.680 == 0.680 [11] 0 - -0.749 == 0.749 [12] 0 - -0.666 == 0.666 [13] 0 - -0.666 == 0.666 [14] 0 - -0.596 == 0.596 [15] 0 - -0.804 == 0.804 [16] 0 - -0.791 == 0.791 [17] 0 - -0.749 == 0.749 ... Failure (test_helpers.R:144:5): predict feature contributions works as.numeric(pred_contr[[g]]) not equal to as.numeric(pred_contr_manual). 568/750 mismatches (average diff: 1.35) [9] 0 - -0.610 == 0.610 [10] 0 - -0.680 == 0.680 [11] 0 - -0.749 == 0.749 [12] 0 - -0.666 == 0.666 [13] 0 - -0.666 == 0.666 [14] 0 - -0.596 == 0.596 [15] 0 - -0.804 == 0.804 [16] 0 - -0.791 == 0.791 [17] 0 - -0.749 == 0.749 ... Failure (test_helpers.R:312:3): xgb.importance works with and without feature names dim(imp.Tree) not equal to c(4, 4). 1/2 mismatches [1] 1 - 4 == -3 Skip (test_helpers.R:347:1): xgb.plot.multi.trees works with and without feature names Reason: empty test Failure (test_helpers.R:370:3): xgb.shap.data works when top_n is provided dim(data_list$shap_contrib) not equal to c(nrow(iris), 2). 1/2 mismatches [2] 1 - 2 == -1 Failure (test_helpers.R:373:3): xgb.shap.data works when top_n is provided dim(data_list$shap_contrib) not equal to c(nrow(iris), 2). 1/2 mismatches [2] 1 - 2 == -1 -------------------------------------------------------------------------------- Maximum number of failures exceeded; quitting at end of file. Increase this number with (e.g.) `Sys.setenv('TESTTHAT_MAX_FAILS' = Inf)` == Results ===================================================================== Duration: 50.6 s -- Skipped tests -------------------------------------------------------------- * empty test (1) [ FAIL 11 | WARN 2 | SKIP 1 | PASS 990 ] == Terminated early ============================================================ Error: Test failures Execution halted ** running tests for arch 'x64' ... [51s] ERROR Running 'testthat.R' [50s] Running the tests in 'tests/testthat.R' failed. Complete output: > library(testthat) > library(xgboost) > > test_check("xgboost", reporter = ProgressReporter) v | F W S OK | Context / | 0 | basic / | 0 | basic functions - | 1 | basic functions - | 5 | basic functions [13:52:58] WARNING: amalgamation/../src/c_api/c_api.cc:718: `ntree_limit` is deprecated, use `iteration_range` instead. [1] train-rmse:2.156544 [2] train-rmse:2.156544 [3] train-rmse:2.152381 [4] train-rmse:2.150422 [5] train-rmse:2.150047 [6] train-rmse:2.149188 [7] train-rmse:2.147871 [8] train-rmse:2.148608 [9] train-rmse:2.148293 [10] train-rmse:2.148611 [11] train-rmse:2.148746 [12] train-rmse:2.147184 [13] train-rmse:2.147197 [14] train-rmse:2.147186 [15] train-rmse:2.147396 [16] train-rmse:2.147121 [17] train-rmse:2.147261 [18] train-rmse:2.147445 [19] train-rmse:2.147641 [20] train-rmse:2.147805 [21] train-rmse:2.147837 [22] train-rmse:2.148016 [23] train-rmse:2.148108 [24] train-rmse:2.148174 [25] train-rmse:2.148293 [26] train-rmse:2.148309 [27] train-rmse:2.148383 [28] train-rmse:2.148398 [29] train-rmse:2.148396 [30] train-rmse:2.148506 [31] train-rmse:2.148516 [32] train-rmse:2.148394 [13:52:58] WARNING: amalgamation/../src/c_api/c_api.cc:718: `ntree_limit` is deprecated, use `iteration_range` instead. \ | 14 | basic functions [13:52:58] WARNING: amalgamation/../src/c_api/c_api.cc:718: `ntree_limit` is deprecated, use `iteration_range` instead. - | 1 20 | basic functions [13:52:58] WARNING: amalgamation/../src/c_api/c_api.cc:718: `ntree_limit` is deprecated, use `iteration_range` instead. [1] train-error:0.027944 - | 4 33 | basic functions [13:52:58] WARNING: amalgamation/../src/c_api/c_api.cc:718: `ntree_limit` is deprecated, use `iteration_range` instead. \ | 4 38 | basic functions [13:52:58] WARNING: amalgamation/../src/c_api/c_api.cc:718: `ntree_limit` is deprecated, use `iteration_range` instead. [13:52:58] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'binary:logistic' was changed from 'error' to 'logloss'. Explicitly set eval_metric if you'd like to restore the old behavior. [13:52:58] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'binary:logistic' was changed from 'error' to 'logloss'. Explicitly set eval_metric if you'd like to restore the old behavior. | | 4 47 | basic functions [13:52:58] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'binary:logistic' was changed from 'error' to 'logloss'. Explicitly set eval_metric if you'd like to restore the old behavior. [13:52:58] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'binary:logistic' was changed from 'error' to 'logloss'. Explicitly set eval_metric if you'd like to restore the old behavior. [1] train-logloss:0.439407 [2] train-logloss:0.299257 [3] train-logloss:0.209938 [4] train-logloss:0.150146 | | 4 55 | basic functions - | 4 61 | basic functions [13:52:59] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'binary:logistic' was changed from 'error' to 'logloss'. Explicitly set eval_metric if you'd like to restore the old behavior. [13:52:59] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'binary:logistic' was changed from 'error' to 'logloss'. Explicitly set eval_metric if you'd like to restore the old behavior. [13:52:59] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'binary:logistic' was changed from 'error' to 'logloss'. Explicitly set eval_metric if you'd like to restore the old behavior. [13:52:59] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'binary:logistic' was changed from 'error' to 'logloss'. Explicitly set eval_metric if you'd like to restore the old behavior. [13:52:59] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'binary:logistic' was changed from 'error' to 'logloss'. Explicitly set eval_metric if you'd like to restore the old behavior. [1] train-logloss:0.233470+0.001566 test-logloss:0.233607+0.004929 [2] train-logloss:0.136850+0.001767 test-logloss:0.137010+0.006645 [13:52:59] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'binary:logistic' was changed from 'error' to 'logloss'. Explicitly set eval_metric if you'd like to restore the old behavior. [13:52:59] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'binary:logistic' was changed from 'error' to 'logloss'. Explicitly set eval_metric if you'd like to restore the old behavior. [13:52:59] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'binary:logistic' was changed from 'error' to 'logloss'. Explicitly set eval_metric if you'd like to restore the old behavior. [13:52:59] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'binary:logistic' was changed from 'error' to 'logloss'. Explicitly set eval_metric if you'd like to restore the old behavior. [13:52:59] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'binary:logistic' was changed from 'error' to 'logloss'. Explicitly set eval_metric if you'd like to restore the old behavior. [1] train-logloss:0.233483+0.001762 test-logloss:0.233527+0.005591 [2] train-logloss:0.136860+0.002158 test-logloss:0.136933+0.007299 | | 4 67 | basic functions [13:52:59] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'binary:logistic' was changed from 'error' to 'logloss'. Explicitly set eval_metric if you'd like to restore the old behavior. [13:52:59] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'binary:logistic' was changed from 'error' to 'logloss'. Explicitly set eval_metric if you'd like to restore the old behavior. [13:52:59] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'binary:logistic' was changed from 'error' to 'logloss'. Explicitly set eval_metric if you'd like to restore the old behavior. - | 4 73 | basic functions [1] train-logloss:0.380601 [2] train-logloss:0.247327 [3] train-logloss:0.175046 [4] train-logloss:0.122303 [5] train-logloss:0.089890 [1] train-logloss:0.497351 [2] train-logloss:0.357289 [3] train-logloss:0.257217 [4] train-logloss:0.184524 [5] train-logloss:0.132112 / | 5 79 | basic functions [1] train-error:0.046522 train-auc:0.958228 train-logloss:0.233366 [2] train-error:0.022263 train-auc:0.981413 train-logloss:0.136656 [1] train-merror:0.613333 [2] train-merror:0.613333 [1] train-error:0.046522 train-auc:0.958228 train-logloss:0.482554 [2] train-error:0.046522 train-auc:0.987161 train-logloss:0.359534 \ | 5 89 | basic functions x | 5 93 | basic functions [6.0s] -------------------------------------------------------------------------------- Failure (test_basic.R:133:3): train and predict softprob bst$evaluation_log[, min(train_merror)] is not strictly less than 0.025. Difference: 0.588 Failure (test_basic.R:144:3): train and predict softprob bst$evaluation_log[5, train_merror] not equal to `err`. 1/1 mismatches [1] 0.613 - 0.667 == -0.0533 Failure (test_basic.R:149:3): train and predict softprob bst$evaluation_log[1, train_merror] not equal to `err`. 1/1 mismatches [1] 0.613 - 0.553 == 0.06 Failure (test_basic.R:179:3): train and predict softmax bst$evaluation_log[, min(train_merror)] is not strictly less than 0.025. Difference: 0.588 Failure (test_basic.R:396:3): colsample_bytree works nrow(xgb.importance(model = bst)) is not more than 30. Difference: -30 -------------------------------------------------------------------------------- / | 0 | callbacks / | 0 | callbacks [1] train-auc:0.900000 test-auc:0.800000 / | 12 | callbacks \ | 26 | callbacks / | 36 | callbacks | | 39 | callbacks / | 1 51 | callbacks / | 1 59 | callbacks [13:53:04] WARNING: amalgamation/../src/c_api/c_api.cc:718: `ntree_limit` is deprecated, use `iteration_range` instead. [1] train-auc:0.539170 Will train until train_auc hasn't improved in 3 rounds. [2] train-auc:0.539170 [3] train-auc:0.539170 [4] train-auc:0.539170 Stopping. Best iteration: [1] train-auc:0.539170 - | 1 68 | callbacks \ | 1 69 | callbacks | | 1 74 | callbacks | | 1 78 | callbacks - | 1 84 | callbacks [13:53:05] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'multi:softprob' was changed from 'merror' to 'mlogloss'. Explicitly set eval_metric if you'd like to restore the old behavior. [13:53:05] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'multi:softprob' was changed from 'merror' to 'mlogloss'. Explicitly set eval_metric if you'd like to restore the old behavior. [13:53:05] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'multi:softprob' was changed from 'merror' to 'mlogloss'. Explicitly set eval_metric if you'd like to restore the old behavior. [13:53:05] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'multi:softprob' was changed from 'merror' to 'mlogloss'. Explicitly set eval_metric if you'd like to restore the old behavior. v | 1 95 | callbacks [2.0s] -------------------------------------------------------------------------------- Warning (test_callbacks.R:196:3): cb.save.model works as expected one argument not used by format 'xgboost.json' Backtrace: 1. xgboost::xgb.train(...) test_callbacks.R:196:2 2. xgboost:::f() 4. base::sprintf(save_name, env$iteration) -------------------------------------------------------------------------------- / | 0 | config / | 0 | Test global configuration v | 8 | Test global configuration / | 0 | custom_objective / | 0 | Test models with custom objective [1] eval-error:0.042831 train-error:0.046522 [2] eval-error:0.021726 train-error:0.022263 | | 3 | Test models with custom objective - | 5 | Test models with custom objective [1] eval-error:0.042831 train-error:0.046522 [2] eval-error:0.021726 train-error:0.022263 [3] eval-error:0.018001 train-error:0.015200 [4] eval-error:0.018001 train-error:0.015200 [5] eval-error:0.006207 train-error:0.007063 [6] eval-error:0.000000 train-error:0.001228 [7] eval-error:0.000000 train-error:0.001228 [8] eval-error:0.000000 train-error:0.001228 [9] eval-error:0.000000 train-error:0.001228 [10] eval-error:0.000000 train-error:0.000000 / | 8 | Test models with custom objective [1] eval-error:0.042831 train-error:0.046522 [2] eval-error:0.021726 train-error:0.022263 v | 12 | Test models with custom objective [0.5s] / | 0 | dmatrix / | 0 | testing xgb.DMatrix functionality / | 1 23 | testing xgb.DMatrix functionality - | 1 36 | testing xgb.DMatrix functionality v | 1 37 | testing xgb.DMatrix functionality [0.2s] -------------------------------------------------------------------------------- Warning (test_dmatrix.R:68:3): xgb.DMatrix: getinfo & setinfo NAs introduced by coercion Backtrace: 1. testthat::expect_error(setinfo(dtest, "weight", rep("a", nrow(test_data)))) test_dmatrix.R:68:2 7. xgboost:::setinfo.xgb.DMatrix(dtest, "weight", rep("a", nrow(test_data))) -------------------------------------------------------------------------------- / | 0 | gc_safety / | 0 | Garbage Collection Safety Check [13:53:17] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'binary:logistic' was changed from 'error' to 'logloss'. Explicitly set eval_metric if you'd like to restore the old behavior. [1] train-logloss:0.233366 [2] train-logloss:0.136656 - | 1 | Garbage Collection Safety Check v | 1 | Garbage Collection Safety Check [32.1s] / | 0 | glm / | 0 | Test generalized linear models | | 3 | Test generalized linear models / | 8 | Test generalized linear models v | 11 | Test generalized linear models [0.3s] / | 0 | helpers / | 0 | Test helper functions [13:53:39] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'binary:logistic' was changed from 'error' to 'logloss'. Explicitly set eval_metric if you'd like to restore the old behavior. [13:53:39] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'binary:logistic' was changed from 'error' to 'logloss'. Explicitly set eval_metric if you'd like to restore the old behavior. [13:53:39] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'multi:softprob' was changed from 'merror' to 'mlogloss'. Explicitly set eval_metric if you'd like to restore the old behavior. [13:53:39] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'multi:softprob' was changed from 'merror' to 'mlogloss'. Explicitly set eval_metric if you'd like to restore the old behavior. - | 1 | Test helper functions [13:53:39] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'binary:logistic' was changed from 'error' to 'logloss'. Explicitly set eval_metric if you'd like to restore the old behavior. [1] train-logloss:0.636592 - | 29 | Test helper functions [1] train-rmse:2.232339 [2] train-rmse:2.099354 [3] train-rmse:2.024595 [4] train-rmse:1.982377 [5] train-rmse:1.957963 [6] train-rmse:1.943576 [7] train-rmse:1.934593 [8] train-rmse:1.928827 [9] train-rmse:1.925038 [10] train-rmse:1.922479 [11] train-rmse:1.920719 [12] train-rmse:1.919510 [13] train-rmse:1.918640 [14] train-rmse:1.918022 [15] train-rmse:1.917581 [16] train-rmse:1.917265 [17] train-rmse:1.917038 [18] train-rmse:1.916875 [19] train-rmse:1.916757 [20] train-rmse:1.916672 [21] train-rmse:1.916611 [22] train-rmse:1.916567 [23] train-rmse:1.916535 [24] train-rmse:1.916512 [25] train-rmse:1.916496 [26] train-rmse:1.916484 [27] train-rmse:1.916475 [28] train-rmse:1.916469 [29] train-rmse:1.916464 [30] train-rmse:1.916461 / | 3 45 | Test helper functions / | 3 93 | Test helper functions \ | 3 139 | Test helper functions \ | 3 199 | Test helper functions [1] train-rmse:2.232339 [2] train-rmse:2.130526 [3] train-rmse:2.063321 [4] train-rmse:2.018815 [5] train-rmse:1.989656 [6] train-rmse:1.969789 [7] train-rmse:1.956415 [8] train-rmse:1.946854 [9] train-rmse:1.940154 [10] train-rmse:1.935110 [11] train-rmse:1.931258 [12] train-rmse:1.928420 [13] train-rmse:1.926229 [14] train-rmse:1.924435 [15] train-rmse:1.923102 [16] train-rmse:1.921919 [17] train-rmse:1.920878 [18] train-rmse:1.920530 [19] train-rmse:1.919936 [20] train-rmse:1.919344 [21] train-rmse:1.919010 [22] train-rmse:1.918570 [23] train-rmse:1.918308 [24] train-rmse:1.918022 [25] train-rmse:1.917761 [26] train-rmse:1.917720 [27] train-rmse:1.917543 [28] train-rmse:1.917544 [29] train-rmse:1.917377 [30] train-rmse:1.917225 \ | 3 247 | Test helper functions \ | 3 327 | Test helper functions \ | 3 403 | Test helper functions | | 3 468 | Test helper functions \ | 3 515 | Test helper functions / | 3 557 | Test helper functions - | 3 582 | Test helper functions \ | 3 611 | Test helper functions | | 3 644 | Test helper functions \ | 3 667 | Test helper functions / | 3 673 | Test helper functions - | 3 682 | Test helper functions \ | 4 682 | Test helper functions [13:53:42] WARNING: amalgamation/../src/learner.cc:1115: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'binary:logistic' was changed from 'error' to 'logloss'. Explicitly set eval_metric if you'd like to restore the old behavior. - | 4 693 | Test helper functions \ | 4 694 | Test helper functions | | 4 1 694 | Test helper functions / | 4 1 695 | Test helper functions - | 4 1 696 | Test helper functions / | 6 1 709 | Test helper functions x | 6 1 740 | Test helper functions [6.2s] -------------------------------------------------------------------------------- Failure (test_helpers.R:144:5): predict feature contributions works as.numeric(pred_contr[[g]]) not equal to as.numeric(pred_contr_manual). 568/750 mismatches (average diff: 1.65) [9] 0 - 0.749 == -0.749 [10] 0 - 0.834 == -0.834 [11] 0 - 0.919 == -0.919 [12] 0 - 0.817 == -0.817 [13] 0 - 0.817 == -0.817 [14] 0 - 0.731 == -0.731 [15] 0 - 0.987 == -0.987 [16] 0 - 0.970 == -0.970 [17] 0 - 0.919 == -0.919 ... Failure (test_helpers.R:144:5): predict feature contributions works as.numeric(pred_contr[[g]]) not equal to as.numeric(pred_contr_manual). 568/750 mismatches (average diff: 1.35) [9] 0 - -0.610 == 0.610 [10] 0 - -0.680 == 0.680 [11] 0 - -0.749 == 0.749 [12] 0 - -0.666 == 0.666 [13] 0 - -0.666 == 0.666 [14] 0 - -0.596 == 0.596 [15] 0 - -0.804 == 0.804 [16] 0 - -0.791 == 0.791 [17] 0 - -0.749 == 0.749 ... Failure (test_helpers.R:144:5): predict feature contributions works as.numeric(pred_contr[[g]]) not equal to as.numeric(pred_contr_manual). 568/750 mismatches (average diff: 1.35) [9] 0 - -0.610 == 0.610 [10] 0 - -0.680 == 0.680 [11] 0 - -0.749 == 0.749 [12] 0 - -0.666 == 0.666 [13] 0 - -0.666 == 0.666 [14] 0 - -0.596 == 0.596 [15] 0 - -0.804 == 0.804 [16] 0 - -0.791 == 0.791 [17] 0 - -0.749 == 0.749 ... Failure (test_helpers.R:312:3): xgb.importance works with and without feature names dim(imp.Tree) not equal to c(4, 4). 1/2 mismatches [1] 1 - 4 == -3 Skip (test_helpers.R:347:1): xgb.plot.multi.trees works with and without feature names Reason: empty test Failure (test_helpers.R:370:3): xgb.shap.data works when top_n is provided dim(data_list$shap_contrib) not equal to c(nrow(iris), 2). 1/2 mismatches [2] 1 - 2 == -1 Failure (test_helpers.R:373:3): xgb.shap.data works when top_n is provided dim(data_list$shap_contrib) not equal to c(nrow(iris), 2). 1/2 mismatches [2] 1 - 2 == -1 -------------------------------------------------------------------------------- Maximum number of failures exceeded; quitting at end of file. Increase this number with (e.g.) `Sys.setenv('TESTTHAT_MAX_FAILS' = Inf)` == Results ===================================================================== Duration: 47.7 s -- Skipped tests -------------------------------------------------------------- * empty test (1) [ FAIL 11 | WARN 2 | SKIP 1 | PASS 997 ] == Terminated early ============================================================ Error: Test failures Execution halted * checking for unstated dependencies in vignettes ... OK * checking package vignettes in 'inst/doc' ... OK * checking re-building of vignette outputs ... [17s] WARNING Error(s) in re-building vignettes: --- re-building 'discoverYourData.Rmd' using rmarkdown Loading required package: xgboost Loading required package: Matrix Loading required package: data.table Loading required package: vcd Loading required package: grid Warning in chisq.test(df$Age, output_vector) : Chi-squared approximation may be incorrect Warning in chisq.test(df$AgeDiscret, output_vector) : Chi-squared approximation may be incorrect Warning in chisq.test(df$AgeCat, output_vector) : Chi-squared approximation may be incorrect --- finished re-building 'discoverYourData.Rmd' --- re-building 'xgboostPresentation.Rmd' using rmarkdown --- finished re-building 'xgboostPresentation.Rmd' --- re-building 'xgboostfromJSON.Rmd' using rmarkdown Quitting from lines 115-122 (xgboostfromJSON.Rmd) Error: processing vignette 'xgboostfromJSON.Rmd' failed with diagnostics: comparison (3) is possible only for atomic and list types --- failed re-building 'xgboostfromJSON.Rmd' --- re-building 'xgboost.Rnw' using knitr Loading required package: knitr --- finished re-building 'xgboost.Rnw' SUMMARY: processing the following file failed: 'xgboostfromJSON.Rmd' Error: Vignette re-building failed. Execution halted * checking PDF version of manual ... OK * checking for detritus in the temp directory ... OK * DONE Status: 2 ERRORs, 1 WARNING, 3 NOTEs