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

LinkNeighborLoader: Support edge_label_time #5137

Merged
merged 49 commits into from
Aug 10, 2022
Merged
Changes from 1 commit
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
6b71e0c
first commit for node time attr
wsad1 Aug 4, 2022
0b2ef57
reset time attribute
wsad1 Aug 4, 2022
a7b008e
Merge branch 'master' into link_time_attr
wsad1 Aug 4, 2022
0d0d990
fix
wsad1 Aug 4, 2022
068e7cd
Update torch_geometric/loader/link_neighbor_loader.py
wsad1 Aug 8, 2022
550ee5b
Update torch_geometric/loader/link_neighbor_loader.py
wsad1 Aug 8, 2022
340356f
add comments
wsad1 Aug 8, 2022
a212f98
update comments
wsad1 Aug 8, 2022
35a0eda
Merge branch 'master' into link_time_attr
wsad1 Aug 8, 2022
52ee2d8
add tests for edge_time
wsad1 Aug 8, 2022
040314f
Merge branch 'link_time_attr' of github.com:wsad1/pytorch_geometric i…
wsad1 Aug 8, 2022
80d7c46
added tests for edge time
wsad1 Aug 8, 2022
3a461ac
added support for edge time with negative sampling
wsad1 Aug 8, 2022
1046e3a
rename function _create_edge_label
wsad1 Aug 8, 2022
a145280
fix typo
wsad1 Aug 8, 2022
89a9686
Merge branch 'master' into link_time_attr
wsad1 Aug 8, 2022
456f13d
Update torch_geometric/loader/link_neighbor_loader.py
wsad1 Aug 9, 2022
9b8f0da
Update torch_geometric/loader/link_neighbor_loader.py
wsad1 Aug 9, 2022
2bc97e0
Merge branch 'link_time_attr' of github.com:wsad1/pytorch_geometric i…
wsad1 Aug 9, 2022
6b84910
renamed variable to edge_label_time + time_attr only works if edge_ti…
wsad1 Aug 9, 2022
6b40bcf
update test for temporal sampling
wsad1 Aug 9, 2022
ba0292c
Merge branch 'master' into link_time_attr
wsad1 Aug 9, 2022
245f9e6
update TODO
wsad1 Aug 9, 2022
8faad58
Merge branch 'link_time_attr' of github.com:wsad1/pytorch_geometric i…
wsad1 Aug 9, 2022
626fcfd
use right num_nodes argument in LinkSampler
wsad1 Aug 9, 2022
53b44c5
rename to edge_label_time
wsad1 Aug 9, 2022
fab0808
node_time is cloned in every call
wsad1 Aug 10, 2022
6f9e32d
hetero_neighbor_sampler now accepts optional node_time_dict
wsad1 Aug 10, 2022
853bf2f
test with multiple workers
wsad1 Aug 10, 2022
1f13c3a
Update torch_geometric/loader/link_neighbor_loader.py
wsad1 Aug 10, 2022
64824b7
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 10, 2022
9af6006
remove edge_label_time from LinkSampler init
wsad1 Aug 10, 2022
3b7efa1
merge upstream
wsad1 Aug 10, 2022
2dd001d
update changelog
wsad1 Aug 10, 2022
08e0c3d
Update torch_geometric/loader/link_neighbor_loader.py
wsad1 Aug 10, 2022
8ffd683
Update torch_geometric/loader/link_neighbor_loader.py
wsad1 Aug 10, 2022
947732d
Update torch_geometric/loader/link_neighbor_loader.py
wsad1 Aug 10, 2022
83c6a5a
Update torch_geometric/loader/link_neighbor_loader.py
wsad1 Aug 10, 2022
409a282
Update torch_geometric/loader/link_neighbor_loader.py
wsad1 Aug 10, 2022
4c8759a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 10, 2022
14f187b
Update torch_geometric/loader/link_neighbor_loader.py
wsad1 Aug 10, 2022
d703385
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 10, 2022
f1a4320
rename variables+ add edge_label_time as object variable
wsad1 Aug 10, 2022
37304f2
Merge branch 'link_time_attr' of github.com:wsad1/pytorch_geometric i…
wsad1 Aug 10, 2022
23b3377
simplify code with scatter_min
wsad1 Aug 10, 2022
a64fd12
test if nodes are sampled before edge time and not node time
wsad1 Aug 10, 2022
165efc3
update to _modify_node_time
wsad1 Aug 10, 2022
de4da3a
Merge branch 'master' into link_time_attr
wsad1 Aug 10, 2022
f8d79c9
typos
rusty1s Aug 10, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'master' into link_time_attr
  • Loading branch information
wsad1 authored Aug 4, 2022
commit a7b008e4999ae2d4d6c78e57c80249712c7b21b6
8 changes: 4 additions & 4 deletions torch_geometric/loader/link_neighbor_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,13 +340,13 @@ def __init__(
edge_type, edge_label_index = get_edge_label_index(
data, edge_label_index)
if edge_label is None:
edge_label = edge_label_index.new_zeros(edge_label_index.size(1))
edge_label = (edge_label +
1 if self.neg_sampling_ratio == 0 else edge_label)
self.edge_label = edge_label.to(torch.float)
edge_label = torch.zeros(edge_label_index.size(1),
device=edge_label_index.device)

if edge_time is not None and time_attr is None:
raise ValueError("`time_attr` has to be specified if"
"`edge_time` is set")

if neighbor_sampler is None:
self.neighbor_sampler = LinkNeighborSampler(
data,
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.