First install pytorch and pytorch-geometric and then run
pip install torch-geometric-temporal
-
Edit '/torch_geometric_temporal/dataset/custom.py' to your desired database name
-
Create and upload a json for the dataset, needs to contain a few values that can be modified but here is a preview:
{"edges": [[0, 0], [1, 1], [1, 0], [0, 1]],
"edge_weights": [1.0, 1.0, 1.0, 1.0],
"node_ids": {"node0_name": 0, "node1_name": 1},
"datababase": [[]]
}
- After created and uploaded the json database, edit this funcion on custom.py
def _read_web_data(self):
url = "" # DEFINE JSON URL HERE, TIPS: UPLOAD JSON TO GITHUB (can be on this project, path:dataset) AND COPY RAW URL+
self._dataset = json.loads(urllib.request.urlopen(url).read())
- If you edited the name of the file custom.py and Class, change on 'torch_geometric_temporal\dataset_init_.py':
#...
from .custom import CustomDatasetLoader # if you edit the custom.py file, you need to restart the kernel and update name here
#...
-
Check I for possible changes and this is the code you need to run for tests and results.
-
After all edits and changes DO THE NEXT SECTION "Before Executing run"
-
Run 'examples\recurrent\dcrnn_example.py'
python setup.py build
and
python setup.py install