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

[ci] make check-docs job compatible with rstcheck 6.x #5388

Merged
merged 4 commits into from
Jul 28, 2022
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
16 changes: 11 additions & 5 deletions .ci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ if [[ $TASK == "check-docs" ]] || [[ $TASK == "check-links" ]]; then
-y \
-n $CONDA_ENV \
doxygen \
rstcheck || exit -1
'rstcheck>=6.0.0' || exit -1
# check reStructuredText formatting
cd $BUILD_DIRECTORY/python-package
rstcheck --report warning $(find . -type f -name "*.rst") || exit -1
rstcheck --report-level warning $(find . -type f -name "*.rst") || exit -1
cd $BUILD_DIRECTORY/docs
rstcheck --report warning --ignore-directives=autoclass,autofunction,doxygenfile $(find . -type f -name "*.rst") || exit -1
rstcheck --report-level warning --ignore-directives=autoclass,autofunction,autosummary,doxygenfile $(find . -type f -name "*.rst") || exit -1
# build docs
make html || exit -1
if [[ $TASK == "check-links" ]]; then
Expand Down Expand Up @@ -118,10 +118,16 @@ if [[ $TASK == "swig" ]]; then
exit 0
fi

# temporary fix for https://github.com/microsoft/LightGBM/issues/5390
if [[ $PYTHON_VERSION == "3.7" ]]; then
DASK_DEPENDENCIES="dask distributed"
else
DASK_DEPENDENCIES="dask=2022.7.0 distributed=2022.7.0"
fi

conda install -q -y -n $CONDA_ENV \
cloudpickle \
dask \
distributed \
${DASK_DEPENDENCIES} \
joblib \
matplotlib \
numpy \
Expand Down
10 changes: 5 additions & 5 deletions docs/Experiments.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ We set up total 3 settings for experiments. The parameters of these settings are

1. xgboost:

.. code::
.. code:: text

eta = 0.1
max_depth = 8
Expand All @@ -68,7 +68,7 @@ We set up total 3 settings for experiments. The parameters of these settings are

2. xgboost\_hist (using histogram based algorithm):

.. code::
.. code:: text

eta = 0.1
num_round = 500
Expand All @@ -81,7 +81,7 @@ We set up total 3 settings for experiments. The parameters of these settings are

3. LightGBM:

.. code::
.. code:: text

learning_rate = 0.1
num_leaves = 255
Expand All @@ -102,7 +102,7 @@ Result
Speed
'''''

We compared speed using only the training task without any test or metric output. We didn't count the time for IO.
We compared speed using only the training task without any test or metric output. We didn't count the time for IO.
For the ranking tasks, since XGBoost and LightGBM implement different ranking objective functions, we used ``regression`` objective for speed benchmark, for the fair comparison.

The following table is the comparison of time cost:
Expand Down Expand Up @@ -212,7 +212,7 @@ We ran our experiments on 16 Windows servers with the following specifications:
Settings
^^^^^^^^

.. code::
.. code:: text

learning_rate = 0.1
num_leaves = 255
Expand Down
32 changes: 16 additions & 16 deletions docs/GPU-Windows.rst
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ You may choose a version other than the most recent one if you need a previous M

Then, add to your PATH the following (to adjust to your MinGW version):

::
.. code:: text

C:\Program Files\mingw-w64\x86_64-5.3.0-posix-seh-rt_v4-rev0\mingw64\bin

Expand Down Expand Up @@ -181,7 +181,7 @@ We can now start downloading and compiling the required Boost libraries:

- Open a command prompt, and run

.. code::
.. code:: console

cd C:\boost\boost_1_63_0\tools\build
bootstrap.bat gcc
Expand All @@ -192,22 +192,22 @@ To build the Boost libraries, you have two choices for command prompt:

- If you have only one single core, you can use the default

.. code::
.. code:: console

b2 install --build_dir="C:\boost\boost-build" --prefix="C:\boost\boost-build" toolset=gcc --with=filesystem,system threading=multi --layout=system release

- If you want to do a multithreaded library building (faster), add ``-j N`` by replacing N by the number of cores/threads you have.
For instance, for 2 cores, you would do

.. code::
.. code:: console

b2 install --build_dir="C:\boost\boost-build" --prefix="C:\boost\boost-build" toolset=gcc --with=filesystem,system threading=multi --layout=system release -j 2

Ignore all the errors popping up, like Python, etc., they do not matter for us.

Your folder should look like this at the end (not fully detailed):

::
.. code:: text

- C
|--- boost
Expand Down Expand Up @@ -253,7 +253,7 @@ Installing Git for Windows is straightforward, use the following `link`_.

Now, we can fetch LightGBM repository for GitHub. Run Git Bash and the following command:

::
.. code:: console

cd C:/
mkdir github_repos
Expand Down Expand Up @@ -319,7 +319,7 @@ Installing CMake requires one download first and then a lot of configuration for
:target: ./_static/images/screenshot-configured-lightgbm.png
:alt: A screenshot of the C Make window after clicking on the configure button.

::
.. code:: text

Looking for CL_VERSION_2_0
Looking for CL_VERSION_2_0 - found
Expand All @@ -333,7 +333,7 @@ Installing CMake requires one download first and then a lot of configuration for

- Click ``Generate`` to get the following message:

::
.. code:: text

Generating done

Expand All @@ -355,19 +355,19 @@ You can do everything in the Git Bash console you left open:

- If you closed Git Bash console previously, run this to get back to the build folder:

::
.. code:: console

cd C:/github_repos/LightGBM/build

- If you did not close the Git Bash console previously, run this to get to the build folder:

::
.. code:: console

cd LightGBM/build

- Setup MinGW as ``make`` using

::
.. code:: console

alias make='mingw32-make'

Expand All @@ -387,7 +387,7 @@ Testing in CLI

You can now test LightGBM directly in CLI in a **command prompt** (not Git Bash):

::
.. code:: console

cd C:/github_repos/LightGBM/examples/binary_classification
"../../lightgbm.exe" config=train.conf data=binary.train valid=binary.test objective=binary device=gpu
Expand Down Expand Up @@ -448,7 +448,7 @@ And then, follow the regular LightGBM CLI installation from there.
Once you have installed LightGBM CLI, assuming your LightGBM is in ``C:\github_repos\LightGBM``,
open a command prompt and run the following:

::
.. code:: console

gdb --args "../../lightgbm.exe" config=train.conf data=binary.train valid=binary.test objective=binary device=gpu

Expand All @@ -461,7 +461,7 @@ Type ``run`` and press the Enter key.

You will probably get something similar to this:

::
.. code:: text

[LightGBM] [Info] This is the GPU trainer!!
[LightGBM] [Info] Total Bins 6143
Expand All @@ -476,7 +476,7 @@ You will probably get something similar to this:

There, write ``backtrace`` and press the Enter key as many times as gdb requests two choices:

::
.. code:: text

Program received signal SIGSEGV, Segmentation fault.
0x00007ffbb37c11f1 in strlen () from C:\Windows\system32\msvcrt.dll
Expand Down Expand Up @@ -511,7 +511,7 @@ There, write ``backtrace`` and press the Enter key as many times as gdb requests

Right-click the command prompt, click "Mark", and select all the text from the first line (with the command prompt containing gdb) to the last line printed, containing all the log, such as:

::
.. code:: text

C:\LightGBM\examples\binary_classification>gdb --args "../../lightgbm.exe" config=train.conf data=binary.train valid=binary.test objective=binary device=gpu
GNU gdb (GDB) 7.10.1
Expand Down
Loading