"...git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "d1d0b8afce2fb07134a243aa42136424a3a632a2"
Unverified Commit 6e9d1645 authored by Alex P's avatar Alex P Committed by GitHub
Browse files

[Fix] Fixed AttributeError with new version of torchtext (0.9+). (#2985)

parent b1628f23
...@@ -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`
......
...@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment