ocbe-uio / BayesMallows

R-package for Bayesian preference learning with the Mallows rank model.
https://ocbe-uio.github.io/BayesMallows/
GNU General Public License v3.0
21 stars 9 forks source link

Test expectation fails on noLD #398

Closed osorensen closed 8 months ago

osorensen commented 8 months ago

On CRAN with "no long double", https://www.stats.ox.ac.uk/pub/bdr/noLD/BayesMallows.out

 ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-update_mallows.R:55:3'): update_mallows works ────────────────
  mod1$alpha$value[[13]] (`actual`) not equal to 0.544567207683911 (`expected`).

    `actual`: 0.2
  `expected`: 0.5

  [ FAIL 1 | WARN 0 | SKIP 6 | PASS 327 ]
  Error: Test failures
  Execution halted

https://github.com/ocbe-uio/BayesMallows/blob/a1d3ee857fdfb5fc0a3934c82db5507788fbeecb/tests/testthat/test-update_mallows.R#L55

First, I take this as support for the hypothesis that platform dependent results are due to numerical precision, and not the random number generators themself. Second, I've already removed this line from the tests because it's also been failing on other platforms. Hence I think the bug should be fixed once we submit the current development version to CRAN. Keeping this issue open until then.