Last updated on 2026-11-02 04:54:59 CET.
| Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
|---|---|---|---|---|---|---|
| r-devel-linux-x86_64-debian-clang | 0.2.2 | 28.66 | 497.82 | 526.48 | OK | |
| r-devel-linux-x86_64-debian-gcc | 0.2.2 | 18.35 | 336.64 | 354.99 | ERROR | |
| r-devel-linux-x86_64-fedora-clang | 0.2.2 | 18.00 | 315.21 | 333.21 | ERROR | |
| r-devel-linux-x86_64-fedora-gcc | 0.2.2 | 20.00 | 310.10 | 330.10 | OK | |
| r-devel-windows-x86_64 | 0.2.2 | 31.00 | 688.00 | 719.00 | OK | |
| r-patched-linux-x86_64 | 0.2.2 | 27.83 | 467.18 | 495.01 | OK | |
| r-release-linux-x86_64 | 0.2.2 | 23.04 | 466.12 | 489.16 | OK | |
| r-release-macos-arm64 | 0.2.2 | 6.00 | 183.00 | 189.00 | OK | |
| r-release-macos-x86_64 | 0.2.2 | 19.00 | 991.00 | 1010.00 | OK | |
| r-release-windows-x86_64 | 0.2.2 | 31.00 | 626.00 | 657.00 | OK | |
| r-oldrel-macos-arm64 | 0.2.2 | 8.00 | 256.00 | 264.00 | OK | |
| r-oldrel-macos-x86_64 | 0.2.2 | 19.00 | 974.00 | 993.00 | OK | |
| r-oldrel-windows-x86_64 | 0.2.2 | 43.00 | 813.00 | 856.00 | OK |
Version: 0.2.2
Check: tests
Result: ERROR
Running ‘spelling.R’ [0s/0s]
Running ‘testthat.R’ [203s/496s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional test configuration?
> # Learn more about the roles of various files in:
> # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
> # * https://testthat.r-lib.org/articles/special-files.html
>
> library(testthat)
> library(bifrost)
>
> test_check("bifrost")
Saving _problems/test-search-background-history-97.R
Saving _problems/test-search-background-history-99.R
- ------------------------------ 0% [0/6] (ETA: ?)
/ =====------------------------- 17% [1/6] (ETA: 2.3s) [1/3] Node 18 scored
/ ==========-------------------- 33% [2/6] (ETA: 1.9s) [1/3] Node 19 scored
/ ===============--------------- 50% [3/6] (ETA: 1.4s) [1/3] Node 22 scored
| ====================---------- 67% [4/6] (ETA: 0.9s) [1/3] Node 25 scored
- =========================----- 83% [5/6] (ETA: 0.5s) [1/3] Node 26 scored
\ ============================== 100% [6/6] (ETA: 0.0s) [1/3] Node 29 scored
\ ============================== 100% [6/6] (ETA: 0.0s) [1/3] Candidates scored
v ============================== 100% [6/6] [3.3s] [1/3] Candidates scored
- ------------------------------ 0% [0/6] (ETA: ?)
\ =====------------------------- 17% [1/6] (ETA: 3.4s) [2/3] Node 25 accepted
/ ==========-------------------- 33% [2/6] (ETA: 3.1s) [2/3] Node 18 accepted
/ ===============--------------- 50% [3/6] (ETA: 2.5s) [2/3] Node 26 rejected
\ ====================---------- 67% [4/6] (ETA: 1.7s) [2/3] Node 29 rejected
- =========================----- 83% [5/6] (ETA: 0.8s) [2/3] Node 19 rejected
/ ============================== 100% [6/6] (ETA: 0.0s) [2/3] Node 22 rejected
/ ============================== 100% [6/6] (ETA: 0.0s) [2/3] Search complete
v ============================== 100% [6/6] [5.2s] [2/3] Search complete
- ------------------------------ 0% [0/2] (ETA: ?)
/ ===============--------------- 50% [1/2] (ETA: 0.5s) [3/3] Weighted node 25
| ============================== 100% [2/2] (ETA: 0.0s) [3/3] Weighted node 18
| ============================== 100% [2/2] (ETA: 0.0s) [3/3] Weights estimated
v ============================== 100% [2/2] [0.9s] [3/3] Weights estimated
- ------------------------------ 0% [0/6] (ETA: ?)
| =====------------------------- 17% [1/6] (ETA: 1.5s) [1/3] Node 18 scored
/ ==========-------------------- 33% [2/6] (ETA: 2.0s) [1/3] Node 19 scored
- ===============--------------- 50% [3/6] (ETA: 1.6s) [1/3] Node 22 scored
- ====================---------- 67% [4/6] (ETA: 1.1s) [1/3] Node 25 scored
- =========================----- 83% [5/6] (ETA: 0.5s) [1/3] Node 26 scored
\ ============================== 100% [6/6] (ETA: 0.0s) [1/3] Node 29 scored
\ ============================== 100% [6/6] (ETA: 0.0s) [1/3] Candidates scored
v ============================== 100% [6/6] [3.3s] [1/3] Candidates scored
- ------------------------------ 0% [0/6] (ETA: ?)
/ =====------------------------- 17% [1/6] (ETA: 5.0s) [2/3] Node 25 accepted
- ==========-------------------- 33% [2/6] (ETA: 3.3s) [2/3] Node 18 accepted
- ===============--------------- 50% [3/6] (ETA: 2.7s) [2/3] Node 26 rejected
- ====================---------- 67% [4/6] (ETA: 1.9s) [2/3] Node 29 rejected
| =========================----- 83% [5/6] (ETA: 1.0s) [2/3] Node 19 rejected
/ ============================== 100% [6/6] (ETA: 0.0s) [2/3] Node 22 rejected
/ ============================== 100% [6/6] (ETA: 0.0s) [2/3] Search complete
v ============================== 100% [6/6] [6.2s] [2/3] Search complete
- ------------------------------ 0% [0/2] (ETA: ?)
- ===============--------------- 50% [1/2] (ETA: 1.2s) [3/3] Weighted node 25
| ============================== 100% [2/2] (ETA: 0.0s) [3/3] Weighted node 18
/ ============================== 100% [2/2] (ETA: 0.0s) [3/3] Weights estimated
v ============================== 100% [2/2] [2.5s] [3/3] Weights estimated
- ------------------------------ 0% [0/6] (ETA: ?)
| =====------------------------- 17% [1/6] (ETA: 4.5s) [1/3] Node 18 scored
| ==========-------------------- 33% [2/6] (ETA: 1.8s) [1/3] Node 22 scored
| ===============--------------- 50% [3/6] (ETA: 0.9s) [1/3] Node 26 scored
- ====================---------- 67% [4/6] (ETA: 0.5s) [1/3] Node 19 scored
- =========================----- 83% [5/6] (ETA: 0.2s) [1/3] Node 25 scored
\ ============================== 100% [6/6] (ETA: 0.0s) [1/3] Node 29 scored
| ============================== 100% [6/6] (ETA: 0.0s) [1/3] Candidates scored
v ============================== 100% [6/6] [1.3s] [1/3] Candidates scored
- ------------------------------ 0% [0/6] (ETA: ?)
\ =====------------------------- 17% [1/6] (ETA: 3.9s) [2/3] Node 25 accepted
- ==========-------------------- 33% [2/6] (ETA: 3.1s) [2/3] Node 18 accepted
| ===============--------------- 50% [3/6] (ETA: 2.4s) [2/3] Node 26 rejected
/ ====================---------- 67% [4/6] (ETA: 1.8s) [2/3] Node 29 rejected
| =========================----- 83% [5/6] (ETA: 0.9s) [2/3] Node 19 rejected
- ============================== 100% [6/6] (ETA: 0.0s) [2/3] Node 22 rejected
- ============================== 100% [6/6] (ETA: 0.0s) [2/3] Search complete
v ============================== 100% [6/6] [5.7s] [2/3] Search complete
- ------------------------------ 0% [0/2] (ETA: ?)
/ ===============--------------- 50% [1/2] (ETA: 0.4s) [3/3] Weighted node 25
| ============================== 100% [2/2] (ETA: 0.0s) [3/3] Weighted node 18
| ============================== 100% [2/2] (ETA: 0.0s) [3/3] Weights estimated
v ============================== 100% [2/2] [0.8s] [3/3] Weights estimated
- ------------------------------ 0% [0/6] (ETA: ?)
- =====------------------------- 17% [1/6] (ETA: 5.2s) [1/3] Node 18 scored
- ==========-------------------- 33% [2/6] (ETA: 2.1s) [1/3] Node 22 scored
- ===============--------------- 50% [3/6] (ETA: 1.1s) [1/3] Node 26 scored
\ ====================---------- 67% [4/6] (ETA: 0.6s) [1/3] Node 19 scored
| =========================----- 83% [5/6] (ETA: 0.3s) [1/3] Node 25 scored
| ============================== 100% [6/6] (ETA: 0.0s) [1/3] Node 29 scored
/ ============================== 100% [6/6] (ETA: 0.0s) [1/3] Candidates scored
v ============================== 100% [6/6] [1.5s] [1/3] Candidates scored
- ------------------------------ 0% [0/6] (ETA: ?)
| =====------------------------- 17% [1/6] (ETA: 4.4s) [2/3] Node 25 accepted
/ ==========-------------------- 33% [2/6] (ETA: 4.1s) [2/3] Node 18 accepted
\ ===============--------------- 50% [3/6] (ETA: 3.3s) [2/3] Node 26 rejected
| ====================---------- 67% [4/6] (ETA: 2.2s) [2/3] Node 29 rejected
\ =========================----- 83% [5/6] (ETA: 1.1s) [2/3] Node 19 rejected
| ============================== 100% [6/6] (ETA: 0.0s) [2/3] Node 22 rejected
| ============================== 100% [6/6] (ETA: 0.0s) [2/3] Search complete
v ============================== 100% [6/6] [6.6s] [2/3] Search complete
- ------------------------------ 0% [0/2] (ETA: ?)
\ ===============--------------- 50% [1/2] (ETA: 1.8s) [3/3] Weighted node 25
/ ============================== 100% [2/2] (ETA: 0.0s) [3/3] Weighted node 18
/ ============================== 100% [2/2] (ETA: 0.0s) [3/3] Weights estimated
v ============================== 100% [2/2] [2.0s] [3/3] Weights estimated
NULL
<1b>[2K<1b>[1A
<1b>[2K<1b>[?7hv ============================== 100% [1/1] [0.0s] [1/3] Candidate scoring done
v ============================== 100% [1/1] [0.0s] [2/3] Greedy shift search...
<1b>[?7li ============================== 100% [1/1] [0.0s] [1/1] complete
<1b>[2K<1b>[?7hi ============================== 100% [1/1] [0.0s] [1/1] complete
<1b>[?7l- ------------------------------ 0% [0/1] (ETA: ?)
<1b>[2K- ============================== 100% [1/1] (ETA: 0.0s) [1/3] Candidate scoring complete
<1b>[2K- ============================== 100% [1/1] (ETA: 0.0s) [1/3] Candidate scoring done
<1b>[2Kv ============================== 100% [1/1] [0.0s] [1/3] Candidate scoring done
<1b>[2Kv ============================== 100% [1/1] [0.0s] [1/3] Candidate scoring done
- ------------------------------ 0% [0/1] (ETA: ?)
<1b>[2K<1b>[1A
<1b>[2Kv ============================== 100% [1/1] [0.0s] [1/3] Candidate scoring done
- ============================== 100% [1/1] (ETA: 0.0s) [2/3] Greedy shift search complete
<1b>[2K<1b>[1A
<1b>[2Kv ============================== 100% [1/1] [0.0s] [1/3] Candidate scoring done
- ============================== 100% [1/1] (ETA: 0.0s) [2/3] Greedy shift search done
<1b>[2K<1b>[1A
<1b>[2Kv ============================== 100% [1/1] [0.0s] [1/3] Candidate scoring done
v ============================== 100% [1/1] [0.0s] [2/3] Greedy shift search done
<1b>[2K<1b>[1A
<1b>[2K<1b>[?7hv ============================== 100% [1/1] [0.0s] [1/3] Candidate scoring done
v ============================== 100% [1/1] [0.0s] [2/3] Greedy shift search...
Loading required namespace: intervals
[ FAIL 2 | WARN 11 | SKIP 138 | PASS 2978 ]
══ Skipped tests (138) ═════════════════════════════════════════════════════════
• Development-only comparison script is excluded from source tarballs (6):
'test-compare-simulation-generators.R:16:3',
'test-compare-simulation-generators.R:33:3',
'test-compare-simulation-generators.R:50:3',
'test-compare-simulation-generators.R:63:3',
'test-compare-simulation-generators.R:79:3',
'test-compare-simulation-generators.R:85:3'
• Development-only simulation regeneration scripts are excluded from source
tarballs (7): 'test-simulation-vignette-cache.R:196:3',
'test-simulation-vignette-cache.R:302:3',
'test-simulation-vignette-cache.R:352:3',
'test-simulation-vignette-cache.R:408:3',
'test-simulation-vignette-cache.R:515:3',
'test-simulation-vignette-cache.R:576:3',
'test-simulation-vignette-cache.R:650:3'
• Lineage-rate vignette source is unavailable in installed tests (1):
'test-vignette-html-widgets.R:5:3'
• On CRAN (93): 'test-createSimulationTemplate.R:8:3',
'test-createSimulationTemplate.R:34:3',
'test-createSimulationTemplate.R:65:3',
'test-createSimulationTemplate.R:89:3',
'test-createSimulationTemplate.R:291:3',
'test-createSimulationTemplate.R:310:3',
'test-createSimulationTemplate.R:361:3',
'test-createSimulationTemplate.R:401:3',
'test-createSimulationTemplate.R:458:3',
'test-createSimulationTemplate.R:490:3',
'test-createSimulationTemplate.R:520:3', 'test-paired-tuning-grid.R:69:3',
'test-print-bifrost_search.R:3:1',
'test-print-bifrost_simulation_template.R:8:3',
'test-print-bifrost_simulation_template.R:27:3',
'test-print-bifrost_simulation_template.R:51:3',
'test-print-bifrost_simulation_template.R:69:3',
'test-runFalsePositiveSimulationStudy.R:135:3',
'test-runFalsePositiveSimulationStudy.R:180:3',
'test-runFalsePositiveSimulationStudy.R:208:3',
'test-runFalsePositiveSimulationStudy.R:268:3',
'test-runFalsePositiveSimulationStudy.R:294:3',
'test-runFalsePositiveSimulationStudy.R:324:3',
'test-runFalsePositiveSimulationStudy.R:349:3',
'test-runFalsePositiveSimulationStudy.R:375:3',
'test-runFalsePositiveSimulationStudy.R:436:3',
'test-runFalsePositiveSimulationStudy.R:484:3',
'test-runFalsePositiveSimulationStudy.R:522:3',
'test-runFalsePositiveSimulationStudy.R:552:3',
'test-runFalsePositiveSimulationStudy.R:580:3',
'test-runFalsePositiveSimulationStudy.R:617:3',
'test-runFalsePositiveSimulationStudy.R:683:3',
'test-runFalsePositiveSimulationStudy.R:718:3',
'test-runFalsePositiveSimulationStudy.R:768:3',
'test-runFalsePositiveSimulationStudy.R:833:3',
'test-runFalsePositiveSimulationStudy.R:861:3',
'test-runFalsePositiveSimulationStudy.R:899:3',
'test-runSearchTuningGrid.R:88:3', 'test-runSearchTuningGrid.R:150:3',
'test-runSearchTuningGrid.R:190:3', 'test-runSearchTuningGrid.R:392:3',
'test-runSearchTuningGrid.R:461:3', 'test-runSearchTuningGrid.R:601:3',
'test-runSearchTuningGrid.R:668:3', 'test-runSearchTuningGrid.R:712:3',
'test-runSearchTuningGrid.R:787:3', 'test-runSearchTuningGrid.R:962:3',
'test-runShiftRecoverySimulationStudy.R:75:3',
'test-runShiftRecoverySimulationStudy.R:133:3',
'test-runShiftRecoverySimulationStudy.R:174:3',
'test-runShiftRecoverySimulationStudy.R:246:3',
'test-runShiftRecoverySimulationStudy.R:280:3',
'test-runShiftRecoverySimulationStudy.R:321:3',
'test-runShiftRecoverySimulationStudy.R:358:3',
'test-runShiftRecoverySimulationStudy.R:391:3',
'test-runShiftRecoverySimulationStudy.R:475:3',
'test-runShiftRecoverySimulationStudy.R:533:3',
'test-runShiftRecoverySimulationStudy.R:578:3',
'test-runShiftRecoverySimulationStudy.R:614:3',
'test-runShiftRecoverySimulationStudy.R:649:3',
'test-runShiftRecoverySimulationStudy.R:700:3',
'test-runShiftRecoverySimulationStudy.R:775:3',
'test-runShiftRecoverySimulationStudy.R:836:3',
'test-runShiftRecoverySimulationStudy.R:894:3',
'test-runShiftRecoverySimulationStudy.R:992:3',
'test-runShiftRecoverySimulationStudy.R:1027:3',
'test-runShiftRecoverySimulationStudy.R:1081:3',
'test-runShiftRecoverySimulationStudy.R:1118:3',
'test-runShiftRecoverySimulationStudy.R:1213:3',
'test-search-baseline-output.R:1:1', 'test-search-characterization.R:3:1',
'test-searchOptimalConfiguration.R:3:1', 'test-simulateNullDataset.R:132:3',
'test-simulateNullDataset.R:147:3', 'test-simulateNullDataset.R:199:3',
'test-simulateNullDataset.R:222:3', 'test-simulateNullDataset.R:237:3',
'test-simulateNullDataset.R:249:3', 'test-simulateNullDataset.R:264:3',
'test-simulateNullDataset.R:296:3', 'test-simulateShiftedDataset.R:133:3',
'test-simulateShiftedDataset.R:179:3', 'test-simulateShiftedDataset.R:200:3',
'test-simulateShiftedDataset.R:293:3', 'test-simulateShiftedDataset.R:343:3',
'test-simulateShiftedDataset.R:368:3', 'test-simulateShiftedDataset.R:395:3',
'test-simulateShiftedDataset.R:430:3', 'test-simulateShiftedDataset.R:494:3',
'test-simulateShiftedDataset.R:513:3', 'test-simulateShiftedDataset.R:536:3',
'test-simulateShiftedDataset.R:559:3', 'test-simulateShiftedDataset.R:622:3'
• Part 1 vignette source is unavailable in installed tests (1):
'test-simulation-terminology.R:9:3'
• Simulation vignette not present (3):
'test-simulation-vignette-cache.R:829:3',
'test-simulation-vignette-cache.R:930:3',
'test-simulation-vignette-cache.R:958:3'
• Simulation vignette sources are unavailable in installed tests (1):
'test-simulation-terminology.R:54:3'
• Simulation vignettes not present (1):
'test-simulation-vignette-cache.R:866:3'
• development exporter unavailable (2): 'test-replicate-metrics.R:170:3',
'test-replicate-metrics.R:214:3'
• development exporter unavailable in package build (2):
'test-replicate-metrics.R:105:3', 'test-replicate-metrics.R:127:3'
• paired-tuning exporter absent (9): 'test-paired-tuning-cache.R:108:3',
'test-paired-tuning-cache.R:209:3', 'test-paired-tuning-cache.R:222:3',
'test-paired-tuning-cache.R:282:3', 'test-paired-tuning-cache.R:297:3',
'test-paired-tuning-cache.R:314:3', 'test-paired-tuning-cache.R:342:3',
'test-paired-tuning-cache.R:363:3', 'test-paired-tuning-cache.R:383:3'
• paired-tuning inputs absent (1): 'test-paired-tuning-cache.R:118:3'
• repository artifacts unavailable (1): 'test-replicate-metrics.R:3:3'
• repository empirical artifact directory unavailable for focal search (2):
'test-lineage_rates.R:684:3', 'test-shift-distributions.R:1865:3'
• repository empirical artifact directory unavailable for post-hoc object (5):
'test-regime-integration.R:1961:3', 'test-regime-integration.R:2003:3',
'test-regime-integration.R:2037:3', 'test-regime-integration.R:2335:3',
'test-regime-integration.R:2395:3'
• repository empirical artifact directory unavailable for sensitivity bundle
(1): 'test-shift-distributions.R:1335:3'
• repository empirical artifact directory unavailable for serialized artifacts
(1): 'test-serialized-artifacts.R:28:3'
• repository empirical artifact directory unavailable for simulation vignette
cache (1): 'test-simulation-vignette-cache.R:3:3'
══ Failed tests ════════════════════════════════════════════════════════════════
── Failure ('test-search-background-history.R:97:9'): background history preserves accepted, rejected and failed proposals and RNG ──
Expected `actual$warnings` to be identical to `expected$warnings`.
Differences:
actual vs expected
- "future::supportsMulticore() is deprecated. Please use the identical parallelly::supportsMulticore() instead [testthat::test_check() -> testthat::test_dir() -> testthat::test_files() -> testthat::test_files_serial() -> testthat::with_reporter() -> base::tryCatch() -> tryCatchList() -> tryCatchOne() -> doTryCatch() -> base::lapply() -> testthat::FUN() -> testthat::source_file() -> testthat::test_code() -> base::withRestarts() -> withOneRestart() -> doWithOneRestart() -> base::tryCatch() -> tryCatchList() -> tryCatchOne() -> doTryCatch() -> base::withCallingHandlers() -> base::eval() -> eval() -> testthat::test_that() -> testthat::test_code() -> base::withRestarts() -> withOneRestart() -> doWithOneRestart() -> base::tryCatch() -> tryCatchList() -> tryCatchOne() -> doTryCatch() -> base::withCallingHandlers() -> base::eval() -> eval() -> run() -> base::withCallingHandlers() -> base::do.call() -> bifrost::(function (sorted_candidates, current_best_tree, current_best_ic, shift_id, IC, formula, trait_data, shift_acceptance_threshold, store_model_fit_history, sub_dir, plot, verbose_log, tick = function(...) invisible(NULL), heartbeat = NULL, is_rstudio = FALSE, fit = .bifrost_search_fit_ic, .future_plan_active = FALSE, ...) { if (length(sorted_candidates) > 0L && !is.null(heartbeat) && !isTRUE(.future_plan_active)) { dots <- list(...) forward_args <- c(list(sorted_candidates = sorted_candidates, current_best_tree = current_best_tree, current_best_ic = current_best_ic, shift_id = shift_id, IC = IC, formula = formula, trait_data = trait_data, shift_acceptance_threshold = shift_acceptance_threshold, store_model_fit_history = store_model_fit_history, sub_dir = sub_dir, plot = plot, verbose_log = verbose_log, tick = tick, heartbeat = heartbeat, is_rstudio = is_rstudio, fit = fit, .future_plan_active = TRUE), dots) return(.bifrost_search_with_future_plan(workers = 1L, is_rstudio_flag = is_rstudio, ensure_async = TRUE, work = function() do.call(.bifrost_search_forward, forward_args))) } shift_vec <- list() model_with_shift_no_uncertainty <- NULL best_tree_no_uncertainty <- NULL warnings_list <- list() model_fit_history <- list() for (i in seq_along(sorted_candidates)) { shift_node_name <- names(sorted_candidates)[i] shift_node_number <- as.integer(sub(\"Node \", \"\", shift_node_name)) percent_complete <- round((i/length(sorted_candidates)) * 100, 2) verbose_log(\"Evaluating shift at node %d (%.2f%% complete)\", shift_node_number, percent_complete) outcome <- \"error\" proposal <- NULL add_shift_result <- addShiftToModel(current_best_tree, shift_node_number, shift_id) shifted_tree <- add_shift_result$tree shift_id <- add_shift_result$shift_id if (plot == TRUE) { nodelabels(text = shift_id, node = shift_node_number) } tryCatch({ fit_args <- c(list(IC, formula, shifted_tree, trait_data), list(...)) fit_proposal <- .bifrost_search_fit_proposal fit_work <- function() fit_proposal(fit, fit_args, IC, current_best_ic, shift_acceptance_threshold, history = if (store_model_fit_history) list(step = i, candidate_node = shift_node_number, regime_id = as.character(shift_id)), sub_dir = if (!is.null(heartbeat)) sub_dir) proposal <- withCallingHandlers(if (is.null(heartbeat)) { fit_work() } else { .bifrost_search_await_work(fit_work, heartbeat = heartbeat) }, warning = function(w) { warning_message <- paste(\"Warning in evaluating shift at node\", shift_node_number, \":\", w$message) warning(warning_message) warnings_list[[length(warnings_list) + 1]] <<- warning_message invokeRestart(\"muffleWarning\") }) model_with_shift <- proposal$value$model new_ic <- proposal$value$ic delta_ic <- proposal$value$delta_ic if (store_model_fit_history) { model_fit_history <- proposal$value } if (delta_ic >= shift_acceptance_threshold) { current_best_tree <- shifted_tree current_best_ic <- new_ic outcome <- \"accepted\" verbose_log(\"Shift at node %d accepted. Updated %s: %.2f; Delta %s: %.2f\", shift_node_number, IC, current_best_ic, IC, delta_ic) shift_vec[[length(shift_vec) + 1]] <- shift_node_number best_tree_no_uncertainty <- current_best_tree model_with_shift_no_uncertainty <- model_with_shift } else { outcome <- \"rejected\" verbose_log(\"Shift at node %d rejected. Delta %s: %.2f < threshold: %.2f\", shift_node_number, IC, delta_ic, shift_acceptance_threshold) } }, error = function(e) { warning_message <- paste(\"Error in evaluating shift at node\", shift_node_number, \":\", e$message) warning(warning_message) warnings_list[[length(warnings_list) + 1]] <<- warning_message if (store_model_fit_history) { model_fit_history <<- list(step = i, candidate_node = shift_node_number, regime_id = as.character(shift_id), model = NULL, ic = NA_real_, accepted = FALSE, delta_ic = NA, status = \"error\", error = e$message) } }) tick(message = sprintf(\"[2/3] Node %d %s\", shift_node_number, if (outcome == \"error\") \"failed\" else outcome)) for (condition in proposal$conditions) { if (inherits(condition, \"error\")) stop(condition) warning(condition) } if (isTRUE(store_model_fit_history) && !is.null(sub_dir) && (is.null(heartbeat) || outcome == \"error\")) { iteration_num <- i + 1L .bifrost_search_save_history(model_fit_history, sub_dir, iteration_num) } if (plot == TRUE) { colorvec <- setNames(object = c(\"black\", rainbow(length(unique(getStates(shifted_tree, type = \"both\"))) - 1)), nm = sort(as.numeric(unique(getStates(shifted_tree, type = \"both\"))))) plotSimmap(current_best_tree, colors = colorvec, ftype = \"off\") } } list(current_best_tree = current_best_tree, current_best_ic = current_best_ic, shift_id = shift_id, shift_vec = shift_vec, shifts_no_uncertainty = unlist(shift_vec), model_with_shift_no_uncertainty = model_with_shift_no_uncertainty, best_tree_no_uncertainty = best_tree_no_uncertainty, warnings_list = warnings_list, model_fit_history = model_fit_history) })() -> bifrost::.bifrost_search_with_future_plan() -> future::supportsMulticore()]"
"Warning in evaluating shift at node 15 : fit warning"
"Error in evaluating shift at node 17 : fit failed after drawing"
── Failure ('test-search-background-history.R:99:11'): background history preserves accepted, rejected and failed proposals and RNG ──
Expected `actual` to be identical to `expected`.
Differences:
actual$warnings vs expected$warnings
- "future::supportsMulticore() is deprecated. Please use the identical parallelly::supportsMulticore() instead [testthat::test_check() -> testthat::test_dir() -> testthat::test_files() -> testthat::test_files_serial() -> testthat::with_reporter() -> base::tryCatch() -> tryCatchList() -> tryCatchOne() -> doTryCatch() -> base::lapply() -> testthat::FUN() -> testthat::source_file() -> testthat::test_code() -> base::withRestarts() -> withOneRestart() -> doWithOneRestart() -> base::tryCatch() -> tryCatchList() -> tryCatchOne() -> doTryCatch() -> base::withCallingHandlers() -> base::eval() -> eval() -> testthat::test_that() -> testthat::test_code() -> base::withRestarts() -> withOneRestart() -> doWithOneRestart() -> base::tryCatch() -> tryCatchList() -> tryCatchOne() -> doTryCatch() -> base::withCallingHandlers() -> base::eval() -> eval() -> run() -> base::withCallingHandlers() -> base::do.call() -> bifrost::(function (sorted_candidates, current_best_tree, current_best_ic, shift_id, IC, formula, trait_data, shift_acceptance_threshold, store_model_fit_history, sub_dir, plot, verbose_log, tick = function(...) invisible(NULL), heartbeat = NULL, is_rstudio = FALSE, fit = .bifrost_search_fit_ic, .future_plan_active = FALSE, ...) { if (length(sorted_candidates) > 0L && !is.null(heartbeat) && !isTRUE(.future_plan_active)) { dots <- list(...) forward_args <- c(list(sorted_candidates = sorted_candidates, current_best_tree = current_best_tree, current_best_ic = current_best_ic, shift_id = shift_id, IC = IC, formula = formula, trait_data = trait_data, shift_acceptance_threshold = shift_acceptance_threshold, store_model_fit_history = store_model_fit_history, sub_dir = sub_dir, plot = plot, verbose_log = verbose_log, tick = tick, heartbeat = heartbeat, is_rstudio = is_rstudio, fit = fit, .future_plan_active = TRUE), dots) return(.bifrost_search_with_future_plan(workers = 1L, is_rstudio_flag = is_rstudio, ensure_async = TRUE, work = function() do.call(.bifrost_search_forward, forward_args))) } shift_vec <- list() model_with_shift_no_uncertainty <- NULL best_tree_no_uncertainty <- NULL warnings_list <- list() model_fit_history <- list() for (i in seq_along(sorted_candidates)) { shift_node_name <- names(sorted_candidates)[i] shift_node_number <- as.integer(sub(\"Node \", \"\", shift_node_name)) percent_complete <- round((i/length(sorted_candidates)) * 100, 2) verbose_log(\"Evaluating shift at node %d (%.2f%% complete)\", shift_node_number, percent_complete) outcome <- \"error\" proposal <- NULL add_shift_result <- addShiftToModel(current_best_tree, shift_node_number, shift_id) shifted_tree <- add_shift_result$tree shift_id <- add_shift_result$shift_id if (plot == TRUE) { nodelabels(text = shift_id, node = shift_node_number) } tryCatch({ fit_args <- c(list(IC, formula, shifted_tree, trait_data), list(...)) fit_proposal <- .bifrost_search_fit_proposal fit_work <- function() fit_proposal(fit, fit_args, IC, current_best_ic, shift_acceptance_threshold, history = if (store_model_fit_history) list(step = i, candidate_node = shift_node_number, regime_id = as.character(shift_id)), sub_dir = if (!is.null(heartbeat)) sub_dir) proposal <- withCallingHandlers(if (is.null(heartbeat)) { fit_work() } else { .bifrost_search_await_work(fit_work, heartbeat = heartbeat) }, warning = function(w) { warning_message <- paste(\"Warning in evaluating shift at node\", shift_node_number, \":\", w$message) warning(warning_message) warnings_list[[length(warnings_list) + 1]] <<- warning_message invokeRestart(\"muffleWarning\") }) model_with_shift <- proposal$value$model new_ic <- proposal$value$ic delta_ic <- proposal$value$delta_ic if (store_model_fit_history) { model_fit_history <- proposal$value } if (delta_ic >= shift_acceptance_threshold) { current_best_tree <- shifted_tree current_best_ic <- new_ic outcome <- \"accepted\" verbose_log(\"Shift at node %d accepted. Updated %s: %.2f; Delta %s: %.2f\", shift_node_number, IC, current_best_ic, IC, delta_ic) shift_vec[[length(shift_vec) + 1]] <- shift_node_number best_tree_no_uncertainty <- current_best_tree model_with_shift_no_uncertainty <- model_with_shift } else { outcome <- \"rejected\" verbose_log(\"Shift at node %d rejected. Delta %s: %.2f < threshold: %.2f\", shift_node_number, IC, delta_ic, shift_acceptance_threshold) } }, error = function(e) { warning_message <- paste(\"Error in evaluating shift at node\", shift_node_number, \":\", e$message) warning(warning_message) warnings_list[[length(warnings_list) + 1]] <<- warning_message if (store_model_fit_history) { model_fit_history <<- list(step = i, candidate_node = shift_node_number, regime_id = as.character(shift_id), model = NULL, ic = NA_real_, accepted = FALSE, delta_ic = NA, status = \"error\", error = e$message) } }) tick(message = sprintf(\"[2/3] Node %d %s\", shift_node_number, if (outcome == \"error\") \"failed\" else outcome)) for (condition in proposal$conditions) { if (inherits(condition, \"error\")) stop(condition) warning(condition) } if (isTRUE(store_model_fit_history) && !is.null(sub_dir) && (is.null(heartbeat) || outcome == \"error\")) { iteration_num <- i + 1L .bifrost_search_save_history(model_fit_history, sub_dir, iteration_num) } if (plot == TRUE) { colorvec <- setNames(object = c(\"black\", rainbow(length(unique(getStates(shifted_tree, type = \"both\"))) - 1)), nm = sort(as.numeric(unique(getStates(shifted_tree, type = \"both\"))))) plotSimmap(current_best_tree, colors = colorvec, ftype = \"off\") } } list(current_best_tree = current_best_tree, current_best_ic = current_best_ic, shift_id = shift_id, shift_vec = shift_vec, shifts_no_uncertainty = unlist(shift_vec), model_with_shift_no_uncertainty = model_with_shift_no_uncertainty, best_tree_no_uncertainty = best_tree_no_uncertainty, warnings_list = warnings_list, model_fit_history = model_fit_history) })() -> bifrost::.bifrost_search_with_future_plan() -> future::supportsMulticore()]"
"Warning in evaluating shift at node 15 : fit warning"
"Error in evaluating shift at node 17 : fit failed after drawing"
[ FAIL 2 | WARN 11 | SKIP 138 | PASS 2978 ]
Error:
! Test failures.
Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc
Version: 0.2.2
Check: tests
Result: ERROR
Running ‘spelling.R’
Running ‘testthat.R’ [193s/359s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional test configuration?
> # Learn more about the roles of various files in:
> # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
> # * https://testthat.r-lib.org/articles/special-files.html
>
> library(testthat)
> library(bifrost)
>
> test_check("bifrost")
Saving _problems/test-search-background-history-97.R
Saving _problems/test-search-background-history-99.R
- ------------------------------ 0% [0/6] (ETA: ?)
| =====------------------------- 17% [1/6] (ETA: 1.5s) [1/3] Node 18 scored
- ==========-------------------- 33% [2/6] (ETA: 1.3s) [1/3] Node 19 scored
/ ===============--------------- 50% [3/6] (ETA: 1.0s) [1/3] Node 22 scored
| ====================---------- 67% [4/6] (ETA: 0.7s) [1/3] Node 25 scored
\ =========================----- 83% [5/6] (ETA: 0.4s) [1/3] Node 26 scored
- ============================== 100% [6/6] (ETA: 0.0s) [1/3] Node 29 scored
- ============================== 100% [6/6] (ETA: 0.0s) [1/3] Candidates scored
v ============================== 100% [6/6] [2.2s] [1/3] Candidates scored
- ------------------------------ 0% [0/6] (ETA: ?)
- =====------------------------- 17% [1/6] (ETA: 2.8s) [2/3] Node 25 accepted
- ==========-------------------- 33% [2/6] (ETA: 2.3s) [2/3] Node 18 accepted
| ===============--------------- 50% [3/6] (ETA: 1.9s) [2/3] Node 26 rejected
- ====================---------- 67% [4/6] (ETA: 1.3s) [2/3] Node 29 rejected
\ =========================----- 83% [5/6] (ETA: 0.7s) [2/3] Node 19 rejected
| ============================== 100% [6/6] (ETA: 0.0s) [2/3] Node 22 rejected
| ============================== 100% [6/6] (ETA: 0.0s) [2/3] Search complete
v ============================== 100% [6/6] [4.0s] [2/3] Search complete
- ------------------------------ 0% [0/2] (ETA: ?)
| ===============--------------- 50% [1/2] (ETA: 0.3s) [3/3] Weighted node 25
- ============================== 100% [2/2] (ETA: 0.0s) [3/3] Weighted node 18
- ============================== 100% [2/2] (ETA: 0.0s) [3/3] Weights estimated
v ============================== 100% [2/2] [0.6s] [3/3] Weights estimated
- ------------------------------ 0% [0/6] (ETA: ?)
| =====------------------------- 17% [1/6] (ETA: 1.5s) [1/3] Node 18 scored
- ==========-------------------- 33% [2/6] (ETA: 1.3s) [1/3] Node 19 scored
/ ===============--------------- 50% [3/6] (ETA: 1.0s) [1/3] Node 22 scored
\ ====================---------- 67% [4/6] (ETA: 0.6s) [1/3] Node 25 scored
\ =========================----- 83% [5/6] (ETA: 0.3s) [1/3] Node 26 scored
/ ============================== 100% [6/6] (ETA: 0.0s) [1/3] Node 29 scored
- ============================== 100% [6/6] (ETA: 0.0s) [1/3] Candidates scored
v ============================== 100% [6/6] [2.1s] [1/3] Candidates scored
- ------------------------------ 0% [0/6] (ETA: ?)
- =====------------------------- 17% [1/6] (ETA: 2.8s) [2/3] Node 25 accepted
- ==========-------------------- 33% [2/6] (ETA: 2.2s) [2/3] Node 18 accepted
| ===============--------------- 50% [3/6] (ETA: 1.9s) [2/3] Node 26 rejected
- ====================---------- 67% [4/6] (ETA: 1.3s) [2/3] Node 29 rejected
\ =========================----- 83% [5/6] (ETA: 0.7s) [2/3] Node 19 rejected
/ ============================== 100% [6/6] (ETA: 0.0s) [2/3] Node 22 rejected
/ ============================== 100% [6/6] (ETA: 0.0s) [2/3] Search complete
v ============================== 100% [6/6] [4.0s] [2/3] Search complete
- ------------------------------ 0% [0/2] (ETA: ?)
\ ===============--------------- 50% [1/2] (ETA: 0.7s) [3/3] Weighted node 25
\ ============================== 100% [2/2] (ETA: 0.0s) [3/3] Weighted node 18
| ============================== 100% [2/2] (ETA: 0.0s) [3/3] Weights estimated
v ============================== 100% [2/2] [1.3s] [3/3] Weights estimated
- ------------------------------ 0% [0/6] (ETA: ?)
/ =====------------------------- 17% [1/6] (ETA: 2.5s) [1/3] Node 18 scored
/ ==========-------------------- 33% [2/6] (ETA: 1.0s) [1/3] Node 22 scored
/ ===============--------------- 50% [3/6] (ETA: 0.5s) [1/3] Node 26 scored
- ====================---------- 67% [4/6] (ETA: 0.3s) [1/3] Node 19 scored
- =========================----- 83% [5/6] (ETA: 0.1s) [1/3] Node 25 scored
\ ============================== 100% [6/6] (ETA: 0.0s) [1/3] Node 29 scored
\ ============================== 100% [6/6] (ETA: 0.0s) [1/3] Candidates scored
v ============================== 100% [6/6] [0.7s] [1/3] Candidates scored
- ------------------------------ 0% [0/6] (ETA: ?)
- =====------------------------- 17% [1/6] (ETA: 2.7s) [2/3] Node 25 accepted
\ ==========-------------------- 33% [2/6] (ETA: 2.4s) [2/3] Node 18 accepted
/ ===============--------------- 50% [3/6] (ETA: 2.0s) [2/3] Node 26 rejected
- ====================---------- 67% [4/6] (ETA: 1.4s) [2/3] Node 29 rejected
\ =========================----- 83% [5/6] (ETA: 0.7s) [2/3] Node 19 rejected
/ ============================== 100% [6/6] (ETA: 0.0s) [2/3] Node 22 rejected
/ ============================== 100% [6/6] (ETA: 0.0s) [2/3] Search complete
v ============================== 100% [6/6] [4.1s] [2/3] Search complete
- ------------------------------ 0% [0/2] (ETA: ?)
| ===============--------------- 50% [1/2] (ETA: 0.3s) [3/3] Weighted node 25
- ============================== 100% [2/2] (ETA: 0.0s) [3/3] Weighted node 18
- ============================== 100% [2/2] (ETA: 0.0s) [3/3] Weights estimated
v ============================== 100% [2/2] [0.6s] [3/3] Weights estimated
- ------------------------------ 0% [0/6] (ETA: ?)
- =====------------------------- 17% [1/6] (ETA: 2.6s) [1/3] Node 18 scored
- ==========-------------------- 33% [2/6] (ETA: 1.1s) [1/3] Node 22 scored
- ===============--------------- 50% [3/6] (ETA: 0.5s) [1/3] Node 26 scored
- ====================---------- 67% [4/6] (ETA: 0.3s) [1/3] Node 19 scored
\ =========================----- 83% [5/6] (ETA: 0.1s) [1/3] Node 25 scored
\ ============================== 100% [6/6] (ETA: 0.0s) [1/3] Node 29 scored
| ============================== 100% [6/6] (ETA: 0.0s) [1/3] Candidates scored
v ============================== 100% [6/6] [0.9s] [1/3] Candidates scored
- ------------------------------ 0% [0/6] (ETA: ?)
- =====------------------------- 17% [1/6] (ETA: 2.8s) [2/3] Node 25 accepted
\ ==========-------------------- 33% [2/6] (ETA: 2.4s) [2/3] Node 18 accepted
/ ===============--------------- 50% [3/6] (ETA: 2.0s) [2/3] Node 26 rejected
- ====================---------- 67% [4/6] (ETA: 1.4s) [2/3] Node 29 rejected
| =========================----- 83% [5/6] (ETA: 0.7s) [2/3] Node 19 rejected
/ ============================== 100% [6/6] (ETA: 0.0s) [2/3] Node 22 rejected
/ ============================== 100% [6/6] (ETA: 0.0s) [2/3] Search complete
v ============================== 100% [6/6] [4.1s] [2/3] Search complete
- ------------------------------ 0% [0/2] (ETA: ?)
\ ===============--------------- 50% [1/2] (ETA: 1.2s) [3/3] Weighted node 25
| ============================== 100% [2/2] (ETA: 0.0s) [3/3] Weighted node 18
| ============================== 100% [2/2] (ETA: 0.0s) [3/3] Weights estimated
v ============================== 100% [2/2] [1.4s] [3/3] Weights estimated
NULL
<1b>[2K<1b>[1A
<1b>[2K<1b>[?7hv ============================== 100% [1/1] [0.0s] [1/3] Candidate scoring done
v ============================== 100% [1/1] [0.0s] [2/3] Greedy shift search...
<1b>[?7li ============================== 100% [1/1] [0.0s] [1/1] complete
<1b>[2K<1b>[?7hi ============================== 100% [1/1] [0.0s] [1/1] complete
<1b>[?7l- ------------------------------ 0% [0/1] (ETA: ?)
<1b>[2K- ============================== 100% [1/1] (ETA: 0.0s) [1/3] Candidate scoring complete
<1b>[2K- ============================== 100% [1/1] (ETA: 0.0s) [1/3] Candidate scoring done
<1b>[2Kv ============================== 100% [1/1] [0.0s] [1/3] Candidate scoring done
<1b>[2Kv ============================== 100% [1/1] [0.0s] [1/3] Candidate scoring done
- ------------------------------ 0% [0/1] (ETA: ?)
<1b>[2K<1b>[1A
<1b>[2Kv ============================== 100% [1/1] [0.0s] [1/3] Candidate scoring done
- ============================== 100% [1/1] (ETA: 0.0s) [2/3] Greedy shift search complete
<1b>[2K<1b>[1A
<1b>[2Kv ============================== 100% [1/1] [0.0s] [1/3] Candidate scoring done
- ============================== 100% [1/1] (ETA: 0.0s) [2/3] Greedy shift search done
<1b>[2K<1b>[1A
<1b>[2Kv ============================== 100% [1/1] [0.0s] [1/3] Candidate scoring done
v ============================== 100% [1/1] [0.0s] [2/3] Greedy shift search done
<1b>[2K<1b>[1A
<1b>[2K<1b>[?7hv ============================== 100% [1/1] [0.0s] [1/3] Candidate scoring done
v ============================== 100% [1/1] [0.0s] [2/3] Greedy shift search...
Loading required namespace: intervals
[ FAIL 2 | WARN 11 | SKIP 138 | PASS 2978 ]
══ Skipped tests (138) ═════════════════════════════════════════════════════════
• Development-only comparison script is excluded from source tarballs (6):
'test-compare-simulation-generators.R:16:3',
'test-compare-simulation-generators.R:33:3',
'test-compare-simulation-generators.R:50:3',
'test-compare-simulation-generators.R:63:3',
'test-compare-simulation-generators.R:79:3',
'test-compare-simulation-generators.R:85:3'
• Development-only simulation regeneration scripts are excluded from source
tarballs (7): 'test-simulation-vignette-cache.R:196:3',
'test-simulation-vignette-cache.R:302:3',
'test-simulation-vignette-cache.R:352:3',
'test-simulation-vignette-cache.R:408:3',
'test-simulation-vignette-cache.R:515:3',
'test-simulation-vignette-cache.R:576:3',
'test-simulation-vignette-cache.R:650:3'
• Lineage-rate vignette source is unavailable in installed tests (1):
'test-vignette-html-widgets.R:5:3'
• On CRAN (93): 'test-createSimulationTemplate.R:8:3',
'test-createSimulationTemplate.R:34:3',
'test-createSimulationTemplate.R:65:3',
'test-createSimulationTemplate.R:89:3',
'test-createSimulationTemplate.R:291:3',
'test-createSimulationTemplate.R:310:3',
'test-createSimulationTemplate.R:361:3',
'test-createSimulationTemplate.R:401:3',
'test-createSimulationTemplate.R:458:3',
'test-createSimulationTemplate.R:490:3',
'test-createSimulationTemplate.R:520:3', 'test-paired-tuning-grid.R:69:3',
'test-print-bifrost_search.R:3:1',
'test-print-bifrost_simulation_template.R:8:3',
'test-print-bifrost_simulation_template.R:27:3',
'test-print-bifrost_simulation_template.R:51:3',
'test-print-bifrost_simulation_template.R:69:3',
'test-runFalsePositiveSimulationStudy.R:135:3',
'test-runFalsePositiveSimulationStudy.R:180:3',
'test-runFalsePositiveSimulationStudy.R:208:3',
'test-runFalsePositiveSimulationStudy.R:268:3',
'test-runFalsePositiveSimulationStudy.R:294:3',
'test-runFalsePositiveSimulationStudy.R:324:3',
'test-runFalsePositiveSimulationStudy.R:349:3',
'test-runFalsePositiveSimulationStudy.R:375:3',
'test-runFalsePositiveSimulationStudy.R:436:3',
'test-runFalsePositiveSimulationStudy.R:484:3',
'test-runFalsePositiveSimulationStudy.R:522:3',
'test-runFalsePositiveSimulationStudy.R:552:3',
'test-runFalsePositiveSimulationStudy.R:580:3',
'test-runFalsePositiveSimulationStudy.R:617:3',
'test-runFalsePositiveSimulationStudy.R:683:3',
'test-runFalsePositiveSimulationStudy.R:718:3',
'test-runFalsePositiveSimulationStudy.R:768:3',
'test-runFalsePositiveSimulationStudy.R:833:3',
'test-runFalsePositiveSimulationStudy.R:861:3',
'test-runFalsePositiveSimulationStudy.R:899:3',
'test-runSearchTuningGrid.R:88:3', 'test-runSearchTuningGrid.R:150:3',
'test-runSearchTuningGrid.R:190:3', 'test-runSearchTuningGrid.R:392:3',
'test-runSearchTuningGrid.R:461:3', 'test-runSearchTuningGrid.R:601:3',
'test-runSearchTuningGrid.R:668:3', 'test-runSearchTuningGrid.R:712:3',
'test-runSearchTuningGrid.R:787:3', 'test-runSearchTuningGrid.R:962:3',
'test-runShiftRecoverySimulationStudy.R:75:3',
'test-runShiftRecoverySimulationStudy.R:133:3',
'test-runShiftRecoverySimulationStudy.R:174:3',
'test-runShiftRecoverySimulationStudy.R:246:3',
'test-runShiftRecoverySimulationStudy.R:280:3',
'test-runShiftRecoverySimulationStudy.R:321:3',
'test-runShiftRecoverySimulationStudy.R:358:3',
'test-runShiftRecoverySimulationStudy.R:391:3',
'test-runShiftRecoverySimulationStudy.R:475:3',
'test-runShiftRecoverySimulationStudy.R:533:3',
'test-runShiftRecoverySimulationStudy.R:578:3',
'test-runShiftRecoverySimulationStudy.R:614:3',
'test-runShiftRecoverySimulationStudy.R:649:3',
'test-runShiftRecoverySimulationStudy.R:700:3',
'test-runShiftRecoverySimulationStudy.R:775:3',
'test-runShiftRecoverySimulationStudy.R:836:3',
'test-runShiftRecoverySimulationStudy.R:894:3',
'test-runShiftRecoverySimulationStudy.R:992:3',
'test-runShiftRecoverySimulationStudy.R:1027:3',
'test-runShiftRecoverySimulationStudy.R:1081:3',
'test-runShiftRecoverySimulationStudy.R:1118:3',
'test-runShiftRecoverySimulationStudy.R:1213:3',
'test-search-baseline-output.R:1:1', 'test-search-characterization.R:3:1',
'test-searchOptimalConfiguration.R:3:1', 'test-simulateNullDataset.R:132:3',
'test-simulateNullDataset.R:147:3', 'test-simulateNullDataset.R:199:3',
'test-simulateNullDataset.R:222:3', 'test-simulateNullDataset.R:237:3',
'test-simulateNullDataset.R:249:3', 'test-simulateNullDataset.R:264:3',
'test-simulateNullDataset.R:296:3', 'test-simulateShiftedDataset.R:133:3',
'test-simulateShiftedDataset.R:179:3', 'test-simulateShiftedDataset.R:200:3',
'test-simulateShiftedDataset.R:293:3', 'test-simulateShiftedDataset.R:343:3',
'test-simulateShiftedDataset.R:368:3', 'test-simulateShiftedDataset.R:395:3',
'test-simulateShiftedDataset.R:430:3', 'test-simulateShiftedDataset.R:494:3',
'test-simulateShiftedDataset.R:513:3', 'test-simulateShiftedDataset.R:536:3',
'test-simulateShiftedDataset.R:559:3', 'test-simulateShiftedDataset.R:622:3'
• Part 1 vignette source is unavailable in installed tests (1):
'test-simulation-terminology.R:9:3'
• Simulation vignette not present (3):
'test-simulation-vignette-cache.R:829:3',
'test-simulation-vignette-cache.R:930:3',
'test-simulation-vignette-cache.R:958:3'
• Simulation vignette sources are unavailable in installed tests (1):
'test-simulation-terminology.R:54:3'
• Simulation vignettes not present (1):
'test-simulation-vignette-cache.R:866:3'
• development exporter unavailable (2): 'test-replicate-metrics.R:170:3',
'test-replicate-metrics.R:214:3'
• development exporter unavailable in package build (2):
'test-replicate-metrics.R:105:3', 'test-replicate-metrics.R:127:3'
• paired-tuning exporter absent (9): 'test-paired-tuning-cache.R:108:3',
'test-paired-tuning-cache.R:209:3', 'test-paired-tuning-cache.R:222:3',
'test-paired-tuning-cache.R:282:3', 'test-paired-tuning-cache.R:297:3',
'test-paired-tuning-cache.R:314:3', 'test-paired-tuning-cache.R:342:3',
'test-paired-tuning-cache.R:363:3', 'test-paired-tuning-cache.R:383:3'
• paired-tuning inputs absent (1): 'test-paired-tuning-cache.R:118:3'
• repository artifacts unavailable (1): 'test-replicate-metrics.R:3:3'
• repository empirical artifact directory unavailable for focal search (2):
'test-lineage_rates.R:684:3', 'test-shift-distributions.R:1865:3'
• repository empirical artifact directory unavailable for post-hoc object (5):
'test-regime-integration.R:1961:3', 'test-regime-integration.R:2003:3',
'test-regime-integration.R:2037:3', 'test-regime-integration.R:2335:3',
'test-regime-integration.R:2395:3'
• repository empirical artifact directory unavailable for sensitivity bundle
(1): 'test-shift-distributions.R:1335:3'
• repository empirical artifact directory unavailable for serialized artifacts
(1): 'test-serialized-artifacts.R:28:3'
• repository empirical artifact directory unavailable for simulation vignette
cache (1): 'test-simulation-vignette-cache.R:3:3'
══ Failed tests ════════════════════════════════════════════════════════════════
── Failure ('test-search-background-history.R:97:9'): background history preserves accepted, rejected and failed proposals and RNG ──
Expected `actual$warnings` to be identical to `expected$warnings`.
Differences:
actual vs expected
- "future::supportsMulticore() is deprecated. Please use the identical parallelly::supportsMulticore() instead [testthat::test_check() -> testthat::test_dir() -> testthat::test_files() -> testthat::test_files_serial() -> testthat::with_reporter() -> base::tryCatch() -> tryCatchList() -> tryCatchOne() -> doTryCatch() -> base::lapply() -> testthat::FUN() -> testthat::source_file() -> testthat::test_code() -> base::withRestarts() -> withOneRestart() -> doWithOneRestart() -> base::tryCatch() -> tryCatchList() -> tryCatchOne() -> doTryCatch() -> base::withCallingHandlers() -> base::eval() -> eval() -> testthat::test_that() -> testthat::test_code() -> base::withRestarts() -> withOneRestart() -> doWithOneRestart() -> base::tryCatch() -> tryCatchList() -> tryCatchOne() -> doTryCatch() -> base::withCallingHandlers() -> base::eval() -> eval() -> run() -> base::withCallingHandlers() -> base::do.call() -> bifrost::(function (sorted_candidates, current_best_tree, current_best_ic, shift_id, IC, formula, trait_data, shift_acceptance_threshold, store_model_fit_history, sub_dir, plot, verbose_log, tick = function(...) invisible(NULL), heartbeat = NULL, is_rstudio = FALSE, fit = .bifrost_search_fit_ic, .future_plan_active = FALSE, ...) { if (length(sorted_candidates) > 0L && !is.null(heartbeat) && !isTRUE(.future_plan_active)) { dots <- list(...) forward_args <- c(list(sorted_candidates = sorted_candidates, current_best_tree = current_best_tree, current_best_ic = current_best_ic, shift_id = shift_id, IC = IC, formula = formula, trait_data = trait_data, shift_acceptance_threshold = shift_acceptance_threshold, store_model_fit_history = store_model_fit_history, sub_dir = sub_dir, plot = plot, verbose_log = verbose_log, tick = tick, heartbeat = heartbeat, is_rstudio = is_rstudio, fit = fit, .future_plan_active = TRUE), dots) return(.bifrost_search_with_future_plan(workers = 1L, is_rstudio_flag = is_rstudio, ensure_async = TRUE, work = function() do.call(.bifrost_search_forward, forward_args))) } shift_vec <- list() model_with_shift_no_uncertainty <- NULL best_tree_no_uncertainty <- NULL warnings_list <- list() model_fit_history <- list() for (i in seq_along(sorted_candidates)) { shift_node_name <- names(sorted_candidates)[i] shift_node_number <- as.integer(sub(\"Node \", \"\", shift_node_name)) percent_complete <- round((i/length(sorted_candidates)) * 100, 2) verbose_log(\"Evaluating shift at node %d (%.2f%% complete)\", shift_node_number, percent_complete) outcome <- \"error\" proposal <- NULL add_shift_result <- addShiftToModel(current_best_tree, shift_node_number, shift_id) shifted_tree <- add_shift_result$tree shift_id <- add_shift_result$shift_id if (plot == TRUE) { nodelabels(text = shift_id, node = shift_node_number) } tryCatch({ fit_args <- c(list(IC, formula, shifted_tree, trait_data), list(...)) fit_proposal <- .bifrost_search_fit_proposal fit_work <- function() fit_proposal(fit, fit_args, IC, current_best_ic, shift_acceptance_threshold, history = if (store_model_fit_history) list(step = i, candidate_node = shift_node_number, regime_id = as.character(shift_id)), sub_dir = if (!is.null(heartbeat)) sub_dir) proposal <- withCallingHandlers(if (is.null(heartbeat)) { fit_work() } else { .bifrost_search_await_work(fit_work, heartbeat = heartbeat) }, warning = function(w) { warning_message <- paste(\"Warning in evaluating shift at node\", shift_node_number, \":\", w$message) warning(warning_message) warnings_list[[length(warnings_list) + 1]] <<- warning_message invokeRestart(\"muffleWarning\") }) model_with_shift <- proposal$value$model new_ic <- proposal$value$ic delta_ic <- proposal$value$delta_ic if (store_model_fit_history) { model_fit_history <- proposal$value } if (delta_ic >= shift_acceptance_threshold) { current_best_tree <- shifted_tree current_best_ic <- new_ic outcome <- \"accepted\" verbose_log(\"Shift at node %d accepted. Updated %s: %.2f; Delta %s: %.2f\", shift_node_number, IC, current_best_ic, IC, delta_ic) shift_vec[[length(shift_vec) + 1]] <- shift_node_number best_tree_no_uncertainty <- current_best_tree model_with_shift_no_uncertainty <- model_with_shift } else { outcome <- \"rejected\" verbose_log(\"Shift at node %d rejected. Delta %s: %.2f < threshold: %.2f\", shift_node_number, IC, delta_ic, shift_acceptance_threshold) } }, error = function(e) { warning_message <- paste(\"Error in evaluating shift at node\", shift_node_number, \":\", e$message) warning(warning_message) warnings_list[[length(warnings_list) + 1]] <<- warning_message if (store_model_fit_history) { model_fit_history <<- list(step = i, candidate_node = shift_node_number, regime_id = as.character(shift_id), model = NULL, ic = NA_real_, accepted = FALSE, delta_ic = NA, status = \"error\", error = e$message) } }) tick(message = sprintf(\"[2/3] Node %d %s\", shift_node_number, if (outcome == \"error\") \"failed\" else outcome)) for (condition in proposal$conditions) { if (inherits(condition, \"error\")) stop(condition) warning(condition) } if (isTRUE(store_model_fit_history) && !is.null(sub_dir) && (is.null(heartbeat) || outcome == \"error\")) { iteration_num <- i + 1L .bifrost_search_save_history(model_fit_history, sub_dir, iteration_num) } if (plot == TRUE) { colorvec <- setNames(object = c(\"black\", rainbow(length(unique(getStates(shifted_tree, type = \"both\"))) - 1)), nm = sort(as.numeric(unique(getStates(shifted_tree, type = \"both\"))))) plotSimmap(current_best_tree, colors = colorvec, ftype = \"off\") } } list(current_best_tree = current_best_tree, current_best_ic = current_best_ic, shift_id = shift_id, shift_vec = shift_vec, shifts_no_uncertainty = unlist(shift_vec), model_with_shift_no_uncertainty = model_with_shift_no_uncertainty, best_tree_no_uncertainty = best_tree_no_uncertainty, warnings_list = warnings_list, model_fit_history = model_fit_history) })() -> bifrost::.bifrost_search_with_future_plan() -> future::supportsMulticore()]"
"Warning in evaluating shift at node 15 : fit warning"
"Error in evaluating shift at node 17 : fit failed after drawing"
── Failure ('test-search-background-history.R:99:11'): background history preserves accepted, rejected and failed proposals and RNG ──
Expected `actual` to be identical to `expected`.
Differences:
actual$warnings vs expected$warnings
- "future::supportsMulticore() is deprecated. Please use the identical parallelly::supportsMulticore() instead [testthat::test_check() -> testthat::test_dir() -> testthat::test_files() -> testthat::test_files_serial() -> testthat::with_reporter() -> base::tryCatch() -> tryCatchList() -> tryCatchOne() -> doTryCatch() -> base::lapply() -> testthat::FUN() -> testthat::source_file() -> testthat::test_code() -> base::withRestarts() -> withOneRestart() -> doWithOneRestart() -> base::tryCatch() -> tryCatchList() -> tryCatchOne() -> doTryCatch() -> base::withCallingHandlers() -> base::eval() -> eval() -> testthat::test_that() -> testthat::test_code() -> base::withRestarts() -> withOneRestart() -> doWithOneRestart() -> base::tryCatch() -> tryCatchList() -> tryCatchOne() -> doTryCatch() -> base::withCallingHandlers() -> base::eval() -> eval() -> run() -> base::withCallingHandlers() -> base::do.call() -> bifrost::(function (sorted_candidates, current_best_tree, current_best_ic, shift_id, IC, formula, trait_data, shift_acceptance_threshold, store_model_fit_history, sub_dir, plot, verbose_log, tick = function(...) invisible(NULL), heartbeat = NULL, is_rstudio = FALSE, fit = .bifrost_search_fit_ic, .future_plan_active = FALSE, ...) { if (length(sorted_candidates) > 0L && !is.null(heartbeat) && !isTRUE(.future_plan_active)) { dots <- list(...) forward_args <- c(list(sorted_candidates = sorted_candidates, current_best_tree = current_best_tree, current_best_ic = current_best_ic, shift_id = shift_id, IC = IC, formula = formula, trait_data = trait_data, shift_acceptance_threshold = shift_acceptance_threshold, store_model_fit_history = store_model_fit_history, sub_dir = sub_dir, plot = plot, verbose_log = verbose_log, tick = tick, heartbeat = heartbeat, is_rstudio = is_rstudio, fit = fit, .future_plan_active = TRUE), dots) return(.bifrost_search_with_future_plan(workers = 1L, is_rstudio_flag = is_rstudio, ensure_async = TRUE, work = function() do.call(.bifrost_search_forward, forward_args))) } shift_vec <- list() model_with_shift_no_uncertainty <- NULL best_tree_no_uncertainty <- NULL warnings_list <- list() model_fit_history <- list() for (i in seq_along(sorted_candidates)) { shift_node_name <- names(sorted_candidates)[i] shift_node_number <- as.integer(sub(\"Node \", \"\", shift_node_name)) percent_complete <- round((i/length(sorted_candidates)) * 100, 2) verbose_log(\"Evaluating shift at node %d (%.2f%% complete)\", shift_node_number, percent_complete) outcome <- \"error\" proposal <- NULL add_shift_result <- addShiftToModel(current_best_tree, shift_node_number, shift_id) shifted_tree <- add_shift_result$tree shift_id <- add_shift_result$shift_id if (plot == TRUE) { nodelabels(text = shift_id, node = shift_node_number) } tryCatch({ fit_args <- c(list(IC, formula, shifted_tree, trait_data), list(...)) fit_proposal <- .bifrost_search_fit_proposal fit_work <- function() fit_proposal(fit, fit_args, IC, current_best_ic, shift_acceptance_threshold, history = if (store_model_fit_history) list(step = i, candidate_node = shift_node_number, regime_id = as.character(shift_id)), sub_dir = if (!is.null(heartbeat)) sub_dir) proposal <- withCallingHandlers(if (is.null(heartbeat)) { fit_work() } else { .bifrost_search_await_work(fit_work, heartbeat = heartbeat) }, warning = function(w) { warning_message <- paste(\"Warning in evaluating shift at node\", shift_node_number, \":\", w$message) warning(warning_message) warnings_list[[length(warnings_list) + 1]] <<- warning_message invokeRestart(\"muffleWarning\") }) model_with_shift <- proposal$value$model new_ic <- proposal$value$ic delta_ic <- proposal$value$delta_ic if (store_model_fit_history) { model_fit_history <- proposal$value } if (delta_ic >= shift_acceptance_threshold) { current_best_tree <- shifted_tree current_best_ic <- new_ic outcome <- \"accepted\" verbose_log(\"Shift at node %d accepted. Updated %s: %.2f; Delta %s: %.2f\", shift_node_number, IC, current_best_ic, IC, delta_ic) shift_vec[[length(shift_vec) + 1]] <- shift_node_number best_tree_no_uncertainty <- current_best_tree model_with_shift_no_uncertainty <- model_with_shift } else { outcome <- \"rejected\" verbose_log(\"Shift at node %d rejected. Delta %s: %.2f < threshold: %.2f\", shift_node_number, IC, delta_ic, shift_acceptance_threshold) } }, error = function(e) { warning_message <- paste(\"Error in evaluating shift at node\", shift_node_number, \":\", e$message) warning(warning_message) warnings_list[[length(warnings_list) + 1]] <<- warning_message if (store_model_fit_history) { model_fit_history <<- list(step = i, candidate_node = shift_node_number, regime_id = as.character(shift_id), model = NULL, ic = NA_real_, accepted = FALSE, delta_ic = NA, status = \"error\", error = e$message) } }) tick(message = sprintf(\"[2/3] Node %d %s\", shift_node_number, if (outcome == \"error\") \"failed\" else outcome)) for (condition in proposal$conditions) { if (inherits(condition, \"error\")) stop(condition) warning(condition) } if (isTRUE(store_model_fit_history) && !is.null(sub_dir) && (is.null(heartbeat) || outcome == \"error\")) { iteration_num <- i + 1L .bifrost_search_save_history(model_fit_history, sub_dir, iteration_num) } if (plot == TRUE) { colorvec <- setNames(object = c(\"black\", rainbow(length(unique(getStates(shifted_tree, type = \"both\"))) - 1)), nm = sort(as.numeric(unique(getStates(shifted_tree, type = \"both\"))))) plotSimmap(current_best_tree, colors = colorvec, ftype = \"off\") } } list(current_best_tree = current_best_tree, current_best_ic = current_best_ic, shift_id = shift_id, shift_vec = shift_vec, shifts_no_uncertainty = unlist(shift_vec), model_with_shift_no_uncertainty = model_with_shift_no_uncertainty, best_tree_no_uncertainty = best_tree_no_uncertainty, warnings_list = warnings_list, model_fit_history = model_fit_history) })() -> bifrost::.bifrost_search_with_future_plan() -> future::supportsMulticore()]"
"Warning in evaluating shift at node 15 : fit warning"
"Error in evaluating shift at node 17 : fit failed after drawing"
[ FAIL 2 | WARN 11 | SKIP 138 | PASS 2978 ]
Error:
! Test failures.
Execution halted
Flavor: r-devel-linux-x86_64-fedora-clang