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
File "", line 3, in
('movie', 'mu', 'user'): (ratings_train['movie_idx'], ratings_train['user_idx'])})
File "/home/hojun/anaconda3/envs/ai/lib/python3.6/site-packages/dgl/convert.py", line 309, in heterograph
u, v, urange, vrange = utils.graphdata2tensors(data, idtype, bipartite=is_bipartite)
File "/home/hojun/anaconda3/envs/ai/lib/python3.6/site-packages/dgl/utils/data.py", line 147, in graphdata2tensors
data = F.tensor(data[0]), F.tensor(data[1])
File "/home/hojun/anaconda3/envs/ai/lib/python3.6/site-packages/dgl/backend/pytorch/tensor.py", line 40, in tensor
return th.as_tensor(data, dtype=dtype)
File "/home/hojun/anaconda3/envs/ai/lib/python3.6/site-packages/pandas/core/series.py", line 868, in getitem
result = self.index.get_value(self, key)
File "/home/hojun/anaconda3/envs/ai/lib/python3.6/site-packages/pandas/core/indexes/base.py", line 4375, in get_value
tz=getattr(series.dtype, 'tz', None))
File "pandas/_libs/index.pyx", line 81, in pandas._libs.index.IndexEngine.get_value
File "pandas/_libs/index.pyx", line 89, in pandas._libs.index.IndexEngine.get_value
File "pandas/_libs/index.pyx", line 132, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/hashtable_class_helper.pxi", line 987, in pandas._libs.hashtable.Int64HashTable.get_item
File "pandas/_libs/hashtable_class_helper.pxi", line 993, in pandas._libs.hashtable.Int64HashTable.get_item
KeyError: 31
The text was updated successfully, but these errors were encountered:
In your main_knn file,
when I'm running the code below, I get an error. Can you share how to fix it? Thank you.
HG = dgl.heterograph({
('user', 'um', 'movie'): (ratings_train['user_idx'], ratings_train['movie_idx']),
('movie', 'mu', 'user'): (ratings_train['movie_idx'], ratings_train['user_idx'])})
error:
Traceback (most recent call last):
File "", line 3, in
('movie', 'mu', 'user'): (ratings_train['movie_idx'], ratings_train['user_idx'])})
File "/home/hojun/anaconda3/envs/ai/lib/python3.6/site-packages/dgl/convert.py", line 309, in heterograph
u, v, urange, vrange = utils.graphdata2tensors(data, idtype, bipartite=is_bipartite)
File "/home/hojun/anaconda3/envs/ai/lib/python3.6/site-packages/dgl/utils/data.py", line 147, in graphdata2tensors
data = F.tensor(data[0]), F.tensor(data[1])
File "/home/hojun/anaconda3/envs/ai/lib/python3.6/site-packages/dgl/backend/pytorch/tensor.py", line 40, in tensor
return th.as_tensor(data, dtype=dtype)
File "/home/hojun/anaconda3/envs/ai/lib/python3.6/site-packages/pandas/core/series.py", line 868, in getitem
result = self.index.get_value(self, key)
File "/home/hojun/anaconda3/envs/ai/lib/python3.6/site-packages/pandas/core/indexes/base.py", line 4375, in get_value
tz=getattr(series.dtype, 'tz', None))
File "pandas/_libs/index.pyx", line 81, in pandas._libs.index.IndexEngine.get_value
File "pandas/_libs/index.pyx", line 89, in pandas._libs.index.IndexEngine.get_value
File "pandas/_libs/index.pyx", line 132, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/hashtable_class_helper.pxi", line 987, in pandas._libs.hashtable.Int64HashTable.get_item
File "pandas/_libs/hashtable_class_helper.pxi", line 993, in pandas._libs.hashtable.Int64HashTable.get_item
KeyError: 31
The text was updated successfully, but these errors were encountered: