-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Changes in Temporal Data to support a new Temporal Data Loader #3985
Changes in Temporal Data to support a new Temporal Data Loader #3985
Conversation
…into refactor-temporal-data
for more information, see https://pre-commit.ci
…pytorch_geometric into refactor-temporal-data
Co-authored-by: Matthias Fey <matthias.fey@tu-dortmund.de>
Co-authored-by: Matthias Fey <matthias.fey@tu-dortmund.de>
- refactor TemporalData to work with the default implementation of DataLoader - refactor Jodie Dataset to inherit from TemporalDataset - refactor the TGN example to work with DataLoader
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
…/otaviocx/pytorch_geometric into temporal-dataset-and-data-loader
for more information, see https://pre-commit.ci
Hey @otaviocx, please let me know if you need any help finishing this PR. Looking forward to seeing this in master :) |
…/otaviocx/pytorch_geometric into temporal-dataset-and-data-loader
for more information, see https://pre-commit.ci
…/otaviocx/pytorch_geometric into temporal-dataset-and-data-loader
Hi @rusty1s, it is ready for review. Sorry for the absence. I was preparing myself for the Qualifying Exam Presentation of my PhD (which was yesterday and I was approved 🍾 ). |
Congratulations! I will take a closer look in the upcoming week. |
Co-authored-by: Matthias Fey <matthias.fey@tu-dortmund.de>
Co-authored-by: Matthias Fey <matthias.fey@tu-dortmund.de>
Could we add a few basic tests like those in the earlier |
@otaviocx I made a pass and changed the @yulonglin Added a test as well. Thanks for the suggestion! |
What
TemporalDataset
class as a base class for Temporal Datasets based on streams of events (TemporalData
).TemporalData
to get it working properly withDataLoader
.Union[List[Data], List[HeteroData]]
byList[BaseData]
andUnion[Data, HeteroData]
byBaseData
.JODIEDataset
to inherit fromTemporalDataset
.TGN
example to useDataLoader
s.Why
TemporalDataset
class we can have a base class for all the datasets based on a stream of events and that will useTemporalData
as an internaldata
class.BaseData
instead ofData
orHeteroData
.BaseData
is the parent class of all the types of data now (includingTemporalData
).TGN
file is to show how to use a DataLoader withTemporalDataset
s.How
The
TemporalDataset
class has been added in order to abstract the concept of a temporal Dataset (an in-memory dataset that the internal data storage is aTemporalData
instance). With that, we were able to use the defaultDataLoader
implementation with a temporal dataset as intgn.py
.Testing
The only model that is currently using the
TemporalDataset
class isexamples/tgn.py
. Thus, in order to test this refactoring, please run this example and it should be working as before.