Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First commit for heterogeneous graph support #125

Merged

Conversation

doGregor
Copy link
Contributor

@doGregor doGregor commented Jan 6, 2022

This includes:

  • a new data-structure StaticHeteroGraphTemporalSignal that works like StaticGraphTemporalSignal but with torch_geometric HeteroData objects as snapshots; instead of np arrays, dictionaries wirth key(node/edge types as strings)/value(indices/features as np arrays) are expected
  • code tests for the new data-structure
  • documentation for the new data-structure

Feedback is welcome! If you think it makes sense to extend your package like that it would be great to open a new branch for heterogeneous support where we can go on working in this direction.
Thanks and cheers, Gregor

This includes:
- a new data-structure 'StaticHeteroGraphTemporalSignal' that works like 'StaticGraphTemporalSignal' but with troch_geometric HeteroData objects as snapshots; instead of np arrays, dictionaries wirth key(node/edge types as strings)/value(indices/features as np arrays) are expected
- code tests for the new data-structure
- documentation for the new data-structure
@benedekrozemberczki
Copy link
Owner

Hi there @doGregor , it seems to depend on a version of PyG that already has the hetero data module. When was that introduced? Which version?

@doGregor
Copy link
Contributor Author

doGregor commented Jan 8, 2022

Hi @benedekrozemberczki , heterogeneous graphs have been introduced in PyG version 2.0.0 that was released on september 13 2021

@benedekrozemberczki
Copy link
Owner

The 0.5.0 support PyG 2.0 please update the PR and let us go from there @doGregor !

@doGregor
Copy link
Contributor Author

Great, thank you! Updated it.

This includes:
- a new data structure, that represents PyG HeteroDataBatch snapshots for static heterogeneous graphs with temporal signals
- documentation
- tests
@codecov-commenter
Copy link

codecov-commenter commented Jan 25, 2022

Codecov Report

Merging #125 (62a86b4) into master (5d5c7dd) will decrease coverage by 1.04%.
The diff coverage is 92.51%.

❗ Current head 62a86b4 differs from pull request most recent head 0437310. Consider uploading reports for the commit 0437310 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #125      +/-   ##
==========================================
- Coverage   99.16%   98.11%   -1.05%     
==========================================
  Files          48       50       +2     
  Lines        3829     4041     +212     
==========================================
+ Hits         3797     3965     +168     
- Misses         32       76      +44     
Impacted Files Coverage Δ
...ignal/static_hetero_graph_temporal_signal_batch.py 89.58% <89.58%> (ø)
...oral/signal/static_hetero_graph_temporal_signal.py 91.86% <91.86%> (ø)
test/batch_test.py 100.00% <100.00%> (ø)
test/dataset_test.py 94.15% <100.00%> (-5.85%) ⬇️
torch_geometric_temporal/signal/__init__.py 100.00% <100.00%> (ø)
...orch_geometric_temporal/signal/train_test_split.py 93.10% <0.00%> (-6.90%) ⬇️
...ic_temporal/signal/static_graph_temporal_signal.py 97.26% <0.00%> (-2.74%) ⬇️
...c_temporal/signal/dynamic_graph_temporal_signal.py 97.33% <0.00%> (-2.67%) ⬇️
...ric_temporal/signal/dynamic_graph_static_signal.py 94.73% <0.00%> (-2.64%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5d5c7dd...0437310. Read the comment docs.

@benedekrozemberczki
Copy link
Owner

I would suggest increasing the test coverage first.

edge tests
edge index tests
additional attributes None test
edge test
edge weights test
additional attributes None test
batch assigned test
- new data structure that works like DynamicGraphStaticSignal but with PyG HeteroData objects
- tests
- documentation
- data structure that works like DynamicGraphStaticSignal but with PyG HeteroData Batches
- tests
- documentation
- new data structure that works like DynamicGraphTemporalSignal but with PyG HeteroData objects
- tests
-documentation
- data structure that works like DynamicGraphTemporalSignalBatch but with PyG HeteroData Batches instead
- tests
-documentation
@benedekrozemberczki
Copy link
Owner

Is this ready for review @doGregor ?

@doGregor
Copy link
Contributor Author

doGregor commented Feb 3, 2022

Hi @benedekrozemberczki , yes, the new data structures are ready to review. What's left afterwards is updating the train/test split method and finally the layers. Will go on with that soon...

Copy link
Owner

@benedekrozemberczki benedekrozemberczki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are really cool things.

@benedekrozemberczki benedekrozemberczki merged commit 01b4394 into benedekrozemberczki:master Feb 3, 2022
@benedekrozemberczki
Copy link
Owner

Merged these for now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants