Running ‘testthat.R’ [68s/78s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(checkmate)
  > library(iml)
  > 
  > test_check("iml")
  ── 1. Error: FeatureEffect (pdp only) works for single output and single feature
  there is no package called 'devtools'
  1: FeatureEffects$new(predictor1, method = "pdp", grid.size = grid.size) at testthat/test-FeatureEffects.R:13
  2: .subset2(public_bind_env, "initialize")(...)
  3: private$run()
  4: foreach(feature = feature.names, .packages = devtools::loaded_packages()$package, 
         .inorder = FALSE) %mypar% feature_effect(feature, predictor = predictor, method = method, 
         center.at = center.at, grid.size = grid.size)
  5: e$fun(obj, substitute(ex), parent.frame(), e$data)
  6: foreach(feature = feature.names, .packages = devtools::loaded_packages()$package, 
         .inorder = FALSE)
  7: devtools::loaded_packages
  8: getExportedValue(pkg, name)
  9: asNamespace(ns)
  10: getNamespace(ns)
  11: tryCatch(loadNamespace(name), error = function(e) stop(e))
  12: tryCatchList(expr, classes, parentenv, handlers)
  13: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  14: value[[3L]](cond)
  
  ── 2. Error: FeatureImp works for single output (@test-FeatureImp.R#9)  ────────
  there is no package called 'devtools'
  1: FeatureImp$new(predictor1, loss = "mse") at testthat/test-FeatureImp.R:9
  2: .subset2(public_bind_env, "initialize")(...)
  3: private$run(self$predictor$batch.size)
  4: foreach(feature = private$sampler$feature.names, .combine = rbind, .export = "self", 
         .packages = devtools::loaded_packages()$package, .inorder = FALSE) %mypar% estimate_feature_imp(feature, 
         data.sample = data.sample, y = y, n.repetitions = n.repetitions, y.names = y.names, 
         pred = pred, loss = loss)
  5: e$fun(obj, substitute(ex), parent.frame(), e$data)
  6: foreach(feature = private$sampler$feature.names, .combine = rbind, .export = "self", 
         .packages = devtools::loaded_packages()$package, .inorder = FALSE)
  7: devtools::loaded_packages
  8: getExportedValue(pkg, name)
  9: asNamespace(ns)
  10: getNamespace(ns)
  11: tryCatch(loadNamespace(name), error = function(e) stop(e))
  12: tryCatchList(expr, classes, parentenv, handlers)
  13: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  14: value[[3L]](cond)
  
  ── 3. Error: FeatureImp works for single output with single repetition (@test-Fe
  there is no package called 'devtools'
  1: FeatureImp$new(predictor1, loss = "mse", n.repetitions = 1) at testthat/test-FeatureImp.R:31
  2: .subset2(public_bind_env, "initialize")(...)
  3: private$run(self$predictor$batch.size)
  4: foreach(feature = private$sampler$feature.names, .combine = rbind, .export = "self", 
         .packages = devtools::loaded_packages()$package, .inorder = FALSE) %mypar% estimate_feature_imp(feature, 
         data.sample = data.sample, y = y, n.repetitions = n.repetitions, y.names = y.names, 
         pred = pred, loss = loss)
  5: e$fun(obj, substitute(ex), parent.frame(), e$data)
  6: foreach(feature = private$sampler$feature.names, .combine = rbind, .export = "self", 
         .packages = devtools::loaded_packages()$package, .inorder = FALSE)
  7: devtools::loaded_packages
  8: getExportedValue(pkg, name)
  9: asNamespace(ns)
  10: getNamespace(ns)
  11: tryCatch(loadNamespace(name), error = function(e) stop(e))
  12: tryCatchList(expr, classes, parentenv, handlers)
  13: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  14: value[[3L]](cond)
  
  ── 4. Error: FeatureImp with difference (@test-FeatureImp.R#44)  ───────────────
  there is no package called 'devtools'
  1: FeatureImp$new(predictor1, loss = "mse", compare = "difference") at testthat/test-FeatureImp.R:44
  2: .subset2(public_bind_env, "initialize")(...)
  3: private$run(self$predictor$batch.size)
  4: foreach(feature = private$sampler$feature.names, .combine = rbind, .export = "self", 
         .packages = devtools::loaded_packages()$package, .inorder = FALSE) %mypar% estimate_feature_imp(feature, 
         data.sample = data.sample, y = y, n.repetitions = n.repetitions, y.names = y.names, 
         pred = pred, loss = loss)
  5: e$fun(obj, substitute(ex), parent.frame(), e$data)
  6: foreach(feature = private$sampler$feature.names, .combine = rbind, .export = "self", 
         .packages = devtools::loaded_packages()$package, .inorder = FALSE)
  7: devtools::loaded_packages
  8: getExportedValue(pkg, name)
  9: asNamespace(ns)
  10: getNamespace(ns)
  11: tryCatch(loadNamespace(name), error = function(e) stop(e))
  12: tryCatchList(expr, classes, parentenv, handlers)
  13: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  14: value[[3L]](cond)
  
  ── 5. Error: FeatureImp with 0 model error (@test-FeatureImp.R#62)  ────────────
  there is no package called 'devtools'
  1: expect_warning({
         var.imp = FeatureImp$new(pred, loss = "mae")
     }, "Model error is 0") at testthat/test-FeatureImp.R:62
  2: quasi_capture(enquo(object), capture_warnings, label = label)
  3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  4: withCallingHandlers(code, warning = function(condition) {
         out$push(condition)
         invokeRestart("muffleWarning")
     })
  5: eval_bare(get_expr(quo), get_env(quo))
  6: FeatureImp$new(pred, loss = "mae") at testthat/test-FeatureImp.R:62
  7: .subset2(public_bind_env, "initialize")(...)
  8: private$run(self$predictor$batch.size)
  9: foreach(feature = private$sampler$feature.names, .combine = rbind, .export = "self", 
         .packages = devtools::loaded_packages()$package, .inorder = FALSE) %mypar% estimate_feature_imp(feature, 
         data.sample = data.sample, y = y, n.repetitions = n.repetitions, y.names = y.names, 
         pred = pred, loss = loss)
  10: e$fun(obj, substitute(ex), parent.frame(), e$data)
  11: foreach(feature = private$sampler$feature.names, .combine = rbind, .export = "self", 
         .packages = devtools::loaded_packages()$package, .inorder = FALSE)
  12: devtools::loaded_packages
  13: getExportedValue(pkg, name)
  14: asNamespace(ns)
  15: getNamespace(ns)
  16: tryCatch(loadNamespace(name), error = function(e) stop(e))
  17: tryCatchList(expr, classes, parentenv, handlers)
  18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  19: value[[3L]](cond)
  
  ── 6. Error: FeatureImp works for single output and function as loss (@test-Feat
  there is no package called 'devtools'
  1: FeatureImp$new(predictor1, loss = Metrics::mse) at testthat/test-FeatureImp.R:75
  2: .subset2(public_bind_env, "initialize")(...)
  3: private$run(self$predictor$batch.size)
  4: foreach(feature = private$sampler$feature.names, .combine = rbind, .export = "self", 
         .packages = devtools::loaded_packages()$package, .inorder = FALSE) %mypar% estimate_feature_imp(feature, 
         data.sample = data.sample, y = y, n.repetitions = n.repetitions, y.names = y.names, 
         pred = pred, loss = loss)
  5: e$fun(obj, substitute(ex), parent.frame(), e$data)
  6: foreach(feature = private$sampler$feature.names, .combine = rbind, .export = "self", 
         .packages = devtools::loaded_packages()$package, .inorder = FALSE)
  7: devtools::loaded_packages
  8: getExportedValue(pkg, name)
  9: asNamespace(ns)
  10: getNamespace(ns)
  11: tryCatch(loadNamespace(name), error = function(e) stop(e))
  12: tryCatchList(expr, classes, parentenv, handlers)
  13: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  14: value[[3L]](cond)
  
  ── 7. Error: FeatureImp works for multiple output (@test-FeatureImp.R#89)  ─────
  there is no package called 'devtools'
  1: FeatureImp$new(predictor2, loss = "ce") at testthat/test-FeatureImp.R:89
  2: .subset2(public_bind_env, "initialize")(...)
  3: private$run(self$predictor$batch.size)
  4: foreach(feature = private$sampler$feature.names, .combine = rbind, .export = "self", 
         .packages = devtools::loaded_packages()$package, .inorder = FALSE) %mypar% estimate_feature_imp(feature, 
         data.sample = data.sample, y = y, n.repetitions = n.repetitions, y.names = y.names, 
         pred = pred, loss = loss)
  5: e$fun(obj, substitute(ex), parent.frame(), e$data)
  6: foreach(feature = private$sampler$feature.names, .combine = rbind, .export = "self", 
         .packages = devtools::loaded_packages()$package, .inorder = FALSE)
  7: devtools::loaded_packages
  8: getExportedValue(pkg, name)
  9: asNamespace(ns)
  10: getNamespace(ns)
  11: tryCatch(loadNamespace(name), error = function(e) stop(e))
  12: tryCatchList(expr, classes, parentenv, handlers)
  13: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  14: value[[3L]](cond)
  
  ── 8. Error: Works for different repetitions. (@test-FeatureImp.R#106)  ────────
  there is no package called 'devtools'
  1: FeatureImp$new(predictor1, loss = "mse", n.repetitions = 2) at testthat/test-FeatureImp.R:106
  2: .subset2(public_bind_env, "initialize")(...)
  3: private$run(self$predictor$batch.size)
  4: foreach(feature = private$sampler$feature.names, .combine = rbind, .export = "self", 
         .packages = devtools::loaded_packages()$package, .inorder = FALSE) %mypar% estimate_feature_imp(feature, 
         data.sample = data.sample, y = y, n.repetitions = n.repetitions, y.names = y.names, 
         pred = pred, loss = loss)
  5: e$fun(obj, substitute(ex), parent.frame(), e$data)
  6: foreach(feature = private$sampler$feature.names, .combine = rbind, .export = "self", 
         .packages = devtools::loaded_packages()$package, .inorder = FALSE)
  7: devtools::loaded_packages
  8: getExportedValue(pkg, name)
  9: asNamespace(ns)
  10: getNamespace(ns)
  11: tryCatch(loadNamespace(name), error = function(e) stop(e))
  12: tryCatchList(expr, classes, parentenv, handlers)
  13: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  14: value[[3L]](cond)
  
  ── 9. Error: Model receives data.frame without additional columns (@test-Feature
  there is no package called 'devtools'
  1: FeatureImp$new(predictor, loss = "ce") at testthat/test-FeatureImp.R:122
  2: .subset2(public_bind_env, "initialize")(...)
  3: private$run(self$predictor$batch.size)
  4: foreach(feature = private$sampler$feature.names, .combine = rbind, .export = "self", 
         .packages = devtools::loaded_packages()$package, .inorder = FALSE) %mypar% estimate_feature_imp(feature, 
         data.sample = data.sample, y = y, n.repetitions = n.repetitions, y.names = y.names, 
         pred = pred, loss = loss)
  5: e$fun(obj, substitute(ex), parent.frame(), e$data)
  6: foreach(feature = private$sampler$feature.names, .combine = rbind, .export = "self", 
         .packages = devtools::loaded_packages()$package, .inorder = FALSE)
  7: devtools::loaded_packages
  8: getExportedValue(pkg, name)
  9: asNamespace(ns)
  10: getNamespace(ns)
  11: tryCatch(loadNamespace(name), error = function(e) stop(e))
  12: tryCatchList(expr, classes, parentenv, handlers)
  13: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  14: value[[3L]](cond)
  
  ── 10. Error: Interaction works for all features (@test-Interaction.R#10)  ─────
  there is no package called 'devtools'
  1: Interaction$new(predictor1) at testthat/test-Interaction.R:10
  2: .subset2(public_bind_env, "initialize")(...)
  3: private$run(predictor$batch.size)
  4: foreach(feature = features, .combine = rbind, .export = c("self"), .packages = devtools::loaded_packages()$package, 
         .inorder = FALSE) %mypar% private$interaction.run.single(dataSample = data.sample, 
         feature.name = c(feature, private$feature), grid.size = self$grid.size, batch.size = batch.size, 
         q = private$q, predictor = self$predictor)
  5: e$fun(obj, substitute(ex), parent.frame(), e$data)
  6: foreach(feature = features, .combine = rbind, .export = c("self"), .packages = devtools::loaded_packages()$package, 
         .inorder = FALSE)
  7: devtools::loaded_packages
  8: getExportedValue(pkg, name)
  9: asNamespace(ns)
  10: getNamespace(ns)
  11: tryCatch(loadNamespace(name), error = function(e) stop(e))
  12: tryCatchList(expr, classes, parentenv, handlers)
  13: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  14: value[[3L]](cond)
  
  ── 11. Error: Interaction works for 2-way interactions (@test-Interaction.R#21) 
  there is no package called 'devtools'
  1: Interaction$new(predictor1, feature = c("a")) at testthat/test-Interaction.R:21
  2: .subset2(public_bind_env, "initialize")(...)
  3: private$run(predictor$batch.size)
  4: foreach(feature = features, .combine = rbind, .export = c("self"), .packages = devtools::loaded_packages()$package, 
         .inorder = FALSE) %mypar% private$interaction.run.single(dataSample = data.sample, 
         feature.name = c(feature, private$feature), grid.size = self$grid.size, batch.size = batch.size, 
         q = private$q, predictor = self$predictor)
  5: e$fun(obj, substitute(ex), parent.frame(), e$data)
  6: foreach(feature = features, .combine = rbind, .export = c("self"), .packages = devtools::loaded_packages()$package, 
         .inorder = FALSE)
  7: devtools::loaded_packages
  8: getExportedValue(pkg, name)
  9: asNamespace(ns)
  10: getNamespace(ns)
  11: tryCatch(loadNamespace(name), error = function(e) stop(e))
  12: tryCatchList(expr, classes, parentenv, handlers)
  13: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  14: value[[3L]](cond)
  
  ── 12. Error: Interaction for multiclass (@test-Interaction.R#39)  ─────────────
  there is no package called 'devtools'
  1: Interaction$new(predictor2) at testthat/test-Interaction.R:39
  2: .subset2(public_bind_env, "initialize")(...)
  3: private$run(predictor$batch.size)
  4: foreach(feature = features, .combine = rbind, .export = c("self"), .packages = devtools::loaded_packages()$package, 
         .inorder = FALSE) %mypar% private$interaction.run.single(dataSample = data.sample, 
         feature.name = c(feature, private$feature), grid.size = self$grid.size, batch.size = batch.size, 
         q = private$q, predictor = self$predictor)
  5: e$fun(obj, substitute(ex), parent.frame(), e$data)
  6: foreach(feature = features, .combine = rbind, .export = c("self"), .packages = devtools::loaded_packages()$package, 
         .inorder = FALSE)
  7: devtools::loaded_packages
  8: getExportedValue(pkg, name)
  9: asNamespace(ns)
  10: getNamespace(ns)
  11: tryCatch(loadNamespace(name), error = function(e) stop(e))
  12: tryCatchList(expr, classes, parentenv, handlers)
  13: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  14: value[[3L]](cond)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 454 SKIPPED: 0 FAILED: 12
  1. Error: FeatureEffect (pdp only) works for single output and single feature (@test-FeatureEffects.R#13) 
  2. Error: FeatureImp works for single output (@test-FeatureImp.R#9) 
  3. Error: FeatureImp works for single output with single repetition (@test-FeatureImp.R#31) 
  4. Error: FeatureImp with difference (@test-FeatureImp.R#44) 
  5. Error: FeatureImp with 0 model error (@test-FeatureImp.R#62) 
  6. Error: FeatureImp works for single output and function as loss (@test-FeatureImp.R#75) 
  7. Error: FeatureImp works for multiple output (@test-FeatureImp.R#89) 
  8. Error: Works for different repetitions. (@test-FeatureImp.R#106) 
  9. Error: Model receives data.frame without additional columns (@test-FeatureImp.R#122) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted