Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
rusty1s committed Nov 14, 2023
1 parent 8d5c29b commit 99478a6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pyg_lib/csrc/sampler/cpu/neighbor_kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -469,15 +469,15 @@ sample(const at::Tensor& rowptr,
cumsum_neighbors_per_node.push_back(sampled_nodes.size());
}
} else {
const auto time_data = node_time.value().data_ptr<temporal_t>();
const auto node_time_data = node_time.value().data_ptr<temporal_t>();
for (size_t i = begin; i < end; ++i) {
const auto batch_idx = sampled_nodes[i].first;
sampler.node_temporal_sample(
/*global_src_node=*/sampled_nodes[i],
/*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);
Expand Down
4 changes: 3 additions & 1 deletion pyg_lib/sampler/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 99478a6

Please sign in to comment.