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

Merge TemporalData with Data/HeteroData [1/n] #8454

Merged
merged 13 commits into from
Dec 10, 2023

Conversation

DamianSzwichtenberg
Copy link
Member

@DamianSzwichtenberg DamianSzwichtenberg commented Nov 27, 2023

This PR attempts to merge TemporalData into Data.
Currently, only edge events are supported. For (src, dst) event definition edge_index is reused as its definition is aligned with our needs. For msg, edge_attr is reused. An additional attribute is time, which represents an event's occurrence time.
New methods include the following:

  • is_sorted_by_time(): returns True if data is sorted according to time, False otherwise.
  • sort_by_time(): sorts event data according to time.
  • snapshot(start_time, end_time): returns event data that occurred in range <start_time, end_time>.
  • up_to(time): returns event data that occurred before or at a given time.
  • concat(data): returns new data that concatenates the object on which the method was called and given data. Can be used to add new events.

Related issue: #3230

@DamianSzwichtenberg DamianSzwichtenberg changed the title Merge TemporalData with Data Merge TemporalData with Data/HeteroData [1/n] Nov 29, 2023
@DamianSzwichtenberg DamianSzwichtenberg marked this pull request as ready for review November 29, 2023 12:16
Copy link

codecov bot commented Dec 8, 2023

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (747322c) 88.76% compared to head (961eca1) 88.77%.

❗ Current head 961eca1 differs from pull request most recent head 26026ca. Consider uploading reports for the commit 26026ca to get more accurate results

Files Patch % Lines
torch_geometric/data/storage.py 87.75% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8454      +/-   ##
==========================================
+ Coverage   88.76%   88.77%   +0.01%     
==========================================
  Files         479      479              
  Lines       29955    30034      +79     
==========================================
+ Hits        26589    26664      +75     
- Misses       3366     3370       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rusty1s rusty1s enabled auto-merge (squash) December 10, 2023 14:34
@rusty1s rusty1s merged commit ad3472e into pyg-team:master Dec 10, 2023
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants