Skip to content

Conversation

@RexYing
Copy link
Contributor

@RexYing RexYing commented Jul 1, 2022

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
Copy link

codecov-commenter commented Jul 1, 2022

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           

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

Copy link
Owner

@rusty1s rusty1s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @RexYing, I think the implementation is correct and looks good. Thank you!

If you spot any index_select errors during forward propagation, it is best to check that

for edge_type in data.edge_types:
    src, _, dst = edge_type    
    assert data[edge_type].edge_index[0].max() < data[src].num_nodes
    assert data[edge_type].edge_index[1].max() < data[dst].num_nodes

holds. Can you confirm?

Copy link

@zechengz zechengz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rows.push_back(src_samples.size() - 1); will resolve the out of index error.

@rusty1s
Copy link
Owner

rusty1s commented Jul 15, 2022

@zechengz Good catch, you are right :)

RexYing and others added 5 commits July 15, 2022 09:43
@rusty1s rusty1s merged commit d670cdd into rusty1s:master Jul 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants