Hi!
Talking about nlp_course/week01_embeddings/seminar.ipynb:
This row "Requirements: pip install --upgrade nltk gensim bokeh , but only if you're running locally." will install the latest versions of libraries, because you didn't specify exact versions.
I suggest to specify exact versions of libraries you intended to use in your notebooks.
As of May 2021, gensim has version 4.0.1
It means that
words = sorted(model.vocab.keys(),
key=lambda word: model.vocab[word].count,
reverse=True)[:1000]
will not work.
Better to replace it with
words = sorted(model.key_to_index.keys(),
key=lambda word: model.get_vecattr(word, "count"),
reverse=True)[:1000]
Talking about nlp_course/week01_embeddings/homework.ipynb:
Hi! Talking about nlp_course/week01_embeddings/seminar.ipynb: This row "Requirements: pip install --upgrade nltk gensim bokeh , but only if you're running locally." will install the latest versions of libraries, because you didn't specify exact versions. I suggest to specify exact versions of libraries you intended to use in your notebooks. As of May 2021, gensim has version 4.0.1 It means that
will not work. Better to replace it with
Talking about nlp_course/week01_embeddings/homework.ipynb:
And here it works only with this fix
precision_top5 >= 0.811
(probably due to new gensim library as well)P.S. I will update this issue with new problems as I go through the course.