Skip to content
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

Doc2Vec.py ZeroDivisionError: float division by zero #529

Closed
kikohs opened this issue Nov 13, 2015 · 1 comment
Closed

Doc2Vec.py ZeroDivisionError: float division by zero #529

kikohs opened this issue Nov 13, 2015 · 1 comment

Comments

@kikohs
Copy link

kikohs commented Nov 13, 2015

Hello,
I ran into this bug while launching multiple instance of doc2vec in parallel using scikit-learn cross-validation. I am basically trying to find the best parameter for doc2vec using sklearn RandomGridSearchCV

In doc2vec.py

self.scan_vocab(sentences, trim_rule=trim_rule)  # initial survey
 for document_no, document in enumerate(documents):
    621             if document_no % progress_per == 0:
--> 622                 interval_rate = (total_words - interval_count) / (default_timer() - interval_start)
    623                 logger.info("PROGRESS: at example #%i, processed %i words (%i/s), %i word types, %i tags",
    624                             document_no, total_words, interval_rate, len(vocab), len(self.docvecs))
    625                 interval_start = default_timer()
    626                 interval_count = total_words

ZeroDivisionError: float division by zero

For now I will try to run one doc2vec at a time. But any input on this bug would be awesome.
Cheers.

@gojomo
Copy link
Collaborator

gojomo commented Nov 13, 2015

Thanks for the report. Duplicate of #518, let's discuss there instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants