Skip to content

The Ultimate Guide to PyTorch Contributions

albanD edited this page Mar 18, 2024 · 5 revisions

Thank you for considering contributing to PyTorch. The contribution process for PyTorch is similar to most open source projects on Github, involving a healthy amount of open discussion between the maintainers, core developers and the broader community.

Table of Contents


All the ways to contribute

There are many ways to contribute to the PyTorch project, and we value them all. Most open source contributors start with small improvements, and ramp up the scale of their work as they become more familiar with the project and the community. Here are some pathways to becoming a PyTorch contributor, listed in no particular order:

Community Discussions PyTorch has an active community of users, researchers, and developers. We tend to congregate on the PyTorch User Forum and PyTorch Developer Forum. Participating in conversations here is a great way to learn about PyTorch and contribute your expertise to the community.
PyTorch developers also engage in discussions around design and feature-level changes at the PyTorch RFC repo and Slack channel (read more).
Tutorials If you are already a user of PyTorch, good places to start contributing are the PyTorch tutorials. The PyTorch tutorials are mainly authored by community members, and we always welcome new contributions or updates to existing tutorials. Learn more about contributing to PyTorch tutorials.
Documentation We aim to produce high-quality documentation, but typos or other inaccuracies may creep in. If you find something to fix or improve, please send in a pull request. The docs guide contains resources for you to start submitting documentation updates.
Reporting Issues If you happen to run into some unexpected behavior, you can help by creating an issue (if a similar one doesn't already exist on the issue list). Use the Bug Report template and supply as much information as you can, and any additional insights/guesses you might have. When reporting an issue, it's helpful to narrow down the problematic behavior to a minimal reproducible example. See Finding or Reporting Issues to get started.
Reproducing and Investigating Issues Another valuable way to contribute is by reproducing open issues. Sometimes the problematic behavior may be isolated to specific environments, or the reported issue is too broad. By repro'ing, you can add details about the problematic behavior, perhaps even further narrow it down towards a root cause, and offer your insights that can help developers to troubleshoot the problem.
Proposing New Features We welcome ideas for new features in PyTorch! A great way to share it with the community is by drafting an RFC (request for comments), especially if you have fleshed out the design and would like it reviewed. For more casual ideas, the Dev-Discuss forum is a good place to start.
Submitting Pull Requests Fixing existing issues or implementing new features require changes to the codebase. We accept new code contributions via Github Pull Requests. We can't accept any changes unless you sign the PyTorch Contributors License Agreement. You will need to set up your developer environment, find an issue to work upon, and submit your changes for review. The PR guide below contains resources for you to start submitting your changes to PyTorch.
Advocate for PyTorch As a PyTorch user, you are already a valued member of our community. Using PyTorch in your projects, examples, demos, workshops, and blogs goes a long way in raising awareness for PyTorch and the community. Please reach out to marketing@pytorch.org for any support with sharing your work.

Getting Started with Documentation changes

PyTorch documentation is generated from docstrings in the python source using Sphinx. This generated HTML is copied to the docs folder in the main branch of pytorch.github.io, and is then served via GitHub pages.

You need to build and install PyTorch before you can develop on the docs.

Here are some resources for developing PyTorch docs:


Getting Started with Pull Requests

Here are some resources that can help you contribute pull requests:

Familiarize yourself with the codebase

Setup the developer environment

Submitting a change

Keep up with PyTorch Developments

Clone this wiki locally