You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tgm/hooks/neighbors/recency.py
-15Lines changed: 0 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -27,13 +27,11 @@ class RecencyNeighborHook(StatefulHook, SeedableHook):
27
27
id (str): A unique identifier for the hook. The hook’s name and all attributes it produces will be suffixed with this `id`.
28
28
29
29
Note:
30
-
RecencyNeighborSamplerHook assumes queries occur in chronological order. Query timestamp is significantly behind the buffer's current timestamp. Results may be incomplete or incorrect.
31
30
The order of the output tensors respect the order of seed_nodes_keys.
32
31
For instance, for seed node keys ['edge_src', 'edge_dst', 'neg'] will have the first output index (hop 0) contain the concatenation
33
32
of batch.edge_src, batch.edge_dst, batch.neg (in that order). The next index (hop 1) will contain first-hop neighbors of batch.edge_src
34
33
followed by first-hop neighbors of batch.edge_dst, and then those of batch.neg. This pattern repeats for deeper hops.
35
34
36
-
37
35
Raises:
38
36
ValueError: If the num_nbrs list is empty or has non-positive entries.
39
37
ValueError: If len(seed_nodes_keys) != len(seed_times_keys).
@@ -64,12 +62,6 @@ def __init__(
64
62
ifnotall([isinstance(x, int) and (x>0) forxinnum_nbrs]):
65
63
raiseValueError('Each value in num_nbrs must be a positive integer')
66
64
67
-
logger.warning(
68
-
"RecencyNeighborSamplerHook: query timestamp is significantly behind the buffer's "
69
-
'current timestamp. Results may be incomplete or incorrect. '
70
-
'This hook assumes queries occur in chronological order.'
71
-
)
72
-
73
65
self._num_nodes=num_nodes
74
66
self._num_nbrs=num_nbrs
75
67
self._max_nbrs=max(num_nbrs)
@@ -241,13 +233,6 @@ def _get_seed_tensors(
241
233
def_get_recency_neighbors(
242
234
self, node_ids: torch.Tensor, query_times: torch.Tensor, k: int
243
235
) ->Tuple[torch.Tensor, ...]:
244
-
ifquery_times.min() <self._nbr_times.min():
245
-
logger.warning(
246
-
"RecencyNeighborSamplerHook: query timestamp is significantly behind the buffer's "
247
-
'current timestamp. Results may be incomplete or incorrect. '
248
-
'This hook assumes queries occur in chronological order.'
0 commit comments