-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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] silence logs in print(), show(), summary() tests #5237
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! I see only the test files names and the dots. What are the tasks left to close #4862?
It's really weird to me that the logs at https://pipelines.actions.githubusercontent.com/serviceHosts/1f53ab1f-1bd7-45b1-9237-cc6b054df090/_apis/pipelines/1/runs/30984/signedlogcontent/17?urlExpires=2022-05-24T16%3A18%3A43.5279800Z&urlSigningMethod=HMACV1&urlSignature=3rzC%2F8PrYEI46MUXIzdWrTHDcMPMfcLJPuT7wmriySk%3D (for example) are getting truncated after the
There should actually be many more. Here's what I see running
The last piece for #4862 is to eliminate those Fatal logs that make it through. Those happen because for the R package, LightGBM/include/LightGBM/utils/log.h Lines 121 to 130 in f2e1ad6
AND raises an R exception (which again writes to stderr). LightGBM/R-package/src/lightgbm_R.cpp Lines 37 to 42 in f2e1ad6
The R exception is trapped and its output suppressed by |
Oh I was looking at the MSVC logs and they look perfect but I see the same as you do on my laptop, I thought it was something on my side because it has M1 but I run it with Rosetta so I figured it didn't work correctly. |
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. |
Contributes to #4862.
This PR proposes capturing the logs printed from tests on
show()
,summary()
, andprint()
methods forBooster
, added in #4686.Using the following code, I found that this PR reduces the output of the R package's tests from 73 lines to 28 lines.