Last updated on 2026-10-18 01:51:02 CEST.
| Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
|---|---|---|---|---|---|---|
| r-devel-linux-x86_64-debian-clang | 1.1.0 | 88.36 | 352.66 | 441.02 | OK | |
| r-devel-linux-x86_64-debian-gcc | 1.1.0 | 56.29 | 231.02 | 287.31 | OK | |
| r-devel-linux-x86_64-fedora-clang | 1.1.0 | 57.00 | 247.35 | 304.35 | OK | |
| r-devel-linux-x86_64-fedora-gcc | 1.1.0 | 63.00 | 247.59 | 310.59 | OK | |
| r-devel-windows-x86_64 | 1.1.0 | 95.00 | 449.00 | 544.00 | OK | |
| r-patched-linux-x86_64 | 1.1.0 | 85.58 | 342.08 | 427.66 | OK | |
| r-release-linux-x86_64 | 1.1.0 | 74.39 | 345.64 | 420.03 | OK | |
| r-release-macos-arm64 | 1.1.0 | 17.00 | 92.00 | 109.00 | OK | |
| r-release-macos-x86_64 | 1.1.0 | 59.00 | 456.00 | 515.00 | OK | |
| r-release-windows-x86_64 | 1.1.0 | 98.00 | 358.00 | 456.00 | OK | |
| r-oldrel-macos-arm64 | 1.1.0 | 21.00 | 90.00 | 111.00 | ERROR | |
| r-oldrel-macos-x86_64 | 1.1.0 | 59.00 | 679.00 | 738.00 | OK | |
| r-oldrel-windows-x86_64 | 1.1.0 | 119.00 | 528.00 | 647.00 | OK |
Version: 1.1.0
Check: tests
Result: ERROR
Running ‘spelling.R’ [0s/0s]
Running ‘testthat.R’ [38s/31s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(missSBM)
>
> test_check("missSBM")
Adjusting Variational EM for Stochastic Block Model
Dyads are distributed according to a 'undirected' SBM.
Imputation assumes a 'covar-dyad' network-sampling process
iteration #: 2
iteration #: 3
Adjusting Variational EM for Stochastic Block Model
Dyads are distributed according to a 'undirected' SBM.
Imputation assumes a 'dyad' network-sampling process
iteration #: 2
iteration #: 3
Adjusting Variational EM for Stochastic Block Model
Dyads are distributed according to a 'undirected' SBM.
Imputation assumes a 'covar-node' network-sampling process
iteration #: 2
iteration #: 3
iteration #: 4
iteration #: 5
Adjusting Variational EM for Stochastic Block Model
Dyads are distributed according to a 'undirected' SBM.
Imputation assumes a 'node' network-sampling process
iteration #: 2
iteration #: 3
iteration #: 4
Tested sampling:
- dyad
- node
- double-standard
- block-node
- block-dyad
Adjusting Variational EM for Stochastic Block Model
Imputation assumes a 'dyad' network-sampling process
Initialization of 3 model(s).
Tested sampling:
- dyad
- node
- double-standard
- block-node
- block-dyad
- degreeTested sampling:
- dyad
- node
- double-standard
- block-node
- block-dyad
- degree
sampling: dyad new better on connectivity
node
double-standard
block-node new better on mixture
Adjusting Variational EM for Stochastic Block Model
iteration #: 2
iteration #: 3
iteration #: 4
iteration #: 5
iteration #: 6
iteration #: 7
iteration #: 8
iteration #: 9
iteration #: 10
iteration #: 11
iteration #: 12
iteration #: 13
iteration #: 14
iteration #: 15
iteration #: 16
iteration #: 17
iteration #: 18
iteration #: 19
iteration #: 20
iteration #: 21
iteration #: 22
iteration #: 23
iteration #: 24
iteration #: 25
iteration #: 26
iteration #: 27
iteration #: 28
iteration #: 29
iteration #: 30
iteration #: 31
iteration #: 32
iteration #: 33
iteration #: 34
Adjusting Variational EM for Stochastic Block Model
Dyads are distributed according to a 'undirected' SBM.
Imputation assumes a 'node' network-sampling process
iteration #: 2
iteration #: 3
iteration #: 4
iteration #: 5
iteration #: 6
iteration #: 7
iteration #: 8
iteration #: 9
iteration #: 10
iteration #: 11
iteration #: 12
iteration #: 13
iteration #: 14
iteration #: 15
iteration #: 16
iteration #: 17
iteration #: 18
iteration #: 19
iteration #: 20
iteration #: 21
iteration #: 22
iteration #: 23
iteration #: 24
iteration #: 25
iteration #: 26
iteration #: 27
iteration #: 28
iteration #: 29
iteration #: 30
iteration #: 31
iteration #: 32
iteration #: 33
iteration #: 34
Adjusting Variational EM for Stochastic Block Model
Imputation assumes a 'node' network-sampling process
Initialization of 1 model(s).
Performing VEM inference
Model with 3 blocks.
Adjusting Variational EM for Stochastic Block Model
Imputation assumes a 'dyad' network-sampling process
Initialization of 2 model(s).
Performing VEM inference
Model with 2 blocks.
Model with 1 blocks.
Polishing (node-swap)
Looking for better solutions
Pass 1 Going forward +
Pass 1 Going backward +
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE)
2: FUN(X[[i]], ...)
3: lapply(X = S, FUN = FUN, ...)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
8: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
10: FUN(X[[i]], ...)
11: lapply(seq_len(cores), inner.do)
12: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE)
13: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, verbose = (verbosity > 4))
14: .self$do_with_inits(inits, Q, reinitialization_effort)
15: .self$estim_ascend(reinitialization_effort, changing_effort)
16: private$BMobject$estimate()
17: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
18: eval(code, test_env)
19: eval(code, test_env)
20: withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)
21: doTryCatch(return(expr), name, parentenv, handler)
22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
23: tryCatchList(expr, classes, parentenv, handlers)
24: tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
25: doWithOneRestart(return(expr), restart)
26: withOneRestart(expr, restarts[[1L]])
27: withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations
Traceback:
1: if (snapshot_skipped) { skip("On CRAN")dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE) }
2: else if (!new_expectations && skip_on_empty) {FUN(X[[i]], ...) skip_empty()
} 3: }, expectation = handle_expectation, packageNotFoundError = function(e) {lapply(X = S, FUN = FUN, ...)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed.")) } 6: }, snapshot_on_cran = function(cnd) {tryCatchList(expr, classes, parentenv, handlers) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot") 7: }, skip = handle_skip, warning = handle_warning, message = handle_message, tryCatch(expr, error = function(e) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal), call <- conditionCall(e) end_test = function() { if (!is.null(call)) { }) if (identical(call[[1L]], quote(doTryCatch)))
call <- sys.call(-4L)28: dcall <- deparse(call, nlines = 1L)test_code(code, parent.frame()) prefix <- paste("Error in", dcall, ": ")
LONG <- 75L29: sm <- strsplit(conditionMessage(e), "\n")[[1L]]test_that("SimpleSBM_fit 'Bernoulli' model, undirected, one covariate", w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") { if (is.na(w)) sampler_undirected_cov$rNetwork(store = TRUE) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData, type = "b") "bernoulli", FALSE, covarList = covarList_undirected) if (w > LONG) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, prefix <- paste0(prefix, "\n ") plot = FALSE)) } mySBM_sbm$setModel(Q) else prefix <- "Error : " net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData, msg <- paste0(prefix, conditionMessage(e), "\n") covariates = covarList_undirected) .Internal(seterrmessage(msg[1L])) cls <- net$clustering(1:(2 * Q)) if (!silent && isTRUE(getOption("show.error.messages"))) { cl <- cls[[Q]] cat(msg, file = outFile) mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, .Internal(printDeferredWarnings()) clusterInit = cl, covarList = covarList_undirected) } mySBM_missSBM$doVEM() invisible(structure(msg, class = "try-error", condition = e)) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), }) 0.05)
expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 8: 0.8)try(lapply(X = S, FUN = FUN, ...), silent = TRUE) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik),
0.01) 9: expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_cov$connectParam$mean), sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 0.1)
expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam), 10: 0.1)FUN(X[[i]], ...) expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_cov$memberships),
0.85)11: })lapply(seq_len(cores), inner.do)
30: 12: eval(code, test_env)parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE,
mc.silent = TRUE)31:
eval(code, test_env)13:
parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, 32: verbose = (verbosity > 4))withCallingHandlers({
eval(code, test_env)14: new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {.self$do_with_inits(inits, Q, reinitialization_effort) skip("On CRAN")
}15: else if (!new_expectations && skip_on_empty) {.self$estim_ascend(reinitialization_effort, changing_effort) skip_empty()
}16: }, expectation = handle_expectation, packageNotFoundError = function(e) {private$BMobject$estimate() if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))17: }mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")18: }, skip = handle_skip, warning = handle_warning, message = handle_message, eval(code, test_env) error = handle_error, interrupt = handle_interrupt)
19: 33: eval(code, test_env)doTryCatch(return(expr), name, parentenv, handler)
20: 34: withCallingHandlers({tryCatchOne(expr, names, parentenv, handlers[[1L]]) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations35: if (snapshot_skipped) {tryCatchList(expr, classes, parentenv, handlers) skip("On CRAN")
}36: tryCatch(withCallingHandlers({ else if (!new_expectations && skip_on_empty) { eval(code, test_env) skip_empty() new_expectations <- the$test_expectations > starting_expectations } if (snapshot_skipped) {}, expectation = handle_expectation, packageNotFoundError = function(e) { skip("On CRAN") if (on_cran()) { } skip(paste0("{", e$package, "} is not installed.")) else if (!new_expectations && skip_on_empty) { } skip_empty()}, snapshot_on_cran = function(cnd) { } snapshot_skipped <<- TRUE}, expectation = handle_expectation, packageNotFoundError = function(e) { invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, if (on_cran()) { error = handle_error, interrupt = handle_interrupt) skip(paste0("{", e$package, "} is not installed."))
}21: }, snapshot_on_cran = function(cnd) {doTryCatch(return(expr), name, parentenv, handler) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")22: }, skip = handle_skip, warning = handle_warning, message = handle_message, tryCatchOne(expr, names, parentenv, handlers[[1L]]) error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
23: 37: tryCatchList(expr, classes, parentenv, handlers)doWithOneRestart(return(expr), restart)
24: 38: tryCatch(withCallingHandlers({withOneRestart(expr, restarts[[1L]]) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations39: withRestarts(tryCatch(withCallingHandlers({ if (snapshot_skipped) { eval(code, test_env) skip("On CRAN") new_expectations <- the$test_expectations > starting_expectations } if (snapshot_skipped) { else if (!new_expectations && skip_on_empty) { skip("On CRAN") skip_empty() } } else if (!new_expectations && skip_on_empty) {}, expectation = handle_expectation, packageNotFoundError = function(e) { skip_empty() if (on_cran()) { } skip(paste0("{", e$package, "} is not installed."))}, expectation = handle_expectation, packageNotFoundError = function(e) { } if (on_cran()) {}, snapshot_on_cran = function(cnd) { skip(paste0("{", e$package, "} is not installed.")) snapshot_skipped <<- TRUE } invokeRestart("muffle_cran_snapshot")}, snapshot_on_cran = function(cnd) {}, skip = handle_skip, warning = handle_warning, message = handle_message, snapshot_skipped <<- TRUE error = handle_error, interrupt = handle_interrupt), error = handle_fatal) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 25: error = handle_error, interrupt = handle_interrupt), error = handle_fatal), doWithOneRestart(return(expr), restart) end_test = function() {
})26:
withOneRestart(expr, restarts[[1L]])40:
test_code(code = exprs, env = env, reporter = get_reporter() %||% StopReporter$new())27:
withRestarts(tryCatch(withCallingHandlers({41: eval(code, test_env)source_file(path, env = env(env), desc = desc, shuffle = shuffle, new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { error_call = error_call) skip("On CRAN")
}42: else if (!new_expectations && skip_on_empty) {FUN(X[[i]], ...) skip_empty()
}43: }, expectation = handle_expectation, packageNotFoundError = function(e) {lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, if (on_cran()) { error_call = error_call) skip(paste0("{", e$package, "} is not installed."))
}44: }, snapshot_on_cran = function(cnd) {doTryCatch(return(expr), name, parentenv, handler) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")45: }, skip = handle_skip, warning = handle_warning, message = handle_message, tryCatchOne(expr, names, parentenv, handlers[[1L]]) error = handle_error, interrupt = handle_interrupt), error = handle_fatal),
46: end_test = function() {tryCatchList(expr, classes, parentenv, handlers) })
47: 28: tryCatch(code, testthat_abort_reporter = function(cnd) {test_code(code, parent.frame())
cat(conditionMessage(cnd), "\n")29: NULLtest_that("SimpleSBM_fit 'Bernoulli' model, undirected, one covariate", }) {
sampler_undirected_cov$rNetwork(store = TRUE)48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData, env = env, desc = desc, shuffle = shuffle, error_call = error_call)) "bernoulli", FALSE, covarList = covarList_undirected)
mySBM_sbm$optimize(estimOptions = list(verbosity = 0, 49: test_files_serial(test_dir = test_dir, test_package = test_package, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, plot = FALSE)) env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, desc = desc, load_package = load_package, shuffle = shuffle, mySBM_sbm$setModel(Q) error_call = error_call) net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData,
covariates = covarList_undirected) cls <- net$clustering(1:(2 * Q)) cl <- cls[[Q]]50: mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, test_files(test_dir = path, test_paths = test_paths, test_package = package, clusterInit = cl, covarList = covarList_undirected) reporter = reporter, load_helpers = load_helpers, env = env, mySBM_missSBM$doVEM() stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), load_package = load_package, parallel = parallel, shuffle = shuffle) 0.05) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships),
0.8)51: expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), test_dir("testthat", package = package, reporter = reporter, 0.01) ..., load_package = "installed") expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_cov$connectParam$mean),
0.1)52: expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam), test_check("missSBM") 0.1)
expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_cov$memberships), An irrecoverable exception occurred. R is aborting now ...
0.85) })
30: eval(code, test_env)
31: eval(code, test_env)
32: withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)
33: doTryCatch(return(expr), name, parentenv, handler)
34: tryCatchOne(expr, names, parentenv, handlers[[1L]])
35: tryCatchList(expr, classes, parentenv, handlers)
36: tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
37: doWithOneRestart(return(expr), restart)
38: withOneRestart(expr, restarts[[1L]])
39: withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() { })
40: test_code(code = exprs, env = env, reporter = get_reporter() %||% StopReporter$new())
41: source_file(path, env = env(env), desc = desc, shuffle = shuffle, error_call = error_call)
42: FUN(X[[i]], ...)
43: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call)
44: doTryCatch(return(expr), name, parentenv, handler)
45: tryCatchOne(expr, names, parentenv, handlers[[1L]])
46: tryCatchList(expr, classes, parentenv, handlers)
47: tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n") NULL})
48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call))
49: test_files_serial(test_dir = test_dir, test_package = test_package, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, desc = desc, load_package = load_package, shuffle = shuffle, error_call = error_call)
50: test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, load_package = load_package, parallel = parallel, shuffle = shuffle)
51: test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed")
52: test_check("missSBM")
An irrecoverable exception occurred. R is aborting now ...
Saving _problems/test-sbm-bernoulli-with-covariates-16.R
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE)
2: FUN(X[[i]], ...)
3: lapply(X = S, FUN = FUN, ...)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
8: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
10: FUN(X[[i]], ...)
11: lapply(seq_len(cores), inner.do)
12: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE)
13: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, verbose = (verbosity > 4))
14: .self$do_with_inits(inits, Q, reinitialization_effort)
15: .self$estim_ascend(reinitialization_effort, changing_effort)
16: private$BMobject$estimate()
17: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
18: eval(code, test_env)
19: eval(code, test_env)
20: withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)
21: doTryCatch(return(expr), name, parentenv, handler)
22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
23: tryCatchList(expr, classes, parentenv, handlers)
24: tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
25: doWithOneRestart(return(expr), restart)
26: withOneRestart(expr, restarts[[1L]])
27: withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() { })
28: test_code(code, parent.frame())
29: test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", { sampler_directed_cov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, "bernoulli", TRUE, covarList = covarList_directed) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) mySBM_sbm$setModel(Q) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, covariates = covarList_directed) cls <- net$clustering(1:(2 * Q)) cl <- cls[[Q]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, clusterInit = cl, covarList = covarList_directed) mySBM_missSBM$doVEM(trace = TRUE) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.1) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.8) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik),
Traceback:
0.05) 1: expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), dispatcher(membership_name, membership_init$to_cc(), model_name, 0.1) .self$network_to_cc(), TRUE) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships),
0.85) 2: FUN(X[[i]], ...) })
3: 30: eval(code, test_env)lapply(X = S, FUN = FUN, ...)
31: 4: eval(code, test_env)doTryCatch(return(expr), name, parentenv, handler)
32: 5: withCallingHandlers({tryCatchOne(expr, names, parentenv, handlers[[1L]]) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations 6: if (snapshot_skipped) {tryCatchList(expr, classes, parentenv, handlers) skip("On CRAN")
} 7: else if (!new_expectations && skip_on_empty) {tryCatch(expr, error = function(e) { skip_empty() call <- conditionCall(e) } if (!is.null(call)) {}, expectation = handle_expectation, packageNotFoundError = function(e) { if (identical(call[[1L]], quote(doTryCatch))) if (on_cran()) { call <- sys.call(-4L) skip(paste0("{", e$package, "} is not installed.")) dcall <- deparse(call, nlines = 1L) } prefix <- paste("Error in", dcall, ": ")}, snapshot_on_cran = function(cnd) { LONG <- 75L snapshot_skipped <<- TRUE sm <- strsplit(conditionMessage(e), "\n")[[1L]] invokeRestart("muffle_cran_snapshot") w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")}, skip = handle_skip, warning = handle_warning, message = handle_message, if (is.na(w)) error = handle_error, interrupt = handle_interrupt) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],
type = "b")33: if (w > LONG) doTryCatch(return(expr), name, parentenv, handler) prefix <- paste0(prefix, "\n ")
}34: else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n")tryCatchOne(expr, names, parentenv, handlers[[1L]]) .Internal(seterrmessage(msg[1L]))
if (!silent && isTRUE(getOption("show.error.messages"))) {35: cat(msg, file = outFile)tryCatchList(expr, classes, parentenv, handlers) .Internal(printDeferredWarnings())
}36: invisible(structure(msg, class = "try-error", condition = e))tryCatch(withCallingHandlers({}) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations 8: if (snapshot_skipped) {try(lapply(X = S, FUN = FUN, ...), silent = TRUE) skip("On CRAN")
} 9: else if (!new_expectations && skip_on_empty) {sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) skip_empty()
}10: }, expectation = handle_expectation, packageNotFoundError = function(e) {FUN(X[[i]], ...) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))11: }lapply(seq_len(cores), inner.do)}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE12: invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, error = handle_error, interrupt = handle_interrupt), error = handle_fatal) mc.silent = TRUE)
37: doWithOneRestart(return(expr), restart)13:
parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, 38: verbose = (verbosity > 4))withOneRestart(expr, restarts[[1L]])
14: 39: .self$do_with_inits(inits, Q, reinitialization_effort)withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations
15: .self$estim_ascend(reinitialization_effort, changing_effort) if (snapshot_skipped) {
skip("On CRAN")16: private$BMobject$estimate() }
else if (!new_expectations && skip_on_empty) {17: skip_empty()mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {18: if (on_cran()) {eval(code, test_env) skip(paste0("{", e$package, "} is not installed.")) }
}, snapshot_on_cran = function(cnd) {19: snapshot_skipped <<- TRUEeval(code, test_env) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 20: error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() {withCallingHandlers({ }) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations40: if (snapshot_skipped) {test_code(code = exprs, env = env, reporter = get_reporter() %||% skip("On CRAN") StopReporter$new()) } else if (!new_expectations && skip_on_empty) {
skip_empty()41: }source_file(path, env = env(env), desc = desc, shuffle = shuffle, }, expectation = handle_expectation, packageNotFoundError = function(e) { error_call = error_call) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))42: }FUN(X[[i]], ...)
}, snapshot_on_cran = function(cnd) {43: snapshot_skipped <<- TRUElapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, invokeRestart("muffle_cran_snapshot") error_call = error_call)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt)44:
21: doTryCatch(return(expr), name, parentenv, handler)doTryCatch(return(expr), name, parentenv, handler)
45: 22: tryCatchOne(expr, names, parentenv, handlers[[1L]])tryCatchOne(expr, names, parentenv, handlers[[1L]])
46: 23: tryCatchList(expr, classes, parentenv, handlers)tryCatchList(expr, classes, parentenv, handlers)
47:
tryCatch(code, testthat_abort_reporter = function(cnd) {24: cat(conditionMessage(cnd), "\n")tryCatch(withCallingHandlers({ NULL eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations}) if (snapshot_skipped) {
skip("On CRAN")48: }with_reporter(reporters$multi, lapply(test_paths, test_one_file, else if (!new_expectations && skip_on_empty) { env = env, desc = desc, shuffle = shuffle, error_call = error_call)) skip_empty()
}49: }, expectation = handle_expectation, packageNotFoundError = function(e) {test_files_serial(test_dir = test_dir, test_package = test_package, if (on_cran()) { test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, skip(paste0("{", e$package, "} is not installed.")) desc = desc, load_package = load_package, shuffle = shuffle, } error_call = error_call)}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE50: invokeRestart("muffle_cran_snapshot")test_files(test_dir = path, test_paths = test_paths, test_package = package, }, skip = handle_skip, warning = handle_warning, message = handle_message, reporter = reporter, load_helpers = load_helpers, env = env, error = handle_error, interrupt = handle_interrupt), error = handle_fatal) stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
load_package = load_package, parallel = parallel, shuffle = shuffle)25:
51: doWithOneRestart(return(expr), restart)test_dir("testthat", package = package, reporter = reporter,
..., load_package = "installed")26:
withOneRestart(expr, restarts[[1L]])
52: 27: withRestarts(tryCatch(withCallingHandlers({test_check("missSBM") eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectationsAn irrecoverable exception occurred. R is aborting now ...
if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() { })
28: test_code(code, parent.frame())
29: test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", { sampler_directed_cov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, "bernoulli", TRUE, covarList = covarList_directed) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) mySBM_sbm$setModel(Q) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, covariates = covarList_directed) cls <- net$clustering(1:(2 * Q)) cl <- cls[[Q]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, clusterInit = cl, covarList = covarList_directed) mySBM_missSBM$doVEM(trace = TRUE) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.1) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.8) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.05) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), 0.1) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), 0.85) })
30: eval(code, test_env)
31: eval(code, test_env)
32: withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)
33: doTryCatch(return(expr), name, parentenv, handler)
34: tryCatchOne(expr, names, parentenv, handlers[[1L]])
35: tryCatchList(expr, classes, parentenv, handlers)
36: tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
37: doWithOneRestart(return(expr), restart)
38: withOneRestart(expr, restarts[[1L]])
39: withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() { })
40: test_code(code = exprs, env = env, reporter = get_reporter() %||% StopReporter$new())
41: source_file(path, env = env(env), desc = desc, shuffle = shuffle, error_call = error_call)
42: FUN(X[[i]], ...)
43: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call)
44: doTryCatch(return(expr), name, parentenv, handler)
45: tryCatchOne(expr, names, parentenv, handlers[[1L]])
46: tryCatchList(expr, classes, parentenv, handlers)
47: tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n") NULL})
48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call))
49: test_files_serial(test_dir = test_dir, test_package = test_package, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, desc = desc, load_package = load_package, shuffle = shuffle, error_call = error_call)
50: test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, load_package = load_package, parallel = parallel, shuffle = shuffle)
51: test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed")
52: test_check("missSBM")
An irrecoverable exception occurred. R is aborting now ...
Saving _problems/test-sbm-bernoulli-with-covariates-46.R
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE)
2: FUN(X[[i]], ...)
3: lapply(X = S, FUN = FUN, ...)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ")
Traceback:
LONG <- 75L 1: sm <- strsplit(conditionMessage(e), "\n")[[1L]]dispatcher(membership_name, membership_init$to_cc(), model_name, w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") .self$network_to_cc(), TRUE) if (is.na(w))
w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 2: FUN(X[[i]], ...) type = "b")
3: if (w > LONG) lapply(X = S, FUN = FUN, ...) prefix <- paste0(prefix, "\n ")
} 4: else prefix <- "Error : "doTryCatch(return(expr), name, parentenv, handler) msg <- paste0(prefix, conditionMessage(e), "\n")
.Internal(seterrmessage(msg[1L])) 5: if (!silent && isTRUE(getOption("show.error.messages"))) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) cat(msg, file = outFile)
.Internal(printDeferredWarnings()) 6: }tryCatchList(expr, classes, parentenv, handlers) invisible(structure(msg, class = "try-error", condition = e))
}) 7:
tryCatch(expr, error = function(e) { 8: call <- conditionCall(e)try(lapply(X = S, FUN = FUN, ...), silent = TRUE) if (!is.null(call)) {
if (identical(call[[1L]], quote(doTryCatch))) 9: call <- sys.call(-4L)sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) dcall <- deparse(call, nlines = 1L)
prefix <- paste("Error in", dcall, ": ")10: LONG <- 75LFUN(X[[i]], ...)
sm <- strsplit(conditionMessage(e), "\n")[[1L]]11: w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")lapply(seq_len(cores), inner.do) if (is.na(w))
w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 12: type = "b")parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, if (w > LONG) mc.silent = TRUE) prefix <- paste0(prefix, "\n ")
13: }parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, else prefix <- "Error : " verbose = (verbosity > 4)) msg <- paste0(prefix, conditionMessage(e), "\n")
.Internal(seterrmessage(msg[1L]))14: if (!silent && isTRUE(getOption("show.error.messages"))) {.self$do_with_inits(inits, Q, reinitialization_effort) cat(msg, file = outFile)
.Internal(printDeferredWarnings())15: }.self$estim_ascend(reinitialization_effort, changing_effort) invisible(structure(msg, class = "try-error", condition = e))
})16: private$BMobject$estimate()
8: 17: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
try(lapply(X = S, FUN = FUN, ...), silent = TRUE)18:
eval(code, test_env) 9:
sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))19:
eval(code, test_env)10:
FUN(X[[i]], ...)20:
withCallingHandlers({11: eval(code, test_env)lapply(seq_len(cores), inner.do) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {12: skip("On CRAN")parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, } mc.silent = TRUE) else if (!new_expectations && skip_on_empty) {
skip_empty()13: }parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, }, expectation = handle_expectation, packageNotFoundError = function(e) { verbose = (verbosity > 4)) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))14: }.self$do_with_inits(inits, Q, reinitialization_effort)}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE15: invokeRestart("muffle_cran_snapshot").self$estim_ascend(reinitialization_effort, changing_effort)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt)16:
private$BMobject$estimate()21:
doTryCatch(return(expr), name, parentenv, handler)17:
mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))22:
tryCatchOne(expr, names, parentenv, handlers[[1L]])18:
eval(code, test_env)23:
tryCatchList(expr, classes, parentenv, handlers)19:
eval(code, test_env)24:
tryCatch(withCallingHandlers({20: eval(code, test_env)withCallingHandlers({ new_expectations <- the$test_expectations > starting_expectations eval(code, test_env) if (snapshot_skipped) { new_expectations <- the$test_expectations > starting_expectations skip("On CRAN") if (snapshot_skipped) { } skip("On CRAN") else if (!new_expectations && skip_on_empty) { } skip_empty() else if (!new_expectations && skip_on_empty) { } skip_empty()}, expectation = handle_expectation, packageNotFoundError = function(e) { } if (on_cran()) {}, expectation = handle_expectation, packageNotFoundError = function(e) { skip(paste0("{", e$package, "} is not installed.")) if (on_cran()) { } skip(paste0("{", e$package, "} is not installed."))}, snapshot_on_cran = function(cnd) { } snapshot_skipped <<- TRUE}, snapshot_on_cran = function(cnd) { invokeRestart("muffle_cran_snapshot") snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, }, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal) error = handle_error, interrupt = handle_interrupt)
25: 21: doWithOneRestart(return(expr), restart)doTryCatch(return(expr), name, parentenv, handler)
26: 22: withOneRestart(expr, restarts[[1L]])tryCatchOne(expr, names, parentenv, handlers[[1L]])
27: 23: withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env)tryCatchList(expr, classes, parentenv, handlers) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {24: skip("On CRAN")tryCatch(withCallingHandlers({ } eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations else if (!new_expectations && skip_on_empty) { if (snapshot_skipped) { skip_empty() skip("On CRAN") } } else if (!new_expectations && skip_on_empty) {}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip_empty() skip(paste0("{", e$package, "} is not installed.")) } }}, expectation = handle_expectation, packageNotFoundError = function(e) {}, snapshot_on_cran = function(cnd) { if (on_cran()) { snapshot_skipped <<- TRUE skip(paste0("{", e$package, "} is not installed.")) invokeRestart("muffle_cran_snapshot") }}, skip = handle_skip, warning = handle_warning, message = handle_message, }, snapshot_on_cran = function(cnd) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal), snapshot_skipped <<- TRUE end_test = function() { invokeRestart("muffle_cran_snapshot") })}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal)28: test_code(code, parent.frame())
29: 25: test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate", doWithOneRestart(return(expr), restart) {
sampler_undirected_nocov$rNetwork(store = TRUE)26: mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, withOneRestart(expr, restarts[[1L]]) "bernoulli", FALSE)
mySBM_sbm$optimize(estimOptions = list(verbosity = 0, 27: plot = FALSE))withRestarts(tryCatch(withCallingHandlers({ mySBM_sbm$setModel(3) eval(code, test_env) net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData) new_expectations <- the$test_expectations > starting_expectations cl <- net$clustering(3)[[1]] if (snapshot_skipped) { mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, skip("On CRAN") clusterInit = cl) } mySBM_missSBM$doVEM() else if (!new_expectations && skip_on_empty) { expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), skip_empty() 0.05) } expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), }, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { 0.95) skip(paste0("{", e$package, "} is not installed.")) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), } 0.01)}, snapshot_on_cran = function(cnd) { expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean), snapshot_skipped <<- TRUE 0.05) invokeRestart("muffle_cran_snapshot") expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships), }, skip = handle_skip, warning = handle_warning, message = handle_message, 0.95) }) error = handle_error, interrupt = handle_interrupt), error = handle_fatal),
end_test = function() {30: })eval(code, test_env)
28: 31: test_code(code, parent.frame())eval(code, test_env)
29: 32: test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate", {withCallingHandlers({ sampler_undirected_nocov$rNetwork(store = TRUE) eval(code, test_env) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, new_expectations <- the$test_expectations > starting_expectations "bernoulli", FALSE) if (snapshot_skipped) { mySBM_sbm$optimize(estimOptions = list(verbosity = 0, skip("On CRAN") plot = FALSE)) mySBM_sbm$setModel(3) } net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData) else if (!new_expectations && skip_on_empty) { cl <- net$clustering(3)[[1]] skip_empty() mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, } clusterInit = cl)}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { mySBM_missSBM$doVEM() skip(paste0("{", e$package, "} is not installed.")) } expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), }, snapshot_on_cran = function(cnd) { 0.05) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), snapshot_skipped <<- TRUE 0.95) invokeRestart("muffle_cran_snapshot") expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), }, skip = handle_skip, warning = handle_warning, message = handle_message, 0.01) error = handle_error, interrupt = handle_interrupt) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean),
0.05)33: expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships), doTryCatch(return(expr), name, parentenv, handler) 0.95)
})34:
tryCatchOne(expr, names, parentenv, handlers[[1L]])30:
eval(code, test_env)35:
tryCatchList(expr, classes, parentenv, handlers)31:
eval(code, test_env)36:
tryCatch(withCallingHandlers({32: eval(code, test_env)withCallingHandlers({ new_expectations <- the$test_expectations > starting_expectations eval(code, test_env) if (snapshot_skipped) { new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } skip("On CRAN") else if (!new_expectations && skip_on_empty) { } skip_empty() else if (!new_expectations && skip_on_empty) { } skip_empty()}, expectation = handle_expectation, packageNotFoundError = function(e) { } if (on_cran()) {}, expectation = handle_expectation, packageNotFoundError = function(e) { skip(paste0("{", e$package, "} is not installed.")) if (on_cran()) { } skip(paste0("{", e$package, "} is not installed."))}, snapshot_on_cran = function(cnd) { } snapshot_skipped <<- TRUE}, snapshot_on_cran = function(cnd) { invokeRestart("muffle_cran_snapshot") snapshot_skipped <<- TRUE}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 37: error = handle_error, interrupt = handle_interrupt)doWithOneRestart(return(expr), restart)
33: 38: doTryCatch(return(expr), name, parentenv, handler)withOneRestart(expr, restarts[[1L]])
34: 39: tryCatchOne(expr, names, parentenv, handlers[[1L]])withRestarts(tryCatch(withCallingHandlers({
eval(code, test_env)35: new_expectations <- the$test_expectations > starting_expectationstryCatchList(expr, classes, parentenv, handlers) if (snapshot_skipped) {
skip("On CRAN")36: } else if (!new_expectations && skip_on_empty) {tryCatch(withCallingHandlers({ eval(code, test_env) skip_empty() new_expectations <- the$test_expectations > starting_expectations } if (snapshot_skipped) {}, expectation = handle_expectation, packageNotFoundError = function(e) { skip("On CRAN") } if (on_cran()) { else if (!new_expectations && skip_on_empty) { skip_empty() skip(paste0("{", e$package, "} is not installed.")) } }}, expectation = handle_expectation, packageNotFoundError = function(e) {}, snapshot_on_cran = function(cnd) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) snapshot_skipped <<- TRUE } invokeRestart("muffle_cran_snapshot")}, snapshot_on_cran = function(cnd) {}, skip = handle_skip, warning = handle_warning, message = handle_message, snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") error = handle_error, interrupt = handle_interrupt), error = handle_fatal), }, skip = handle_skip, warning = handle_warning, message = handle_message, end_test = function() { error = handle_error, interrupt = handle_interrupt), error = handle_fatal) })
40: 37: test_code(code = exprs, env = env, reporter = get_reporter() %||% doWithOneRestart(return(expr), restart) StopReporter$new())
38:
41: withOneRestart(expr, restarts[[1L]])source_file(path, env = env(env), desc = desc, shuffle = shuffle,
error_call = error_call)39:
withRestarts(tryCatch(withCallingHandlers({42: eval(code, test_env)FUN(X[[i]], ...) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {43: skip("On CRAN")lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, } error_call = error_call) else if (!new_expectations && skip_on_empty) {
skip_empty() }44: }, expectation = handle_expectation, packageNotFoundError = function(e) {doTryCatch(return(expr), name, parentenv, handler) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed.")) }45: }, snapshot_on_cran = function(cnd) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, 46: error = handle_error, interrupt = handle_interrupt), error = handle_fatal), tryCatchList(expr, classes, parentenv, handlers) end_test = function() {
})47: tryCatch(code, testthat_abort_reporter = function(cnd) {
cat(conditionMessage(cnd), "\n")40: NULLtest_code(code = exprs, env = env, reporter = get_reporter() %||% }) StopReporter$new())
48: 41: with_reporter(reporters$multi, lapply(test_paths, test_one_file, source_file(path, env = env(env), desc = desc, shuffle = shuffle, env = env, desc = desc, shuffle = shuffle, error_call = error_call)) error_call = error_call)
42: 49: FUN(X[[i]], ...)test_files_serial(test_dir = test_dir, test_package = test_package,
test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, 43: env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, desc = desc, load_package = load_package, shuffle = shuffle, error_call = error_call)
error_call = error_call)44:
doTryCatch(return(expr), name, parentenv, handler)50:
test_files(test_dir = path, test_paths = test_paths, test_package = package, 45: reporter = reporter, load_helpers = load_helpers, env = env, tryCatchOne(expr, names, parentenv, handlers[[1L]]) stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
load_package = load_package, parallel = parallel, shuffle = shuffle)46:
tryCatchList(expr, classes, parentenv, handlers)51:
test_dir("testthat", package = package, reporter = reporter, 47: ..., load_package = "installed")
tryCatch(code, testthat_abort_reporter = function(cnd) {52: test_check("missSBM") cat(conditionMessage(cnd), "\n")
NULL})An irrecoverable exception occurred. R is aborting now ...
48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call))
49: test_files_serial(test_dir = test_dir, test_package = test_package, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, desc = desc, load_package = load_package, shuffle = shuffle, error_call = error_call)
50: test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, load_package = load_package, parallel = parallel, shuffle = shuffle)
51: test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed")
52: test_check("missSBM")
An irrecoverable exception occurred. R is aborting now ...
Saving _problems/test-sbm-bernoulli-without-covariate-16.R
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE)
2: FUN(X[[i]], ...)
3: lapply(X = S, FUN = FUN, ...)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : "
Traceback:
msg <- paste0(prefix, conditionMessage(e), "\n") 1: .Internal(seterrmessage(msg[1L]))dispatcher(membership_name, membership_init$to_cc(), model_name, if (!silent && isTRUE(getOption("show.error.messages"))) { .self$network_to_cc(), TRUE) cat(msg, file = outFile)
.Internal(printDeferredWarnings()) 2: }FUN(X[[i]], ...) invisible(structure(msg, class = "try-error", condition = e))
3: lapply(X = S, FUN = FUN, ...)})
4: 8: doTryCatch(return(expr), name, parentenv, handler)try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
5:
tryCatchOne(expr, names, parentenv, handlers[[1L]]) 9:
6: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))tryCatchList(expr, classes, parentenv, handlers)
7: 10: tryCatch(expr, error = function(e) { call <- conditionCall(e)FUN(X[[i]], ...)
if (!is.null(call)) {11: if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L)lapply(seq_len(cores), inner.do)
dcall <- deparse(call, nlines = 1L)12: prefix <- paste("Error in", dcall, ": ")parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] mc.silent = TRUE) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w))
13: w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, type = "b") if (w > LONG) verbose = (verbosity > 4)) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : "
msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L]))14: if (!silent && isTRUE(getOption("show.error.messages"))) {.self$do_with_inits(inits, Q, reinitialization_effort) cat(msg, file = outFile)
15: .Internal(printDeferredWarnings()) }.self$estim_ascend(reinitialization_effort, changing_effort) invisible(structure(msg, class = "try-error", condition = e))
})16: private$BMobject$estimate()
17: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) 8:
try(lapply(X = S, FUN = FUN, ...), silent = TRUE)18:
eval(code, test_env) 9:
sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))19: eval(code, test_env)
20: 10: withCallingHandlers({FUN(X[[i]], ...) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations11: if (snapshot_skipped) {lapply(seq_len(cores), inner.do) skip("On CRAN")
12: }parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, else if (!new_expectations && skip_on_empty) { mc.silent = TRUE) skip_empty() }
}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {13: skip(paste0("{", e$package, "} is not installed."))parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, } verbose = (verbosity > 4))}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")14: }, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt).self$do_with_inits(inits, Q, reinitialization_effort)
21: 15: doTryCatch(return(expr), name, parentenv, handler)
.self$estim_ascend(reinitialization_effort, changing_effort)22:
16: tryCatchOne(expr, names, parentenv, handlers[[1L]])private$BMobject$estimate()
23: 17: tryCatchList(expr, classes, parentenv, handlers)mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
18: 24: eval(code, test_env)tryCatch(withCallingHandlers({
19: eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {eval(code, test_env) skip("On CRAN")
} else if (!new_expectations && skip_on_empty) { skip_empty() }20: }, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))withCallingHandlers({ }}, snapshot_on_cran = function(cnd) { eval(code, test_env) snapshot_skipped <<- TRUE new_expectations <- the$test_expectations > starting_expectations invokeRestart("muffle_cran_snapshot") if (snapshot_skipped) { skip("On CRAN")}, skip = handle_skip, warning = handle_warning, message = handle_message, } error = handle_error, interrupt = handle_interrupt), error = handle_fatal) else if (!new_expectations && skip_on_empty) {
skip_empty()25: doWithOneRestart(return(expr), restart)
26: }withOneRestart(expr, restarts[[1L]])
27: }, expectation = handle_expectation, packageNotFoundError = function(e) {withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { snapshot_skipped <<- TRUE skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() invokeRestart("muffle_cran_snapshot") }}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))
21: }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUEdoTryCatch(return(expr), name, parentenv, handler) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() {22: tryCatchOne(expr, names, parentenv, handlers[[1L]]) })
23: 28: tryCatchList(expr, classes, parentenv, handlers)
test_code(code, parent.frame())
24: tryCatch(withCallingHandlers({29: eval(code, test_env)test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate", { new_expectations <- the$test_expectations > starting_expectations sampler_directed_nocov$rNetwork(store = TRUE) if (snapshot_skipped) { mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, skip("On CRAN") "bernoulli", TRUE) } mySBM_sbm$optimize(estimOptions = list(verbosity = 0, else if (!new_expectations && skip_on_empty) { plot = FALSE)) skip_empty() } mySBM_sbm$setModel(3) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData)}, expectation = handle_expectation, packageNotFoundError = function(e) { cl <- net$clustering(3)[[1]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, clusterInit = cl) if (on_cran()) { mySBM_missSBM$doVEM() skip(paste0("{", e$package, "} is not installed.")) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), } 0.1)}, snapshot_on_cran = function(cnd) { expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), snapshot_skipped <<- TRUE 0.95) invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), error = handle_error, interrupt = handle_interrupt), error = handle_fatal) 0.01)
expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean), 25: doWithOneRestart(return(expr), restart) 0.1)
expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), 26: withOneRestart(expr, restarts[[1L]]) 0.2)
expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), 27: 0.95)withRestarts(tryCatch(withCallingHandlers({ }) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {30: skip("On CRAN")eval(code, test_env) }
else if (!new_expectations && skip_on_empty) { skip_empty()31: }eval(code, test_env)}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {32: skip(paste0("{", e$package, "} is not installed.")) }withCallingHandlers({}, snapshot_on_cran = function(cnd) { eval(code, test_env) snapshot_skipped <<- TRUE new_expectations <- the$test_expectations > starting_expectations invokeRestart("muffle_cran_snapshot") if (snapshot_skipped) {}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() { skip("On CRAN") } }) else if (!new_expectations && skip_on_empty) {
skip_empty()28: }test_code(code, parent.frame())}, expectation = handle_expectation, packageNotFoundError = function(e) {
29: if (on_cran()) {test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate", skip(paste0("{", e$package, "} is not installed.")) { sampler_directed_nocov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, } "bernoulli", TRUE)}, snapshot_on_cran = function(cnd) { mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") mySBM_sbm$setModel(3) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData)}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt) cl <- net$clustering(3)[[1]]
mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, 33: clusterInit = cl)doTryCatch(return(expr), name, parentenv, handler) mySBM_missSBM$doVEM()
expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.1)34: expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), tryCatchOne(expr, names, parentenv, handlers[[1L]]) 0.95)
expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 35: 0.01)tryCatchList(expr, classes, parentenv, handlers) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean), 0.1)
36: expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), tryCatch(withCallingHandlers({ 0.2) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations 0.95) if (snapshot_skipped) { skip("On CRAN") } }) else if (!new_expectations && skip_on_empty) { skip_empty()
}30: }, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {eval(code, test_env)
skip(paste0("{", e$package, "} is not installed.")) }31: }, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")eval(code, test_env)}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
32: 37: withCallingHandlers({doWithOneRestart(return(expr), restart)
38: eval(code, test_env)withOneRestart(expr, restarts[[1L]]) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {39: withRestarts(tryCatch(withCallingHandlers({ skip("On CRAN") eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations else if (!new_expectations && skip_on_empty) { if (snapshot_skipped) { skip_empty() skip("On CRAN") } }}, expectation = handle_expectation, packageNotFoundError = function(e) { else if (!new_expectations && skip_on_empty) { if (on_cran()) { skip_empty() } skip(paste0("{", e$package, "} is not installed."))}, expectation = handle_expectation, packageNotFoundError = function(e) { } if (on_cran()) {}, snapshot_on_cran = function(cnd) { skip(paste0("{", e$package, "} is not installed.")) snapshot_skipped <<- TRUE } invokeRestart("muffle_cran_snapshot")}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE}, skip = handle_skip, warning = handle_warning, message = handle_message, invokeRestart("muffle_cran_snapshot") error = handle_error, interrupt = handle_interrupt)}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() {
})33:
doTryCatch(return(expr), name, parentenv, handler)40:
34: test_code(code = exprs, env = env, reporter = get_reporter() %||% tryCatchOne(expr, names, parentenv, handlers[[1L]]) StopReporter$new())
35: 41: source_file(path, env = env(env), desc = desc, shuffle = shuffle, tryCatchList(expr, classes, parentenv, handlers) error_call = error_call)
42: 36: FUN(X[[i]], ...)tryCatch(withCallingHandlers({
eval(code, test_env)43: new_expectations <- the$test_expectations > starting_expectationslapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, if (snapshot_skipped) { error_call = error_call) skip("On CRAN")
44: doTryCatch(return(expr), name, parentenv, handler) }
else if (!new_expectations && skip_on_empty) {45: skip_empty()tryCatchOne(expr, names, parentenv, handlers[[1L]]) }
46: }, expectation = handle_expectation, packageNotFoundError = function(e) {tryCatchList(expr, classes, parentenv, handlers) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))47: }tryCatch(code, testthat_abort_reporter = function(cnd) {}, snapshot_on_cran = function(cnd) { cat(conditionMessage(cnd), "\n") NULL snapshot_skipped <<- TRUE}) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 48: error = handle_error, interrupt = handle_interrupt), error = handle_fatal)with_reporter(reporters$multi, lapply(test_paths, test_one_file,
env = env, desc = desc, shuffle = shuffle, error_call = error_call))37:
49: doWithOneRestart(return(expr), restart)test_files_serial(test_dir = test_dir, test_package = test_package, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter,
env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 38: desc = desc, load_package = load_package, shuffle = shuffle, withOneRestart(expr, restarts[[1L]]) error_call = error_call)
39:
withRestarts(tryCatch(withCallingHandlers({50: eval(code, test_env)test_files(test_dir = path, test_paths = test_paths, test_package = package, new_expectations <- the$test_expectations > starting_expectations reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, load_package = load_package, parallel = parallel, shuffle = shuffle) if (snapshot_skipped) {
skip("On CRAN")51: } else if (!new_expectations && skip_on_empty) {test_dir("testthat", package = package, reporter = reporter, skip_empty() ..., load_package = "installed")
52: }test_check("missSBM")}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {An irrecoverable exception occurred. R is aborting now ...
skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() { })
40: test_code(code = exprs, env = env, reporter = get_reporter() %||% StopReporter$new())
41: source_file(path, env = env(env), desc = desc, shuffle = shuffle, error_call = error_call)
42: FUN(X[[i]], ...)
43: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call)
44: doTryCatch(return(expr), name, parentenv, handler)
45: tryCatchOne(expr, names, parentenv, handlers[[1L]])
46: tryCatchList(expr, classes, parentenv, handlers)
47: tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n") NULL})
48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call))
49: test_files_serial(test_dir = test_dir, test_package = test_package, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, desc = desc, load_package = load_package, shuffle = shuffle, error_call = error_call)
50: test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, load_package = load_package, parallel = parallel, shuffle = shuffle)
51: test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed")
52: test_check("missSBM")
An irrecoverable exception occurred. R is aborting now ...
Saving _problems/test-sbm-bernoulli-without-covariate-44.R
[ FAIL 4 | WARN 4 | SKIP 3 | PASS 531 ]
══ Skipped tests (3) ═══════════════════════════════════════════════════════════
• On CRAN (3): 'test-explore-block-count.R:4:3',
'test-missSBM_collection-degenerate.R:80:3',
'test-missSBM_collection-estimate_chain.R:64:3'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-sbm-bernoulli-with-covariates.R:16:3'): SimpleSBM_fit 'Bernoulli' model, undirected, one covariate ──
Error: invalid assignment for reference class field 'Z', should be from class "matrix" or a subclass (was class "NULL")
Backtrace:
▆
1. ├─mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) at test-sbm-bernoulli-with-covariates.R:16:3
2. │ └─private$BMobject$estimate()
3. │ └─.self$estim_ascend(reinitialization_effort, changing_effort)
4. │ └─.self$do_with_inits(inits, Q, reinitialization_effort)
5. │ └─base::sapply(...)
6. │ └─base::lapply(X = X, FUN = FUN, ...)
7. │ └─blockmodels (local) FUN(X[[i]], ...)
8. │ └─getRefClass(membership_name)(from_cc = r$membership)
9. │ └─methods::new(`<chr>`, ...)
10. │ ├─methods::initialize(value, ...)
11. │ └─methods::initialize(value, ...)
12. │ └─.Object$initialize(...)
13. └─blockmodels (local) `<dfltBndF>`(base::quote(NULL))
14. └─methods:::.setDummyField(...)
── Error ('test-sbm-bernoulli-with-covariates.R:46:3'): SimpleSBM_fit 'Bernoulli' model, directed, one covariate ──
Error: invalid assignment for reference class field 'Z', should be from class "matrix" or a subclass (was class "NULL")
Backtrace:
▆
1. ├─mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) at test-sbm-bernoulli-with-covariates.R:46:3
2. │ └─private$BMobject$estimate()
3. │ └─.self$estim_ascend(reinitialization_effort, changing_effort)
4. │ └─.self$do_with_inits(inits, Q, reinitialization_effort)
5. │ └─base::sapply(...)
6. │ └─base::lapply(X = X, FUN = FUN, ...)
7. │ └─blockmodels (local) FUN(X[[i]], ...)
8. │ └─getRefClass(membership_name)(from_cc = r$membership)
9. │ └─methods::new(`<chr>`, ...)
10. │ ├─methods::initialize(value, ...)
11. │ └─methods::initialize(value, ...)
12. │ └─.Object$initialize(...)
13. └─blockmodels (local) `<dfltBndF>`(base::quote(NULL))
14. └─methods:::.setDummyField(...)
── Error ('test-sbm-bernoulli-without-covariate.R:16:3'): SimpleSBM_fit 'Bernoulli' model, undirected, no covariate ──
Error: invalid assignment for reference class field 'Z', should be from class "matrix" or a subclass (was class "NULL")
Backtrace:
▆
1. ├─mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) at test-sbm-bernoulli-without-covariate.R:16:3
2. │ └─private$BMobject$estimate()
3. │ └─.self$estim_ascend(reinitialization_effort, changing_effort)
4. │ └─.self$do_with_inits(inits, Q, reinitialization_effort)
5. │ └─base::sapply(...)
6. │ └─base::lapply(X = X, FUN = FUN, ...)
7. │ └─blockmodels (local) FUN(X[[i]], ...)
8. │ └─getRefClass(membership_name)(from_cc = r$membership)
9. │ └─methods::new(`<chr>`, ...)
10. │ ├─methods::initialize(value, ...)
11. │ └─methods::initialize(value, ...)
12. │ └─.Object$initialize(...)
13. └─blockmodels (local) `<dfltBndF>`(base::quote(NULL))
14. └─methods:::.setDummyField(...)
── Error ('test-sbm-bernoulli-without-covariate.R:44:3'): SimpleSBM_fit 'Bernoulli' model, directed, no covariate ──
Error: invalid assignment for reference class field 'Z', should be from class "matrix" or a subclass (was class "NULL")
Backtrace:
▆
1. ├─mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) at test-sbm-bernoulli-without-covariate.R:44:3
2. │ └─private$BMobject$estimate()
3. │ └─.self$estim_ascend(reinitialization_effort, changing_effort)
4. │ └─.self$do_with_inits(inits, Q, reinitialization_effort)
5. │ └─base::sapply(...)
6. │ └─base::lapply(X = X, FUN = FUN, ...)
7. │ └─blockmodels (local) FUN(X[[i]], ...)
8. │ └─getRefClass(membership_name)(from_cc = r$membership)
9. │ └─methods::new(`<chr>`, ...)
10. │ ├─methods::initialize(value, ...)
11. │ └─methods::initialize(value, ...)
12. │ └─.Object$initialize(...)
13. └─blockmodels (local) `<dfltBndF>`(base::quote(NULL))
14. └─methods:::.setDummyField(...)
[ FAIL 4 | WARN 4 | SKIP 3 | PASS 531 ]
Error:
! Test failures.
Execution halted
Flavor: r-oldrel-macos-arm64