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] improve docs about nthreads parameter #4756

Merged
merged 2 commits into from
Oct 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/Parameters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ Core Parameters

- ``num_threads`` :raw-html:`<a id="num_threads" title="Permalink to this parameter" href="#num_threads">&#x1F517;&#xFE0E;</a>`, default = ``0``, type = int, aliases: ``num_thread``, ``nthread``, ``nthreads``, ``n_jobs``

- used only in ``train``, ``prediction`` and ``refit`` tasks or in correspondent functions of language-specific packages

- number of threads for LightGBM

- ``0`` means default number of threads in OpenMP
Expand Down
1 change: 1 addition & 0 deletions include/LightGBM/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ struct Config {
std::string tree_learner = "serial";

// alias = num_thread, nthread, nthreads, n_jobs
// desc = used only in ``train``, ``prediction`` and ``refit`` tasks or in correspondent functions of language-specific packages
// desc = number of threads for LightGBM
// desc = ``0`` means default number of threads in OpenMP
// desc = for the best speed, set this to the number of **real CPU cores**, not the number of threads (most CPUs use `hyper-threading <https://en.wikipedia.org/wiki/Hyper-threading>`__ to generate 2 threads per CPU core)
Expand Down
2 changes: 1 addition & 1 deletion python-package/lightgbm/sklearn.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ def __init__(
If RandomState object (numpy), a random integer is picked based on its state to seed the C++ code.
If None, default seeds in C++ code are used.
n_jobs : int, optional (default=-1)
Number of parallel threads.
Number of parallel threads to use for training (can be changed at prediction time).
silent : bool, optional (default=True)
Whether to print messages while running boosting.
importance_type : str, optional (default='split')
Expand Down