Last updated on 2026-09-24 09:59:25 CEST.
| Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
|---|---|---|---|---|---|---|
| r-devel-linux-x86_64-debian-clang | 1.1.0 | 89.37 | 358.05 | 447.42 | OK | |
| r-devel-linux-x86_64-debian-gcc | 1.1.0 | 57.55 | 243.49 | 301.04 | OK | |
| r-devel-linux-x86_64-fedora-clang | 1.1.0 | 59.00 | 243.15 | 302.15 | OK | |
| r-devel-linux-x86_64-fedora-gcc | 1.1.0 | 64.00 | 248.05 | 312.05 | OK | |
| r-devel-windows-x86_64 | 1.1.0 | 91.00 | 452.00 | 543.00 | OK | |
| r-patched-linux-x86_64 | 1.1.0 | 83.11 | 346.95 | 430.06 | OK | |
| r-release-linux-x86_64 | 1.1.0 | 90.56 | 343.79 | 434.35 | 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 | 361.00 | 459.00 | OK | |
| r-oldrel-macos-arm64 | 1.1.0 | 19.00 | 112.00 | 131.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 | 115.00 | 505.00 | 620.00 | OK |
Version: 1.1.0
Check: tests
Result: ERROR
Running ‘spelling.R’ [0s/0s]
Running ‘testthat.R’ [37s/30s]
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)
Traceback:
1: 15: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE).self$estim_ascend(reinitialization_effort, changing_effort)
2: 16: FUN(X[[i]], ...)private$BMobject$estimate()
3: 17: lapply(X = S, FUN = FUN, ...)mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
4: doTryCatch(return(expr), name, parentenv, handler)18: eval(code, test_env)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: 19: tryCatchList(expr, classes, parentenv, handlers)eval(code, test_env)
7: 20: tryCatch(expr, error = function(e) {withCallingHandlers({ call <- conditionCall(e) eval(code, test_env) if (!is.null(call)) { new_expectations <- the$test_expectations > starting_expectations if (identical(call[[1L]], quote(doTryCatch))) if (snapshot_skipped) { call <- sys.call(-4L) skip("On CRAN") dcall <- deparse(call, nlines = 1L) } prefix <- paste("Error in", dcall, ": ") else if (!new_expectations && skip_on_empty) { LONG <- 75L skip_empty() sm <- strsplit(conditionMessage(e), "\n")[[1L]] }}, expectation = handle_expectation, packageNotFoundError = function(e) { w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (on_cran()) { if (is.na(w)) skip(paste0("{", e$package, "} is not installed.")) } w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], }, snapshot_on_cran = function(cnd) { type = "b") snapshot_skipped <<- TRUE if (w > LONG) invokeRestart("muffle_cran_snapshot") prefix <- paste0(prefix, "\n ")}, skip = handle_skip, warning = handle_warning, message = handle_message, } error = handle_error, interrupt = handle_interrupt) else prefix <- "Error : "
msg <- paste0(prefix, conditionMessage(e), "\n")21: .Internal(seterrmessage(msg[1L]))doTryCatch(return(expr), name, parentenv, handler) if (!silent && isTRUE(getOption("show.error.messages"))) {
cat(msg, file = outFile)22: .Internal(printDeferredWarnings())tryCatchOne(expr, names, parentenv, handlers[[1L]]) }
23: invisible(structure(msg, class = "try-error", condition = e))tryCatchList(expr, classes, parentenv, handlers)})
24: 8: tryCatch(withCallingHandlers({try(lapply(X = S, FUN = FUN, ...), silent = TRUE) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations 9: if (snapshot_skipped) {sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) skip("On CRAN")
}10: else if (!new_expectations && skip_on_empty) {FUN(X[[i]], ...) skip_empty()
11: lapply(seq_len(cores), inner.do)
}12: }, expectation = handle_expectation, packageNotFoundError = function(e) {parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))13: }parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, }, snapshot_on_cran = function(cnd) { verbose = (verbosity > 4)) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")14: }, skip = handle_skip, warning = handle_warning, message = handle_message, .self$do_with_inits(inits, Q, reinitialization_effort) error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
15: 25: .self$estim_ascend(reinitialization_effort, changing_effort)doWithOneRestart(return(expr), restart)
16: 26: private$BMobject$estimate()withOneRestart(expr, restarts[[1L]])
17: 27: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))withRestarts(tryCatch(withCallingHandlers({
eval(code, test_env)18: new_expectations <- the$test_expectations > starting_expectationseval(code, test_env) if (snapshot_skipped) {
skip("On CRAN")19: } else if (!new_expectations && skip_on_empty) {eval(code, test_env) skip_empty() }
}, expectation = handle_expectation, packageNotFoundError = function(e) {20: if (on_cran()) {withCallingHandlers({ skip(paste0("{", e$package, "} is not installed.")) eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations}, snapshot_on_cran = function(cnd) { if (snapshot_skipped) { snapshot_skipped <<- TRUE skip("On CRAN") invokeRestart("muffle_cran_snapshot") }}, skip = handle_skip, warning = handle_warning, message = handle_message, else if (!new_expectations && skip_on_empty) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() { skip_empty() }) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {28: if (on_cran()) {test_code(code, parent.frame()) skip(paste0("{", e$package, "} is not installed."))
}29: test_that("SimpleSBM_fit 'Bernoulli' model, undirected, one covariate", }, snapshot_on_cran = function(cnd) { { snapshot_skipped <<- TRUE sampler_undirected_cov$rNetwork(store = TRUE) invokeRestart("muffle_cran_snapshot") mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData, }, skip = handle_skip, warning = handle_warning, message = handle_message, "bernoulli", FALSE, covarList = covarList_undirected) error = handle_error, interrupt = handle_interrupt) mySBM_sbm$optimize(estimOptions = list(verbosity = 0,
plot = FALSE))21: mySBM_sbm$setModel(Q)doTryCatch(return(expr), name, parentenv, handler) net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData,
covariates = covarList_undirected)22: cls <- net$clustering(1:(2 * Q))tryCatchOne(expr, names, parentenv, handlers[[1L]]) cl <- cls[[Q]]
mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, 23: clusterInit = cl, covarList = covarList_undirected)tryCatchList(expr, classes, parentenv, handlers)
mySBM_missSBM$doVEM()24: expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), tryCatch(withCallingHandlers({ 0.05) eval(code, test_env) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), new_expectations <- the$test_expectations > starting_expectations 0.8) if (snapshot_skipped) { expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), skip("On CRAN") 0.01) } expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_cov$connectParam$mean), else if (!new_expectations && skip_on_empty) { 0.1) skip_empty() expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam), } 0.1) expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_cov$memberships), 0.85) })
}, expectation = handle_expectation, packageNotFoundError = function(e) {30: if (on_cran()) {eval(code, test_env) skip(paste0("{", e$package, "} is not installed."))
}}, snapshot_on_cran = function(cnd) {31: snapshot_skipped <<- TRUEeval(code, test_env) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 32: error = handle_error, interrupt = handle_interrupt), error = handle_fatal)withCallingHandlers({
eval(code, test_env)25: new_expectations <- the$test_expectations > starting_expectationsdoWithOneRestart(return(expr), restart) if (snapshot_skipped) {
skip("On CRAN")26: } else if (!new_expectations && skip_on_empty) {withOneRestart(expr, restarts[[1L]])
skip_empty() }27: }, expectation = handle_expectation, packageNotFoundError = function(e) {withRestarts(tryCatch(withCallingHandlers({ if (on_cran()) { eval(code, test_env) skip(paste0("{", e$package, "} is not installed.")) new_expectations <- the$test_expectations > starting_expectations } if (snapshot_skipped) {}, snapshot_on_cran = function(cnd) { skip("On CRAN") snapshot_skipped <<- TRUE } invokeRestart("muffle_cran_snapshot") else if (!new_expectations && skip_on_empty) {}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt) skip_empty()
}33: }, expectation = handle_expectation, packageNotFoundError = function(e) {doTryCatch(return(expr), name, parentenv, handler) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))34: }tryCatchOne(expr, names, parentenv, handlers[[1L]])}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE35: invokeRestart("muffle_cran_snapshot")tryCatchList(expr, classes, parentenv, handlers)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 36: tryCatch(withCallingHandlers({ end_test = function() { eval(code, test_env) }) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {28: skip("On CRAN")test_code(code, parent.frame()) }
else if (!new_expectations && skip_on_empty) {29: skip_empty()test_that("SimpleSBM_fit 'Bernoulli' model, undirected, one covariate", } {}, expectation = handle_expectation, packageNotFoundError = function(e) { sampler_undirected_cov$rNetwork(store = TRUE) if (on_cran()) { mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData, skip(paste0("{", e$package, "} is not installed.")) "bernoulli", FALSE, covarList = covarList_undirected) } mySBM_sbm$optimize(estimOptions = list(verbosity = 0, }, snapshot_on_cran = function(cnd) { plot = FALSE)) snapshot_skipped <<- TRUE mySBM_sbm$setModel(Q) invokeRestart("muffle_cran_snapshot") net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData, }, skip = handle_skip, warning = handle_warning, message = handle_message, covariates = covarList_undirected) error = handle_error, interrupt = handle_interrupt), error = handle_fatal) cls <- net$clustering(1:(2 * Q))
cl <- cls[[Q]]37: mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, doWithOneRestart(return(expr), restart) clusterInit = cl, covarList = covarList_undirected)
mySBM_missSBM$doVEM()38: expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), withOneRestart(expr, restarts[[1L]]) 0.05)
expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 39: 0.8)withRestarts(tryCatch(withCallingHandlers({ expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), eval(code, test_env) 0.01) new_expectations <- the$test_expectations > starting_expectations expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_cov$connectParam$mean), if (snapshot_skipped) { 0.1) skip("On CRAN") expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam), } 0.1) else if (!new_expectations && skip_on_empty) { expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_cov$memberships), 0.85) skip_empty() }) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {30: if (on_cran()) {eval(code, test_env) skip(paste0("{", e$package, "} is not installed."))
}31: }, snapshot_on_cran = function(cnd) {eval(code, test_env) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")32: }, skip = handle_skip, warning = handle_warning, message = handle_message, withCallingHandlers({ error = handle_error, interrupt = handle_interrupt), error = handle_fatal), eval(code, test_env) end_test = function() { new_expectations <- the$test_expectations > starting_expectations }) if (snapshot_skipped) {
skip("On CRAN")40: }test_code(code = exprs, env = env, reporter = get_reporter() %||% else if (!new_expectations && skip_on_empty) { StopReporter$new()) skip_empty()
}41: }, expectation = handle_expectation, packageNotFoundError = function(e) {source_file(path, env = env(env), desc = desc, shuffle = shuffle, if (on_cran()) { error_call = error_call) skip(paste0("{", e$package, "} is not installed."))
}42: }, snapshot_on_cran = function(cnd) {FUN(X[[i]], ...) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")43: }, skip = handle_skip, warning = handle_warning, message = handle_message, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call) error = handle_error, interrupt = handle_interrupt)
44: 33: doTryCatch(return(expr), name, parentenv, handler)doTryCatch(return(expr), name, parentenv, handler)
45: 34: tryCatchOne(expr, names, parentenv, handlers[[1L]])tryCatchOne(expr, names, parentenv, handlers[[1L]])
35: 46: tryCatchList(expr, classes, parentenv, handlers)tryCatchList(expr, classes, parentenv, handlers)
36: 47: tryCatch(withCallingHandlers({tryCatch(code, testthat_abort_reporter = function(cnd) { eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations cat(conditionMessage(cnd), "\n") if (snapshot_skipped) { NULL skip("On CRAN")}) }
else if (!new_expectations && skip_on_empty) {48: skip_empty()with_reporter(reporters$multi, lapply(test_paths, test_one_file, } env = env, desc = desc, shuffle = shuffle, error_call = error_call))}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {49: skip(paste0("{", e$package, "} is not installed."))test_files_serial(test_dir = test_dir, test_package = test_package, } test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, }, snapshot_on_cran = function(cnd) { env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, snapshot_skipped <<- TRUE desc = desc, load_package = load_package, 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), error = handle_fatal)50:
test_files(test_dir = path, test_paths = test_paths, test_package = package, 37: reporter = reporter, load_helpers = load_helpers, env = env, doWithOneRestart(return(expr), restart) stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
load_package = load_package, parallel = parallel, shuffle = shuffle)38:
51: withOneRestart(expr, restarts[[1L]])
39: test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed")withRestarts(tryCatch(withCallingHandlers({
eval(code, test_env)52: new_expectations <- the$test_expectations > starting_expectationstest_check("missSBM")
An 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() { })
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]], ...)
Traceback:
1:
dispatcher(membership_name, membership_init$to_cc(), model_name, 3: lapply(X = S, FUN = FUN, ...) .self$network_to_cc(), TRUE)
4: 2: FUN(X[[i]], ...)doTryCatch(return(expr), name, parentenv, handler)
3: 5: lapply(X = S, FUN = FUN, ...)tryCatchOne(expr, names, parentenv, handlers[[1L]])
4: 6: doTryCatch(return(expr), name, parentenv, handler)tryCatchList(expr, classes, parentenv, handlers)
5: 7: tryCatchOne(expr, names, parentenv, handlers[[1L]])
tryCatch(expr, error = function(e) { 6: call <- conditionCall(e)tryCatchList(expr, classes, parentenv, handlers) if (!is.null(call)) {
if (identical(call[[1L]], quote(doTryCatch))) 7: call <- sys.call(-4L)tryCatch(expr, error = function(e) { dcall <- deparse(call, nlines = 1L) call <- conditionCall(e) prefix <- paste("Error in", dcall, ": ") if (!is.null(call)) { LONG <- 75L if (identical(call[[1L]], quote(doTryCatch))) sm <- strsplit(conditionMessage(e), "\n")[[1L]] call <- sys.call(-4L) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") dcall <- deparse(call, nlines = 1L) if (is.na(w)) prefix <- paste("Error in", dcall, ": ") w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], LONG <- 75L type = "b") sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (w > LONG) if (is.na(w)) prefix <- paste0(prefix, "\n ") w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], } type = "b") else prefix <- "Error : " if (w > LONG) msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) prefix <- paste0(prefix, "\n ") if (!silent && isTRUE(getOption("show.error.messages"))) { } cat(msg, file = outFile) else prefix <- "Error : " .Internal(printDeferredWarnings()) msg <- paste0(prefix, conditionMessage(e), "\n") } .Internal(seterrmessage(msg[1L])) invisible(structure(msg, class = "try-error", condition = e)) if (!silent && isTRUE(getOption("show.error.messages"))) {})
cat(msg, file = outFile) 8: .Internal(printDeferredWarnings())try(lapply(X = S, FUN = FUN, ...), silent = TRUE) }
invisible(structure(msg, class = "try-error", condition = e)) 9: })sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
8: 10: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)FUN(X[[i]], ...)
9: 11: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))lapply(seq_len(cores), inner.do)
10: 12: FUN(X[[i]], ...)parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE,
mc.silent = TRUE)11: lapply(seq_len(cores), inner.do)
13: 12: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, verbose = (verbosity > 4)) mc.silent = TRUE)
13: 14: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, .self$do_with_inits(inits, Q, reinitialization_effort) verbose = (verbosity > 4))
15:
.self$estim_ascend(reinitialization_effort, changing_effort)14:
.self$do_with_inits(inits, Q, reinitialization_effort)16:
private$BMobject$estimate()15:
.self$estim_ascend(reinitialization_effort, changing_effort)17:
mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))16:
private$BMobject$estimate()
17: 18: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))eval(code, test_env)
18: 19: eval(code, test_env)eval(code, test_env)
20: 19: withCallingHandlers({eval(code, test_env) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations20: if (snapshot_skipped) {withCallingHandlers({ eval(code, test_env) skip("On CRAN") new_expectations <- the$test_expectations > starting_expectations 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_error, interrupt = handle_interrupt)
21: 21: doTryCatch(return(expr), name, parentenv, handler)doTryCatch(return(expr), name, parentenv, handler)
22: 22: tryCatchOne(expr, names, parentenv, handlers[[1L]])tryCatchOne(expr, names, parentenv, handlers[[1L]])
23: 23: tryCatchList(expr, classes, parentenv, handlers)tryCatchList(expr, classes, parentenv, handlers)
24: 24: tryCatch(withCallingHandlers({tryCatch(withCallingHandlers({ eval(code, test_env) 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}, skip = handle_skip, warning = handle_warning, message = handle_message, invokeRestart("muffle_cran_snapshot") error = handle_error, interrupt = handle_interrupt), error = handle_fatal)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal)25:
doWithOneRestart(return(expr), restart)25:
doWithOneRestart(return(expr), restart)26:
26: withOneRestart(expr, restarts[[1L]])withOneRestart(expr, restarts[[1L]])
27: 27: withRestarts(tryCatch(withCallingHandlers({withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { if (snapshot_skipped) { skip("On CRAN") skip("On CRAN") } } else if (!new_expectations && skip_on_empty) { else if (!new_expectations && skip_on_empty) { skip_empty() skip_empty() } }}, expectation = handle_expectation, packageNotFoundError = function(e) {}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) skip(paste0("{", e$package, "} is not installed.")) } }}, snapshot_on_cran = function(cnd) {}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") 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), error = handle_fatal), end_test = function() { end_test = function() { }) })
28: 28: test_code(code, parent.frame())test_code(code, parent.frame())
29: 29: test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", { { sampler_directed_cov$rNetwork(store = TRUE) sampler_directed_cov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, "bernoulli", TRUE, covarList = covarList_directed) "bernoulli", TRUE, covarList = covarList_directed) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) plot = FALSE)) mySBM_sbm$setModel(Q) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, mySBM_sbm$setModel(Q) covariates = covarList_directed) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, cls <- net$clustering(1:(2 * Q)) covariates = covarList_directed) cl <- cls[[Q]] cls <- net$clustering(1:(2 * Q)) mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, cl <- cls[[Q]] clusterInit = cl, covarList = covarList_directed) mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, mySBM_missSBM$doVEM(trace = TRUE) clusterInit = cl, covarList = covarList_directed) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), mySBM_missSBM$doVEM(trace = TRUE) 0.1) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.1) 0.8) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.8) 0.05) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), 0.05) 0.1) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), 0.1) 0.85) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), }) 0.85)
})
30: 30: eval(code, test_env)eval(code, test_env)
31: 31: eval(code, test_env)eval(code, test_env)
32: 32: withCallingHandlers({withCallingHandlers({ eval(code, test_env) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { if (snapshot_skipped) { skip("On CRAN") skip("On CRAN") } } else if (!new_expectations && skip_on_empty) { else if (!new_expectations && skip_on_empty) { skip_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()) {}, snapshot_on_cran = function(cnd) { 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) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")33: }, skip = handle_skip, warning = handle_warning, message = handle_message, doTryCatch(return(expr), name, parentenv, handler) error = handle_error, interrupt = handle_interrupt)
34: 33: tryCatchOne(expr, names, parentenv, handlers[[1L]])doTryCatch(return(expr), name, parentenv, handler)
35: 34: tryCatchList(expr, classes, parentenv, handlers)tryCatchOne(expr, names, parentenv, handlers[[1L]])
36: 35: tryCatch(withCallingHandlers({tryCatchList(expr, classes, parentenv, handlers)
eval(code, test_env)36: new_expectations <- the$test_expectations > starting_expectationstryCatch(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, 37: error = handle_error, interrupt = handle_interrupt), error = handle_fatal)doWithOneRestart(return(expr), restart)
37: 38: doWithOneRestart(return(expr), restart)withOneRestart(expr, restarts[[1L]])
38: 39: withOneRestart(expr, restarts[[1L]])withRestarts(tryCatch(withCallingHandlers({
eval(code, test_env)39: withRestarts(tryCatch(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), error = handle_fatal), end_test = function() { end_test = function() { }) })
40: 40: test_code(code = exprs, env = env, reporter = get_reporter() %||% test_code(code = exprs, env = env, reporter = get_reporter() %||% StopReporter$new()) StopReporter$new())
41:
source_file(path, env = env(env), desc = desc, shuffle = shuffle, 41: error_call = error_call)source_file(path, env = env(env), desc = desc, shuffle = shuffle,
error_call = error_call)42:
FUN(X[[i]], ...)42:
FUN(X[[i]], ...)43:
lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, 43: error_call = error_call)lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle,
error_call = error_call)44: doTryCatch(return(expr), name, parentenv, handler)
44: 45: doTryCatch(return(expr), name, parentenv, handler)tryCatchOne(expr, names, parentenv, handlers[[1L]])
45: 46: tryCatchOne(expr, names, parentenv, handlers[[1L]])
tryCatchList(expr, classes, parentenv, handlers)46:
tryCatchList(expr, classes, parentenv, handlers)47:
tryCatch(code, testthat_abort_reporter = function(cnd) {47: cat(conditionMessage(cnd), "\n")tryCatch(code, testthat_abort_reporter = function(cnd) { NULL cat(conditionMessage(cnd), "\n")}) NULL
})48:
with_reporter(reporters$multi, lapply(test_paths, test_one_file, 48: env = env, desc = desc, shuffle = shuffle, error_call = error_call))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, 49: test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, test_files_serial(test_dir = test_dir, test_package = test_package, desc = desc, load_package = load_package, shuffle = shuffle, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, error_call = error_call) env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
desc = desc, load_package = load_package, shuffle = shuffle, 50: error_call = error_call)test_files(test_dir = path, test_paths = test_paths, test_package = package,
reporter = reporter, load_helpers = load_helpers, env = env, 50: stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, test_files(test_dir = path, test_paths = test_paths, test_package = package, load_package = load_package, parallel = parallel, shuffle = shuffle) reporter = reporter, load_helpers = load_helpers, env = env,
stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 51: load_package = load_package, parallel = parallel, shuffle = shuffle)test_dir("testthat", package = package, reporter = reporter,
..., load_package = "installed")51:
test_dir("testthat", package = package, reporter = reporter, 52: ..., load_package = "installed")test_check("missSBM")
52: An irrecoverable exception occurred. R is aborting now ...
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, ": ") 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)
Traceback:
1: 25: dispatcher(membership_name, membership_init$to_cc(), model_name, doWithOneRestart(return(expr), restart) .self$network_to_cc(), TRUE)
26: 2: withOneRestart(expr, restarts[[1L]])FUN(X[[i]], ...)
27: withRestarts(tryCatch(withCallingHandlers({
eval(code, test_env) 3: new_expectations <- the$test_expectations > starting_expectationslapply(X = S, FUN = FUN, ...) if (snapshot_skipped) { skip("On CRAN")
4: }doTryCatch(return(expr), name, parentenv, handler) else if (!new_expectations && skip_on_empty) {
skip_empty() 5: }tryCatchOne(expr, names, parentenv, handlers[[1L]])}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {
skip(paste0("{", e$package, "} is not installed.")) 6: }tryCatchList(expr, classes, parentenv, handlers)}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE 7: invokeRestart("muffle_cran_snapshot")tryCatch(expr, error = function(e) {}, skip = handle_skip, warning = handle_warning, message = handle_message, call <- conditionCall(e) error = handle_error, interrupt = handle_interrupt), error = handle_fatal), if (!is.null(call)) { end_test = function() { if (identical(call[[1L]], quote(doTryCatch))) }) call <- sys.call(-4L)
dcall <- deparse(call, nlines = 1L)28: prefix <- paste("Error in", dcall, ": ")test_code(code, parent.frame())
LONG <- 75L29: sm <- strsplit(conditionMessage(e), "\n")[[1L]]test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate", w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") { if (is.na(w)) sampler_undirected_nocov$rNetwork(store = TRUE) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, type = "b") "bernoulli", FALSE) if (w > LONG) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, prefix <- paste0(prefix, "\n ") plot = FALSE)) } mySBM_sbm$setModel(3) net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData) else prefix <- "Error : " cl <- net$clustering(3)[[1]] msg <- paste0(prefix, conditionMessage(e), "\n") mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, .Internal(seterrmessage(msg[1L])) clusterInit = cl) if (!silent && isTRUE(getOption("show.error.messages"))) { mySBM_missSBM$doVEM() cat(msg, file = outFile) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), .Internal(printDeferredWarnings()) 0.05) } expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), invisible(structure(msg, class = "try-error", condition = e)) 0.95)}) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik),
0.01) 8: expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean), try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 0.05)
expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships), 0.95) 9: })sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
30:
eval(code, test_env)10:
FUN(X[[i]], ...)31:
eval(code, test_env)11:
lapply(seq_len(cores), inner.do)32:
withCallingHandlers({12: eval(code, test_env) new_expectations <- the$test_expectations > starting_expectationsparallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE) if (snapshot_skipped) {
skip("On CRAN")13: }parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, else if (!new_expectations && skip_on_empty) { verbose = (verbosity > 4)) skip_empty()
}14: }, expectation = handle_expectation, packageNotFoundError = function(e) {.self$do_with_inits(inits, Q, reinitialization_effort) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed.")) }}, 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()33:
17: doTryCatch(return(expr), name, parentenv, handler)
mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))34: tryCatchOne(expr, names, parentenv, handlers[[1L]])
18: 35: eval(code, test_env)tryCatchList(expr, classes, parentenv, handlers)
19: 36: eval(code, test_env)tryCatch(withCallingHandlers({ eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations20: if (snapshot_skipped) {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) {}, 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
invokeRestart("muffle_cran_snapshot")37: }, skip = handle_skip, warning = handle_warning, message = handle_message, doWithOneRestart(return(expr), restart) error = handle_error, interrupt = handle_interrupt)
38: 21: withOneRestart(expr, restarts[[1L]])doTryCatch(return(expr), name, parentenv, handler)
39: 22: withRestarts(tryCatch(withCallingHandlers({tryCatchOne(expr, names, parentenv, handlers[[1L]]) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations23: tryCatchList(expr, classes, parentenv, handlers) if (snapshot_skipped) {
skip("On CRAN")24: }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()) { } else if (!new_expectations && skip_on_empty) { skip(paste0("{", e$package, "} is not installed.")) skip_empty() } }}, snapshot_on_cran = function(cnd) {}, expectation = handle_expectation, packageNotFoundError = function(e) { snapshot_skipped <<- TRUE if (on_cran()) { invokeRestart("muffle_cran_snapshot") skip(paste0("{", e$package, "} is not installed."))}, skip = handle_skip, warning = handle_warning, message = handle_message, } error = handle_error, interrupt = handle_interrupt), error = handle_fatal), }, snapshot_on_cran = function(cnd) { end_test = function() { snapshot_skipped <<- TRUE }) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 40: error = handle_error, interrupt = handle_interrupt), error = handle_fatal)test_code(code = exprs, env = env, reporter = get_reporter() %||%
StopReporter$new())25:
doWithOneRestart(return(expr), restart)41:
source_file(path, env = env(env), desc = desc, shuffle = shuffle, 26: error_call = error_call)withOneRestart(expr, restarts[[1L]])
42: 27: FUN(X[[i]], ...)withRestarts(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: else if (!new_expectations && skip_on_empty) {doTryCatch(return(expr), name, parentenv, handler)
skip_empty()45: }tryCatchOne(expr, names, parentenv, handlers[[1L]])}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {46: skip(paste0("{", e$package, "} is not installed."))tryCatchList(expr, classes, parentenv, handlers) }
}, snapshot_on_cran = function(cnd) {47: snapshot_skipped <<- TRUEtryCatch(code, testthat_abort_reporter = function(cnd) { invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, cat(conditionMessage(cnd), "\n") error = handle_error, interrupt = handle_interrupt), error = handle_fatal), NULL end_test = function() {}) })
48: 28: with_reporter(reporters$multi, lapply(test_paths, test_one_file, test_code(code, parent.frame()) env = env, desc = desc, shuffle = shuffle, error_call = error_call))
29: 49: test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate", test_files_serial(test_dir = test_dir, test_package = test_package, { test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, sampler_undirected_nocov$rNetwork(store = TRUE) env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, desc = desc, load_package = load_package, shuffle = shuffle, error_call = error_call)
50: "bernoulli", FALSE)test_files(test_dir = path, test_paths = test_paths, test_package = package, mySBM_sbm$optimize(estimOptions = list(verbosity = 0, reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, plot = FALSE)) load_package = load_package, parallel = parallel, shuffle = shuffle)
51: mySBM_sbm$setModel(3)test_dir("testthat", package = package, reporter = reporter, net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData) cl <- net$clustering(3)[[1]] ..., load_package = "installed") mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, clusterInit = cl)
mySBM_missSBM$doVEM()52: expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), test_check("missSBM") 0.05)
expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), An irrecoverable exception occurred. R is aborting now ...
0.95) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.01) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean), 0.05) expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships), 0.95) })
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-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 : " 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))})
Traceback:
1: 8: dispatcher(membership_name, membership_init$to_cc(), model_name, try(lapply(X = S, FUN = FUN, ...), silent = TRUE) .self$network_to_cc(), TRUE)
9: 2: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))FUN(X[[i]], ...)
10: 3: FUN(X[[i]], ...)lapply(X = S, FUN = FUN, ...)
11: 4: lapply(seq_len(cores), inner.do)doTryCatch(return(expr), name, parentenv, handler)
12: 5: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, tryCatchOne(expr, names, parentenv, handlers[[1L]]) mc.silent = TRUE)
6: 13: tryCatchList(expr, classes, parentenv, handlers)parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores,
verbose = (verbosity > 4)) 7:
tryCatch(expr, error = function(e) {14: call <- conditionCall(e).self$do_with_inits(inits, Q, reinitialization_effort) if (!is.null(call)) {
if (identical(call[[1L]], quote(doTryCatch))) 15: call <- sys.call(-4L).self$estim_ascend(reinitialization_effort, changing_effort) dcall <- deparse(call, nlines = 1L)
prefix <- paste("Error in", dcall, ": ")16: LONG <- 75Lprivate$BMobject$estimate() sm <- strsplit(conditionMessage(e), "\n")[[1L]]
w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")17: if (is.na(w)) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],
type = "b")18: if (w > LONG) eval(code, test_env) prefix <- paste0(prefix, "\n ")
}19: else prefix <- "Error : "eval(code, test_env) msg <- paste0(prefix, conditionMessage(e), "\n")
.Internal(seterrmessage(msg[1L]))20: if (!silent && isTRUE(getOption("show.error.messages"))) {withCallingHandlers({ cat(msg, file = outFile) eval(code, test_env) .Internal(printDeferredWarnings()) new_expectations <- the$test_expectations > starting_expectations } if (snapshot_skipped) { invisible(structure(msg, class = "try-error", condition = e)) skip("On CRAN")}) }
else if (!new_expectations && skip_on_empty) { 8: skip_empty()try(lapply(X = S, FUN = FUN, ...), silent = TRUE) }
}, expectation = handle_expectation, packageNotFoundError = function(e) { 9: if (on_cran()) {sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) skip(paste0("{", e$package, "} is not installed."))
}10: }, snapshot_on_cran = function(cnd) {FUN(X[[i]], ...) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")11: }, skip = handle_skip, warning = handle_warning, message = handle_message, lapply(seq_len(cores), inner.do) error = handle_error, interrupt = handle_interrupt)
12: 21: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, doTryCatch(return(expr), name, parentenv, handler) mc.silent = TRUE)
22: 13: tryCatchOne(expr, names, parentenv, handlers[[1L]])parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores,
verbose = (verbosity > 4))23:
tryCatchList(expr, classes, parentenv, handlers)14:
.self$do_with_inits(inits, Q, reinitialization_effort)24:
tryCatch(withCallingHandlers({15: eval(code, test_env).self$estim_ascend(reinitialization_effort, changing_effort) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {16: skip("On CRAN")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()) { skip(paste0("{", e$package, "} is not installed."))eval(code, test_env) }
}, 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)withCallingHandlers({
eval(code, test_env)25: new_expectations <- the$test_expectations > starting_expectationsdoWithOneRestart(return(expr), restart) if (snapshot_skipped) {
skip("On CRAN")26: }withOneRestart(expr, restarts[[1L]]) else if (!new_expectations && skip_on_empty) {
skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) {27: withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) new_expectations <- the$test_expectations > starting_expectations } if (snapshot_skipped) {}, snapshot_on_cran = function(cnd) { skip("On CRAN") snapshot_skipped <<- TRUE } invokeRestart("muffle_cran_snapshot") else if (!new_expectations && skip_on_empty) {}, skip = handle_skip, warning = handle_warning, message = handle_message, skip_empty() error = handle_error, interrupt = handle_interrupt) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {21: if (on_cran()) {doTryCatch(return(expr), name, parentenv, handler) skip(paste0("{", e$package, "} is not installed."))
}22: }, snapshot_on_cran = function(cnd) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) snapshot_skipped <<- TRUE
23: invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, tryCatchList(expr, classes, parentenv, handlers) error = handle_error, interrupt = handle_interrupt), error = handle_fatal),
end_test = function() {24: })
tryCatch(withCallingHandlers({28: eval(code, test_env)test_code(code, parent.frame()) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {29: skip("On CRAN")test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate", } { else if (!new_expectations && skip_on_empty) { sampler_directed_nocov$rNetwork(store = TRUE) skip_empty() mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, } "bernoulli", TRUE)}, expectation = handle_expectation, packageNotFoundError = function(e) { mySBM_sbm$optimize(estimOptions = list(verbosity = 0, if (on_cran()) { plot = FALSE)) skip(paste0("{", e$package, "} is not installed.")) mySBM_sbm$setModel(3) } net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData)}, snapshot_on_cran = function(cnd) { cl <- net$clustering(3)[[1]] snapshot_skipped <<- TRUE mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, invokeRestart("muffle_cran_snapshot") clusterInit = cl)}, skip = handle_skip, warning = handle_warning, message = handle_message, mySBM_missSBM$doVEM() error = handle_error, interrupt = handle_interrupt), error = handle_fatal) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean),
0.1)25: expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), doWithOneRestart(return(expr), restart) 0.95)
expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 26: 0.01)withOneRestart(expr, restarts[[1L]]) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean),
0.1)27: expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), withRestarts(tryCatch(withCallingHandlers({ 0.2) eval(code, test_env) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), new_expectations <- the$test_expectations > starting_expectations 0.95) if (snapshot_skipped) { }) skip("On CRAN")
}30: else if (!new_expectations && skip_on_empty) {eval(code, test_env) skip_empty()
}31: }, expectation = handle_expectation, packageNotFoundError = function(e) {eval(code, test_env) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))32: }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, skip("On CRAN") error = handle_error, interrupt = handle_interrupt), error = handle_fatal), } end_test = function() { else if (!new_expectations && skip_on_empty) { }) skip_empty()
}28: }, expectation = handle_expectation, packageNotFoundError = function(e) {test_code(code, parent.frame()) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))29: }test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate", }, snapshot_on_cran = function(cnd) { { snapshot_skipped <<- TRUE sampler_directed_nocov$rNetwork(store = TRUE) invokeRestart("muffle_cran_snapshot") mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, }, skip = handle_skip, warning = handle_warning, message = handle_message, "bernoulli", TRUE) error = handle_error, interrupt = handle_interrupt) mySBM_sbm$optimize(estimOptions = list(verbosity = 0,
plot = FALSE))33: mySBM_sbm$setModel(3) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData) cl <- net$clustering(3)[[1]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, doTryCatch(return(expr), name, parentenv, handler)
clusterInit = cl) mySBM_missSBM$doVEM()34: expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), tryCatchOne(expr, names, parentenv, handlers[[1L]]) 0.1)
expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 35: 0.95)tryCatchList(expr, classes, parentenv, handlers) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik),
0.01)36: expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean), tryCatch(withCallingHandlers({ 0.1) eval(code, test_env) expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), new_expectations <- the$test_expectations > starting_expectations 0.2) if (snapshot_skipped) { expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), skip("On CRAN") 0.95) } }) else if (!new_expectations && skip_on_empty) {
skip_empty()30: }}, expectation = handle_expectation, packageNotFoundError = function(e) {eval(code, test_env) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))31: }eval(code, test_env)}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE32: invokeRestart("muffle_cran_snapshot")withCallingHandlers({}, skip = handle_skip, warning = handle_warning, message = handle_message, eval(code, test_env) error = handle_error, interrupt = handle_interrupt), error = handle_fatal) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {37: skip("On CRAN")doWithOneRestart(return(expr), restart) }
else if (!new_expectations && skip_on_empty) {38: skip_empty()withOneRestart(expr, restarts[[1L]]) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {39: if (on_cran()) {withRestarts(tryCatch(withCallingHandlers({ skip(paste0("{", e$package, "} is not installed.")) eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations}, snapshot_on_cran = function(cnd) { if (snapshot_skipped) { snapshot_skipped <<- TRUE skip("On CRAN") invokeRestart("muffle_cran_snapshot") }}, skip = handle_skip, warning = handle_warning, message = handle_message, else if (!new_expectations && skip_on_empty) { error = handle_error, interrupt = handle_interrupt) skip_empty()
}33: }, expectation = handle_expectation, packageNotFoundError = function(e) {doTryCatch(return(expr), name, parentenv, handler) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))34: }tryCatchOne(expr, names, parentenv, handlers[[1L]])}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE35: invokeRestart("muffle_cran_snapshot")tryCatchList(expr, classes, parentenv, handlers)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 36: end_test = function() {tryCatch(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) {41: skip_empty()source_file(path, env = env(env), desc = desc, shuffle = shuffle, } error_call = error_call)}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {42: skip(paste0("{", e$package, "} is not installed.")) }FUN(X[[i]], ...)}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE43: invokeRestart("muffle_cran_snapshot")lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, }, skip = handle_skip, warning = handle_warning, message = handle_message, error_call = error_call) error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
44: 37: doTryCatch(return(expr), name, parentenv, handler)doWithOneRestart(return(expr), restart)
45: 38: tryCatchOne(expr, names, parentenv, handlers[[1L]])withOneRestart(expr, restarts[[1L]])
46: 39: tryCatchList(expr, classes, parentenv, handlers)withRestarts(tryCatch(withCallingHandlers({
eval(code, test_env)47: new_expectations <- the$test_expectations > starting_expectationstryCatch(code, testthat_abort_reporter = function(cnd) { if (snapshot_skipped) { cat(conditionMessage(cnd), "\n") skip("On CRAN") NULL }}) else if (!new_expectations && skip_on_empty) {
skip_empty()48: }with_reporter(reporters$multi, lapply(test_paths, test_one_file, }, expectation = handle_expectation, packageNotFoundError = function(e) { env = env, desc = desc, shuffle = shuffle, error_call = error_call)) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))49: }test_files_serial(test_dir = test_dir, test_package = test_package, }, snapshot_on_cran = function(cnd) { test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, snapshot_skipped <<- TRUE env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, invokeRestart("muffle_cran_snapshot") desc = desc, load_package = load_package, shuffle = shuffle, }, skip = handle_skip, warning = handle_warning, message = handle_message, error_call = error_call) error = handle_error, interrupt = handle_interrupt), error = handle_fatal),
end_test = function() {50: })test_files(test_dir = path, test_paths = test_paths, test_package = package,
reporter = reporter, load_helpers = load_helpers, env = env, 40: stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, test_code(code = exprs, env = env, reporter = get_reporter() %||% load_package = load_package, parallel = parallel, shuffle = shuffle) StopReporter$new())
51: 41: test_dir("testthat", package = package, reporter = reporter, source_file(path, env = env(env), desc = desc, shuffle = shuffle, ..., load_package = "installed") error_call = error_call)
52: 42: test_check("missSBM")FUN(X[[i]], ...)
An irrecoverable exception occurred. R is aborting now ...
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