Skip to content

Commit

Permalink
[Example] Add Pytorch Geometric Example (#4568)
Browse files Browse the repository at this point in the history
* add example for Pytorch Geometric

* remove hydra

* add docstring

* remove description

* rename folder

* update script to not break test

* remove .lock

* add Pytorch Geometric to doc

* add docstring at the begining

* add comments

* Update pl_examples/pytorch_ecosystem/pytorch_geometric/README.md

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>

* Update pl_examples/pytorch_ecosystem/pytorch_geometric/README.md

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>

* Update pl_examples/pytorch_ecosystem/pytorch_geometric/cora_dna.py

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>

* add toml

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Jirka Borovec <jirka@pytorchlightning.ai>
  • Loading branch information
3 people authored and rohitgr7 committed Nov 21, 2020
1 parent 359bc3e commit d05c68a
Show file tree
Hide file tree
Showing 8 changed files with 476 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,14 @@ include *.md
include LICENSE

exclude *.sh
exclude *.toml
exclude *.svg
recursive-include pytorch_lightning *.py

# Include marker file for PEP 561
include pytorch_lightning/py.typed

# include examples
recursive-include pl_examples *.py *.md *.sh *.txt
recursive-include pl_examples *.py *.md *.sh *.txt *.toml

# exclude tests from package
recursive-exclude tests *
Expand All @@ -49,6 +48,7 @@ recursive-include docs/source/_images/general/ pl_overview* tf_* tutorial_* PTL1
recursive-include requirements *.txt
recursive-exclude requirements *.sh
include requirements.txt
include pyproject.toml

# Exclude build configs
exclude *.yml
Expand Down
1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ PyTorch Lightning Documentation
:name: Examples
:caption: Examples

pytorch_ecoystem
community_examples
Autoencoder <https://pytorch-lightning-bolts.readthedocs.io/en/latest/autoencoders.html#autoencoders>
BYOL <https://pytorch-lightning-bolts.readthedocs.io/en/latest/self_supervised_models.html#byol>
Expand Down
4 changes: 4 additions & 0 deletions docs/source/pytorch_ecoystem.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Pytorch Ecosystem Examples
==========================

- `Pytorch Geometric: Deep learning on Graphs and other irregular structures <https://github.com/PyTorchLightning/pytorch-lightning/tree/master/pl_examples/pytorch_ecosystem/pytorch_geometric/README.md>`_.
38 changes: 38 additions & 0 deletions pl_examples/pytorch_ecosystem/pytorch_geometric/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# [Pytorch Geometric](https://github.com/rusty1s/pytorch_geometric) examples with Lighting

### Introduction

PyTorch Geometric (PyG) is a geometric deep learning extension library for PyTorch. It relies on lower level libraries such as

* PyTorch Cluster: A package consists of a small extension library of highly optimized graph cluster algorithms in Pytorch
* PyTorch Sparse: A package consists of a small extension library of optimized sparse matrix operations with autograd support in Pytorch
* PyTorch Scatter: A package consists of a small extension library of highly optimized sparse update (scatter and segment) operations for the use in PyTorch

## Setup

```
pyenv install 3.7.8
pyenv local 3.7.8
python -m venv
source .venv/bin/activate
poetry install
```

Run example

```
python cora_dna.py
```

## Current example lists

| `DATASET` | `MODEL` | `TASK` | DATASET DESCRIPTION | MODEL DESCRIPTION | |
| :---: | :---: | :---: | :---: | :---: | :---: |
| Cora | DNA | Node Classification | The citation network datasets "Cora", "CiteSeer" and "PubMed" from the "Revisiting Semi-Supervised Learning with Graph Embeddings" <https://arxiv.org/abs/1603.08861> | The dynamic neighborhood aggregation operator from the "Just Jump: Towards Dynamic Neighborhood Aggregation in Graph Neural Networks"


## DATASET SIZES

```
16M ./cora
```
Empty file.
Loading

0 comments on commit d05c68a

Please sign in to comment.