From 99478a6647776c82069e290ced2ed65ad82a8e0e Mon Sep 17 00:00:00 2001 From: rusty1s Date: Tue, 14 Nov 2023 10:11:08 +0000 Subject: [PATCH] update --- pyg_lib/csrc/sampler/cpu/neighbor_kernel.cpp | 4 ++-- pyg_lib/sampler/__init__.py | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pyg_lib/csrc/sampler/cpu/neighbor_kernel.cpp b/pyg_lib/csrc/sampler/cpu/neighbor_kernel.cpp index ef03f7472..fed686296 100644 --- a/pyg_lib/csrc/sampler/cpu/neighbor_kernel.cpp +++ b/pyg_lib/csrc/sampler/cpu/neighbor_kernel.cpp @@ -469,7 +469,7 @@ sample(const at::Tensor& rowptr, cumsum_neighbors_per_node.push_back(sampled_nodes.size()); } } else { - const auto time_data = node_time.value().data_ptr(); + const auto node_time_data = node_time.value().data_ptr(); for (size_t i = begin; i < end; ++i) { const auto batch_idx = sampled_nodes[i].first; sampler.node_temporal_sample( @@ -477,7 +477,7 @@ sample(const at::Tensor& rowptr, /*local_src_node=*/i, /*count=*/count, /*seed_time=*/seed_times[batch_idx], - /*time=*/time_data, + /*time=*/node_time_data, /*dst_mapper=*/mapper, /*generator=*/generator, /*out_global_dst_nodes=*/sampled_nodes); diff --git a/pyg_lib/sampler/__init__.py b/pyg_lib/sampler/__init__.py index fb9b26474..c2ca0c496 100644 --- a/pyg_lib/sampler/__init__.py +++ b/pyg_lib/sampler/__init__.py @@ -58,7 +58,9 @@ def neighbor_sample( (default: :obj:`None`) seed_time (torch.Tensor, optional): Optional values to override the timestamp for seed nodes. If not set, will use timestamps in - :obj:`time` as default for seed nodes. (default: :obj:`None`) + :obj:`node_time` as default for seed nodes. + Needs to be specified in case edge-level sampling is used via + :obj:`edge_time`. (default: :obj:`None`) edge-weight (torch.Tensor, optional): If given, will perform biased sampling based on the weight of each edge. (default: :obj:`None`) csc (bool, optional): If set to :obj:`True`, assumes that the graph is