Metadata-Version: 2.4
Name: pyg-rnnconv
Version: 0.1.0
Summary: RNNConv module for PyTorch Geometric
Home-page: https://github.com/businessabstraction/pyg_rnn
Author: Your Name
Author-email: your.email@example.com
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: torch
Requires-Dist: torch-geometric
Requires-Dist: torch-scatter
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# pyg-rnn

A PyTorch Geometric RNN-based Convolution layer for temporal graph processing.

## Installation

```bash
pip install pyg-rnn
```
## Example usage
```python
from pyg_rnn import RNNConv
import torch
from torch_geometric.data import Data

conv = RNNConv(torch.nn.GRU, edge_index=edge_index, event_time=event_time, in_channels=16, hidden_channels=32)

x = torch.randn((num_events, 16))
output = conv(x)
print(output.shape)
```

## Why pyg-rnn
This Module allows creation of RNN layers within a PyG model without going through a padded tensor.
Creating a padded tensor can be very prohibitive for a dataset with big lead and long tail For example, it you have 1 million groups of events, where most groups have 3-5 events (long take), but some have about 1000, you will need to create a padded tensor $1000000*1,000*n$, where $n$ is the number of properties within each event. That can be 100 times more space than needed 
