rusty1s / pytorch_sparse

PyTorch Extension Library of Optimized Autograd Sparse Matrix Operations
MIT License
1.01k stars 147 forks source link

Temporal sample disable undirected #247

Closed RexYing closed 2 years ago

RexYing commented 2 years ago

For temporal sampling, the undirected neighbor sampling does not make sense, since it may violate the time constraint when constructing subgraph from the sampled nodes.

Hence we disable directed=False case for temporal sampling. For direct=True case, we also skip the check if the node already existed, so that the same node (potentially with different time constraints due to different input nodes in the minibatch) can have multiple copies in the minibatch.

codecov-commenter commented 2 years ago

Codecov Report

Merging #247 (e98496f) into master (7dbc51c) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #247   +/-   ##
=======================================
  Coverage   72.32%   72.32%           
=======================================
  Files          28       28           
  Lines        1120     1120           
=======================================
  Hits          810      810           
  Misses        310      310           

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

rusty1s commented 2 years ago

@zechengz Good catch, you are right :)