-
Notifications
You must be signed in to change notification settings - Fork 43
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
Edge-based temporal sampling #280
Conversation
for more information, see https://pre-commit.ci
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #280 +/- ##
==========================================
- Coverage 85.74% 85.65% -0.10%
==========================================
Files 32 32
Lines 1087 1115 +28
==========================================
+ Hits 932 955 +23
- Misses 155 160 +5 ☔ View full report in Codecov by Sentry. |
@@ -12,6 +12,8 @@ | |||
#include "pyg_lib/csrc/utils/cpu/convert.h" | |||
#include "pyg_lib/csrc/utils/types.h" | |||
|
|||
#include <iostream> |
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.
to be removed?
pyg::sampler::Mapper<node_t, scalar_t>& dst_mapper, | ||
pyg::random::RandintEngine<scalar_t>& generator, | ||
std::vector<node_t>& out_global_dst_nodes) { | ||
void edge_temporal_sample(const node_t global_src_node, |
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.
Please keep the order of argument same as in the temporal_sample function:
const int64_t count, const temporal_t seed_time, const temporal_t* edge_time,
if ((row_end - row_start == 0) || (count == 0)) | ||
return; | ||
// Find new `row_end` such that all neighbors fulfill temporal constraints: | ||
std::vector<int> v(row_end - row_start); |
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.
std::vector<int> v(row_end - row_start); | |
std::vector<scalar_t> v(row_end - row_start); |
@kgajdamo Thanks for the review. I think all of your comments are already resolved in latest commit :) |
I came back to this review after a while and didn't notice it was merged and left the comments 🥲 |
This PR is to enable the edge-based temporal sampling for NeighborSampler. This PR covers both homogeneous and heterogeneous cases. The associated PYG-LIB PR is pyg-team/pyg-lib#280 . Thanks, Poovaiah --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Akihiro Nitta <[email protected]> Co-authored-by: Matthias Fey <[email protected]>
This PR is to enable edge-based temporal sampling for both homogeneous and heterogeneous graphs.
Thanks,
Poovaiah