[docs] improve wordings and code style (#3887)

This commit is contained in:
Nikita Titov 2021-02-01 02:28:01 +03:00 коммит произвёл GitHub
Родитель 198a15138e
Коммит e0887ae0c7
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 74 добавлений и 43 удалений

Просмотреть файл

@ -59,7 +59,8 @@ Now we are ready to checkout LightGBM and compile it with GPU support:
git clone --recursive https://github.com/microsoft/LightGBM
cd LightGBM
mkdir build ; cd build
mkdir build
cd build
cmake -DUSE_GPU=1 ..
  # if you have installed NVIDIA CUDA to a customized location, you should specify paths to OpenCL headers and library like the following:
# cmake -DUSE_GPU=1 -DOpenCL_LIBRARY=/usr/local/cuda/lib64/libOpenCL.so -DOpenCL_INCLUDE_DIR=/usr/local/cuda/include/ ..

Просмотреть файл

@ -103,8 +103,10 @@ On Linux LightGBM can be built using **CMake** and **gcc** or **Clang**.
.. code::
git clone --recursive https://github.com/microsoft/LightGBM ; cd LightGBM
mkdir build ; cd build
git clone --recursive https://github.com/microsoft/LightGBM
cd LightGBM
mkdir build
cd build
cmake ..
make -j4
@ -148,8 +150,10 @@ Build from GitHub
.. code::
git clone --recursive https://github.com/microsoft/LightGBM ; cd LightGBM
mkdir build ; cd build
git clone --recursive https://github.com/microsoft/LightGBM
cd LightGBM
mkdir build
cd build
cmake ..
make -j4
@ -172,9 +176,11 @@ gcc
.. code::
git clone --recursive https://github.com/microsoft/LightGBM ; cd LightGBM
git clone --recursive https://github.com/microsoft/LightGBM
cd LightGBM
export CXX=g++-7 CC=gcc-7 # replace "7" with version of gcc installed on your machine
mkdir build ; cd build
mkdir build
cd build
cmake ..
make -j4
@ -273,8 +279,10 @@ On Linux a version of LightGBM without OpenMP support can be built using **CMake
.. code::
git clone --recursive https://github.com/microsoft/LightGBM ; cd LightGBM
mkdir build ; cd build
git clone --recursive https://github.com/microsoft/LightGBM
cd LightGBM
mkdir build
cd build
cmake -DUSE_OPENMP=OFF ..
make -j4
@ -300,8 +308,10 @@ Only **Apple Clang** version 8.1 or higher is supported.
.. code::
git clone --recursive https://github.com/microsoft/LightGBM ; cd LightGBM
mkdir build ; cd build
git clone --recursive https://github.com/microsoft/LightGBM
cd LightGBM
mkdir build
cd build
cmake -DUSE_OPENMP=OFF ..
make -j4
@ -324,9 +334,11 @@ gcc
.. code::
git clone --recursive https://github.com/microsoft/LightGBM ; cd LightGBM
git clone --recursive https://github.com/microsoft/LightGBM
cd LightGBM
export CXX=g++-7 CC=gcc-7 # replace "7" with version of gcc installed on your machine
mkdir build ; cd build
mkdir build
cd build
cmake -DUSE_OPENMP=OFF ..
make -j4
@ -399,8 +411,10 @@ On Linux an MPI version of LightGBM can be built using **Open MPI**, **CMake** a
.. code::
git clone --recursive https://github.com/microsoft/LightGBM ; cd LightGBM
mkdir build ; cd build
git clone --recursive https://github.com/microsoft/LightGBM
cd LightGBM
mkdir build
cd build
cmake -DUSE_MPI=ON ..
make -j4
@ -438,8 +452,10 @@ Only **Apple Clang** version 8.1 or higher is supported.
.. code::
git clone --recursive https://github.com/microsoft/LightGBM ; cd LightGBM
mkdir build ; cd build
git clone --recursive https://github.com/microsoft/LightGBM
cd LightGBM
mkdir build
cd build
cmake -DUSE_MPI=ON ..
make -j4
@ -468,9 +484,11 @@ gcc
.. code::
git clone --recursive https://github.com/microsoft/LightGBM ; cd LightGBM
git clone --recursive https://github.com/microsoft/LightGBM
cd LightGBM
export CXX=g++-7 CC=gcc-7 # replace "7" with version of gcc installed on your machine
mkdir build ; cd build
mkdir build
cd build
cmake -DUSE_MPI=ON ..
make -j4
@ -500,8 +518,10 @@ To build LightGBM GPU version, run the following commands:
.. code::
git clone --recursive https://github.com/microsoft/LightGBM ; cd LightGBM
mkdir build ; cd build
git clone --recursive https://github.com/microsoft/LightGBM
cd LightGBM
mkdir build
cd build
cmake -DUSE_GPU=1 ..
# if you have installed NVIDIA CUDA to a customized location, you should specify paths to OpenCL headers and library like the following:
# cmake -DUSE_GPU=1 -DOpenCL_LIBRARY=/usr/local/cuda/lib64/libOpenCL.so -DOpenCL_INCLUDE_DIR=/usr/local/cuda/include/ ..
@ -582,8 +602,10 @@ To build LightGBM CUDA version, run the following commands:
.. code::
git clone --recursive https://github.com/microsoft/LightGBM ; cd LightGBM
mkdir build ; cd build
git clone --recursive https://github.com/microsoft/LightGBM
cd LightGBM
mkdir build
cd build
cmake -DUSE_CUDA=1 ..
make -j4
@ -603,8 +625,10 @@ On Linux a HDFS version of LightGBM can be built using **CMake** and **gcc**.
.. code::
git clone --recursive https://github.com/microsoft/LightGBM ; cd LightGBM
mkdir build ; cd build
git clone --recursive https://github.com/microsoft/LightGBM
cd LightGBM
mkdir build
cd build
cmake -DUSE_HDFS=ON ..
# if you have installed HDFS to a customized location, you should specify paths to HDFS headers (hdfs.h) and library (libhdfs.so) like the following:
# cmake \
@ -683,8 +707,10 @@ On Linux a Java wrapper of LightGBM can be built using **Java**, **SWIG**, **CMa
.. code::
git clone --recursive https://github.com/microsoft/LightGBM ; cd LightGBM
mkdir build ; cd build
git clone --recursive https://github.com/microsoft/LightGBM
cd LightGBM
mkdir build
cd build
cmake -DUSE_SWIG=ON ..
make -j4
@ -717,8 +743,10 @@ Only **Apple Clang** version 8.1 or higher is supported.
.. code::
git clone --recursive https://github.com/microsoft/LightGBM ; cd LightGBM
mkdir build ; cd build
git clone --recursive https://github.com/microsoft/LightGBM
cd LightGBM
mkdir build
cd build
cmake -DUSE_SWIG=ON -DAPPLE_OUTPUT_DYLIB=ON ..
make -j4
@ -741,9 +769,11 @@ gcc
.. code::
git clone --recursive https://github.com/microsoft/LightGBM ; cd LightGBM
git clone --recursive https://github.com/microsoft/LightGBM
cd LightGBM
export CXX=g++-7 CC=gcc-7 # replace "7" with version of gcc installed on your machine
mkdir build ; cd build
mkdir build
cd build
cmake -DUSE_SWIG=ON -DAPPLE_OUTPUT_DYLIB=ON ..
make -j4

Просмотреть файл

@ -60,7 +60,7 @@ Build Threadless Version
pip install lightgbm --install-option=--nomp
All remarks, except the **OpenMP** requirement for **macOS** users, from `Build from Sources section <#build-from-sources>`__ are actual in this case.
All requirements, except the **OpenMP** requirement for **macOS** users, from `Build from Sources section <#build-from-sources>`__ apply for this installation option as well.
It is **strongly not recommended** to use this version of LightGBM!
@ -71,7 +71,7 @@ Build MPI Version
pip install lightgbm --install-option=--mpi
All remarks from `Build from Sources section <#build-from-sources>`__ are actual in this case.
All requirements from `Build from Sources section <#build-from-sources>`__ apply for this installation option as well.
For **Windows** users, compilation with **MinGW-w64** is not supported and `CMake`_ (version 3.8 or higher) is strongly required.
@ -84,7 +84,7 @@ Build GPU Version
pip install lightgbm --install-option=--gpu
All remarks from `Build from Sources section <#build-from-sources>`__ are actual in this case.
All requirements from `Build from Sources section <#build-from-sources>`__ apply for this installation option as well.
For **Windows** users, `CMake`_ (version 3.8 or higher) is strongly required.
@ -117,7 +117,7 @@ Build CUDA Version
pip install lightgbm --install-option=--cuda
All remarks from `Build from Sources section <#build-from-sources>`__ are actual in this case and `CMake`_ (version 3.16 or higher) is strongly required.
All requirements from `Build from Sources section <#build-from-sources>`__ apply for this installation option as well, and `CMake`_ (version 3.16 or higher) is strongly required.
**CUDA** library is needed: details for installation can be found in `Installation Guide <https://github.com/microsoft/LightGBM/blob/master/docs/Installation-Guide.rst#build-cuda-version-experimental>`__.
@ -167,7 +167,7 @@ If you use ``conda`` to manage Python dependencies, you can install LightGBM usi
Install from GitHub
'''''''''''''''''''
All remarks from `Build from Sources section <#build-from-sources>`__ are actual in this case.
All requirements from `Build from Sources section <#build-from-sources>`__ apply for this installation option as well.
For **Windows** users, if you get any errors during installation and there is the warning ``WARNING:LightGBM:Compilation with MSBuild from existing solution file failed.`` in the log, you should install `CMake`_ (version 3.8 or higher).
@ -180,19 +180,19 @@ For **Windows** users, if you get any errors during installation and there is th
Note: ``sudo`` (or administrator rights in **Windows**) may be needed to perform the command.
Run ``python setup.py install --nomp`` to disable **OpenMP** support. All remarks from `Build Threadless Version section <#build-threadless-version>`__ are actual in this case.
Run ``python setup.py install --nomp`` to disable **OpenMP** support. All requirements from `Build Threadless Version section <#build-threadless-version>`__ apply for this installation option as well.
Run ``python setup.py install --mpi`` to enable **MPI** support. All remarks from `Build MPI Version section <#build-mpi-version>`__ are actual in this case.
Run ``python setup.py install --mpi`` to enable **MPI** support. All requirements from `Build MPI Version section <#build-mpi-version>`__ apply for this installation option as well.
Run ``python setup.py install --mingw``, if you want to use **MinGW-w64** on **Windows** instead of **Visual Studio**. All remarks from `Build with MinGW-w64 on Windows section <#build-with-mingw-w64-on-windows>`__ are actual in this case.
Run ``python setup.py install --mingw``, if you want to use **MinGW-w64** on **Windows** instead of **Visual Studio**. All requirements from `Build with MinGW-w64 on Windows section <#build-with-mingw-w64-on-windows>`__ apply for this installation option as well.
Run ``python setup.py install --gpu`` to enable GPU support. All remarks from `Build GPU Version section <#build-gpu-version>`__ are actual in this case. To pass additional options to **CMake** use the following syntax: ``python setup.py install --gpu --opencl-include-dir=/usr/local/cuda/include/``, see `Build GPU Version section <#build-gpu-version>`__ for the complete list of them.
Run ``python setup.py install --gpu`` to enable GPU support. All requirements from `Build GPU Version section <#build-gpu-version>`__ apply for this installation option as well. To pass additional options to **CMake** use the following syntax: ``python setup.py install --gpu --opencl-include-dir=/usr/local/cuda/include/``, see `Build GPU Version section <#build-gpu-version>`__ for the complete list of them.
Run ``python setup.py install --cuda`` to enable CUDA support. All remarks from `Build CUDA Version section <#build-cuda-version>`__ are actual in this case.
Run ``python setup.py install --cuda`` to enable CUDA support. All requirements from `Build CUDA Version section <#build-cuda-version>`__ apply for this installation option as well.
Run ``python setup.py install --hdfs`` to enable HDFS support. All remarks from `Build HDFS Version section <#build-hdfs-version>`__ are actual in this case.
Run ``python setup.py install --hdfs`` to enable HDFS support. All requirements from `Build HDFS Version section <#build-hdfs-version>`__ apply for this installation option as well.
Run ``python setup.py install --bit32``, if you want to use 32-bit version. All remarks from `Build 32-bit Version with 32-bit Python section <#build-32-bit-version-with-32-bit-python>`__ are actual in this case.
Run ``python setup.py install --bit32``, if you want to use 32-bit version. All requirements from `Build 32-bit Version with 32-bit Python section <#build-32-bit-version-with-32-bit-python>`__ apply for this installation option as well.
If you get any errors during installation or due to any other reasons, you may want to build dynamic library from sources by any method you prefer (see `Installation Guide <https://github.com/microsoft/LightGBM/blob/master/docs/Installation-Guide.rst>`__) and then just run ``python setup.py install --precompile``.