Registry Mirror
Skip to content

Conversation

@avehtari

@avehtari avehtari commented Nov 28, 2026 •

Copy link
Copy Markdown
Member

Summary

In the CI of #682, the check at test_varsel.R:598 failed on Linux and macOS: the mean relative difference was 2.34e-15 and the tolerance 2.2e-15. On CSC Roihu and Windows, it passed. The rounding of two computations of the same value depends on the platform. This PR raises the tolerance of five similar checks, so that they do not fail on other platforms.

Changes

check old tolerance new tolerance old margin on Roihu
test_methods_vsel.R:751 (cv_proportions(), cumulated) .Machine$double.eps 1e2 * .Machine$double.eps 0.64
test_proj_predfun.R:97 (repair_re(), GLMM) 1e-15 1e-13 0.58
test_proj_predfun.R:109 (repair_re(), GLMM) 1e-15 1e-13 0.58
test_proj_predfun.R:165 (repair_re(), GLMM) 1e-15 1e-13 0.13
test_glm_ridge.R:348 (glm_ridge, intercept only) 1e-12 1e-10 0.11

With the new tolerances, the margins are 100 times smaller (at most 0.0064).

This PR was assisted by Claude

# Conflicts:
#	NEWS.md
#	tests/testthat/helpers/expectors.R
#	tests/testthat/setup.R
#	tests/testthat/test_as_matrix.R
#	tests/testthat/test_parallel.R
#	tests/testthat/test_proj_pred.R
#	tests/testthat/test_project.R
#	tests/testthat/test_refmodel.R
#	tests/testthat/test_setup.R
#	tests/testthat/test_varsel.R
# Conflicts:
#	tests/testthat/test_varsel.R
@avehtari avehtari added the tests testthat tests label Nov 28, 2026
# Conflicts:
#	tests/testthat/test_augdat.R
#	tests/testthat/test_custom_stats.R
#	tests/testthat/test_latent.R
#	tests/testthat/test_loo_fold_projection.R
#	tests/testthat/test_parallel.R
#	tests/testthat/test_proj_pred.R
#	tests/testthat/test_project.R
#	tests/testthat/test_varsel.R
@avehtari
avehtari merged commit 797a846 into master Nov 30, 2026
6 checks passed
@avehtari
avehtari deleted the test-tolerance-margins branch November 30, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests testthat tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants