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