JuliaGast / TGB2

Temporal Graph Benchmark project repo
1 stars 0 forks source link

Add DURENDAL method #42

Open erfanloghmani opened 3 months ago

erfanloghmani commented 3 months ago

Add DURENDAL (8c2176b commit) method with Update-Then-Aggregate schema.

There is only one challenge with the requirements. The DURENDAL code requires torch_geometric_temporal==0.54.0 which needs pandas==1.3.5, however, our pandas version in TGB is pandas==1.5.3. Downgrading to 1.3.5 will cause problem with reading pickle file ml_{data}.pkl because the file is created using pandas 1.5.3. My workaround to test the code was to export the file using pandas 1.3.5. We can also try using pd.read_pickle as mentioned here. I didn't change the code in the base to avoid any issues with other parts.

Now that I have the code structure, I think adopting other methods and baselines from DURENDAL code base should be relatively easier. I will try to work on it if I got time.

erfanloghmani commented 2 months ago

I performed a workaround on the pandas requirement issue by forking the torch_geometric_temporal repo and removing the requirement because it seems the code does not use pandas directly, as mentioned here.

I also added other benchmarks from the Durendal repo. These models are supported:

Only one method needs to be added if we want, which is TNTComplEx

To run the code:

  1. Install the requirement
  2. Run python snapshot_based.py --seed {seed} --model {model_name}, where you can use one of the model names listed above