-
Couldn't load subscription status.
- Fork 53
Implement a basic hetero sampler in the class #415
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
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
…m/pyg-lib into vid_hetero_neigh_sampler
for more information, see https://pre-commit.ci
…m/pyg-lib into vid_hetero_neigh_sampler
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great start.
| if (edge_time_.has_value()) | ||
| TORCH_CHECK(seed_time.has_value(), "Seed time needs to be specified"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and node_time_? Perhaps we can add a utility function such as is_temporal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original implementation logic which I was following will just use node times from the graph if seed_time isn't given. I don't see a reason to deviate from the behaviour of hetero_neighbor_sample
| phmap::flat_hash_map<node_type, size_t> num_nodes_dict; | ||
| for (const auto& k : edge_types_) { | ||
| const auto num_nodes = rowptr_.at(to_rel_type(k)).size(0) - 1; | ||
| num_nodes_dict[std::get<0>(k)] = num_nodes; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't we do it in init?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my answer to the next comment
Implement a basic GraphSAGE sampler inside the
HeteroNeighborSampler.