Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
85 lines (55 sloc) 3.12 KB

Contributing to PyTorch Geometric

If you are interested in contributing to PyTorch Geometric, your contributions will fall into two categories:

  1. You want to implement a new feature:
    • In general, we accept any features as long as they fit the scope of this package. If you are unsure about this or need help on the design/implementation of your feature, post about it in an issue.
  2. You want to fix a bug:
    • Feel free to send a Pull Request any time you encounter a bug. Please provide a clear and concise description of what the bug was. If you are unsure about if this is a bug at all or how to fix, post about it in an issue.

Once you finish implementing a feature or bug-fix, please send a Pull Request to

Developing PyTorch Geometric

To develop PyTorch Geometric on your machine, here are some tips:

  1. Uninstall all existing PyTorch Geometric installs:
pip uninstall torch-geometric
pip uninstall torch-geometric  # run this command twice
  1. Clone a copy of PyTorch Geometric from source:
git clone
cd pytorch_geometric
  1. If you already have a PyTorch Geometric from source, update it:
git pull
  1. Install PyTorch Geometric in develop mode:
python develop

This mode will symlink the Python files from the current local source tree into the Python install. Hence, if you modify a Python file, you do not need to reinstall PyTorch Geometric again and again.

  1. Ensure that you have a working PyTorch Geometric installation by running the entire test suite with
python test

In case an error occurs, please first check if all sub-packages (torch-scatter, torch-sparse, torch-cluster and torch-spline-conv) are on its latest reported version.

Unit Testing

PyTorch Geometric's testing is located under test/. Run the entire test suite with

python test

or run individual test files, like pytest --no-cov test/utils/, for individual test suites.

Continuous Integration

PyTorch Geometric uses Travis CI in combination with CodeCov for continuous integration.

Everytime you send a Pull Request, your commit will be built and checked against the PyTorch Geometric guidelines:

  1. Ensure that your code is formatted correctly by testing against the styleguides of flake8 and pycodestyle:
pycodestyle torch_geometric test examples
flake8 torch_geometric test examples

If you do not want to format your code manually, we recommend to use yapf.

  1. Ensure that the entire test suite passes and that code coverage roughly stays at 100%. Please feel encouraged to provide a test with your submitted code.
python test
You can’t perform that action at this time.