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

[docs][R-package] Update the explanation of num_threads (fixes #4192) #4199

Merged
merged 4 commits into from
Apr 19, 2021

Conversation

issactoast
Copy link
Contributor

Hi @jameslamb

Here is the PR related to the issue #4192. Please check out the update!

Best,
Issac

@ghost
Copy link

ghost commented Apr 19, 2021

CLA assistant check
All CLA requirements met.

Copy link
Collaborator

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

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

Thanks very much for this!

Sorry I didn't check earlier, but there are two other places with this same bit of documentation. Can you please update these as well?

@jameslamb jameslamb changed the title Update the explanation of num_threads in lightgbm.R (microsoft#4192) [R-package] Update the explanation of num_threads Apr 19, 2021
@jameslamb jameslamb added the doc label Apr 19, 2021
@issactoast
Copy link
Contributor Author

@jameslamb Sure, will do that, but just wonder what's the difference between LightGBM/lightgbm_r and LightGBM/R-package? I know the latter is the r package but what's the lightgbm_r? That folder has the same three files lgb.cv.R, lgb.train.R, and lightgbm.R

@jameslamb
Copy link
Collaborator

Oh sure, I can explain. The R package wraps C/C++ code stored in src/, include/, and external_libs/. So to build the R package, you have to copy all that code into the correct location inside the R package's file structure.

To do that, the R build scripts (build-cran-package.sh for autoconf-based builds and build_r.R for CMake-based builds) create a new folder, lightgbm_r, and copy R-package/ plus all those C/C++ files into it at build time. I think it will be clearer if you inspect those build scripts.

lightgbm_r is not actually checked into the repo, as it is ignored by gitignore. So you do not need to change aything in that directory.

Let me know if you have other questions! We'd love to have you contribute more to the R package in the future of you're interested, and understanding this setup might help you do that.

@issactoast
Copy link
Contributor Author

Thank you for the explanation! Yes, I would like to add some contributions to the LGBM if I could! :) I will ask if I have some questions related to the package!

@jameslamb jameslamb self-requested a review April 19, 2021 04:06
Copy link
Collaborator

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

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

Looks great, thanks very much!

@jameslamb jameslamb changed the title [R-package] Update the explanation of num_threads [R-package] Update the explanation of num_threads (fixes #4192) Apr 19, 2021
@StrikerRUS StrikerRUS changed the title [R-package] Update the explanation of num_threads (fixes #4192) [docs][R-package] Update the explanation of num_threads (fixes #4192) Apr 19, 2021
@StrikerRUS StrikerRUS merged commit e12409f into microsoft:master Apr 19, 2021
@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.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants