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.
Due to the fact that the implementation of distributed training for hetero has changed, it is also necessary to change the dist hetero relabel neighborhood function.
Related pytorch_geometric PR: #8503
Changes made:
-
num_sampled_neighbors_per_node
dictionary currently store information about the number of sampled neighbors for each layer separately:const c10::Dict<rel_type, std::vector<int64_t>>&num_sampled_neighbors_per_node_dict
->const c10::Dict<rel_type, std::vector<std::vector<int64_t>>>&num_sampled_neighbors_per_node_dict
- The method of mapping nodes has also been changed. This is now done layer by layer.
- After each layer, the range of src nodes for each edge type for the next layer is calculated and the offsets for edge types having the same src node types must be the same.
- The src node range for each edge type in a given layer is defined by a dictionary
srcs_slice_dict
. Local src nodes (sampled_rows
) will be created on its basis and the starting value of the next layer will be the end value from the previous layer.