Skip to content

Commit

Permalink
FIX-#2684: Add method level docs for Modin XGBoost (#2685)
Browse files Browse the repository at this point in the history
Signed-off-by: Alexey Prutskov <[email protected]>
  • Loading branch information
prutskov authored Feb 8, 2021
1 parent 7525f05 commit c637d89
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
# ones.
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.napoleon",
"sphinx.ext.intersphinx",
'sphinx.ext.todo',
'sphinx.ext.mathjax',
Expand Down
19 changes: 12 additions & 7 deletions docs/modin_xgboost.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,28 @@ XGBoost Train and Predict
Distributed XGBoost functionality is placed in ``modin.experimental.xgboost`` module.
``modin.experimental.xgboost`` provides a xgboost-like API for ``train`` and ``predict`` functions.

``train`` has all arguments of ``xgboost.train`` function exclude the `evals_result`
.. automodule:: modin.experimental.xgboost
:members: train

``train`` has all arguments of the ``xgboost.train`` function except for ``evals_result``
parameter which is returned as part of function return value instead of argument.

``predict`` is separate function unlike ``xgboost.Booster.predict`` which uses an additional argument
``model``. ``model`` could be ``xgboost.Booster`` or output of ``modin.experimental.xgboost`` function.
.. automodule:: modin.experimental.xgboost
:noindex:
:members: predict

Both functions have additional parameters ``nthread`` and ``evenly_data_distribution``.
``nthread`` sets number of threads to use per node in cluster.
``evenly_data_distribution`` sets rule of distribution data between nodes in cluster.
``predict`` is similar to ``xgboost.Booster.predict`` with an additional argument,
``model``.


ModinDMatrix
------------

Data is passed to ``modin.experimental.xgboost`` functions via a ``ModinDMatrix`` object.

The ``ModinDMatrix`` stores data as Modin DataFrames internally.
.. automodule:: modin.experimental.xgboost
:noindex:
:members: ModinDMatrix

Currently, the ``ModinDMatrix`` supports ``modin.pandas.DataFrame`` only as an input.

Expand Down
1 change: 1 addition & 0 deletions docs/requirements-doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ pandas
modin[all]
sphinxcontrib_plantuml
sphinx-issues
xgboost

0 comments on commit c637d89

Please sign in to comment.