Last updated on 2026-10-15 21:52:57 CEST.
| Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
|---|---|---|---|---|---|---|
| r-devel-linux-x86_64-debian-clang | 1.1.0 | 80.54 | 363.82 | 444.36 | OK | |
| r-devel-linux-x86_64-debian-gcc | 1.1.0 | 57.45 | 245.68 | 303.13 | 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 | 91.00 | 446.00 | 537.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 | 95.00 | 361.00 | 456.00 | OK | |
| r-oldrel-macos-arm64 | 1.1.0 | 22.00 | 109.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 | 119.00 | 528.00 | 647.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))
Traceback:
10: 1: FUN(X[[i]], ...)dispatcher(membership_name, membership_init$to_cc(), model_name,
.self$network_to_cc(), TRUE)11:
lapply(seq_len(cores), inner.do) 2:
FUN(X[[i]], ...)12:
parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, 3: mc.silent = TRUE)lapply(X = S, FUN = FUN, ...)
13: 4: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, doTryCatch(return(expr), name, parentenv, handler) verbose = (verbosity > 4))
5: 14: tryCatchOne(expr, names, parentenv, handlers[[1L]]).self$do_with_inits(inits, Q, reinitialization_effort)
6: 15: tryCatchList(expr, classes, parentenv, handlers).self$estim_ascend(reinitialization_effort, changing_effort)
7: 16: tryCatch(expr, error = function(e) {private$BMobject$estimate() call <- conditionCall(e)
if (!is.null(call)) {17: if (identical(call[[1L]], quote(doTryCatch))) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) call <- sys.call(-4L)
dcall <- deparse(call, nlines = 1L)18: prefix <- paste("Error in", dcall, ": ")eval(code, test_env) LONG <- 75L
sm <- strsplit(conditionMessage(e), "\n")[[1L]]19: w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")eval(code, test_env) if (is.na(w))
w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 20: type = "b")withCallingHandlers({ if (w > LONG) eval(code, test_env) prefix <- paste0(prefix, "\n ") new_expectations <- the$test_expectations > starting_expectations } if (snapshot_skipped) { else prefix <- "Error : " skip("On CRAN") msg <- paste0(prefix, conditionMessage(e), "\n") } .Internal(seterrmessage(msg[1L])) else if (!new_expectations && skip_on_empty) { if (!silent && isTRUE(getOption("show.error.messages"))) { skip_empty() cat(msg, file = outFile) } .Internal(printDeferredWarnings())}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { } skip(paste0("{", e$package, "} is not installed.")) invisible(structure(msg, class = "try-error", condition = e)) }})}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE 8: invokeRestart("muffle_cran_snapshot")try(lapply(X = S, FUN = FUN, ...), silent = TRUE)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt)
9: 21: doTryCatch(return(expr), name, parentenv, handler)sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
22: 10: tryCatchOne(expr, names, parentenv, handlers[[1L]])FUN(X[[i]], ...)
23: 11: tryCatchList(expr, classes, parentenv, handlers)lapply(seq_len(cores), inner.do)
24: 12: tryCatch(withCallingHandlers({parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, eval(code, test_env) mc.silent = TRUE) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {13: skip("On CRAN")parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, } verbose = (verbosity > 4)) else if (!new_expectations && skip_on_empty) {
skip_empty()14: }.self$do_with_inits(inits, Q, reinitialization_effort)}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {15: skip(paste0("{", e$package, "} is not installed.")).self$estim_ascend(reinitialization_effort, changing_effort) }
}, snapshot_on_cran = function(cnd) {16: snapshot_skipped <<- TRUEprivate$BMobject$estimate() invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 17: error = handle_error, interrupt = handle_interrupt), error = handle_fatal)mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
25: 18: doWithOneRestart(return(expr), restart)eval(code, test_env)
26: 19: withOneRestart(expr, restarts[[1L]])eval(code, test_env)
27: 20: withRestarts(tryCatch(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) {}, 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) end_test = function() {
})21:
doTryCatch(return(expr), name, parentenv, handler)28: test_code(code, parent.frame())
22: 29: tryCatchOne(expr, names, parentenv, handlers[[1L]])test_that("SimpleSBM_fit 'Bernoulli' model, undirected, one covariate",
{23: sampler_undirected_cov$rNetwork(store = TRUE)tryCatchList(expr, classes, parentenv, handlers) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData,
"bernoulli", FALSE, covarList = covarList_undirected)24: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, tryCatch(withCallingHandlers({ plot = FALSE)) eval(code, test_env) mySBM_sbm$setModel(Q) new_expectations <- the$test_expectations > starting_expectations net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData, if (snapshot_skipped) { covariates = covarList_undirected) skip("On CRAN") cls <- net$clustering(1:(2 * Q)) } cl <- cls[[Q]] else if (!new_expectations && skip_on_empty) { mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, skip_empty() clusterInit = cl, covarList = covarList_undirected) } mySBM_missSBM$doVEM()}, expectation = handle_expectation, packageNotFoundError = function(e) { expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), if (on_cran()) { 0.05) skip(paste0("{", e$package, "} is not installed.")) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), } 0.8)}, snapshot_on_cran = function(cnd) { expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), snapshot_skipped <<- TRUE 0.01) invokeRestart("muffle_cran_snapshot") expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_cov$connectParam$mean), }, skip = handle_skip, warning = handle_warning, message = handle_message, 0.1) error = handle_error, interrupt = handle_interrupt), error = handle_fatal) expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam),
0.1)25: expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_cov$memberships), doWithOneRestart(return(expr), restart) 0.85)
})26:
withOneRestart(expr, restarts[[1L]])30:
eval(code, test_env)27:
withRestarts(tryCatch(withCallingHandlers({31: eval(code, test_env)eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {32: skip("On CRAN")withCallingHandlers({ } eval(code, test_env) else if (!new_expectations && skip_on_empty) { new_expectations <- the$test_expectations > starting_expectations skip_empty() if (snapshot_skipped) { } skip("On CRAN")}, expectation = handle_expectation, packageNotFoundError = function(e) { } 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, 28: error = handle_error, interrupt = handle_interrupt)test_code(code, parent.frame())
33: 29: doTryCatch(return(expr), name, parentenv, handler)test_that("SimpleSBM_fit 'Bernoulli' model, undirected, one covariate",
{34: sampler_undirected_cov$rNetwork(store = TRUE)tryCatchOne(expr, names, parentenv, handlers[[1L]]) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData,
"bernoulli", FALSE, covarList = covarList_undirected)35: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, tryCatchList(expr, classes, parentenv, handlers) plot = FALSE))
mySBM_sbm$setModel(Q)36: net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData, tryCatch(withCallingHandlers({ covariates = covarList_undirected) eval(code, test_env) cls <- net$clustering(1:(2 * Q)) new_expectations <- the$test_expectations > starting_expectations cl <- cls[[Q]] if (snapshot_skipped) { mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, skip("On CRAN") clusterInit = cl, covarList = covarList_undirected) } 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) { 0.8) if (on_cran()) { expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), skip(paste0("{", e$package, "} is not installed.")) 0.01) } expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_cov$connectParam$mean), }, snapshot_on_cran = function(cnd) { 0.1) snapshot_skipped <<- TRUE expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam), invokeRestart("muffle_cran_snapshot") 0.1)}, skip = handle_skip, warning = handle_warning, message = handle_message, expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_cov$memberships), error = handle_error, interrupt = handle_interrupt), error = handle_fatal) 0.85)
})37:
doWithOneRestart(return(expr), restart)30:
eval(code, test_env)38:
withOneRestart(expr, restarts[[1L]])31:
eval(code, test_env)39:
withRestarts(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) { 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_error, interrupt = handle_interrupt), error = handle_fatal),
end_test = function() { })33:
doTryCatch(return(expr), name, parentenv, handler)40:
test_code(code = exprs, env = env, reporter = get_reporter() %||% 34: StopReporter$new())tryCatchOne(expr, names, parentenv, handlers[[1L]])
41: 35: source_file(path, env = env(env), desc = desc, shuffle = shuffle, tryCatchList(expr, classes, parentenv, handlers) error_call = error_call)
36: 42: tryCatch(withCallingHandlers({FUN(X[[i]], ...) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations43: if (snapshot_skipped) {lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, skip("On CRAN") error_call = error_call) }
else if (!new_expectations && skip_on_empty) {44: skip_empty()doTryCatch(return(expr), name, parentenv, handler) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {45: if (on_cran()) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) skip(paste0("{", e$package, "} is not installed."))
}46: }, snapshot_on_cran = function(cnd) {tryCatchList(expr, classes, parentenv, handlers)
snapshot_skipped <<- TRUE47: invokeRestart("muffle_cran_snapshot")tryCatch(code, testthat_abort_reporter = function(cnd) {}, skip = handle_skip, warning = handle_warning, message = handle_message, cat(conditionMessage(cnd), "\n") error = handle_error, interrupt = handle_interrupt), error = handle_fatal) NULL
})37:
doWithOneRestart(return(expr), restart)48:
with_reporter(reporters$multi, lapply(test_paths, test_one_file, 38: env = env, desc = desc, shuffle = shuffle, error_call = error_call))withOneRestart(expr, restarts[[1L]])
49: 39: test_files_serial(test_dir = test_dir, test_package = test_package, withRestarts(tryCatch(withCallingHandlers({ test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, eval(code, test_env) env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, new_expectations <- the$test_expectations > starting_expectations desc = desc, load_package = load_package, shuffle = shuffle, if (snapshot_skipped) { error_call = error_call) skip("On CRAN")
}50: else if (!new_expectations && skip_on_empty) {test_files(test_dir = path, test_paths = test_paths, test_package = package, skip_empty() reporter = reporter, load_helpers = load_helpers, env = env, } stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, }, expectation = handle_expectation, packageNotFoundError = function(e) { load_package = load_package, parallel = parallel, shuffle = shuffle) if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))
}51: }, snapshot_on_cran = function(cnd) {test_dir("testthat", package = package, reporter = reporter, snapshot_skipped <<- TRUE ..., load_package = "installed") invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 52: test_check("missSBM") error = handle_error, interrupt = handle_interrupt), error = handle_fatal),
end_test = function() {An irrecoverable exception occurred. R is aborting now ...
})
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,
Traceback:
error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 1: end_test = function() {dispatcher(membership_name, membership_init$to_cc(), model_name, }) .self$network_to_cc(), TRUE)
28: 2: test_code(code, parent.frame())FUN(X[[i]], ...)
29: 3: test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", lapply(X = S, FUN = FUN, ...) {
sampler_directed_cov$rNetwork(store = TRUE) 4: mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, doTryCatch(return(expr), name, parentenv, handler) "bernoulli", TRUE, covarList = covarList_directed)
mySBM_sbm$optimize(estimOptions = list(verbosity = 0, 5: plot = FALSE))tryCatchOne(expr, names, parentenv, handlers[[1L]]) mySBM_sbm$setModel(Q)
net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, 6: covariates = covarList_directed)tryCatchList(expr, classes, parentenv, handlers) cls <- net$clustering(1:(2 * Q))
cl <- cls[[Q]] 7: mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, clusterInit = cl, covarList = covarList_directed)tryCatch(expr, error = function(e) { mySBM_missSBM$doVEM(trace = TRUE) call <- conditionCall(e) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.1) if (!is.null(call)) { expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), if (identical(call[[1L]], quote(doTryCatch))) 0.8) call <- sys.call(-4L) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), dcall <- deparse(call, nlines = 1L) 0.05) prefix <- paste("Error in", dcall, ": ") expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), LONG <- 75L 0.1) sm <- strsplit(conditionMessage(e), "\n")[[1L]] expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") 0.85) if (is.na(w)) }) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],
type = "b")30: if (w > LONG) eval(code, test_env) prefix <- paste0(prefix, "\n ")
}31: else prefix <- "Error : "eval(code, test_env) msg <- paste0(prefix, conditionMessage(e), "\n")
.Internal(seterrmessage(msg[1L]))32: 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) { } skip("On CRAN") invisible(structure(msg, class = "try-error", condition = e)) }}) else if (!new_expectations && skip_on_empty) {
skip_empty() } 8: }, expectation = handle_expectation, packageNotFoundError = function(e) {try(lapply(X = S, FUN = FUN, ...), silent = TRUE) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed.")) 9: }sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE10: invokeRestart("muffle_cran_snapshot")FUN(X[[i]], ...)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt)11:
lapply(seq_len(cores), inner.do)33:
doTryCatch(return(expr), name, parentenv, handler)12: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE,
mc.silent = TRUE)34:
tryCatchOne(expr, names, parentenv, handlers[[1L]])13:
parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, 35: verbose = (verbosity > 4))tryCatchList(expr, classes, parentenv, handlers)
14: 36: .self$do_with_inits(inits, Q, reinitialization_effort)tryCatch(withCallingHandlers({
eval(code, test_env)15: new_expectations <- the$test_expectations > starting_expectations.self$estim_ascend(reinitialization_effort, changing_effort) if (snapshot_skipped) {
skip("On CRAN")16: }private$BMobject$estimate() else if (!new_expectations && skip_on_empty) {
skip_empty()17: }mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {18: 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)37: new_expectations <- the$test_expectations > starting_expectationsdoWithOneRestart(return(expr), restart) if (snapshot_skipped) {
skip("On CRAN")38: }withOneRestart(expr, restarts[[1L]]) else if (!new_expectations && skip_on_empty) {
skip_empty()39: }withRestarts(tryCatch(withCallingHandlers({}, expectation = handle_expectation, packageNotFoundError = function(e) { eval(code, test_env) if (on_cran()) { new_expectations <- the$test_expectations > starting_expectations skip(paste0("{", e$package, "} is not installed.")) if (snapshot_skipped) { } skip("On CRAN")}, snapshot_on_cran = function(cnd) { } snapshot_skipped <<- TRUE else if (!new_expectations && skip_on_empty) { invokeRestart("muffle_cran_snapshot") skip_empty()}, skip = handle_skip, warning = handle_warning, message = handle_message, } error = handle_error, interrupt = handle_interrupt)}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {21: skip(paste0("{", e$package, "} is not installed."))doTryCatch(return(expr), name, parentenv, handler) }
}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE22: invokeRestart("muffle_cran_snapshot")tryCatchOne(expr, names, parentenv, handlers[[1L]])}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 23: end_test = function() {tryCatchList(expr, classes, parentenv, handlers) })
24: 40: tryCatch(withCallingHandlers({test_code(code = exprs, env = env, reporter = get_reporter() %||% eval(code, test_env) StopReporter$new()) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {41: skip("On CRAN")source_file(path, env = env(env), desc = desc, shuffle = shuffle, } error_call = error_call) else if (!new_expectations && skip_on_empty) {
skip_empty()42: }FUN(X[[i]], ...)}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {43: skip(paste0("{", e$package, "} is not installed."))lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, } error_call = error_call)}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE44: invokeRestart("muffle_cran_snapshot")doTryCatch(return(expr), name, parentenv, handler)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal)45:
tryCatchOne(expr, names, parentenv, handlers[[1L]])25:
doWithOneRestart(return(expr), restart)46:
tryCatchList(expr, classes, parentenv, handlers)26:
withOneRestart(expr, restarts[[1L]])47:
tryCatch(code, testthat_abort_reporter = function(cnd) {27: cat(conditionMessage(cnd), "\n")withRestarts(tryCatch(withCallingHandlers({ NULL eval(code, test_env)}) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {48: skip("On CRAN")with_reporter(reporters$multi, 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()49: }test_files_serial(test_dir = test_dir, test_package = test_package, }, expectation = handle_expectation, packageNotFoundError = function(e) { test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, if (on_cran()) { 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), end_test = function() { stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, }) load_package = load_package, parallel = parallel, shuffle = shuffle)
28: 51: test_code(code, parent.frame())test_dir("testthat", package = package, reporter = reporter,
..., load_package = "installed")29:
test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", 52: {test_check("missSBM") sampler_directed_cov$rNetwork(store = TRUE)
mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, An irrecoverable exception occurred. R is aborting now ...
"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, ": ") 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 ")
Traceback:
} else prefix <- "Error : " 1: msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L]))dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE)
if (!silent && isTRUE(getOption("show.error.messages"))) { 2: cat(msg, file = outFile) .Internal(printDeferredWarnings())FUN(X[[i]], ...) }
invisible(structure(msg, class = "try-error", condition = e)) 3: })lapply(X = S, FUN = FUN, ...)
8: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 4: doTryCatch(return(expr), name, parentenv, handler)
9: 5: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))tryCatchOne(expr, names, parentenv, handlers[[1L]])
10: 6: tryCatchList(expr, classes, parentenv, handlers)FUN(X[[i]], ...)
7: 11: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) {lapply(seq_len(cores), inner.do) if (identical(call[[1L]], quote(doTryCatch)))
call <- sys.call(-4L) 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 mc.silent = TRUE) sm <- strsplit(conditionMessage(e), "\n")[[1L]]
w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")13: if (is.na(w)) parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], verbose = (verbosity > 4)) type = "b")
if (w > LONG) 14: prefix <- paste0(prefix, "\n ").self$do_with_inits(inits, Q, reinitialization_effort)
15: }.self$estim_ascend(reinitialization_effort, changing_effort) else prefix <- "Error : "
msg <- paste0(prefix, conditionMessage(e), "\n")16: .Internal(seterrmessage(msg[1L]))private$BMobject$estimate() if (!silent && isTRUE(getOption("show.error.messages"))) {
cat(msg, file = outFile)17: .Internal(printDeferredWarnings())mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) }
invisible(structure(msg, class = "try-error", condition = e))18: })eval(code, test_env)
8: 19: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
eval(code, test_env) 9:
sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))20:
withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations10: FUN(X[[i]], ...) if (snapshot_skipped) {
skip("On CRAN")11: }lapply(seq_len(cores), inner.do) else if (!new_expectations && skip_on_empty) {
skip_empty()12: }parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, }, expectation = handle_expectation, packageNotFoundError = function(e) { 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)
15: 21: .self$estim_ascend(reinitialization_effort, changing_effort)doTryCatch(return(expr), name, parentenv, handler)
16: 22: private$BMobject$estimate()tryCatchOne(expr, names, parentenv, handlers[[1L]])
23: 17: tryCatchList(expr, classes, parentenv, handlers)mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
24: tryCatch(withCallingHandlers({18: eval(code, test_env)eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {19: skip("On CRAN")eval(code, test_env) }
else if (!new_expectations && skip_on_empty) {20: skip_empty()withCallingHandlers({ } eval(code, test_env)}, expectation = handle_expectation, packageNotFoundError = function(e) { new_expectations <- the$test_expectations > starting_expectations if (on_cran()) { if (snapshot_skipped) { skip(paste0("{", e$package, "} is not installed.")) skip("On CRAN") } }}, snapshot_on_cran = function(cnd) { else if (!new_expectations && skip_on_empty) { snapshot_skipped <<- TRUE skip_empty() invokeRestart("muffle_cran_snapshot") }}, skip = handle_skip, warning = handle_warning, message = handle_message, }, expectation = handle_expectation, packageNotFoundError = function(e) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))25: }doWithOneRestart(return(expr), restart)}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE26: invokeRestart("muffle_cran_snapshot")withOneRestart(expr, restarts[[1L]])}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt)
27: 21: withRestarts(tryCatch(withCallingHandlers({doTryCatch(return(expr), name, parentenv, handler) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations22: if (snapshot_skipped) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) skip("On CRAN")
}23: else if (!new_expectations && skip_on_empty) {tryCatchList(expr, classes, parentenv, handlers) skip_empty()
}24: }, expectation = handle_expectation, packageNotFoundError = function(e) {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")}, 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), skip_empty() end_test = function() { } })}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {28: skip(paste0("{", e$package, "} is not installed.")) }test_code(code, parent.frame())}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE29: invokeRestart("muffle_cran_snapshot")test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate", }, skip = handle_skip, warning = handle_warning, message = handle_message, { error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
sampler_undirected_nocov$rNetwork(store = TRUE)25: mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, doWithOneRestart(return(expr), restart)
"bernoulli", FALSE)26: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, withOneRestart(expr, restarts[[1L]]) plot = FALSE))
mySBM_sbm$setModel(3)27: net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData)withRestarts(tryCatch(withCallingHandlers({ cl <- net$clustering(3)[[1]] eval(code, test_env) mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, new_expectations <- the$test_expectations > starting_expectations clusterInit = cl) if (snapshot_skipped) { mySBM_missSBM$doVEM() skip("On CRAN") expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), } 0.05) else if (!new_expectations && skip_on_empty) { expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), skip_empty() 0.95) } expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.01)}, expectation = handle_expectation, packageNotFoundError = function(e) { expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean), 0.05) if (on_cran()) { expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships), skip(paste0("{", e$package, "} is not installed.")) 0.95) } })}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE30: 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),
end_test = function() {31: })eval(code, test_env)
32: 28: withCallingHandlers({test_code(code, parent.frame()) eval(code, test_env)
29: new_expectations <- the$test_expectations > starting_expectationstest_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate", if (snapshot_skipped) { { skip("On CRAN") sampler_undirected_nocov$rNetwork(store = TRUE) } mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, else if (!new_expectations && skip_on_empty) { "bernoulli", FALSE) skip_empty() mySBM_sbm$optimize(estimOptions = list(verbosity = 0, } plot = FALSE))}, expectation = handle_expectation, packageNotFoundError = function(e) { mySBM_sbm$setModel(3) if (on_cran()) { net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData) skip(paste0("{", e$package, "} is not installed.")) cl <- net$clustering(3)[[1]] } mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, }, snapshot_on_cran = function(cnd) { clusterInit = cl) snapshot_skipped <<- TRUE mySBM_missSBM$doVEM() invokeRestart("muffle_cran_snapshot") expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.05)}, skip = handle_skip, warning = handle_warning, message = handle_message, expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), error = handle_error, interrupt = handle_interrupt) 0.95)
expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 33: 0.01)doTryCatch(return(expr), name, parentenv, handler) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean),
0.05)34: expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships), tryCatchOne(expr, names, parentenv, handlers[[1L]]) 0.95)
})35:
tryCatchList(expr, classes, parentenv, handlers)30:
eval(code, test_env)36:
tryCatch(withCallingHandlers({31: eval(code, test_env)eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations32: 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) { 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()) { 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")}, 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]])
39: 34: withRestarts(tryCatch(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: else if (!new_expectations && skip_on_empty) {tryCatch(withCallingHandlers({ skip_empty() eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations}, expectation = handle_expectation, packageNotFoundError = function(e) { if (snapshot_skipped) { if (on_cran()) { skip("On CRAN") skip(paste0("{", e$package, "} is not installed.")) } } else if (!new_expectations && skip_on_empty) {}, snapshot_on_cran = function(cnd) { skip_empty() snapshot_skipped <<- TRUE } invokeRestart("muffle_cran_snapshot")}, expectation = handle_expectation, packageNotFoundError = function(e) {}, skip = handle_skip, warning = handle_warning, message = handle_message, if (on_cran()) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal), skip(paste0("{", e$package, "} is not installed.")) end_test = function() { } })
40: }, snapshot_on_cran = function(cnd) {test_code(code = exprs, env = env, reporter = get_reporter() %||% snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") StopReporter$new())}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
37: 41: doWithOneRestart(return(expr), restart)source_file(path, env = env(env), desc = desc, shuffle = shuffle, error_call = error_call)
38: 42: withOneRestart(expr, restarts[[1L]])FUN(X[[i]], ...)
39: withRestarts(tryCatch(withCallingHandlers({43: eval(code, test_env)lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, new_expectations <- the$test_expectations > starting_expectations error_call = error_call) if (snapshot_skipped) {
skip("On CRAN")44: }doTryCatch(return(expr), name, parentenv, handler)
else if (!new_expectations && skip_on_empty) { skip_empty()45: }tryCatchOne(expr, names, parentenv, handlers[[1L]])
}, expectation = handle_expectation, packageNotFoundError = function(e) {46: if (on_cran()) {tryCatchList(expr, classes, parentenv, handlers)
skip(paste0("{", e$package, "} is not installed.")) }47: }, snapshot_on_cran = function(cnd) {tryCatch(code, testthat_abort_reporter = function(cnd) { snapshot_skipped <<- TRUE cat(conditionMessage(cnd), "\n") invokeRestart("muffle_cran_snapshot") NULL}, skip = handle_skip, warning = handle_warning, message = handle_message, }) error = handle_error, interrupt = handle_interrupt), error = handle_fatal),
end_test = function() {48: })with_reporter(reporters$multi, lapply(test_paths, test_one_file,
40: env = env, desc = desc, shuffle = shuffle, error_call = error_call))test_code(code = exprs, env = env, reporter = get_reporter() %||% StopReporter$new())
49: 41: test_files_serial(test_dir = test_dir, test_package = test_package, source_file(path, env = env(env), desc = desc, 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,
42: desc = desc, load_package = load_package, shuffle = shuffle, error_call = error_call)FUN(X[[i]], ...)
43: 50: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, test_files(test_dir = path, test_paths = test_paths, test_package = package, error_call = error_call) reporter = reporter, load_helpers = load_helpers, env = env,
stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 44: load_package = load_package, parallel = parallel, shuffle = shuffle)doTryCatch(return(expr), name, parentenv, handler)
51: 45: test_dir("testthat", package = package, reporter = reporter, tryCatchOne(expr, names, parentenv, handlers[[1L]]) ..., load_package = "installed")
46: 52: tryCatchList(expr, classes, parentenv, handlers)
test_check("missSBM")47:
tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n")An irrecoverable exception occurred. R is aborting now ...
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, ...)
Traceback:
1: dispatcher(membership_name, membership_init$to_cc(), model_name,
.self$network_to_cc(), TRUE)
4: 2: doTryCatch(return(expr), name, parentenv, handler)FUN(X[[i]], ...)
5: 3: lapply(X = S, FUN = FUN, ...)tryCatchOne(expr, names, parentenv, handlers[[1L]])
4:
doTryCatch(return(expr), name, parentenv, handler) 6:
tryCatchList(expr, classes, parentenv, handlers) 5:
tryCatchOne(expr, names, parentenv, handlers[[1L]])
7: 6: tryCatch(expr, error = function(e) { call <- conditionCall(e)tryCatchList(expr, classes, parentenv, handlers) if (!is.null(call)) {
if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) 7: tryCatch(expr, error = function(e) { prefix <- paste("Error in", dcall, ": ") call <- conditionCall(e) 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) prefix <- paste("Error in", dcall, ": ") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] type = "b") w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (w > LONG) if (is.na(w)) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { if (w > LONG) prefix <- paste0(prefix, "\n ") cat(msg, file = outFile) } .Internal(printDeferredWarnings()) else prefix <- "Error : " } 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)
.Internal(printDeferredWarnings()) 8: }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: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)10:
FUN(X[[i]], ...) 9:
11: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
lapply(seq_len(cores), inner.do)10: FUN(X[[i]], ...)
12: 11: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, lapply(seq_len(cores), inner.do)
mc.silent = TRUE)12: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE,
13: mc.silent = TRUE)
parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, 13: verbose = (verbosity > 4))parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores,
verbose = (verbosity > 4))
14: .self$do_with_inits(inits, Q, reinitialization_effort)14: .self$do_with_inits(inits, Q, reinitialization_effort)
15: .self$estim_ascend(reinitialization_effort, changing_effort)
15:
16: private$BMobject$estimate().self$estim_ascend(reinitialization_effort, changing_effort)
16: private$BMobject$estimate()17:
17: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
18: 18: eval(code, test_env)eval(code, test_env)
19: 19: eval(code, test_env)eval(code, test_env)
20: withCallingHandlers({20: eval(code, test_env)withCallingHandlers({ new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { eval(code, test_env) skip("On CRAN") } 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) { skip_empty() if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) } }}, expectation = handle_expectation, packageNotFoundError = function(e) {}, snapshot_on_cran = function(cnd) { 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)}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE21: invokeRestart("muffle_cran_snapshot")doTryCatch(return(expr), name, parentenv, handler)
}, skip = handle_skip, warning = handle_warning, message = handle_message, 22: tryCatchOne(expr, names, parentenv, handlers[[1L]]) error = handle_error, interrupt = handle_interrupt)
23: tryCatchList(expr, classes, parentenv, handlers)21: doTryCatch(return(expr), name, parentenv, handler)
24: tryCatch(withCallingHandlers({22: tryCatchOne(expr, names, parentenv, handlers[[1L]]) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) { skip("On CRAN")23: }tryCatchList(expr, classes, parentenv, handlers)
else if (!new_expectations && skip_on_empty) { skip_empty()24: }tryCatch(withCallingHandlers({ eval(code, test_env)}, expectation = handle_expectation, packageNotFoundError = function(e) { new_expectations <- the$test_expectations > starting_expectations if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) 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), error = handle_fatal) }
25: }, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {doWithOneRestart(return(expr), restart)
skip(paste0("{", e$package, "} is not installed."))26: withOneRestart(expr, restarts[[1L]])
}27: withRestarts(tryCatch(withCallingHandlers({}, snapshot_on_cran = function(cnd) { eval(code, test_env) snapshot_skipped <<- TRUE new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, skip("On CRAN") error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
} else if (!new_expectations && skip_on_empty) {25: skip_empty() }doWithOneRestart(return(expr), restart)}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))26: }withOneRestart(expr, restarts[[1L]])}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")27: }, skip = handle_skip, warning = handle_warning, message = handle_message, withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() { new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { })
skip("On CRAN")28: }test_code(code, parent.frame()) else if (!new_expectations && skip_on_empty) {
29: skip_empty() }test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate", {}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { sampler_directed_nocov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, skip(paste0("{", e$package, "} is not installed.")) "bernoulli", TRUE) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, } plot = FALSE)) mySBM_sbm$setModel(3)}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData) cl <- net$clustering(3)[[1]]}, skip = handle_skip, warning = handle_warning, message = handle_message, mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, clusterInit = cl) error = handle_error, interrupt = handle_interrupt), error = handle_fatal), mySBM_missSBM$doVEM() end_test = function() { expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), }) 0.1) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships),
0.95) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 28: test_code(code, parent.frame()) 0.01) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean),
0.1) expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), 29: test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate", 0.2) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), { 0.95) sampler_directed_nocov$rNetwork(store = TRUE) })
mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, "bernoulli", TRUE)30: eval(code, test_env) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
31: mySBM_sbm$setModel(3)eval(code, test_env)
net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData)32: cl <- net$clustering(3)[[1]]withCallingHandlers({ eval(code, test_env) mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, clusterInit = cl) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { mySBM_missSBM$doVEM() skip("On CRAN") } expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), else if (!new_expectations && skip_on_empty) { 0.1) skip_empty() expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), } 0.95)}, expectation = handle_expectation, packageNotFoundError = function(e) { expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.01) if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean), 0.1) }}, snapshot_on_cran = function(cnd) { expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") 0.2)}, skip = handle_skip, warning = handle_warning, message = handle_message, expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), error = handle_error, interrupt = handle_interrupt) 0.95)
})
33: 30: doTryCatch(return(expr), name, parentenv, handler)eval(code, test_env)
34: 31: tryCatchOne(expr, names, parentenv, handlers[[1L]])eval(code, test_env)
35: 32: withCallingHandlers({tryCatchList(expr, classes, parentenv, handlers)
eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations36: tryCatch(withCallingHandlers({ if (snapshot_skipped) { eval(code, test_env) 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) { }}, 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()) { } 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")}, 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,
37: error = handle_error, interrupt = handle_interrupt)
doWithOneRestart(return(expr), restart)
33: 38: doTryCatch(return(expr), name, parentenv, handler)withOneRestart(expr, restarts[[1L]])
39: withRestarts(tryCatch(withCallingHandlers({34: eval(code, test_env)tryCatchOne(expr, names, parentenv, handlers[[1L]]) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) { skip("On CRAN")35: }tryCatchList(expr, classes, parentenv, handlers) else if (!new_expectations && skip_on_empty) {
36: skip_empty()tryCatch(withCallingHandlers({ eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip("On CRAN") skip(paste0("{", e$package, "} is not installed.")) } } else if (!new_expectations && skip_on_empty) {}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE skip_empty() invokeRestart("muffle_cran_snapshot") }}, skip = handle_skip, warning = handle_warning, message = handle_message, }, expectation = handle_expectation, packageNotFoundError = function(e) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal), if (on_cran()) { end_test = function() { skip(paste0("{", e$package, "} is not installed.")) }) }
}, snapshot_on_cran = function(cnd) {40: test_code(code = exprs, env = env, reporter = get_reporter() %||% snapshot_skipped <<- TRUE StopReporter$new())
invokeRestart("muffle_cran_snapshot")41: }, skip = handle_skip, warning = handle_warning, message = handle_message, source_file(path, env = env(env), desc = desc, shuffle = shuffle, error = handle_error, interrupt = handle_interrupt), error = handle_fatal) error_call = error_call)
37: 42: FUN(X[[i]], ...)doWithOneRestart(return(expr), restart)
43: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, 38: error_call = error_call)
withOneRestart(expr, restarts[[1L]])44:
doTryCatch(return(expr), name, parentenv, handler)
39: 45: tryCatchOne(expr, names, parentenv, handlers[[1L]])withRestarts(tryCatch(withCallingHandlers({
eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations46: if (snapshot_skipped) {tryCatchList(expr, classes, parentenv, handlers)
skip("On CRAN")47: }tryCatch(code, testthat_abort_reporter = function(cnd) { else if (!new_expectations && skip_on_empty) { cat(conditionMessage(cnd), "\n") skip_empty() } NULL}, expectation = handle_expectation, packageNotFoundError = function(e) {}) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))48: }with_reporter(reporters$multi, lapply(test_paths, test_one_file, }, snapshot_on_cran = function(cnd) { env = env, desc = desc, shuffle = shuffle, error_call = error_call)) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")49: test_files_serial(test_dir = test_dir, test_package = test_package, }, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, end_test = function() { desc = desc, load_package = load_package, shuffle = shuffle, })
error_call = error_call)
40: 50: test_files(test_dir = path, test_paths = test_paths, test_package = package, test_code(code = exprs, env = env, reporter = get_reporter() %||% reporter = reporter, load_helpers = load_helpers, env = env, StopReporter$new()) stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
load_package = load_package, parallel = parallel, shuffle = shuffle)41:
source_file(path, env = env(env), desc = desc, shuffle = shuffle, 51: error_call = error_call)test_dir("testthat", package = package, reporter = reporter,
..., load_package = "installed")42: FUN(X[[i]], ...)
52: test_check("missSBM")43:
An irrecoverable exception occurred. R is aborting now ...
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