Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@kgajdamo
Copy link
Contributor

@kgajdamo kgajdamo commented Sep 6, 2023

This code belongs to the part of the whole distributed training for PyG.

This PR is complementary to the #246 and introduces some updates.

What has been changed:

  • Removed not needed dist_hetero_neighbor_sample function (due to the fact, that distributed sampling have a loop over the layers in python, in case of hetero at the moment when we call neighbor_sample we have only one edge type. So it becomes actually homo and we don't need the dist_hetero_neighbor_sample and can use dist_neighbor_sample instead.)
  • Removed all not used outputs and left only the following: node, edge_ids, cummsum_sampled_nbrs_per_node.
  • Changed std::vector<int64_t> num_neighbors input list into int64_t one_hop_num.

Added:

  • Unit tests

@codecov
Copy link

codecov bot commented Sep 6, 2023

Codecov Report

Merging #253 (c6a44de) into master (6af62de) will increase coverage by 3.86%.
The diff coverage is 100.00%.

❗ Current head c6a44de differs from pull request most recent head 68ff866. Consider uploading reports for the commit 68ff866 to get more accurate results

@@            Coverage Diff             @@
##           master     #253      +/-   ##
==========================================
+ Coverage   79.61%   83.48%   +3.86%     
==========================================
  Files          28       28              
  Lines         996      969      -27     
==========================================
+ Hits          793      809      +16     
+ Misses        203      160      -43     
Files Changed Coverage Δ
pyg_lib/csrc/sampler/neighbor.cpp 100.00% <ø> (+45.83%) ⬆️
pyg_lib/csrc/sampler/cpu/neighbor_kernel.cpp 85.18% <100.00%> (+4.87%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@rusty1s rusty1s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. Like it :)

@rusty1s rusty1s enabled auto-merge (squash) September 6, 2023 13:59
@rusty1s rusty1s merged commit 3a4d436 into pyg-team:master Sep 6, 2023
rusty1s added a commit that referenced this pull request Sep 15, 2023
#254)

This code belongs to the part of the whole distributed training for PyG.

This PR is complementary to the
[#246](#246).

##Descrption
Perform global to local mappings using mapper and create (row, col)
based on a sampled_nodes_with_duplicates and sampled_nbrs_per_node.

**Other distributed PRs:**
pytorch_geometric DistLoader:
[#7869](pyg-team/pytorch_geometric#7869)
pytorch_geometric DistSampler:
[#7974](pyg-team/pytorch_geometric#7974)
pyg-lib [MERGED]: [#246](#246)
pyg-lib: [#252](#252)
pyg-lib: [#253](#253)

---------

Co-authored-by: Matthias Fey <[email protected]>
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.

2 participants