PyTorch project is a Python package that provides GPU accelerated tensor computation and high level functionalities for building deep learning networks. For licensing details, see the PyTorch license doc on GitHub.
To monitor and debug your PyTorch models, consider using TensorBoard.
The following sections provide guidance on installing PyTorch on Azure Databricks and give an example of running PyTorch programs.
This is not a comprehensive guide to PyTorch. For more information, see the PyTorch website.
Databricks Runtime for ML
Databricks Runtime for Machine Learning includes PyTorch so you can create the cluster and start using PyTorch. For the version of PyTorch installed in the Databricks Runtime ML version you are using, see the release notes.
We recommend using the PyTorch included on Databricks Runtime for Machine Learning. However, if you must use Databricks Runtime, PyTorch can be installed as a Databricks PyPI library. The following example shows how to install PyTorch 1.5.0:
On GPU clusters, install
torchvisionby specifying the following:
On CPU clusters, install
torchvisionby using the following wheel files:
Use PyTorch on a single node
To test and migrate single-machine PyTorch workflows, you can start with a driver-only cluster on Azure Databricks by setting the number of workers to zero. Though Apache Spark is not functional under this setting, it is a cost-effective way to run single-machine PyTorch workflows.