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

TestWikiCorpus intermittent test hangs #971

Open
gojomo opened this issue Oct 20, 2016 · 7 comments
Open

TestWikiCorpus intermittent test hangs #971

gojomo opened this issue Oct 20, 2016 · 7 comments
Labels
bug Issue described a bug

Comments

@gojomo
Copy link
Collaborator

gojomo commented Oct 20, 2016

I've noticed a bunch of recent Travis-CI test 10-minute-hang-failures have been just after:

test_first_element (gensim.test.test_wikicorpus.TestWikiCorpus) ... 

One example: https://travis-ci.org/RaRe-Technologies/gensim/jobs/169348681

As with other intermittent test failures, this can really confuse evaluation of unrelated changes.

Perhaps something about its multiprocessing is flaky, and should be made less-aggressive?

@markroxor
Copy link
Contributor

It led to a stalled build because of #956 as these lines were missing.
if __name__ == '__main__':
logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.DEBUG)
unittest.main()
therefore the file test_wikicorpus.py did not return an "ok" when the build passed.

I tried fixing it in #957 . After this merge when I tested it on my VM this outputted "ok" unlike before where it's non-outputting nature led to "No output has been received in the last 10 minutes".

@gojomo
Copy link
Collaborator Author

gojomo commented Oct 21, 2016

I don't believe Travis-CI invokes these tests as individual scripts (where they'd be __main__). Also, when failing, often it's only one of the 4 Python versions we use – 2.7 in the cases I've noticed – whereas if this lack of __main__ handling was the real problem, I'd expect consistent failures.

@markroxor
Copy link
Contributor

Indeed, you are right. Though my solution should have fixed it. Anyways I have lodged an issue with Travis already.

@gojomo
Copy link
Collaborator Author

gojomo commented Oct 21, 2016

If my conjecture about how Travis-CI runs the test is right, then your solution couldn't possibly have fixed it, because the added code would not be run/relevant.

@anmolgulati
Copy link
Contributor

anmolgulati commented Oct 26, 2016

Weird though, but I removed a blank line in test_wikicorpus.py file and it works fine now. See PR #980 (Commit : here)

@gojomo
Copy link
Collaborator Author

gojomo commented Oct 27, 2016

@anmol01gulati Interesting! Unsure how that could help; perhaps some odd bit of corrupted cached files being used at Travis-CI?

@tmylk
Copy link
Contributor

tmylk commented Oct 28, 2016

Removing an empty line has helped Travis before. We can't be doing this for every build, so issue is still open.

tmylk pushed a commit that referenced this issue Nov 13, 2016
* updated refactor
* commit missed file

* docstring added

* more refactoring

* add missing docstring

* fix docstring format

* clearer docstring

* minor typo in word2vec wmdistance

* pyemd error in keyedvecs

* relative import of keyedvecs from word2vec fails

* bug in init_sims in word2vec

* property descriptors for syn0, syn0norm, index2word, vocab - fixes bug in saving

* tests for loading older word2vec models

* backwards compatibility for loading older models

* test for syn0norm not saved to file

* syn0norm not saved to file for KeyedVectors

* tests and fix for accuracy

* minor bug in finalized vocab check

* warnings for direct syn0/syn0norm access

* fixes use of most_similar in accuracy

* changes logging level to ERROR in word2vec tests

* renames kv to wv in word2vec

* minor bugs with checking existence of syn0

* replaces syn0 and syn0norm with wv.syn0 and wv.syn0norm in tests and cython files

* adds changelog

* updates tests for loading word2vec models for different python versions

* Added separate word2vec model explicitly for python version 3.4.

* Added saved word2vec model for python 3.4 files

* Removed blank line in test_wikicorpus.py

* Increased window size in test_sg_hs_online

* PR #986 merged in wmd in keyedvectors.py

* Added deprecation warnings in Word2vec class attributes for future releases

* Merged rare/develop into keyedvecs removing conflicts.

* Merged rare/develop into keyedvecs and resolved conflicts.

* Changed numpy to np in test_word2vec.py

* Increased window size in test_cbow_hs_online

* Removed blank line in test_ldamodel, work around for Travis-CI issue #971

* Removed logging during import
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue described a bug
Projects
None yet
Development

No branches or pull requests

5 participants