Rename backend name from “torch_distributed” to “ray” in Orca Pytorch Estimator (#4388)
* change backend name from torch_distributed to ray * update in examples and docs
This commit is contained in:
		
							parent
							
								
									0c0e99fee5
								
							
						
					
					
						commit
						71cd125837
					
				
					 3 changed files with 4 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -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:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue