Skip to content
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

Why is input_id not contained by n_id? #287

Open
smiles724 opened this issue Dec 20, 2024 · 4 comments
Open

Why is input_id not contained by n_id? #287

smiles724 opened this issue Dec 20, 2024 · 4 comments

Comments

@smiles724
Copy link

Hi, thanks for sharing the benchmark.

In rel-attendance data, what is the relationship between input_id and n_id in the heterogenous graph sampled by NeighborLoader?
From my understanding, 'input_id' corresponds to the global index of the input_nodes, while n_id corresponds to the global node index for every sampled node. Therefore, n_id should contain 'input_id'. However, when I printed them out, this is not the case.

Can you please give me some hints to understand this?
image

@rishabh-ranjan
Copy link
Collaborator

@rusty1s can you please take a look?

@rusty1s
Copy link
Collaborator

rusty1s commented Dec 21, 2024

input_id refers to the ID of the training table, i.e., the row of the training table the example subgraph was sampled from.

@smiles724
Copy link
Author

input_id refers to the ID of the training table, i.e., the row of the training table the example subgraph was sampled from.

Matthias, thanks for your immediate reply! I have two more questions.

(1) As input_id refers to the training table's ID, can we access this input_id for other tables instead of only entity_table? It seems in rel-attendance, input_id only exists for users.

(2) I am confused about the GNN model forward function. As you directly slice x_dict[entity_table][: seed_time.size(0)] for final output prediction, does it mean that the first seed_time.size(0) entities of the entity_table are the target entities that corresponds to the seed time?
image

Look forward to your response!

@rusty1s
Copy link
Collaborator

rusty1s commented Dec 22, 2024

  1. it only exists for the entity table since this is the seed table to start sampling from.
  2. Yes

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

No branches or pull requests

3 participants