From 71cd125837098fef379f9f634117a6da15e4d422 Mon Sep 17 00:00:00 2001 From: Shan Yu Date: Tue, 12 Apr 2022 09:29:21 +0800 Subject: [PATCH] =?UTF-8?q?Rename=20backend=20name=20from=20=E2=80=9Ctorch?= =?UTF-8?q?=5Fdistributed=E2=80=9D=20to=20=E2=80=9Cray=E2=80=9D=20in=20Orc?= =?UTF-8?q?a=20Pytorch=20Estimator=20(#4388)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * change backend name from torch_distributed to ray * update in examples and docs --- .../doc/Orca/Overview/distributed-training-inference.md | 4 ++-- .../Orca/QuickStart/orca-pytorch-distributed-quickstart.md | 2 +- docs/readthedocs/source/doc/PythonAPI/Orca/orca.rst | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/readthedocs/source/doc/Orca/Overview/distributed-training-inference.md b/docs/readthedocs/source/doc/Orca/Overview/distributed-training-inference.md index 299afc79..9a2622ad 100644 --- a/docs/readthedocs/source/doc/Orca/Overview/distributed-training-inference.md +++ b/docs/readthedocs/source/doc/Orca/Overview/distributed-training-inference.md @@ -181,7 +181,7 @@ View the related [Python API doc](https://bigdl.readthedocs.io/en/latest/doc/Pyt **Using `torch.distributed` or *Horovod* backend** -Alternatively, users can create a PyTorch `Estimator` using `torch.distributed` or *Horovod* backend by specifying the `backend` argument to be "torch_distributed" or "horovod". In this case, the `model` and `optimizer` should be wrapped in _Creater Functions_. For example: +Alternatively, users can create a PyTorch `Estimator` using `torch.distributed` or *Horovod* backend by specifying the `backend` argument to be "ray" or "horovod". In this case, the `model` and `optimizer` should be wrapped in _Creater Functions_. For example: ```python def model_creator(config): @@ -196,7 +196,7 @@ est = Estimator.from_torch(model=model, optimizer=optimizer_creator, loss=nn.NLLLoss(), config={"lr": 1e-2}, - backend="torch_distributed") # or backend="horovod" + backend="ray") # or backend="horovod" ``` Then users can perform distributed model training and inference as follows: diff --git a/docs/readthedocs/source/doc/Orca/QuickStart/orca-pytorch-distributed-quickstart.md b/docs/readthedocs/source/doc/Orca/QuickStart/orca-pytorch-distributed-quickstart.md index 401bf98a..1a24d12b 100644 --- a/docs/readthedocs/source/doc/Orca/QuickStart/orca-pytorch-distributed-quickstart.md +++ b/docs/readthedocs/source/doc/Orca/QuickStart/orca-pytorch-distributed-quickstart.md @@ -118,7 +118,7 @@ from bigdl.orca.learn.pytorch import Estimator from bigdl.orca.learn.metrics import Accuracy est = Estimator.from_torch(model=model_creator, optimizer=optim_creator, loss=criterion, metrics=[Accuracy()], - backend="torch_distributed") + backend="ray") ``` Next, fit and evaluate using the Estimator diff --git a/docs/readthedocs/source/doc/PythonAPI/Orca/orca.rst b/docs/readthedocs/source/doc/PythonAPI/Orca/orca.rst index 947279e1..d378a707 100644 --- a/docs/readthedocs/source/doc/PythonAPI/Orca/orca.rst +++ b/docs/readthedocs/source/doc/PythonAPI/Orca/orca.rst @@ -62,7 +62,7 @@ orca.learn.pytorch.estimator orca.learn.pytorch.pytorch_ray_estimator ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Orca Pytorch Estimator with backend of "horovod" or "torch_distributed". +Orca Pytorch Estimator with backend of "horovod" or "ray". .. autoclass:: bigdl.orca.learn.pytorch.pytorch_ray_estimator.PyTorchRayEstimator :members: