From 0186123ecc821988535a029c28690cd8271cd71d Mon Sep 17 00:00:00 2001 From: Antoni Baum Date: Fri, 26 Aug 2022 17:35:26 +0000 Subject: [PATCH 1/4] [AIR][Docs] Clarify how LGBM/XGB trainers work Signed-off-by: Antoni Baum --- python/ray/train/lightgbm/lightgbm_trainer.py | 7 +++++++ python/ray/train/xgboost/xgboost_trainer.py | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/python/ray/train/lightgbm/lightgbm_trainer.py b/python/ray/train/lightgbm/lightgbm_trainer.py index d018a4d59038..1ddc4523c719 100644 --- a/python/ray/train/lightgbm/lightgbm_trainer.py +++ b/python/ray/train/lightgbm/lightgbm_trainer.py @@ -24,6 +24,13 @@ class LightGBMTrainer(GBDTTrainer): for features with the categorical data type, consider using the :class:`Categorizer` preprocessor to set the dtypes in the dataset. + .. note:: + ``LightGBMTrainer`` does not modify or otherwise alter the working + of the LightGBM distributed training algorithm. + Ray only provides orchestration, data ingest and fault tolerance. + For more information on LightGBM distributed training, refer to + `LightGBM documentation `_. + Example: .. code-block:: python diff --git a/python/ray/train/xgboost/xgboost_trainer.py b/python/ray/train/xgboost/xgboost_trainer.py index 61ce02f3322d..b1fda424b6ad 100644 --- a/python/ray/train/xgboost/xgboost_trainer.py +++ b/python/ray/train/xgboost/xgboost_trainer.py @@ -20,6 +20,13 @@ class XGBoostTrainer(GBDTTrainer): This Trainer runs the XGBoost training loop in a distributed manner using multiple Ray Actors. + .. note:: + ``XGBoostTrainer`` does not modify or otherwise alter the working + of the XGBoost distributed training algorithm. + Ray only provides orchestration, data ingest and fault tolerance. + For more information on XGBoost distributed training, refer to + `XGBoost documentation `_. + Example: .. code-block:: python From 46e8ead3e04f9fbd50d56a372456d4609fb73184 Mon Sep 17 00:00:00 2001 From: Antoni Baum Date: Fri, 26 Aug 2022 17:48:36 +0000 Subject: [PATCH 2/4] Add to gbdt.rst Signed-off-by: Antoni Baum --- doc/source/train/gbdt.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/source/train/gbdt.rst b/doc/source/train/gbdt.rst index 636eee3f03fe..cd5f43d4c87d 100644 --- a/doc/source/train/gbdt.rst +++ b/doc/source/train/gbdt.rst @@ -5,6 +5,14 @@ XGBoost / LightGBM User Guide Ray Train has built-in support for XGBoost and LightGBM. +.. note:: + Ray Train does not modify or otherwise alter the working + of the underlying XGBoost / LightGBM distributed training algorithms. + Ray only provides orchestration, data ingest and fault tolerance. + For more information on GBDT distributed training, refer to + `XGBoost documentation `_ and + `LightGBM documentation `_. + Basic Usage ----------- From 1a621c04c7aefea4972c83a99f53c0799718be12 Mon Sep 17 00:00:00 2001 From: Antoni Baum Date: Fri, 26 Aug 2022 17:53:37 +0000 Subject: [PATCH 3/4] Use anonymous references Signed-off-by: Antoni Baum --- doc/source/train/gbdt.rst | 4 ++-- python/ray/train/lightgbm/lightgbm_trainer.py | 2 +- python/ray/train/xgboost/xgboost_trainer.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/source/train/gbdt.rst b/doc/source/train/gbdt.rst index cd5f43d4c87d..2a941d897482 100644 --- a/doc/source/train/gbdt.rst +++ b/doc/source/train/gbdt.rst @@ -10,8 +10,8 @@ Ray Train has built-in support for XGBoost and LightGBM. of the underlying XGBoost / LightGBM distributed training algorithms. Ray only provides orchestration, data ingest and fault tolerance. For more information on GBDT distributed training, refer to - `XGBoost documentation `_ and - `LightGBM documentation `_. + `XGBoost documentation `__ and + `LightGBM documentation `__. Basic Usage ----------- diff --git a/python/ray/train/lightgbm/lightgbm_trainer.py b/python/ray/train/lightgbm/lightgbm_trainer.py index 1ddc4523c719..6ae4fe6f0f01 100644 --- a/python/ray/train/lightgbm/lightgbm_trainer.py +++ b/python/ray/train/lightgbm/lightgbm_trainer.py @@ -29,7 +29,7 @@ class LightGBMTrainer(GBDTTrainer): of the LightGBM distributed training algorithm. Ray only provides orchestration, data ingest and fault tolerance. For more information on LightGBM distributed training, refer to - `LightGBM documentation `_. + `LightGBM documentation `__. Example: .. code-block:: python diff --git a/python/ray/train/xgboost/xgboost_trainer.py b/python/ray/train/xgboost/xgboost_trainer.py index b1fda424b6ad..c0a19d9b096c 100644 --- a/python/ray/train/xgboost/xgboost_trainer.py +++ b/python/ray/train/xgboost/xgboost_trainer.py @@ -25,7 +25,7 @@ class XGBoostTrainer(GBDTTrainer): of the XGBoost distributed training algorithm. Ray only provides orchestration, data ingest and fault tolerance. For more information on XGBoost distributed training, refer to - `XGBoost documentation `_. + `XGBoost documentation `__. Example: .. code-block:: python From bb884644d4dada311628d5513f4a8b9c17ec9f29 Mon Sep 17 00:00:00 2001 From: Antoni Baum Date: Fri, 26 Aug 2022 20:19:50 +0200 Subject: [PATCH 4/4] Update gbdt.rst --- doc/source/train/gbdt.rst | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/doc/source/train/gbdt.rst b/doc/source/train/gbdt.rst index 2a941d897482..8855050624b3 100644 --- a/doc/source/train/gbdt.rst +++ b/doc/source/train/gbdt.rst @@ -5,14 +5,6 @@ XGBoost / LightGBM User Guide Ray Train has built-in support for XGBoost and LightGBM. -.. note:: - Ray Train does not modify or otherwise alter the working - of the underlying XGBoost / LightGBM distributed training algorithms. - Ray only provides orchestration, data ingest and fault tolerance. - For more information on GBDT distributed training, refer to - `XGBoost documentation `__ and - `LightGBM documentation `__. - Basic Usage ----------- @@ -44,8 +36,18 @@ Ray-specific params are passed in through the trainer constructors. How to scale out training? -------------------------- The benefit of using Ray AIR is that you can seamlessly scale up your training by -adjusting the :class:`ScalingConfig `. Here are some -examples for common use-cases: +adjusting the :class:`ScalingConfig `. + +.. note:: + Ray Train does not modify or otherwise alter the working + of the underlying XGBoost / LightGBM distributed training algorithms. + Ray only provides orchestration, data ingest and fault tolerance. + For more information on GBDT distributed training, refer to + `XGBoost documentation `__ and + `LightGBM documentation `__. + + +Here are some examples for common use-cases: .. tabbed:: Multi-node CPU