Skip to content
This repository has been archived by the owner on May 1, 2020. It is now read-only.

Add python3.7 support #12

Merged
merged 10 commits into from
Sep 23, 2018
Merged

Add python3.7 support #12

merged 10 commits into from
Sep 23, 2018

Conversation

menshikh-iv
Copy link
Collaborator

@menshikh-iv menshikh-iv commented Sep 22, 2018

Just add python3.7 support

@menshikh-iv menshikh-iv changed the title [DNM] Add python3.7 support Add python3.7 support Sep 23, 2018
@menshikh-iv
Copy link
Collaborator Author

Fails on win produced by undetermined tests, this will be passed after some number of re-runs (but I'm tired to restart full build each time, appveyor still have no way to restart only one build job). So, I merge this (but we definitely need to do something with most-frequent-failing tests).

@menshikh-iv menshikh-iv merged commit b90e48c into master Sep 23, 2018
@menshikh-iv menshikh-iv deleted the add-py37 branch September 23, 2018 08:08
@piskvorky
Copy link
Collaborator

piskvorky commented Sep 23, 2018

Fails on win produced by undetermined tests … definitely need to do something with most-frequent-failing tests.

@menshikh-iv which tests are these?

@menshikh-iv
Copy link
Collaborator Author

menshikh-iv commented Sep 23, 2018

@piskvorky

  • TestFastTextModel.test_cbow_hs_online
____________________ TestFastTextModel.test_cbow_hs_online _____________________
self = <gensim.test.test_fasttext.TestFastTextModel testMethod=test_cbow_hs_online>
    @unittest.skipIf(IS_WIN32, "avoid memory error with Appveyor x32")
    def test_cbow_hs_online(self):
        model = FT_gensim(
            sg=0, cbow_mean=1, alpha=0.05, window=2, hs=1, negative=0, min_count=3, iter=1, seed=42, workers=1
        )
>       self.online_sanity(model)
model      = <gensim.models.fasttext.FastText object at 0x7fb8e2470e80>
self       = <gensim.test.test_fasttext.TestFastTextModel testMethod=test_cbow_hs_online>
gensim/test/test_fasttext.py:707: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
gensim/test/test_fasttext.py:690: in online_sanity
    self.assertLess(0., sim)
E   AssertionError: 0.0 not less than -0.96153259
  • TestWord2VecModel.test_cbow_hs_fromfile
___________________ TestWord2VecModel.test_cbow_hs_fromfile ____________________
self = <gensim.test.test_word2vec.TestWord2VecModel testMethod=test_cbow_hs_fromfile>
    @unittest.skipIf(os.name == 'nt' and six.PY2, "CythonLineSentence is not supported on Windows + Py27")
    def test_cbow_hs_fromfile(self):
        model = word2vec.Word2Vec(
            sg=0, cbow_mean=1, alpha=0.05, window=8, hs=1, negative=0,
            min_count=5, iter=10, workers=2, batch_words=1000
        )
>       self.model_sanity(model, with_corpus_file=True)
model      = <gensim.models.word2vec.Word2Vec object at 0x7fb8ec18f9b0>
self       = <gensim.test.test_word2vec.TestWord2VecModel testMethod=test_cbow_hs_fromfile>
gensim/test/test_word2vec.py:687: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
gensim/test/test_word2vec.py:647: in model_sanity
    self.assertLess(t_rank, 50)
E   AssertionError: 66 not less than 50
  • TestDoc2VecModel.testLoadOldModel
______________________ TestDoc2VecModel.testLoadOldModel ______________________
self = <gensim.test.test_doc2vec.TestDoc2VecModel testMethod=testLoadOldModel>
    def testLoadOldModel(self):
        """Test loading doc2vec models from previous version"""
    
        model_file = 'doc2vec_old'
        model = doc2vec.Doc2Vec.load(datapath(model_file))
        self.assertTrue(model.wv.vectors.shape == (3955, 100))
        self.assertTrue(len(model.wv.vocab) == 3955)
        self.assertTrue(len(model.wv.index2word) == 3955)
        self.assertIsNone(model.corpus_total_words)
        self.assertTrue(model.syn1neg.shape == (len(model.wv.vocab), model.vector_size))
        self.assertTrue(model.trainables.vectors_lockf.shape == (3955, ))
        self.assertTrue(model.vocabulary.cum_table.shape == (3955, ))
    
        self.assertTrue(model.docvecs.vectors_docs.shape == (300, 100))
        self.assertTrue(model.trainables.vectors_docs_lockf.shape == (300, ))
        self.assertTrue(model.docvecs.max_rawint == 299)
        self.assertTrue(model.docvecs.count == 300)
    
        self.model_sanity(model)
    
        # Model stored in multiple files
        model_file = 'doc2vec_old_sep'
        model = doc2vec.Doc2Vec.load(datapath(model_file))
        self.assertTrue(model.wv.vectors.shape == (3955, 100))
        self.assertTrue(len(model.wv.vocab) == 3955)
        self.assertTrue(len(model.wv.index2word) == 3955)
        self.assertIsNone(model.corpus_total_words)
        self.assertTrue(model.syn1neg.shape == (len(model.wv.vocab), model.vector_size))
        self.assertTrue(model.trainables.vectors_lockf.shape == (3955, ))
        self.assertTrue(model.vocabulary.cum_table.shape == (3955, ))
    
        self.assertTrue(model.docvecs.vectors_docs.shape == (300, 100))
        self.assertTrue(model.trainables.vectors_docs_lockf.shape == (300, ))
        self.assertTrue(model.docvecs.max_rawint == 299)
        self.assertTrue(model.docvecs.count == 300)
    
        self.model_sanity(model)
    
        # load really old model
        model_file = 'd2v-lee-v0.13.0'
        model = doc2vec.Doc2Vec.load(datapath(model_file))
>       self.model_sanity(model)
model      = <gensim.models.doc2vec.Doc2Vec object at 0x000000268F86FEF0>
model_file = 'd2v-lee-v0.13.0'
self       = <gensim.test.test_doc2vec.TestDoc2VecModel testMethod=testLoadOldModel>
c:\python36-x64\lib\site-packages\gensim\test\test_doc2vec.py:146: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
c:\python36-x64\lib\site-packages\gensim\test\test_doc2vec.py:357: in model_sanity
    self.assertLess(f_rank, 10)
E   AssertionError: 10 not less than 10

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

Successfully merging this pull request may close these issues.

2 participants