benedekrozemberczki / pytorch_geometric_temporal

PyTorch Geometric Temporal: Spatiotemporal Signal Processing with Neural Machine Learning Models (CIKM 2021)
MIT License
2.66k stars 377 forks source link

Temporal signal split fix #129

Closed tforgaard closed 2 years ago

tforgaard commented 2 years ago

Hi,

This fix ensures that additional features are properly split between the train and test dataset when using temporal_signal_split.

I edited a couple of the tests that use temporal_signal_split. Do leave feedback if something needs fixing.

Thanks

codecov-commenter commented 2 years ago

Codecov Report

Merging #129 (fe67347) into master (4984827) will increase coverage by 0.71%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #129      +/-   ##
==========================================
+ Coverage   98.45%   99.16%   +0.71%     
==========================================
  Files          48       48              
  Lines        3814     3829      +15     
==========================================
+ Hits         3755     3797      +42     
+ Misses         59       32      -27     
Impacted Files Coverage Δ
...orch_geometric_temporal/signal/train_test_split.py 100.00% <ø> (+6.89%) :arrow_up:
test/dataset_test.py 100.00% <100.00%> (+6.25%) :arrow_up:
...ric_temporal/signal/dynamic_graph_static_signal.py 97.36% <0.00%> (+2.63%) :arrow_up:
...c_temporal/signal/dynamic_graph_temporal_signal.py 100.00% <0.00%> (+2.66%) :arrow_up:
...ic_temporal/signal/static_graph_temporal_signal.py 100.00% <0.00%> (+2.73%) :arrow_up:

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 4984827...fe67347. Read the comment docs.

benedekrozemberczki commented 2 years ago

Can you pull and increase the test coverage with examples?

tforgaard commented 2 years ago

I am a bit at a loss as to writing examples.

However, I noticed that two of the tests in dataset_test were named test_discrete_train_test_split_dynamic which I think might cause one of them to not be run. I renamed one of them now