-
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] Remove CLI-only objects #3566
Conversation
Is it not enough to build only LightGBM/R-package/src/install.libs.R Line 135 in 0b5e60d
Do we build executable file for R somewhere? Could you please clarify what is a benefit from adding those if s in CMakeLists.txt ? Sorry, but I'm a bit confused by these changes for CMake. I thought we already excluded excess files from R builds by building only _lightgbm target.
|
Not as we currently have it set up. If you look in the logs for any of the R CI jobs, you'll see building the R package is still compiling
Maybe I could just move Line 333 in 0b5e60d
All the |
OK, I see. I guess it comes from here. And excluding this line for Lines 320 to 321 in 0b5e60d
Line 345 in 0b5e60d
|
I think so, yeah. That is what I meant in #3566 (comment). I can remove add_executable(lightgbm src/main.cpp src/application.cpp ${SOURCES}) Maybe I was being overly-cautious trying to only make changes that impact the R package. I'll update this and see how it goes. |
After that change, I got this error
I don't think I can just add an Line 333 in 0b5e60d
if statements I originally added).
So to solve this and avoid making too many invasive changes in |
@@ -17,6 +17,8 @@ | |||
|
|||
namespace LightGBM { | |||
|
|||
Common::Timer global_timer; |
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.
moving this define from application.cpp
to this file (the first source file that needs global_timer
) to try to fix these errors:
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.
LGTM for CMake part!
ping @guolinke for global_timer
.
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.
LGTM
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. |
I realized, looking at logs, that the R package includes some objects that are only necessary for the LightGBM CLI. This PR proposes removing them.
Benefits of this change
Notes for Reviewers
I think that the Python package would benefit from a change like this too, but I didn't want this PR to get too large.