Documentation I Like: PyTorch Installation
Published on under the Technical Writing category. Toggle Memex mode
Machine learning software often has complex installation requirements. This is because how you install and set up machine learning software can be heavily dependent on the operating system you are using, whether you have an NVIDIA CUDA-enabled GPU available on your machine, among other requirements.
Earlier this week, a colleague shared the official PyTorch installation instructions as an example of an effective installation instructions page. PyTorch is a machine learning framework implemented in Python. The installation page has an interactive box with buttons you can click to specify the system on which you want to run PyTorch. Here is a screenshot of the box that lets you customise your installation command:
You can specify:
- Whether you want to use the stable or Nightly build
- Your operating system
- The package manager you want to use
- Whether you want to install the Python PyTorch package or the C++ / Java
libtorchpackage - The compute platform on which you are running
After you click a button, the installation command below the table of buttons updates. You can choose exactly what system you are on and the web page will give you the command you need to get set up. This feels much more effective than a document that explains how installation instructions vary between operating systems as the main means by which you figure out how to install the software.
The installation command updates as you choose options, but that's not the only part of the page: the detailed instructions below are also updated. For example, if you choose macOS and scroll down you can see the versions of macOS that you can use with PyTorch, among other pieces of information.
Toward the end of the page, there is a Verification section that gives you some sample code to run that you can use to validate that PyTorch has been installed successfully. This is an effective way to give a user confidence that PyTorch has been successfully installed on their system.
I can think of at least one project to which I contribute that might benefit from having a table in which you can choose options that influence the content on the installation page.
Responses
Comment on this post
Respond to this post by sending a Webmention.
Have a comment? Email me at readers@jamesg.blog.

