Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dgl
Commits
6e9d1645
Unverified
Commit
6e9d1645
authored
Jun 04, 2021
by
Alex P
Committed by
GitHub
Jun 05, 2021
Browse files
[Fix] Fixed AttributeError with new version of torchtext (0.9+). (#2985)
parent
b1628f23
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
examples/pytorch/gcmc/README.md
examples/pytorch/gcmc/README.md
+1
-1
examples/pytorch/gcmc/data.py
examples/pytorch/gcmc/data.py
+1
-1
No files found.
examples/pytorch/gcmc/README.md
View file @
6e9d1645
...
@@ -11,7 +11,7 @@ Credit: Jiani Zhang ([@jennyzhang0215](https://github.com/jennyzhang0215))
...
@@ -11,7 +11,7 @@ Credit: Jiani Zhang ([@jennyzhang0215](https://github.com/jennyzhang0215))
## Dependencies
## Dependencies
*
PyTorch 1.2+
*
PyTorch 1.2+
*
pandas
*
pandas
*
torchtext 0.
4
+ (if using user and item contents as node features)
*
torchtext 0.
9
+ (if using user and item contents as node features)
*
spacy (if using user and item contents as node features)
*
spacy (if using user and item contents as node features)
-
You will also need to run
`python -m spacy download en_core_web_sm`
-
You will also need to run
`python -m spacy download en_core_web_sm`
...
...
examples/pytorch/gcmc/data.py
View file @
6e9d1645
...
@@ -514,7 +514,7 @@ class MovieLens(object):
...
@@ -514,7 +514,7 @@ class MovieLens(object):
else
:
else
:
raise
NotImplementedError
raise
NotImplementedError
TEXT
=
torchtext
.
data
.
Field
(
tokenize
=
'spacy'
,
tokenizer_language
=
'en_core_web_sm'
)
TEXT
=
torchtext
.
legacy
.
data
.
Field
(
tokenize
=
'spacy'
,
tokenizer_language
=
'en_core_web_sm'
)
embedding
=
torchtext
.
vocab
.
GloVe
(
name
=
'840B'
,
dim
=
300
)
embedding
=
torchtext
.
vocab
.
GloVe
(
name
=
'840B'
,
dim
=
300
)
title_embedding
=
np
.
zeros
(
shape
=
(
self
.
movie_info
.
shape
[
0
],
300
),
dtype
=
np
.
float32
)
title_embedding
=
np
.
zeros
(
shape
=
(
self
.
movie_info
.
shape
[
0
],
300
),
dtype
=
np
.
float32
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment