dglai / www20-hands-on-tutorial Goto Github PK
View Code? Open in Web Editor NEWMaterials for DGL hands-on tutorial in WWW 2020
Materials for DGL hands-on tutorial in WWW 2020
Hi,
I am running the recommendation-fism.jupyter file (WWW20-Hands-on-Tutorial-master/_legacy/advanced_apps/rec) and run into this error while executing the following line:
from movielens import MovieLens
data = MovieLens('.')
File not found. Downloading from https://s3.us-east-2.amazonaws.com/dgl.ai/dataset/movielens.tar.gz
Download finished. Unzipping the file...
Use device: cpu
---
Loading: tokenize
With settings:
{'model_path': '/home/anna/stanfordnlp_resources/en_ewt_models/en_ewt_tokenizer.pt', 'lang': 'en', 'shorthand': 'en_ewt', 'mode': 'predict'}
0%| | 0/3702 [00:00<?, ?it/s]
---
Loading: lemma
With settings:
{'model_path': '/home/anna/stanfordnlp_resources/en_ewt_models/en_ewt_lemmatizer.pt', 'lang': 'en', 'shorthand': 'en_ewt', 'mode': 'predict'}
Building an attentional Seq2Seq model...
Using a Bi-LSTM encoder
Using soft attention for LSTM.
Finetune all embeddings.
[Running seq2seq lemmatizer with edit classifier]
Done loading processors!
---
100%|██████████| 3702/3702 [00:39<00:00, 93.45it/s]
100%|██████████| 3702/3702 [00:00<00:00, 93133.52it/s]
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-6-63a521714800> in <module>
1 from movielens import MovieLens
----> 2 data = MovieLens('.')
~/Dropbox/python/python_courses/GNN/DGL/WWW20-Hands-on-Tutorial-master/_legacy/advanced_apps/rec/movielens.py in __init__(self, directory, neg_size)
162
163 for u in range(len(self.users)):
--> 164 interacted_movies = self.ratings['movie_idx'][rating_groups.indices[u]]
165 timerank = self.ratings['timerank'][rating_groups.indices[u]]
166
~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/pandas/core/series.py in __getitem__(self, key)
908 key = check_bool_indexer(self.index, key)
909
--> 910 return self._get_with(key)
911
912 def _get_with(self, key):
~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/pandas/core/series.py in _get_with(self, key)
941 if key_type == "integer":
942 if self.index.is_integer() or self.index.is_floating():
--> 943 return self.loc[key]
944 else:
945 return self._get_values(key)
~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/pandas/core/indexing.py in __getitem__(self, key)
1765
1766 maybe_callable = com.apply_if_callable(key, self.obj)
-> 1767 return self._getitem_axis(maybe_callable, axis=axis)
1768
1769 def _is_scalar_access(self, key: Tuple):
~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/pandas/core/indexing.py in _getitem_axis(self, key, axis)
1951 raise ValueError("Cannot index with multidimensional key")
1952
-> 1953 return self._getitem_iterable(key, axis=axis)
1954
1955 # nested tuple slicing
~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/pandas/core/indexing.py in _getitem_iterable(self, key, axis)
1592 else:
1593 # A collection of keys
-> 1594 keyarr, indexer = self._get_listlike_indexer(key, axis, raise_missing=False)
1595 return self.obj._reindex_with_indexers(
1596 {axis: [keyarr, indexer]}, copy=True, allow_dups=True
~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/pandas/core/indexing.py in _get_listlike_indexer(self, key, axis, raise_missing)
1550
1551 self._validate_read_indexer(
-> 1552 keyarr, indexer, o._get_axis_number(axis), raise_missing=raise_missing
1553 )
1554 return keyarr, indexer
~/anaconda3/envs/tfgpu/lib/python3.7/site-packages/pandas/core/indexing.py in _validate_read_indexer(self, key, indexer, axis, raise_missing)
1652 if not (ax.is_categorical() or ax.is_interval()):
1653 raise KeyError(
-> 1654 "Passing list-likes to .loc or [] with any missing labels "
1655 "is no longer supported, see "
1656 "https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#deprecate-loc-reindex-listlike" # noqa:E501
KeyError: 'Passing list-likes to .loc or [] with any missing labels is no longer supported, see https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#deprecate-loc-reindex-listlike'
I am using anoconda env with:
py 3.7
tf 2.1
nvidia 10.1
thanks.
Dear All
This is sound silly, where do i could get sample of zkc files? the csv version of nodes and edges, i can't find it anywhere even when i'm googling it. i try to make a dummy node with 5 node-features and i get
g.ndata['age'] = age
print(g)
...
DGLError: Expect number of features to match number of nodes (len(u)). Got 5 and 10 instead.
I don't know what went wrong and where it get 10 nodes.
Can you please help me Mr.@BarclayII ?
Thank you very much.
Hi there, when I ran the BasicTasks_pytorch, everything is working well just except the last code block.
The error I got is as below:
DGLError: [23:05:38] /opt/dgl/include/dgl/packed_func_ext.h:117: Check failed: ObjectTypeChecker::Check(sptr.get()): Expected type graph.Graph but get graph.HeteroGraph
Do you know where it goes wrong?
Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.