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