Last updated on 2026-09-24 05:04:09 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 | 58.00 | 245.06 | 303.06 | 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 | 20.00 | 106.00 | 126.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/29s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(missSBM)
>
> test_check("missSBM")
Adjusting Variational EM for Stochastic Block Model
Dyads are distributed according to a 'undirected' SBM.
Imputation assumes a 'covar-dyad' network-sampling process
iteration #: 2
iteration #: 3
Adjusting Variational EM for Stochastic Block Model
Dyads are distributed according to a 'undirected' SBM.
Imputation assumes a 'dyad' network-sampling process
iteration #: 2
iteration #: 3
Adjusting Variational EM for Stochastic Block Model
Dyads are distributed according to a 'undirected' SBM.
Imputation assumes a 'covar-node' network-sampling process
iteration #: 2
iteration #: 3
iteration #: 4
iteration #: 5
Adjusting Variational EM for Stochastic Block Model
Dyads are distributed according to a 'undirected' SBM.
Imputation assumes a 'node' network-sampling process
iteration #: 2
iteration #: 3
iteration #: 4
Tested sampling:
- dyad
- node
- double-standard
- block-node
- block-dyad
Adjusting Variational EM for Stochastic Block Model
Imputation assumes a 'dyad' network-sampling process
Initialization of 3 model(s).
Tested sampling:
- dyad
- node
- double-standard
- block-node
- block-dyad
- degreeTested sampling:
- dyad
- node
- double-standard
- block-node
- block-dyad
- degree
sampling: dyad new better on connectivity
node
double-standard
block-node new better on mixture
Adjusting Variational EM for Stochastic Block Model
iteration #: 2
iteration #: 3
iteration #: 4
iteration #: 5
iteration #: 6
iteration #: 7
iteration #: 8
iteration #: 9
iteration #: 10
iteration #: 11
iteration #: 12
iteration #: 13
iteration #: 14
iteration #: 15
iteration #: 16
iteration #: 17
iteration #: 18
iteration #: 19
iteration #: 20
iteration #: 21
iteration #: 22
iteration #: 23
iteration #: 24
iteration #: 25
iteration #: 26
iteration #: 27
iteration #: 28
iteration #: 29
iteration #: 30
iteration #: 31
iteration #: 32
iteration #: 33
iteration #: 34
Adjusting Variational EM for Stochastic Block Model
Dyads are distributed according to a 'undirected' SBM.
Imputation assumes a 'node' network-sampling process
iteration #: 2
iteration #: 3
iteration #: 4
iteration #: 5
iteration #: 6
iteration #: 7
iteration #: 8
iteration #: 9
iteration #: 10
iteration #: 11
iteration #: 12
iteration #: 13
iteration #: 14
iteration #: 15
iteration #: 16
iteration #: 17
iteration #: 18
iteration #: 19
iteration #: 20
iteration #: 21
iteration #: 22
iteration #: 23
iteration #: 24
iteration #: 25
iteration #: 26
iteration #: 27
iteration #: 28
iteration #: 29
iteration #: 30
iteration #: 31
iteration #: 32
iteration #: 33
iteration #: 34
Adjusting Variational EM for Stochastic Block Model
Imputation assumes a 'node' network-sampling process
Initialization of 1 model(s).
Performing VEM inference
Model with 3 blocks.
Adjusting Variational EM for Stochastic Block Model
Imputation assumes a 'dyad' network-sampling process
Initialization of 2 model(s).
Performing VEM inference
Model with 2 blocks.
Model with 1 blocks.
Polishing (node-swap)
Looking for better solutions
Pass 1 Going forward +
Pass 1 Going backward +
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE)
2: FUN(X[[i]], ...)
3: lapply(X = S, FUN = FUN, ...)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
8: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
10: FUN(X[[i]], ...)
11: lapply(seq_len(cores), inner.do)
12: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE)
13: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, verbose = (verbosity > 4))
14: .self$do_with_inits(inits, Q, reinitialization_effort)
15: .self$estim_ascend(reinitialization_effort, changing_effort)
16: private$BMobject$estimate()
17: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
18:
Traceback:
eval(code, test_env) 1:
dispatcher(membership_name, membership_init$to_cc(), model_name, 19: .self$network_to_cc(), TRUE)eval(code, test_env)
2: 20: FUN(X[[i]], ...)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()
}}, expectation = handle_expectation, packageNotFoundError = function(e) { 5: if (on_cran()) {tryCatchOne(expr, names, parentenv, handlers[[1L]])
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) { call <- conditionCall(e)}, skip = handle_skip, warning = handle_warning, message = handle_message, if (!is.null(call)) { error = handle_error, interrupt = handle_interrupt) if (identical(call[[1L]], quote(doTryCatch)))
call <- sys.call(-4L)21: doTryCatch(return(expr), name, parentenv, handler)
22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ")23: LONG <- 75LtryCatchList(expr, classes, parentenv, handlers) sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")
24: if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], tryCatch(withCallingHandlers({ type = "b") eval(code, test_env) if (w > LONG) new_expectations <- the$test_expectations > starting_expectations prefix <- paste0(prefix, "\n ") if (snapshot_skipped) { } skip("On CRAN") else prefix <- "Error : " } msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) else if (!new_expectations && skip_on_empty) { if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) skip_empty() .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) {
8: snapshot_skipped <<- TRUEtry(lapply(X = S, FUN = FUN, ...), silent = TRUE) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
10: FUN(X[[i]], ...)
25: 11: doWithOneRestart(return(expr), restart)lapply(seq_len(cores), inner.do)
12: 26: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, withOneRestart(expr, restarts[[1L]])
mc.silent = TRUE)27:
withRestarts(tryCatch(withCallingHandlers({13: eval(code, test_env)parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, new_expectations <- the$test_expectations > starting_expectations verbose = (verbosity > 4)) if (snapshot_skipped) {
skip("On CRAN")14: }.self$do_with_inits(inits, Q, reinitialization_effort) else if (!new_expectations && skip_on_empty) {
skip_empty()15: }.self$estim_ascend(reinitialization_effort, changing_effort)}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {16: skip(paste0("{", e$package, "} is not installed."))private$BMobject$estimate() }
}, snapshot_on_cran = function(cnd) {17: snapshot_skipped <<- TRUEmySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 18: error = handle_error, interrupt = handle_interrupt), error = handle_fatal), eval(code, test_env) end_test = function() {
})19:
eval(code, test_env)28:
test_code(code, parent.frame())20:
withCallingHandlers({29: eval(code, test_env)test_that("SimpleSBM_fit 'Bernoulli' model, undirected, one covariate", new_expectations <- the$test_expectations > starting_expectations { if (snapshot_skipped) { sampler_undirected_cov$rNetwork(store = TRUE) skip("On CRAN") } else if (!new_expectations && skip_on_empty) { mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData, skip_empty() "bernoulli", FALSE, covarList = covarList_undirected) } mySBM_sbm$optimize(estimOptions = list(verbosity = 0, }, expectation = handle_expectation, packageNotFoundError = function(e) { plot = FALSE)) mySBM_sbm$setModel(Q) if (on_cran()) { net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData, skip(paste0("{", e$package, "} is not installed.")) covariates = covarList_undirected) } cls <- net$clustering(1:(2 * Q))}, snapshot_on_cran = function(cnd) { cl <- cls[[Q]] snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, }, skip = handle_skip, warning = handle_warning, message = handle_message, clusterInit = cl, covarList = covarList_undirected) error = handle_error, interrupt = handle_interrupt)
mySBM_missSBM$doVEM()21: expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), doTryCatch(return(expr), name, parentenv, handler) 0.05)
expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 22: 0.8)tryCatchOne(expr, names, parentenv, handlers[[1L]]) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik),
0.01)23: expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_cov$connectParam$mean), 0.1)tryCatchList(expr, classes, parentenv, handlers)
expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam), 24: tryCatch(withCallingHandlers({ 0.1) eval(code, test_env) expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_cov$memberships), 0.85) new_expectations <- the$test_expectations > starting_expectations }) 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: }}, snapshot_on_cran = function(cnd) {withCallingHandlers({ eval(code, test_env) snapshot_skipped <<- TRUE new_expectations <- the$test_expectations > starting_expectations invokeRestart("muffle_cran_snapshot") if (snapshot_skipped) { skip("On CRAN")}, skip = handle_skip, warning = handle_warning, message = handle_message, } error = handle_error, interrupt = handle_interrupt), error = handle_fatal) else if (!new_expectations && skip_on_empty) {
skip_empty()25: }doWithOneRestart(return(expr), restart)}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {26: skip(paste0("{", e$package, "} is not installed."))withOneRestart(expr, restarts[[1L]]) }
}, snapshot_on_cran = function(cnd) {27: snapshot_skipped <<- TRUEwithRestarts(tryCatch(withCallingHandlers({ invokeRestart("muffle_cran_snapshot") eval(code, test_env)}, skip = handle_skip, warning = handle_warning, message = handle_message, new_expectations <- the$test_expectations > starting_expectations error = handle_error, interrupt = handle_interrupt) if (snapshot_skipped) {
skip("On CRAN")33: }doTryCatch(return(expr), name, parentenv, handler) else if (!new_expectations && skip_on_empty) {
skip_empty()34: }tryCatchOne(expr, names, parentenv, handlers[[1L]])}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {35: skip(paste0("{", e$package, "} is not installed."))tryCatchList(expr, classes, parentenv, handlers) }
}, snapshot_on_cran = function(cnd) {36: snapshot_skipped <<- TRUEtryCatch(withCallingHandlers({ invokeRestart("muffle_cran_snapshot") eval(code, test_env)}, skip = handle_skip, warning = handle_warning, message = handle_message, new_expectations <- the$test_expectations > starting_expectations error = handle_error, interrupt = handle_interrupt), error = handle_fatal), if (snapshot_skipped) { end_test = function() { skip("On CRAN") }) }
else if (!new_expectations && skip_on_empty) { skip_empty()28: }test_code(code, parent.frame())}, expectation = handle_expectation, packageNotFoundError = function(e) {
29: if (on_cran()) {test_that("SimpleSBM_fit 'Bernoulli' model, undirected, one covariate", skip(paste0("{", e$package, "} is not installed.")) { } sampler_undirected_cov$rNetwork(store = TRUE)}, snapshot_on_cran = function(cnd) { mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData, snapshot_skipped <<- TRUE "bernoulli", FALSE, covarList = covarList_undirected) invokeRestart("muffle_cran_snapshot") mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))}, skip = handle_skip, warning = handle_warning, message = handle_message, mySBM_sbm$setModel(Q) error = handle_error, interrupt = handle_interrupt), error = handle_fatal) net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData,
covariates = covarList_undirected)37: cls <- net$clustering(1:(2 * Q))doWithOneRestart(return(expr), restart) cl <- cls[[Q]]
mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, 38: clusterInit = cl, covarList = covarList_undirected) mySBM_missSBM$doVEM() 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), 0.01) eval(code, test_env) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_cov$connectParam$mean), new_expectations <- the$test_expectations > starting_expectations 0.1) if (snapshot_skipped) { expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam), skip("On CRAN") 0.1) } expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_cov$memberships), else if (!new_expectations && skip_on_empty) { 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")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 43: error = handle_error, interrupt = handle_interrupt)lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle,
error_call = error_call)33:
doTryCatch(return(expr), name, parentenv, handler)44:
doTryCatch(return(expr), name, parentenv, handler)34:
tryCatchOne(expr, names, parentenv, handlers[[1L]])
45: 35: tryCatchOne(expr, names, parentenv, handlers[[1L]])tryCatchList(expr, classes, parentenv, handlers)
46: 36: tryCatchList(expr, classes, parentenv, handlers)tryCatch(withCallingHandlers({
eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations47: if (snapshot_skipped) {tryCatch(code, testthat_abort_reporter = function(cnd) { skip("On CRAN") cat(conditionMessage(cnd), "\n") NULL }}) else if (!new_expectations && skip_on_empty) { skip_empty() }
}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {48: skip(paste0("{", e$package, "} is not installed."))with_reporter(reporters$multi, lapply(test_paths, test_one_file, } env = env, desc = desc, shuffle = shuffle, error_call = error_call))}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE49: invokeRestart("muffle_cran_snapshot")test_files_serial(test_dir = test_dir, test_package = test_package, }, skip = handle_skip, warning = handle_warning, message = handle_message, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, error = handle_error, interrupt = handle_interrupt), error = handle_fatal) env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
desc = desc, load_package = load_package, shuffle = shuffle, 37: error_call = error_call)doWithOneRestart(return(expr), restart)
50:
test_files(test_dir = path, test_paths = test_paths, test_package = package, 38: withOneRestart(expr, restarts[[1L]]) reporter = reporter, load_helpers = load_helpers, env = env,
stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 39: load_package = load_package, parallel = parallel, shuffle = shuffle)withRestarts(tryCatch(withCallingHandlers({
eval(code, test_env)51: new_expectations <- the$test_expectations > starting_expectationstest_dir("testthat", package = package, reporter = reporter, if (snapshot_skipped) { ..., load_package = "installed") skip("On CRAN")
}52: else if (!new_expectations && skip_on_empty) {test_check("missSBM") skip_empty()
}An irrecoverable exception occurred. R is aborting now ...
}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() { })
40: test_code(code = exprs, env = env, reporter = get_reporter() %||% StopReporter$new())
41: source_file(path, env = env(env), desc = desc, shuffle = shuffle, error_call = error_call)
42: FUN(X[[i]], ...)
43: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call)
44: doTryCatch(return(expr), name, parentenv, handler)
45: tryCatchOne(expr, names, parentenv, handlers[[1L]])
46: tryCatchList(expr, classes, parentenv, handlers)
47: tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n") NULL})
48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call))
49: test_files_serial(test_dir = test_dir, test_package = test_package, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, desc = desc, load_package = load_package, shuffle = shuffle, error_call = error_call)
50: test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, load_package = load_package, parallel = parallel, shuffle = shuffle)
51: test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed")
52: test_check("missSBM")
An irrecoverable exception occurred. R is aborting now ...
Saving _problems/test-sbm-bernoulli-with-covariates-16.R
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE)
2: FUN(X[[i]], ...)
3: lapply(X = S, FUN = FUN, ...)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
8: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
10: FUN(X[[i]], ...)
11: lapply(seq_len(cores), inner.do)
12: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE)
Traceback:
13: 1: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, dispatcher(membership_name, membership_init$to_cc(), model_name, verbose = (verbosity > 4)) .self$network_to_cc(), TRUE)
14: 2: .self$do_with_inits(inits, Q, reinitialization_effort)FUN(X[[i]], ...)
15: 3: .self$estim_ascend(reinitialization_effort, changing_effort)lapply(X = S, FUN = FUN, ...)
16: 4: private$BMobject$estimate()doTryCatch(return(expr), name, parentenv, handler)
17: 5: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))tryCatchOne(expr, names, parentenv, handlers[[1L]])
18:
eval(code, test_env) 6:
tryCatchList(expr, classes, parentenv, handlers)19:
eval(code, test_env) 7:
tryCatch(expr, error = function(e) {20: call <- conditionCall(e)withCallingHandlers({ if (!is.null(call)) { eval(code, test_env) if (identical(call[[1L]], quote(doTryCatch))) new_expectations <- the$test_expectations > starting_expectations call <- sys.call(-4L) if (snapshot_skipped) { dcall <- deparse(call, nlines = 1L) skip("On CRAN") prefix <- paste("Error in", dcall, ": ") } LONG <- 75L else if (!new_expectations && skip_on_empty) { sm <- strsplit(conditionMessage(e), "\n")[[1L]] skip_empty() w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") } if (is.na(w)) }, expectation = handle_expectation, packageNotFoundError = function(e) { w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], if (on_cran()) { type = "b") skip(paste0("{", e$package, "} is not installed.")) if (w > LONG) } prefix <- paste0(prefix, "\n ")}, snapshot_on_cran = function(cnd) { } snapshot_skipped <<- TRUE else prefix <- "Error : " invokeRestart("muffle_cran_snapshot") msg <- paste0(prefix, conditionMessage(e), "\n")}, skip = handle_skip, warning = handle_warning, message = handle_message, .Internal(seterrmessage(msg[1L])) error = handle_error, interrupt = handle_interrupt) if (!silent && isTRUE(getOption("show.error.messages"))) {
cat(msg, file = outFile)21: .Internal(printDeferredWarnings())doTryCatch(return(expr), name, parentenv, handler) }
invisible(structure(msg, class = "try-error", condition = e))22: })tryCatchOne(expr, names, parentenv, handlers[[1L]])
8: 23: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)tryCatchList(expr, classes, parentenv, handlers)
24: 9: tryCatch(withCallingHandlers({sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) eval(code, test_env)
10: new_expectations <- the$test_expectations > starting_expectationsFUN(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")}, skip = handle_skip, warning = handle_warning, message = handle_message, 14: error = handle_error, interrupt = handle_interrupt), error = handle_fatal).self$do_with_inits(inits, Q, reinitialization_effort)
25: 15: doWithOneRestart(return(expr), restart).self$estim_ascend(reinitialization_effort, changing_effort)
26: withOneRestart(expr, restarts[[1L]])16:
private$BMobject$estimate()27:
withRestarts(tryCatch(withCallingHandlers({17: eval(code, test_env)mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {18: skip("On CRAN")eval(code, test_env) }
else if (!new_expectations && skip_on_empty) {19: skip_empty()eval(code, test_env) }
}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {20: skip(paste0("{", e$package, "} is not installed."))withCallingHandlers({ } eval(code, test_env)}, snapshot_on_cran = function(cnd) { new_expectations <- the$test_expectations > starting_expectations snapshot_skipped <<- TRUE if (snapshot_skipped) { invokeRestart("muffle_cran_snapshot") skip("On CRAN")}, skip = handle_skip, warning = handle_warning, message = handle_message, } error = handle_error, interrupt = handle_interrupt), error = handle_fatal), else if (!new_expectations && skip_on_empty) { 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: }, snapshot_on_cran = function(cnd) {test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", snapshot_skipped <<- TRUE { invokeRestart("muffle_cran_snapshot") sampler_directed_cov$rNetwork(store = TRUE)}, skip = handle_skip, warning = handle_warning, message = handle_message, mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, error = handle_error, interrupt = handle_interrupt) "bernoulli", TRUE, covarList = covarList_directed)
mySBM_sbm$optimize(estimOptions = list(verbosity = 0, 21: plot = FALSE))doTryCatch(return(expr), name, parentenv, handler) mySBM_sbm$setModel(Q)
net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, 22: covariates = covarList_directed)tryCatchOne(expr, names, parentenv, handlers[[1L]]) cls <- net$clustering(1:(2 * Q))
cl <- cls[[Q]]23: tryCatchList(expr, classes, parentenv, handlers) mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net,
clusterInit = cl, covarList = covarList_directed)24: mySBM_missSBM$doVEM(trace = TRUE)tryCatch(withCallingHandlers({ expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.1) 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.05) } expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), else if (!new_expectations && skip_on_empty) { 0.1) skip_empty() expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), } 0.85) })}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {30: skip(paste0("{", e$package, "} is not installed."))eval(code, test_env) }
}, 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: }withOneRestart(expr, restarts[[1L]]) else if (!new_expectations && skip_on_empty) {
skip_empty()27: }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) {33: if (on_cran()) {doTryCatch(return(expr), name, parentenv, handler) skip(paste0("{", e$package, "} is not installed."))
}34: }, snapshot_on_cran = function(cnd) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")35: }, 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() {36: })tryCatch(withCallingHandlers({
eval(code, test_env)28: new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {test_code(code, parent.frame())
skip("On CRAN")29: }test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", else if (!new_expectations && skip_on_empty) { { skip_empty() sampler_directed_cov$rNetwork(store = TRUE) } mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, }, expectation = handle_expectation, packageNotFoundError = function(e) { "bernoulli", TRUE, covarList = covarList_directed) if (on_cran()) { mySBM_sbm$optimize(estimOptions = list(verbosity = 0, skip(paste0("{", e$package, "} is not installed.")) plot = FALSE)) } mySBM_sbm$setModel(Q)}, snapshot_on_cran = function(cnd) { net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, snapshot_skipped <<- TRUE covariates = covarList_directed) invokeRestart("muffle_cran_snapshot") cls <- net$clustering(1:(2 * Q))}, skip = handle_skip, warning = handle_warning, message = handle_message, cl <- cls[[Q]] error = handle_error, interrupt = handle_interrupt), error = handle_fatal) mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net,
clusterInit = cl, covarList = covarList_directed)37: doWithOneRestart(return(expr), restart) mySBM_missSBM$doVEM(trace = TRUE)
expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 38: 0.1)withOneRestart(expr, restarts[[1L]]) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships),
0.8)39: expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), withRestarts(tryCatch(withCallingHandlers({ 0.05) eval(code, test_env) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), new_expectations <- the$test_expectations > starting_expectations 0.1) if (snapshot_skipped) { expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), skip("On CRAN") 0.85) } }) 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 end_test = function() { if (snapshot_skipped) { }) skip("On CRAN")
}40: else if (!new_expectations && skip_on_empty) {test_code(code = exprs, env = env, reporter = get_reporter() %||% skip_empty() StopReporter$new()) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {41: if (on_cran()) {source_file(path, env = env(env), desc = desc, shuffle = shuffle, skip(paste0("{", e$package, "} is not installed.")) error_call = error_call) }}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE42: invokeRestart("muffle_cran_snapshot")FUN(X[[i]], ...)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt)43:
lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, 33: error_call = error_call)doTryCatch(return(expr), name, parentenv, handler)
44: 34: doTryCatch(return(expr), name, parentenv, handler)tryCatchOne(expr, names, parentenv, handlers[[1L]])
45: 35: tryCatchOne(expr, names, parentenv, handlers[[1L]])tryCatchList(expr, classes, parentenv, handlers)
46: 36: tryCatchList(expr, classes, parentenv, handlers)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) {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:
withOneRestart(expr, restarts[[1L]])51:
test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed")39:
withRestarts(tryCatch(withCallingHandlers({52: eval(code, test_env) new_expectations <- the$test_expectations > starting_expectationstest_check("missSBM") if (snapshot_skipped) {
skip("On CRAN")An irrecoverable exception occurred. R is aborting now ...
} else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() { })
40: test_code(code = exprs, env = env, reporter = get_reporter() %||% StopReporter$new())
41: source_file(path, env = env(env), desc = desc, shuffle = shuffle, error_call = error_call)
42: FUN(X[[i]], ...)
43: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call)
44: doTryCatch(return(expr), name, parentenv, handler)
45: tryCatchOne(expr, names, parentenv, handlers[[1L]])
46: tryCatchList(expr, classes, parentenv, handlers)
47: tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n") NULL})
48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call))
49: test_files_serial(test_dir = test_dir, test_package = test_package, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, desc = desc, load_package = load_package, shuffle = shuffle, error_call = error_call)
50: test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, load_package = load_package, parallel = parallel, shuffle = shuffle)
51: test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed")
52: test_check("missSBM")
An irrecoverable exception occurred. R is aborting now ...
Saving _problems/test-sbm-bernoulli-with-covariates-46.R
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE)
2: FUN(X[[i]], ...)
3: lapply(X = S, FUN = FUN, ...)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ")
Traceback:
1: LONG <- 75Ldispatcher(membership_name, membership_init$to_cc(), model_name, sm <- strsplit(conditionMessage(e), "\n")[[1L]] .self$network_to_cc(), TRUE) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")
if (is.na(w)) 2: w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], FUN(X[[i]], ...) type = "b")
if (w > LONG) 3: prefix <- paste0(prefix, "\n ")lapply(X = S, FUN = FUN, ...) }
else prefix <- "Error : " 4: msg <- paste0(prefix, conditionMessage(e), "\n")doTryCatch(return(expr), name, parentenv, handler)
.Internal(seterrmessage(msg[1L])) 5: if (!silent && isTRUE(getOption("show.error.messages"))) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) cat(msg, file = outFile)
6: .Internal(printDeferredWarnings())tryCatchList(expr, classes, parentenv, handlers)
} 7: invisible(structure(msg, class = "try-error", condition = e))tryCatch(expr, error = function(e) {}) call <- conditionCall(e)
if (!is.null(call)) { 8: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
if (identical(call[[1L]], quote(doTryCatch))) 9: call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L)sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) prefix <- paste("Error in", dcall, ": ")
LONG <- 75L10: sm <- strsplit(conditionMessage(e), "\n")[[1L]]FUN(X[[i]], ...) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")
if (is.na(w)) 11: w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], lapply(seq_len(cores), inner.do) type = "b")
if (w > LONG) prefix <- paste0(prefix, "\n ")12: }parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, else prefix <- "Error : " mc.silent = TRUE) msg <- paste0(prefix, conditionMessage(e), "\n")
13: .Internal(seterrmessage(msg[1L]))parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, verbose = (verbosity > 4)) if (!silent && isTRUE(getOption("show.error.messages"))) {
14: cat(msg, file = outFile).self$do_with_inits(inits, Q, reinitialization_effort) .Internal(printDeferredWarnings())
} invisible(structure(msg, class = "try-error", condition = e))15: }).self$estim_ascend(reinitialization_effort, changing_effort)
16: 8: private$BMobject$estimate()try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
17: 9: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
18: 10: eval(code, test_env)FUN(X[[i]], ...)
19:
eval(code, test_env)11:
20: lapply(seq_len(cores), inner.do)
withCallingHandlers({12: eval(code, test_env)parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, new_expectations <- the$test_expectations > starting_expectations mc.silent = TRUE) if (snapshot_skipped) {
13: skip("On CRAN") }parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, else if (!new_expectations && skip_on_empty) { verbose = (verbosity > 4))
skip_empty()14: }.self$do_with_inits(inits, Q, reinitialization_effort)
}, expectation = handle_expectation, packageNotFoundError = function(e) {15: if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")).self$estim_ascend(reinitialization_effort, changing_effort) }
}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE16: invokeRestart("muffle_cran_snapshot")private$BMobject$estimate()}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt)
17: 21: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))doTryCatch(return(expr), name, parentenv, handler)
18: 22: tryCatchOne(expr, names, parentenv, handlers[[1L]])eval(code, test_env)
23: 19: tryCatchList(expr, classes, parentenv, handlers)eval(code, test_env)
24: 20: 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_skipped <<- TRUE}, snapshot_on_cran = function(cnd) { 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)
25: 21: doWithOneRestart(return(expr), restart)doTryCatch(return(expr), name, parentenv, handler)
26: 22: tryCatchOne(expr, names, parentenv, handlers[[1L]])withOneRestart(expr, restarts[[1L]])
23: 27: tryCatchList(expr, classes, parentenv, handlers)withRestarts(tryCatch(withCallingHandlers({
eval(code, test_env)24: 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) { } 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()) { } 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, 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), error = handle_fatal)test_code(code, parent.frame())
25:
doWithOneRestart(return(expr), restart)29:
test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate", {26: sampler_undirected_nocov$rNetwork(store = TRUE)withOneRestart(expr, restarts[[1L]])
mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, 27: "bernoulli", FALSE)withRestarts(tryCatch(withCallingHandlers({ mySBM_sbm$optimize(estimOptions = list(verbosity = 0, eval(code, test_env) plot = FALSE)) new_expectations <- the$test_expectations > starting_expectations mySBM_sbm$setModel(3) if (snapshot_skipped) { net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData) skip("On CRAN") cl <- net$clustering(3)[[1]] } mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, else if (!new_expectations && skip_on_empty) { skip_empty() clusterInit = cl) } mySBM_missSBM$doVEM()}, expectation = handle_expectation, packageNotFoundError = function(e) { expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.05) if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), } 0.95)}, snapshot_on_cran = function(cnd) { expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), snapshot_skipped <<- TRUE 0.01) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean), invokeRestart("muffle_cran_snapshot") 0.05)}, skip = handle_skip, warning = handle_warning, message = handle_message, expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships), error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 0.95) end_test = function() { })
})
30: 28: eval(code, test_env)test_code(code, parent.frame())
29: 31: eval(code, test_env)test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate", {
sampler_undirected_nocov$rNetwork(store = TRUE)32: mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, withCallingHandlers({ "bernoulli", FALSE) eval(code, test_env) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, new_expectations <- the$test_expectations > starting_expectations plot = FALSE)) if (snapshot_skipped) { mySBM_sbm$setModel(3) skip("On CRAN") } net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData) cl <- net$clustering(3)[[1]] else if (!new_expectations && skip_on_empty) { mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, skip_empty() clusterInit = cl) }}, expectation = handle_expectation, packageNotFoundError = function(e) { mySBM_missSBM$doVEM() if (on_cran()) { expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.05) skip(paste0("{", e$package, "} is not installed.")) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), } 0.95) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), }, snapshot_on_cran = function(cnd) { 0.01) snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean), }, skip = handle_skip, warning = handle_warning, message = handle_message, 0.05) error = handle_error, interrupt = handle_interrupt) expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships), 0.95)
33: })doTryCatch(return(expr), name, parentenv, handler)
30: 34: eval(code, test_env)tryCatchOne(expr, names, parentenv, handlers[[1L]])
31: 35: eval(code, test_env)
tryCatchList(expr, classes, parentenv, handlers)32:
withCallingHandlers({36: eval(code, test_env) new_expectations <- the$test_expectations > starting_expectationstryCatch(withCallingHandlers({ if (snapshot_skipped) { skip("On CRAN") eval(code, test_env) } else if (!new_expectations && skip_on_empty) { new_expectations <- the$test_expectations > starting_expectations skip_empty() } if (snapshot_skipped) {}, expectation = handle_expectation, packageNotFoundError = function(e) { skip("On CRAN") if (on_cran()) { } skip(paste0("{", e$package, "} is not installed.")) else if (!new_expectations && skip_on_empty) { skip_empty() } }}, snapshot_on_cran = function(cnd) {}, expectation = handle_expectation, packageNotFoundError = function(e) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") if (on_cran()) {}, skip = handle_skip, warning = handle_warning, message = handle_message, skip(paste0("{", e$package, "} is not installed.")) error = handle_error, interrupt = handle_interrupt) }
}, snapshot_on_cran = function(cnd) {33: snapshot_skipped <<- TRUEdoTryCatch(return(expr), name, parentenv, handler) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 34: error = handle_error, interrupt = handle_interrupt), error = handle_fatal)tryCatchOne(expr, names, parentenv, handlers[[1L]])
37: 35: doWithOneRestart(return(expr), restart)tryCatchList(expr, classes, parentenv, handlers)
38: withOneRestart(expr, restarts[[1L]])36: tryCatch(withCallingHandlers({
eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations39: if (snapshot_skipped) {withRestarts(tryCatch(withCallingHandlers({ 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) { if (on_cran()) { snapshot_skipped <<- TRUE skip(paste0("{", e$package, "} is not installed.")) 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")37: }, skip = handle_skip, warning = handle_warning, message = handle_message, doWithOneRestart(return(expr), restart) error = handle_error, interrupt = handle_interrupt), error = handle_fatal),
end_test = function() {38: })withOneRestart(expr, restarts[[1L]])
39: 40: withRestarts(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) { skip("On CRAN") }41: else if (!new_expectations && skip_on_empty) {source_file(path, env = env(env), desc = desc, shuffle = shuffle, error_call = error_call) skip_empty()
}42: }, expectation = handle_expectation, packageNotFoundError = function(e) {FUN(X[[i]], ...) if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))
43: }lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, }, snapshot_on_cran = function(cnd) { error_call = error_call) snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 44: error = handle_error, interrupt = handle_interrupt), error = handle_fatal), doTryCatch(return(expr), name, parentenv, handler) end_test = function() {
})
45: 40: test_code(code = exprs, env = env, reporter = get_reporter() %||% tryCatchOne(expr, names, parentenv, handlers[[1L]])
StopReporter$new())
46: 41: tryCatchList(expr, classes, parentenv, handlers)
source_file(path, env = env(env), desc = desc, shuffle = shuffle, 47: error_call = error_call)tryCatch(code, testthat_abort_reporter = function(cnd) {
cat(conditionMessage(cnd), "\n")42: NULLFUN(X[[i]], ...)})
43:
lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, 48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, error_call = error_call)
env = env, desc = desc, shuffle = shuffle, error_call = error_call))
44: 49: doTryCatch(return(expr), name, parentenv, handler)test_files_serial(test_dir = test_dir, test_package = test_package,
test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, 45: env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, desc = desc, load_package = load_package, shuffle = shuffle, tryCatchOne(expr, names, parentenv, handlers[[1L]])
error_call = error_call)
46: 50: tryCatchList(expr, classes, parentenv, handlers)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, 47: load_package = load_package, parallel = parallel, shuffle = shuffle)tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n")
NULL51: })test_dir("testthat", package = package, reporter = reporter,
..., load_package = "installed")48:
with_reporter(reporters$multi, lapply(test_paths, test_one_file, 52: env = env, desc = desc, shuffle = shuffle, error_call = error_call))test_check("missSBM")
49:
test_files_serial(test_dir = test_dir, test_package = test_package, An irrecoverable exception occurred. R is aborting now ...
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:
Traceback:
1: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE)dispatcher(membership_name, membership_init$to_cc(), model_name,
2: .self$network_to_cc(), TRUE)FUN(X[[i]], ...)
2:
FUN(X[[i]], ...) 3: lapply(X = S, FUN = FUN, ...)
3: 4: lapply(X = S, FUN = FUN, ...)doTryCatch(return(expr), name, parentenv, handler)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6:
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatchList(expr, classes, parentenv, handlers)tryCatch(expr, error = function(e) { call <- conditionCall(e)
if (!is.null(call)) { 7: tryCatch(expr, error = function(e) { if (identical(call[[1L]], quote(doTryCatch))) call <- conditionCall(e) call <- sys.call(-4L) if (!is.null(call)) { dcall <- deparse(call, nlines = 1L) if (identical(call[[1L]], quote(doTryCatch))) prefix <- paste("Error in", dcall, ": ") LONG <- 75L call <- sys.call(-4L) sm <- strsplit(conditionMessage(e), "\n")[[1L]] dcall <- deparse(call, nlines = 1L) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") prefix <- paste("Error in", dcall, ": ") if (is.na(w)) LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) if (w > LONG) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], prefix <- paste0(prefix, "\n ") type = "b") } if (w > LONG) else prefix <- "Error : " prefix <- paste0(prefix, "\n ") msg <- paste0(prefix, conditionMessage(e), "\n") } .Internal(seterrmessage(msg[1L])) else prefix <- "Error : " if (!silent && isTRUE(getOption("show.error.messages"))) { msg <- paste0(prefix, conditionMessage(e), "\n") cat(msg, file = outFile) .Internal(seterrmessage(msg[1L])) .Internal(printDeferredWarnings()) if (!silent && isTRUE(getOption("show.error.messages"))) { } cat(msg, file = outFile) invisible(structure(msg, class = "try-error", condition = e)) .Internal(printDeferredWarnings())}) }
invisible(structure(msg, class = "try-error", condition = e)) 8: })try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
8: 9: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
9: 10: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))FUN(X[[i]], ...)
10: 11: FUN(X[[i]], ...)lapply(seq_len(cores), inner.do)
11: 12: lapply(seq_len(cores), inner.do)parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE,
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,
verbose = (verbosity > 4))13:
parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, 14: verbose = (verbosity > 4)).self$do_with_inits(inits, Q, reinitialization_effort)
14: 15: .self$do_with_inits(inits, Q, reinitialization_effort).self$estim_ascend(reinitialization_effort, changing_effort)
15: 16: .self$estim_ascend(reinitialization_effort, changing_effort)
16: private$BMobject$estimate()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: 20: 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_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)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt)21:
doTryCatch(return(expr), name, parentenv, handler)21:
doTryCatch(return(expr), name, parentenv, handler)22:
tryCatchOne(expr, names, parentenv, handlers[[1L]])22:
tryCatchOne(expr, names, parentenv, handlers[[1L]])23:
tryCatchList(expr, classes, parentenv, handlers)23:
tryCatchList(expr, classes, parentenv, handlers)24:
tryCatch(withCallingHandlers({24: eval(code, test_env)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}, 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: 25: doWithOneRestart(return(expr), restart)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, no covariate", test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate", { sampler_directed_nocov$rNetwork(store = TRUE) { mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, sampler_directed_nocov$rNetwork(store = TRUE) "bernoulli", TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, mySBM_sbm$optimize(estimOptions = list(verbosity = 0, "bernoulli", TRUE) plot = FALSE)) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, mySBM_sbm$setModel(3) plot = FALSE)) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData) mySBM_sbm$setModel(3) cl <- net$clustering(3)[[1]] net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData) mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, cl <- net$clustering(3)[[1]] clusterInit = cl) mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, mySBM_missSBM$doVEM() clusterInit = cl) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), mySBM_missSBM$doVEM() 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.95) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.95) 0.01) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean), 0.01) 0.1) expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean), 0.2) 0.1) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), 0.95) 0.2) }) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships),
0.95)30: })eval(code, test_env)
30: 31: eval(code, test_env)eval(code, test_env)
31: 32: eval(code, test_env)withCallingHandlers({
eval(code, test_env)32: new_expectations <- the$test_expectations > starting_expectationswithCallingHandlers({ 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) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 33: error = handle_error, interrupt = handle_interrupt)doTryCatch(return(expr), name, parentenv, handler)
33: 34: 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)
new_expectations <- the$test_expectations > starting_expectations36: if (snapshot_skipped) {tryCatch(withCallingHandlers({ skip("On CRAN") 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_empty() skip(paste0("{", e$package, "} is not installed.")) } }}, 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) {
snapshot_skipped <<- TRUE37: invokeRestart("muffle_cran_snapshot")doWithOneRestart(return(expr), restart)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal)38:
withOneRestart(expr, restarts[[1L]])37:
doWithOneRestart(return(expr), restart)39:
withRestarts(tryCatch(withCallingHandlers({38: eval(code, test_env)withOneRestart(expr, restarts[[1L]]) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {39: skip("On CRAN")withRestarts(tryCatch(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, 40: test_code(code = exprs, env = env, reporter = get_reporter() %||% error = handle_error, interrupt = handle_interrupt), error = handle_fatal), StopReporter$new()) end_test = function() {
})41:
source_file(path, env = env(env), desc = desc, shuffle = shuffle, 40: error_call = error_call)test_code(code = exprs, env = env, reporter = get_reporter() %||%
StopReporter$new())42:
41: FUN(X[[i]], ...)source_file(path, env = env(env), desc = desc, shuffle = shuffle,
error_call = error_call)43:
lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, 42: error_call = error_call)FUN(X[[i]], ...)
44: 43: doTryCatch(return(expr), name, parentenv, handler)lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle,
error_call = error_call)45:
tryCatchOne(expr, names, parentenv, handlers[[1L]])44:
doTryCatch(return(expr), name, parentenv, handler)46:
tryCatchList(expr, classes, parentenv, handlers)45:
tryCatchOne(expr, names, parentenv, handlers[[1L]])47:
tryCatch(code, testthat_abort_reporter = function(cnd) {46: cat(conditionMessage(cnd), "\n")tryCatchList(expr, classes, parentenv, handlers) NULL
})47:
tryCatch(code, testthat_abort_reporter = function(cnd) {48: cat(conditionMessage(cnd), "\n") NULLwith_reporter(reporters$multi, lapply(test_paths, test_one_file, }) env = env, desc = desc, shuffle = shuffle, error_call = error_call))
49: 48: test_files_serial(test_dir = test_dir, test_package = test_package, with_reporter(reporters$multi, lapply(test_paths, test_one_file, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, desc = desc, shuffle = shuffle, 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, 49: error_call = error_call)test_files_serial(test_dir = test_dir, test_package = test_package,
test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, 50: env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, test_files(test_dir = path, test_paths = test_paths, test_package = package, desc = desc, load_package = load_package, shuffle = shuffle, reporter = reporter, load_helpers = load_helpers, env = env, error_call = error_call) stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
load_package = load_package, parallel = parallel, shuffle = shuffle)50:
test_files(test_dir = path, test_paths = test_paths, test_package = package, 51: reporter = reporter, load_helpers = load_helpers, env = env, test_dir("testthat", package = package, reporter = reporter, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, ..., load_package = "installed") load_package = load_package, parallel = parallel, shuffle = shuffle)
52: 51: test_check("missSBM")test_dir("testthat", package = package, reporter = reporter,
..., load_package = "installed")An irrecoverable exception occurred. R is aborting now ...
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