PyTorch is a popular ML library written in native Python and has built-in support for GPUs. Installing PyTorch is very similar to installing TensorFlow. You can install it via PyPI in the Create | Library menu choice. In the PyPI import library menu, put in the current version of PyPI (torch==1.1.0.post2). The installation steps are as follows:
- Go to https://pypi.org/ and search for PyTorch.
- Copy the name and version number you want in this format: torch==1.1.0.post2.
- In the Workspace tab of Databricks, right-click anywhere and from the dropdown, click on Create and then Library.
- Select PyPI as the library source.
- Copy the name of the library and the version number and paste that into the Package section.
- Click Create.
If you have already created a cluster, you can attach PyTorch to it. You can also install PyTorch on all clusters.