-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Enable distributed link hetero sampling #8722
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kgajdamo
requested review from
wsad1,
mananshah99,
a team and
rusty1s
as code owners
January 5, 2024 09:32
kgajdamo
force-pushed
the
dist-edge-hetero
branch
from
January 5, 2024 09:38
fe4ef2f
to
306eca9
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #8722 +/- ##
==========================================
- Coverage 86.46% 86.27% -0.20%
==========================================
Files 479 479
Lines 31189 31267 +78
==========================================
+ Hits 26969 26976 +7
- Misses 4220 4291 +71 ☔ View full report in Codecov by Sentry. |
kgajdamo
force-pushed
the
dist-edge-hetero
branch
from
January 13, 2024 13:16
649781b
to
5b66bd1
Compare
kgajdamo
force-pushed
the
dist-edge-hetero
branch
from
January 22, 2024 11:22
5b66bd1
to
9d30db5
Compare
kgajdamo
force-pushed
the
dist-edge-hetero
branch
from
January 29, 2024 10:41
9d30db5
to
0ad91ea
Compare
thanks for doing this!! |
kgajdamo
force-pushed
the
dist-edge-hetero
branch
from
January 29, 2024 13:58
0ad91ea
to
f226d1d
Compare
for more information, see https://pre-commit.ci
…h_geometric into dist-edge-hetero
kgajdamo
force-pushed
the
dist-edge-hetero
branch
from
January 31, 2024 14:39
50ad9a9
to
82021de
Compare
kgajdamo
force-pushed
the
dist-edge-hetero
branch
from
January 31, 2024 15:01
82021de
to
5ed546a
Compare
rusty1s
approved these changes
Feb 4, 2024
rusty1s
added a commit
that referenced
this pull request
Feb 5, 2024
…tributed solution (#8820) **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](https://github.com/pyg-team/pytorch_geometric/blob/f9470530bd23bbcff93f73c6818af3fe03f0bf67/examples/distributed/pyg/distributed_cpu.py) and [temporal_link_pred.py](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/hetero/temporal_link_pred.py) **IMPORTANT INFORMATION:** This script depends on [Enable distributed link hetero sampling PR](#8722). 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](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/distributed/pyg/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.) --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Matthias Fey <matthias.fey@tu-dortmund.de>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR enables distributed edge sampling for heterogeneous graphs.
Added:
DistEdgeHeteroSamplerInput
class, which serves as an input data to thenode_sample
function when for a given input edge there are different source and target node types.Comments: