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

Add e2e link prediction example with temporal information for the distributed solution #8820

Merged
merged 10 commits into from
Feb 5, 2024

Conversation

kgajdamo
Copy link
Contributor

Description:

This PR purpose is to add e2e link prediction example to run distributed training on a MovieLens dataset. It is characterized by the presence of temporal information for the edges.

This example is strongly inspired on: distributed_cpu.py and temporal_link_pred.py

IMPORTANT INFORMATION: This script depends on Enable distributed link hetero sampling PR. It will not work without the changes made in that PR. So that one should be merged first.

Script information:

  • Link prediction
  • Edge based temporal information
  • MovieLens dataset

How to run:
The example should be evaluated on at least 2 machines. Before running the example a prework needs to be done. It is necessary to generate a partitions of the MovieLens dataset using a partition_graph.py script using the command below:
python partition_graph.py --MovieLens --num_partitions {number of machines}

Example commands to run the script:
Node 0:
python ./distributed_link_temporal_cpu.py --num_nodes 2 --node_rank 0 --batch_size 1024 --master_addr {ip address of one of the machines} --ddp_port 11111 --train_loader_port 11112 --test_loader_port 11113

Node 1:
python ./distributed_link_temporal_cpu.py --num_nodes 2 --node_rank 1 --batch_size 1024 --master_addr {ip address of one of the machines} --ddp_port 11111 --train_loader_port 11112 --test_loader_port 11113

(As you can see the only difference is the --node_rank argument.)

Copy link

codecov bot commented Jan 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (fd28440) 0.00% compared to head (abb2265) 89.28%.

❗ Current head abb2265 differs from pull request most recent head 6f2abf4. Consider uploading reports for the commit 6f2abf4 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #8820       +/-   ##
===========================================
+ Coverage        0   89.28%   +89.28%     
===========================================
  Files           0      467      +467     
  Lines           0    29905    +29905     
===========================================
+ Hits            0    26701    +26701     
- Misses          0     3204     +3204     

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

@rusty1s rusty1s merged commit 651ef07 into pyg-team:master Feb 5, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants