-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segfault running run-core-concepts-py against first lines of Shakespeare's sonnets #3101
Comments
The When you change your TFIDF corpus, you'll need to adapt its number of features too. That's the cause of the crash (technically, Your log says Let me know if that helped and we can close this ticket. |
Yes, that change fixes the crash. |
@piskvorky Perhaps in the tutorial code, we can set the number of features dynamically, based on the dictionary size? There's no need to hard code it, and it will prevent other people from tripping over a similar problem. |
Definitely. @jorendorff can you submit a PR? Thanks. |
(Hi! Thanks for putting so much effort into the tutorials! Gensim looks amazing and I'm looking forward to experimenting more. Happy to help debug--anything you need. I know Python, CPython, and C/C++ pretty well, and I can drive GDB.)
run-core-concepts.py
crashes withSegmentation fault (core dumped)
when I replacetext_corpus
with a list of first lines of Shakespeare's sonnets.Steps/code/corpus to reproduce
Go to https://radimrehurek.com/gensim/auto_examples/core/run_core_concepts.html, scroll to the bottom, click "Download Python source code". Move the downloaded script into a new, empty directory.
cd to that directory,
python3 -m venv venv; source venv/bin/activate; pip install gensim
.Note that
python run_core_concepts.py
now works fine, up until the end where it tries to importmatplotlib
.Now edit
run_core_concepts.py
and replace thetext_corpus
with this:Note that
python run_core_concepts.py
now crashes; the output ends withThe crash occurs on the line:
The output of
index.lifecycle_events
here is:Versions
The text was updated successfully, but these errors were encountered: