From 9d62b145910de4a581d08eb83370c8e7c9b8749c Mon Sep 17 00:00:00 2001 From: Jiaming Yuan Date: Tue, 2 Feb 2021 20:43:31 +0800 Subject: [PATCH] Fix document. [skip ci] (#6669) --- doc/tutorials/dask.rst | 2 ++ python-package/xgboost/dask.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/tutorials/dask.rst b/doc/tutorials/dask.rst index 7530ad953..400481f4e 100644 --- a/doc/tutorials/dask.rst +++ b/doc/tutorials/dask.rst @@ -410,6 +410,8 @@ Other customization XGBoost dask interface accepts other advanced features found in single node Python interface, including callback functions, custom evaluation metric and objective: +.. code-block:: python + def eval_error_metric(predt, dtrain: xgb.DMatrix): label = dtrain.get_label() r = np.zeros(predt.shape) diff --git a/python-package/xgboost/dask.py b/python-package/xgboost/dask.py index c75137a61..534ac0705 100644 --- a/python-package/xgboost/dask.py +++ b/python-package/xgboost/dask.py @@ -1313,8 +1313,8 @@ def inplace_predict( # pylint: disable=unused-argument Returns ------- prediction : - When input data is ``dask.array.Array`` or ``DaskDMatrix``, the return value is an - array, when input data is ``dask.dataframe.DataFrame``, return value can be + When input data is ``dask.array.Array``, the return value is an array, when input + data is ``dask.dataframe.DataFrame``, return value can be ``dask.dataframe.Series``, ``dask.dataframe.DataFrame`` or ``dask.array.Array``, depending on the output shape. '''