Last updated on 2026-10-17 12:50:53 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 | 58.03 | 240.79 | 298.82 | 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 | 95.00 | 449.00 | 544.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 | 98.00 | 358.00 | 456.00 | OK | |
| r-oldrel-macos-arm64 | 1.1.0 | 21.00 | 90.00 | 111.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)
Traceback:
1: 33: dispatcher(membership_name, membership_init$to_cc(), model_name, doTryCatch(return(expr), name, parentenv, handler) .self$network_to_cc(), TRUE)
34: 2: tryCatchOne(expr, names, parentenv, handlers[[1L]])FUN(X[[i]], ...)
35: 3: tryCatchList(expr, classes, parentenv, handlers)lapply(X = S, FUN = FUN, ...)
36: 4: tryCatch(withCallingHandlers({ eval(code, test_env)doTryCatch(return(expr), name, parentenv, handler) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) { 5: skip("On CRAN")tryCatchOne(expr, names, parentenv, handlers[[1L]]) }
else if (!new_expectations && skip_on_empty) { skip_empty() 6: }tryCatchList(expr, classes, parentenv, handlers)}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) { 7: skip(paste0("{", e$package, "} is not installed."))tryCatch(expr, error = function(e) { } call <- conditionCall(e)}, snapshot_on_cran = function(cnd) { if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) snapshot_skipped <<- TRUE call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, prefix <- paste("Error in", dcall, ": ") error = handle_error, interrupt = handle_interrupt), error = handle_fatal) LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]]
w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")37: if (is.na(w)) doWithOneRestart(return(expr), restart) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],
type = "b")38: if (w > LONG) withOneRestart(expr, restarts[[1L]]) prefix <- paste0(prefix, "\n ")
}39: else prefix <- "Error : "withRestarts(tryCatch(withCallingHandlers({ msg <- paste0(prefix, conditionMessage(e), "\n") eval(code, test_env) .Internal(seterrmessage(msg[1L])) new_expectations <- the$test_expectations > starting_expectations if (!silent && isTRUE(getOption("show.error.messages"))) { if (snapshot_skipped) { skip("On CRAN") } cat(msg, file = outFile) else if (!new_expectations && skip_on_empty) { .Internal(printDeferredWarnings()) skip_empty() } }}, expectation = handle_expectation, packageNotFoundError = function(e) { invisible(structure(msg, class = "try-error", condition = e)) if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))}) }
}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE 8: invokeRestart("muffle_cran_snapshot")try(lapply(X = S, FUN = FUN, ...), silent = TRUE)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 9: end_test = function() { })sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
40: 10: test_code(code = exprs, env = env, reporter = get_reporter() %||% FUN(X[[i]], ...) StopReporter$new())
41: 11: source_file(path, env = env(env), desc = desc, shuffle = shuffle, lapply(seq_len(cores), inner.do) error_call = error_call)
12: 42: FUN(X[[i]], ...)parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE,
mc.silent = TRUE)43: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle,
error_call = error_call)13: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores,
verbose = (verbosity > 4))44:
doTryCatch(return(expr), name, parentenv, handler)14:
.self$do_with_inits(inits, Q, reinitialization_effort)45:
tryCatchOne(expr, names, parentenv, handlers[[1L]])15:
.self$estim_ascend(reinitialization_effort, changing_effort)46:
tryCatchList(expr, classes, parentenv, handlers)16:
private$BMobject$estimate()47: tryCatch(code, testthat_abort_reporter = function(cnd) {
cat(conditionMessage(cnd), "\n")17: NULLmySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))})
18: 48: eval(code, test_env)with_reporter(reporters$multi, lapply(test_paths, test_one_file,
19: env = env, desc = desc, shuffle = shuffle, error_call = error_call))eval(code, test_env)
49: 20: test_files_serial(test_dir = test_dir, test_package = test_package, withCallingHandlers({ test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, eval(code, test_env) env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, new_expectations <- the$test_expectations > starting_expectations desc = desc, load_package = load_package, shuffle = shuffle, if (snapshot_skipped) { skip("On CRAN") error_call = error_call) } else if (!new_expectations && skip_on_empty) { skip_empty()
}50: }, expectation = handle_expectation, packageNotFoundError = function(e) {test_files(test_dir = path, test_paths = test_paths, test_package = package, if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) reporter = reporter, load_helpers = load_helpers, env = env, } stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, }, snapshot_on_cran = function(cnd) { load_package = load_package, parallel = parallel, shuffle = shuffle) snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 51: test_dir("testthat", package = package, reporter = reporter, error = handle_error, interrupt = handle_interrupt) ..., load_package = "installed")
21: 52: doTryCatch(return(expr), name, parentenv, handler)test_check("missSBM")
22:
tryCatchOne(expr, names, parentenv, handlers[[1L]])An irrecoverable exception occurred. R is aborting now ...
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]], ...)
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: 13: FUN(X[[i]], ...)parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, verbose = (verbosity > 4))
3: 14: lapply(X = S, FUN = FUN, ...).self$do_with_inits(inits, Q, reinitialization_effort)
4: 15: doTryCatch(return(expr), name, parentenv, handler).self$estim_ascend(reinitialization_effort, changing_effort)
5: 16: tryCatchOne(expr, names, parentenv, handlers[[1L]])private$BMobject$estimate()
6:
tryCatchList(expr, classes, parentenv, handlers)17: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
7: 18: tryCatch(expr, error = function(e) {eval(code, test_env) call <- conditionCall(e)
if (!is.null(call)) {19: if (identical(call[[1L]], quote(doTryCatch))) eval(code, test_env) call <- sys.call(-4L)
dcall <- deparse(call, nlines = 1L)20: prefix <- paste("Error in", dcall, ": ")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], } else if (!new_expectations && skip_on_empty) { type = "b") skip_empty() if (w > LONG) } prefix <- paste0(prefix, "\n ")}, expectation = handle_expectation, packageNotFoundError = function(e) { } if (on_cran()) { else prefix <- "Error : " skip(paste0("{", e$package, "} is not installed.")) } msg <- paste0(prefix, conditionMessage(e), "\n")}, snapshot_on_cran = function(cnd) { .Internal(seterrmessage(msg[1L])) snapshot_skipped <<- TRUE if (!silent && isTRUE(getOption("show.error.messages"))) { invokeRestart("muffle_cran_snapshot") cat(msg, file = outFile)}, skip = handle_skip, warning = handle_warning, message = handle_message, .Internal(printDeferredWarnings()) error = handle_error, interrupt = handle_interrupt) }
invisible(structure(msg, class = "try-error", condition = e))21: })doTryCatch(return(expr), name, parentenv, handler)
22: 8: tryCatchOne(expr, names, parentenv, handlers[[1L]])try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
23: 9: tryCatchList(expr, classes, parentenv, handlers)sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
24: 10: tryCatch(withCallingHandlers({FUN(X[[i]], ...) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations11: if (snapshot_skipped) {lapply(seq_len(cores), inner.do) skip("On CRAN")
} else if (!new_expectations && skip_on_empty) {12: skip_empty()parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, } mc.silent = TRUE)}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {13: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, skip(paste0("{", e$package, "} is not installed.")) verbose = (verbosity > 4)) }
}, snapshot_on_cran = function(cnd) {14: snapshot_skipped <<- TRUE.self$do_with_inits(inits, Q, reinitialization_effort) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 15: error = handle_error, interrupt = handle_interrupt), error = handle_fatal).self$estim_ascend(reinitialization_effort, changing_effort)
25: 16: doWithOneRestart(return(expr), restart)private$BMobject$estimate()
26: 17: withOneRestart(expr, restarts[[1L]])mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
27: 18: eval(code, test_env)withRestarts(tryCatch(withCallingHandlers({
eval(code, test_env)19: new_expectations <- the$test_expectations > starting_expectationseval(code, test_env) if (snapshot_skipped) {
20: skip("On CRAN")withCallingHandlers({ } eval(code, test_env) else if (!new_expectations && skip_on_empty) { new_expectations <- the$test_expectations > starting_expectations skip_empty() if (snapshot_skipped) { } skip("On CRAN")}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { } 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")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 28: error = handle_error, interrupt = handle_interrupt)test_code(code, parent.frame())
21:
doTryCatch(return(expr), name, parentenv, handler)29:
test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", 22: {tryCatchOne(expr, names, parentenv, handlers[[1L]]) sampler_directed_cov$rNetwork(store = TRUE)
mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, 23: "bernoulli", TRUE, covarList = covarList_directed)tryCatchList(expr, classes, parentenv, handlers) mySBM_sbm$optimize(estimOptions = list(verbosity = 0,
plot = FALSE))24: mySBM_sbm$setModel(Q)tryCatch(withCallingHandlers({ net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, eval(code, test_env) covariates = covarList_directed) new_expectations <- the$test_expectations > starting_expectations cls <- net$clustering(1:(2 * Q)) if (snapshot_skipped) { cl <- cls[[Q]] skip("On CRAN") mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, } else if (!new_expectations && skip_on_empty) { clusterInit = cl, covarList = covarList_directed) skip_empty() mySBM_missSBM$doVEM(trace = TRUE) }}, expectation = handle_expectation, packageNotFoundError = function(e) { expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), if (on_cran()) { 0.1) skip(paste0("{", e$package, "} is not installed.")) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), } 0.8)}, snapshot_on_cran = function(cnd) { expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), snapshot_skipped <<- TRUE 0.05) invokeRestart("muffle_cran_snapshot") expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), }, skip = handle_skip, warning = handle_warning, message = handle_message, 0.1) error = handle_error, interrupt = handle_interrupt), error = handle_fatal) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships),
25: 0.85)doWithOneRestart(return(expr), restart) })
26: 30: withOneRestart(expr, restarts[[1L]])eval(code, test_env)
27:
withRestarts(tryCatch(withCallingHandlers({31: eval(code, test_env)eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {32: skip("On CRAN")withCallingHandlers({ } eval(code, test_env) else if (!new_expectations && skip_on_empty) { new_expectations <- the$test_expectations > starting_expectations skip_empty() } if (snapshot_skipped) {}, 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 invokeRestart("muffle_cran_snapshot")}, expectation = handle_expectation, packageNotFoundError = function(e) {}, skip = handle_skip, warning = handle_warning, message = handle_message, if (on_cran()) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal), skip(paste0("{", e$package, "} is not installed.")) end_test = function() { } })}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE28: invokeRestart("muffle_cran_snapshot")test_code(code, parent.frame())}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt)29:
test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", 33: { sampler_directed_cov$rNetwork(store = TRUE)doTryCatch(return(expr), name, parentenv, handler)
mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, 34: "bernoulli", TRUE, covarList = covarList_directed)tryCatchOne(expr, names, parentenv, handlers[[1L]]) mySBM_sbm$optimize(estimOptions = list(verbosity = 0,
plot = FALSE))35: mySBM_sbm$setModel(Q)tryCatchList(expr, classes, parentenv, handlers) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData,
covariates = covarList_directed)36: cls <- net$clustering(1:(2 * Q))tryCatch(withCallingHandlers({ cl <- cls[[Q]] eval(code, test_env) mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, new_expectations <- the$test_expectations > starting_expectations clusterInit = cl, covarList = covarList_directed) if (snapshot_skipped) { mySBM_missSBM$doVEM(trace = TRUE) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), skip("On CRAN") 0.1) } expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), else if (!new_expectations && skip_on_empty) { 0.8) skip_empty() expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), } 0.05)}, expectation = handle_expectation, packageNotFoundError = function(e) { expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), if (on_cran()) { 0.1) skip(paste0("{", e$package, "} is not installed.")) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), } 0.85)}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE }) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 30: error = handle_error, interrupt = handle_interrupt), error = handle_fatal)eval(code, test_env)
37: 31: doWithOneRestart(return(expr), restart)eval(code, test_env)
38: 32: withOneRestart(expr, restarts[[1L]])withCallingHandlers({ eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations39: if (snapshot_skipped) {withRestarts(tryCatch(withCallingHandlers({ skip("On CRAN") eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations else if (!new_expectations && skip_on_empty) { if (snapshot_skipped) { skip_empty() skip("On CRAN") } }}, expectation = handle_expectation, packageNotFoundError = function(e) { else if (!new_expectations && skip_on_empty) { if (on_cran()) { skip_empty() skip(paste0("{", e$package, "} is not installed.")) } }}, 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)}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE33: doTryCatch(return(expr), name, parentenv, handler) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 34: tryCatchOne(expr, names, parentenv, handlers[[1L]]) error = handle_error, interrupt = handle_interrupt), error = handle_fatal),
end_test = function() {35: tryCatchList(expr, classes, parentenv, handlers) })
36: 40: tryCatch(withCallingHandlers({test_code(code = exprs, env = env, reporter = get_reporter() %||% eval(code, test_env) StopReporter$new()) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {41: skip("On CRAN")source_file(path, env = env(env), desc = desc, shuffle = shuffle, } error_call = error_call) else if (!new_expectations && skip_on_empty) { skip_empty()
}42: }, expectation = handle_expectation, packageNotFoundError = function(e) {FUN(X[[i]], ...) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed.")) }43: }, snapshot_on_cran = function(cnd) {lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, snapshot_skipped <<- TRUE error_call = error_call) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 44: error = handle_error, interrupt = handle_interrupt), error = handle_fatal)doTryCatch(return(expr), name, parentenv, handler)
37: 45: doWithOneRestart(return(expr), restart)tryCatchOne(expr, names, parentenv, handlers[[1L]])
38: 46: withOneRestart(expr, restarts[[1L]])tryCatchList(expr, classes, parentenv, handlers)
39: 47: withRestarts(tryCatch(withCallingHandlers({tryCatch(code, testthat_abort_reporter = function(cnd) { eval(code, test_env) cat(conditionMessage(cnd), "\n") new_expectations <- the$test_expectations > starting_expectations NULL if (snapshot_skipped) {}) skip("On CRAN")
}48: else if (!new_expectations && skip_on_empty) {with_reporter(reporters$multi, lapply(test_paths, test_one_file, skip_empty() env = env, desc = desc, shuffle = shuffle, error_call = error_call)) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {49: if (on_cran()) {test_files_serial(test_dir = test_dir, test_package = test_package, skip(paste0("{", e$package, "} is not installed.")) test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, } env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, }, snapshot_on_cran = function(cnd) { desc = desc, load_package = load_package, shuffle = shuffle, snapshot_skipped <<- TRUE error_call = error_call) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 50: end_test = function() {test_files(test_dir = path, test_paths = test_paths, test_package = package, })
reporter = reporter, load_helpers = load_helpers, env = env, 40: stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, test_code(code = exprs, env = env, reporter = get_reporter() %||% load_package = load_package, parallel = parallel, shuffle = shuffle) StopReporter$new())
51: 41: test_dir("testthat", package = package, reporter = reporter, source_file(path, env = env(env), desc = desc, shuffle = shuffle, ..., load_package = "installed") error_call = error_call)
52: 42: test_check("missSBM")FUN(X[[i]], ...)
An irrecoverable exception occurred. R is aborting now ...
43: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call)
44: doTryCatch(return(expr), name, parentenv, handler)
45: tryCatchOne(expr, names, parentenv, handlers[[1L]])
46: tryCatchList(expr, classes, parentenv, handlers)
47: tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n") NULL})
48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call))
49: test_files_serial(test_dir = test_dir, test_package = test_package, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, desc = desc, load_package = load_package, shuffle = shuffle, error_call = error_call)
50: test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, load_package = load_package, parallel = parallel, shuffle = shuffle)
51: test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed")
52: test_check("missSBM")
An irrecoverable exception occurred. R is aborting now ...
Saving _problems/test-sbm-bernoulli-with-covariates-46.R
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE)
2: FUN(X[[i]], ...)
3: lapply(X = S, FUN = FUN, ...)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
8: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
10: FUN(X[[i]], ...)
11: lapply(seq_len(cores), inner.do)
12: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE)
13: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, verbose = (verbosity > 4))
14: .self$do_with_inits(inits, Q, reinitialization_effort)
15: .self$estim_ascend(reinitialization_effort, changing_effort)
16: private$BMobject$estimate()
17: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
18: eval(code, test_env)
19: eval(code, test_env)
20: withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)
21: doTryCatch(return(expr), name, parentenv, handler)
22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
23: tryCatchList(expr, classes, parentenv, handlers)
24:
Traceback:
tryCatch(withCallingHandlers({ 1: 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) { 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")}, skip = handle_skip, warning = handle_warning, message = handle_message, tryCatchOne(expr, names, parentenv, handlers[[1L]]) error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
6: 25: tryCatchList(expr, classes, parentenv, handlers)doWithOneRestart(return(expr), restart)
7: 26: tryCatch(expr, error = function(e) {withOneRestart(expr, restarts[[1L]]) call <- conditionCall(e)
if (!is.null(call)) {27: if (identical(call[[1L]], quote(doTryCatch))) withRestarts(tryCatch(withCallingHandlers({ call <- sys.call(-4L) eval(code, test_env) dcall <- deparse(call, nlines = 1L) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { prefix <- paste("Error in", dcall, ": ") skip("On CRAN") LONG <- 75L } else if (!new_expectations && skip_on_empty) { skip_empty() sm <- strsplit(conditionMessage(e), "\n")[[1L]] } w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")}, expectation = handle_expectation, packageNotFoundError = function(e) { if (is.na(w)) if (on_cran()) { w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], skip(paste0("{", e$package, "} is not installed.")) type = "b") } if (w > LONG) }, snapshot_on_cran = function(cnd) { prefix <- paste0(prefix, "\n ") snapshot_skipped <<- TRUE } else prefix <- "Error : " invokeRestart("muffle_cran_snapshot") msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L]))}, skip = handle_skip, warning = handle_warning, message = handle_message, if (!silent && isTRUE(getOption("show.error.messages"))) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal), cat(msg, file = outFile) end_test = function() { .Internal(printDeferredWarnings()) }) } invisible(structure(msg, class = "try-error", condition = e))
})28:
test_code(code, parent.frame()) 8:
try(lapply(X = S, FUN = FUN, ...), silent = TRUE)29:
test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate", 9: {sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) sampler_undirected_nocov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData,
"bernoulli", FALSE)10: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, FUN(X[[i]], ...) plot = FALSE))
mySBM_sbm$setModel(3)11: net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData)lapply(seq_len(cores), inner.do) cl <- net$clustering(3)[[1]]
mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, 12: clusterInit = cl)parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mySBM_missSBM$doVEM() expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), mc.silent = TRUE) 0.05)
13: expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, 0.95) verbose = (verbosity > 4)) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik),
0.01)14: expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean), .self$do_with_inits(inits, Q, reinitialization_effort) 0.05)
expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships), 15: 0.95).self$estim_ascend(reinitialization_effort, changing_effort) })
16: 30: eval(code, test_env)private$BMobject$estimate()
31: 17: eval(code, test_env)mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
32:
18: withCallingHandlers({eval(code, test_env) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations19: if (snapshot_skipped) {eval(code, test_env) skip("On CRAN")
}20: 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: tryCatchList(expr, classes, parentenv, handlers)21:
doTryCatch(return(expr), name, parentenv, handler)
36: tryCatch(withCallingHandlers({22: eval(code, test_env)tryCatchOne(expr, names, parentenv, handlers[[1L]]) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {23: skip("On CRAN")tryCatchList(expr, classes, parentenv, handlers) }
24: else if (!new_expectations && skip_on_empty) { skip_empty()tryCatch(withCallingHandlers({ } eval(code, test_env)}, expectation = handle_expectation, packageNotFoundError = function(e) { new_expectations <- the$test_expectations > starting_expectations if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) } if (snapshot_skipped) {}, snapshot_on_cran = function(cnd) { skip("On CRAN") } snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") else if (!new_expectations && skip_on_empty) {}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal) skip_empty()
}37: }, expectation = handle_expectation, packageNotFoundError = function(e) {doWithOneRestart(return(expr), restart) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))38: }withOneRestart(expr, restarts[[1L]])}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE39: invokeRestart("muffle_cran_snapshot")withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {}, skip = handle_skip, warning = handle_warning, message = handle_message, skip("On CRAN") error = handle_error, interrupt = handle_interrupt), error = handle_fatal) }
else if (!new_expectations && skip_on_empty) { skip_empty()25: }doWithOneRestart(return(expr), restart)}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {26: skip(paste0("{", e$package, "} is not installed."))withOneRestart(expr, restarts[[1L]]) }
}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE27: invokeRestart("muffle_cran_snapshot")withRestarts(tryCatch(withCallingHandlers({}, skip = handle_skip, warning = handle_warning, message = handle_message, eval(code, test_env) error = handle_error, interrupt = handle_interrupt), error = handle_fatal), new_expectations <- the$test_expectations > starting_expectations end_test = function() { if (snapshot_skipped) { }) skip("On CRAN")
}40: else if (!new_expectations && skip_on_empty) {test_code(code = exprs, env = env, reporter = get_reporter() %||% skip_empty() StopReporter$new()) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {41: if (on_cran()) {source_file(path, env = env(env), desc = desc, shuffle = shuffle, skip(paste0("{", e$package, "} is not installed.")) error_call = error_call) }
}, snapshot_on_cran = function(cnd) {42: snapshot_skipped <<- TRUEFUN(X[[i]], ...) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 43: end_test = function() { })lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle,
error_call = error_call)28:
test_code(code, parent.frame())44:
doTryCatch(return(expr), name, parentenv, handler)29:
test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate", 45: {tryCatchOne(expr, names, parentenv, handlers[[1L]]) sampler_undirected_nocov$rNetwork(store = TRUE)
mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, 46: "bernoulli", FALSE)tryCatchList(expr, classes, parentenv, handlers) mySBM_sbm$optimize(estimOptions = list(verbosity = 0,
plot = FALSE))47: mySBM_sbm$setModel(3)tryCatch(code, testthat_abort_reporter = function(cnd) { net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData) cat(conditionMessage(cnd), "\n") cl <- net$clustering(3)[[1]] NULL mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, }) clusterInit = cl)
mySBM_missSBM$doVEM()48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call)) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean),
0.05)49: expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), test_files_serial(test_dir = test_dir, test_package = test_package, 0.95) test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 0.01) desc = desc, load_package = load_package, shuffle = shuffle, expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean), error_call = error_call) 0.05)
expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships), 50: test_files(test_dir = path, test_paths = test_paths, test_package = package, 0.95) reporter = reporter, load_helpers = load_helpers, env = env, }) stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
30: load_package = load_package, parallel = parallel, shuffle = shuffle)eval(code, test_env)
51: 31: test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed")eval(code, test_env)
52: 32: test_check("missSBM")withCallingHandlers({
eval(code, test_env)An irrecoverable exception occurred. R is aborting now ...
new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)
33: doTryCatch(return(expr), name, parentenv, handler)
34: tryCatchOne(expr, names, parentenv, handlers[[1L]])
35: tryCatchList(expr, classes, parentenv, handlers)
36: tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
37: doWithOneRestart(return(expr), restart)
38: withOneRestart(expr, restarts[[1L]])
39: withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() { })
40: test_code(code = exprs, env = env, reporter = get_reporter() %||% StopReporter$new())
41: source_file(path, env = env(env), desc = desc, shuffle = shuffle, error_call = error_call)
42: FUN(X[[i]], ...)
43: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call)
44: doTryCatch(return(expr), name, parentenv, handler)
45: tryCatchOne(expr, names, parentenv, handlers[[1L]])
46: tryCatchList(expr, classes, parentenv, handlers)
47: tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n") NULL})
48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call))
49: test_files_serial(test_dir = test_dir, test_package = test_package, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, desc = desc, load_package = load_package, shuffle = shuffle, error_call = error_call)
50: test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, load_package = load_package, parallel = parallel, shuffle = shuffle)
51: test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed")
52: test_check("missSBM")
An irrecoverable exception occurred. R is aborting now ...
Saving _problems/test-sbm-bernoulli-without-covariate-16.R
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE)
Traceback:
2: 1: FUN(X[[i]], ...)dispatcher(membership_name, membership_init$to_cc(), model_name,
.self$network_to_cc(), TRUE) 3:
lapply(X = S, FUN = FUN, ...) 2: FUN(X[[i]], ...)
4: 3: doTryCatch(return(expr), name, parentenv, handler)
lapply(X = S, FUN = FUN, ...) 5:
tryCatchOne(expr, names, parentenv, handlers[[1L]]) 4:
doTryCatch(return(expr), name, parentenv, handler) 6:
tryCatchList(expr, classes, parentenv, handlers) 5:
7: tryCatchOne(expr, names, parentenv, handlers[[1L]])tryCatch(expr, error = function(e) {
6: call <- conditionCall(e)tryCatchList(expr, classes, parentenv, handlers) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch)))
call <- sys.call(-4L) 7: dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ")tryCatch(expr, error = function(e) { LONG <- 75L call <- conditionCall(e) if (!is.null(call)) { sm <- strsplit(conditionMessage(e), "\n")[[1L]] if (identical(call[[1L]], quote(doTryCatch))) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") call <- sys.call(-4L) if (is.na(w)) dcall <- deparse(call, nlines = 1L) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") prefix <- paste("Error in", dcall, ": ") if (w > LONG) prefix <- paste0(prefix, "\n ") LONG <- 75L } sm <- strsplit(conditionMessage(e), "\n")[[1L]] else prefix <- "Error : " w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") msg <- paste0(prefix, conditionMessage(e), "\n") if (is.na(w)) .Internal(seterrmessage(msg[1L])) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], if (!silent && isTRUE(getOption("show.error.messages"))) { type = "b") cat(msg, file = outFile) .Internal(printDeferredWarnings()) if (w > LONG) } 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"))) {try(lapply(X = S, FUN = FUN, ...), silent = TRUE) cat(msg, file = outFile)
.Internal(printDeferredWarnings()) 9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
}10: invisible(structure(msg, class = "try-error", condition = e))FUN(X[[i]], ...)})
11: 8: lapply(seq_len(cores), inner.do)
try(lapply(X = S, FUN = FUN, ...), silent = TRUE)12:
parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, 9: mc.silent = TRUE)sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
13: 10: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, FUN(X[[i]], ...) verbose = (verbosity > 4))
11: 14: lapply(seq_len(cores), inner.do).self$do_with_inits(inits, Q, reinitialization_effort)
12: 15: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, .self$estim_ascend(reinitialization_effort, changing_effort) mc.silent = TRUE)
16: 13: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, private$BMobject$estimate() verbose = (verbosity > 4))
17:
mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))14: .self$do_with_inits(inits, Q, reinitialization_effort)
18: 15: eval(code, test_env).self$estim_ascend(reinitialization_effort, changing_effort)
19: 16: eval(code, test_env)private$BMobject$estimate()
20: 17: withCallingHandlers({mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations18: if (snapshot_skipped) { skip("On CRAN")eval(code, test_env) }
else if (!new_expectations && skip_on_empty) {19: skip_empty()eval(code, test_env) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {20: if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))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) else if (!new_expectations && skip_on_empty) { skip_empty()
}21: }, expectation = handle_expectation, packageNotFoundError = function(e) {doTryCatch(return(expr), name, parentenv, handler) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed.")) }22: }, snapshot_on_cran = function(cnd) {tryCatchOne(expr, names, parentenv, handlers[[1L]])
snapshot_skipped <<- TRUE23: tryCatchList(expr, classes, parentenv, handlers) invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt)24:
tryCatch(withCallingHandlers({ eval(code, test_env)21: doTryCatch(return(expr), name, parentenv, handler) new_expectations <- the$test_expectations > starting_expectations
22: tryCatchOne(expr, names, parentenv, handlers[[1L]]) if (snapshot_skipped) {
skip("On CRAN")23: }tryCatchList(expr, classes, parentenv, handlers)
else if (!new_expectations && skip_on_empty) {24: skip_empty()tryCatch(withCallingHandlers({ } eval(code, test_env)}, expectation = handle_expectation, packageNotFoundError = function(e) { new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { if (on_cran()) { skip("On CRAN") skip(paste0("{", e$package, "} is not installed.")) } }}, snapshot_on_cran = function(cnd) { else if (!new_expectations && skip_on_empty) { snapshot_skipped <<- TRUE skip_empty() invokeRestart("muffle_cran_snapshot") }}, skip = handle_skip, warning = handle_warning, message = handle_message, }, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal) skip(paste0("{", e$package, "} is not installed."))
25: }doWithOneRestart(return(expr), restart)}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")26: }, skip = handle_skip, warning = handle_warning, message = handle_message, withOneRestart(expr, restarts[[1L]]) error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
27: 25: withRestarts(tryCatch(withCallingHandlers({doWithOneRestart(return(expr), restart) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations26: if (snapshot_skipped) {withOneRestart(expr, restarts[[1L]]) skip("On CRAN")
27: }withRestarts(tryCatch(withCallingHandlers({ else if (!new_expectations && skip_on_empty) { eval(code, test_env) skip_empty() } 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.")) } }}, snapshot_on_cran = function(cnd) { else if (!new_expectations && skip_on_empty) { snapshot_skipped <<- TRUE skip_empty() invokeRestart("muffle_cran_snapshot") }}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), }, expectation = handle_expectation, packageNotFoundError = function(e) { end_test = function() { if (on_cran()) { }) skip(paste0("{", e$package, "} is not installed."))
}28: }, snapshot_on_cran = function(cnd) {test_code(code, parent.frame()) snapshot_skipped <<- TRUE
29: test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate", invokeRestart("muffle_cran_snapshot") {}, skip = handle_skip, warning = handle_warning, message = handle_message, sampler_directed_nocov$rNetwork(store = TRUE) error = handle_error, interrupt = handle_interrupt), error = handle_fatal), mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, end_test = function() { "bernoulli", TRUE) }) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) mySBM_sbm$setModel(3)
net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData)28: cl <- net$clustering(3)[[1]]test_code(code, parent.frame()) mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData,
clusterInit = cl)29: mySBM_missSBM$doVEM() expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate", 0.1) { expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.95) sampler_directed_nocov$rNetwork(store = TRUE) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, "bernoulli", TRUE) 0.01) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean), plot = FALSE)) 0.1) mySBM_sbm$setModel(3) expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), 0.2) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData) 0.95) cl <- net$clustering(3)[[1]] })
mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, 30: clusterInit = cl)eval(code, test_env) mySBM_missSBM$doVEM() expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean),
0.1)31: expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), eval(code, test_env) 0.95)
expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 32: 0.01)withCallingHandlers({ expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean), eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations 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()) { skip(paste0("{", e$package, "} is not installed."))30: }eval(code, test_env)}, snapshot_on_cran = function(cnd) {
31: snapshot_skipped <<- TRUEeval(code, test_env)
invokeRestart("muffle_cran_snapshot")32: }, skip = handle_skip, warning = handle_warning, message = handle_message, withCallingHandlers({ error = handle_error, interrupt = handle_interrupt) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations33: doTryCatch(return(expr), name, parentenv, handler) if (snapshot_skipped) {
skip("On CRAN")34: }tryCatchOne(expr, names, parentenv, handlers[[1L]]) else if (!new_expectations && skip_on_empty) {
skip_empty()35: }}, expectation = handle_expectation, packageNotFoundError = function(e) {tryCatchList(expr, classes, parentenv, handlers) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))36: tryCatch(withCallingHandlers({ eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations}, snapshot_on_cran = function(cnd) { if (snapshot_skipped) { skip("On CRAN") snapshot_skipped <<- TRUE } invokeRestart("muffle_cran_snapshot") else if (!new_expectations && skip_on_empty) {}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt) skip_empty()
}33: }, expectation = handle_expectation, packageNotFoundError = function(e) {doTryCatch(return(expr), name, parentenv, handler) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))34: }tryCatchOne(expr, names, parentenv, handlers[[1L]])}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE35: invokeRestart("muffle_cran_snapshot")tryCatchList(expr, classes, parentenv, handlers)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal)36:
tryCatch(withCallingHandlers({ eval(code, test_env)37: new_expectations <- the$test_expectations > starting_expectationsdoWithOneRestart(return(expr), restart) if (snapshot_skipped) {
skip("On CRAN")38: }withOneRestart(expr, restarts[[1L]]) else if (!new_expectations && skip_on_empty) {
skip_empty()39: }withRestarts(tryCatch(withCallingHandlers({}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { eval(code, test_env) skip(paste0("{", e$package, "} is not installed.")) new_expectations <- the$test_expectations > starting_expectations } if (snapshot_skipped) {}, snapshot_on_cran = function(cnd) { skip("On CRAN") snapshot_skipped <<- TRUE } invokeRestart("muffle_cran_snapshot") else if (!new_expectations && skip_on_empty) {}, skip = handle_skip, warning = handle_warning, message = handle_message, skip_empty() error = handle_error, interrupt = handle_interrupt), error = handle_fatal) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {37: if (on_cran()) {doWithOneRestart(return(expr), restart)
skip(paste0("{", e$package, "} is not installed."))38: }withOneRestart(expr, restarts[[1L]])}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")39: }, skip = handle_skip, warning = handle_warning, message = handle_message, withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations error = handle_error, interrupt = handle_interrupt), error = handle_fatal), if (snapshot_skipped) { end_test = function() { skip("On CRAN") }) }
else if (!new_expectations && skip_on_empty) {40: skip_empty()test_code(code = exprs, env = env, reporter = get_reporter() %||% } StopReporter$new())}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {41: skip(paste0("{", e$package, "} is not installed."))source_file(path, env = env(env), desc = desc, shuffle = shuffle, } error_call = error_call)}, snapshot_on_cran = function(cnd) {
42: snapshot_skipped <<- TRUEFUN(X[[i]], ...) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 43: error = handle_error, interrupt = handle_interrupt), error = handle_fatal), lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, end_test = function() { error_call = error_call)
})44: doTryCatch(return(expr), name, parentenv, handler)
40: 45: test_code(code = exprs, env = env, reporter = get_reporter() %||% tryCatchOne(expr, names, parentenv, handlers[[1L]]) StopReporter$new())
46: 41: tryCatchList(expr, classes, parentenv, handlers)source_file(path, env = env(env), desc = desc, shuffle = shuffle,
47: tryCatch(code, testthat_abort_reporter = function(cnd) { error_call = error_call) cat(conditionMessage(cnd), "\n")
NULL})42:
FUN(X[[i]], ...)48:
with_reporter(reporters$multi, lapply(test_paths, test_one_file, 43: env = env, desc = desc, shuffle = shuffle, error_call = error_call))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, 44: test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, doTryCatch(return(expr), name, parentenv, handler) env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
desc = desc, load_package = load_package, shuffle = shuffle, 45: error_call = error_call)tryCatchOne(expr, names, parentenv, handlers[[1L]])
50: 46: test_files(test_dir = path, test_paths = test_paths, test_package = package, tryCatchList(expr, classes, parentenv, handlers) 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)47:
tryCatch(code, testthat_abort_reporter = function(cnd) {51: cat(conditionMessage(cnd), "\n")test_dir("testthat", package = package, reporter = reporter, NULL ..., load_package = "installed")
})52:
test_check("missSBM")48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call))
49: An irrecoverable exception occurred. R is aborting now ...
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