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

Extending manual sampling of NodeLoader and LinkLoader (__call__) with time #9785

Open
Kh4L opened this issue Nov 14, 2024 · 1 comment
Open
Labels

Comments

@Kh4L
Copy link
Contributor

Kh4L commented Nov 14, 2024

🚀 The feature, motivation and pitch

NodeLoader and LinkLoader can be used to manually sample since #7197
This is currently implemented through the __call__ method. One can manually sample a subgraph from seed indices. These point to the underlying NodeSamplerInput/EdgeSamplerInput, which can be seen as a map linking indices to actual node IDs, times, etc.

The two base loaders also implement temporal sampling through seed node time — input_time for NodeLoader and edge_label_time for LinkLoader, which forces the sampled neighbors to have a time_attr smaller than or equal to the seed time.

The current implementation uses a static seed time for each node, which can be passed to the loader as an initialization arg. However, we can consider scenarios (e.g. during inference) where we want to sample certain seed nodes with different seed times at different calls.

The proposal would be to extend __call__ with an extra argument.
I can think of 3 ways of achieve that:

  • Keep the current index arg logic but add a seed time arg, that would dynamically override the seed times in NodeSamplerInput and EdgeSamplerInput.
  • Change __call__ interface altogether, changing the index arg to 'raw' seed_nodes , and adding optional seed times
  • Allow both of the options described above or a mix of them

I'll start implementing the second option and open a PR.

Open for discussion and ideas!

cc @rusty1s

@Kh4L Kh4L added the feature label Nov 14, 2024
@puririshi98
Copy link
Contributor

i like idea two

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants