Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[R-package] allow for small numerical differences in Booster test #4714

Merged
merged 2 commits into from
Oct 26, 2021

Conversation

jameslamb
Copy link
Collaborator

See #4680 for background on this PR.

On the submission of v3.3.0 to CRAN, one test in the R package failed in one CRAN test setup (r-devel-windows-x86_64-gcc10-UCRT).

── 1. Failure (test_lgb.Booster.R:469:5): Booster$eval() should work on a Datase
eval_in_mem not identical to eval_from_file.
Objects equal but not identical

This PR proposes using testthat::expect_equal() instead of testthat::expect_identical() on Windows in the relevant test, to reduce the risk of a rejected submission caused by small numerical precision differences.

Notes for Reviewers

As noted in #4680, LightGBM's CI does not currently have a job replicating CRAN's UCRT tests, and I'm not aware of an easy way to replicate that job. Also, confusingly, CRAN re-ran the package's tests in that environment and the second time, they all passed: #4680 (comment).

With this PR, I'm just trying to be overly-cautious in the hope that it reduces the risk of {lightgbm} being removed from CRAN. I think that most users of the R package would prefer very small numeric precision issues on Windows to the package being entirely unavailable.

@jameslamb jameslamb mentioned this pull request Oct 25, 2021
18 tasks
Copy link
Collaborator

@StrikerRUS StrikerRUS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for the detailed description! It makes sense to me.

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants