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

Get rid most of warnings in testing #2191

Merged
merged 16 commits into from
Sep 23, 2018
Merged

Get rid most of warnings in testing #2191

merged 16 commits into from
Sep 23, 2018

Conversation

menshikh-iv
Copy link
Contributor

Little cleanup for gensim:

  • pin pattern version for document building (they make a release after 5 years of silence and new release have breaking dependence like mysqlclient, see https://pypi.org/project/Pattern/#history)
  • fix benchmark information in CHANGELOG.md
  • get rid almost all warnings from gensim (most of it are DeprecationWarning).

This PR reduced the # of warnings than happens in the test process (python2, linux) from 3550 to 23 (now CI log are readable ⭐ )

@menshikh-iv menshikh-iv added the testing Issue related with testing (code, documentation, etc) label Sep 21, 2018
@piskvorky
Copy link
Owner

Nice! Out of curiosity, what are the remaining 23 warnings about?

@menshikh-iv
Copy link
Contributor Author

@piskvorky

/home/travis/build/RaRe-Technologies/gensim/.tox/py27-linux/lib/python2.7/site-packages/numpy/lib/utils.py:99: DeprecationWarning: `scipy.sparse.sparsetools` is deprecated!
scipy.sparse.sparsetools is a private module for scipy.sparse, and should not be used.
  warnings.warn(depdoc, DeprecationWarning)
/home/travis/build/RaRe-Technologies/gensim/gensim/test/test_doc2vec.py:629: DeprecationWarning: Call to deprecated `syn0_lockf` (Attribute will be removed in 4.0.0, use self.trainables.vectors_lockf instead).
  self.assertTrue(hasattr(model, 'syn0_lockf'))
/home/travis/build/RaRe-Technologies/gensim/gensim/test/test_doc2vec.py:629: DeprecationWarning: Call to deprecated `syn0_lockf` (Attribute will be removed in 4.0.0, use self.trainables.vectors_lockf instead).
  self.assertTrue(hasattr(model, 'syn0_lockf'))
/home/travis/build/RaRe-Technologies/gensim/gensim/test/test_doc2vec.py:629: DeprecationWarning: Call to deprecated `syn0_lockf` (Attribute will be removed in 4.0.0, use self.trainables.vectors_lockf instead).
  self.assertTrue(hasattr(model, 'syn0_lockf'))
/home/travis/build/RaRe-Technologies/gensim/gensim/test/test_doc2vec.py:629: DeprecationWarning: Call to deprecated `syn0_lockf` (Attribute will be removed in 4.0.0, use self.trainables.vectors_lockf instead).
  self.assertTrue(hasattr(model, 'syn0_lockf'))
/home/travis/build/RaRe-Technologies/gensim/gensim/test/test_keras_integration.py:62: UserWarning: Update your `Model` call to the Keras 2 API: `Model(outputs=Tensor("do..., inputs=[<tf.Tenso...)`
  model = Model(input=[input_a, input_b], output=similarity)
/home/travis/build/RaRe-Technologies/gensim/gensim/models/ldaseqmodel.py:290: RuntimeWarning: divide by zero encountered in double_scalars
  convergence = np.fabs((bound - old_bound) / old_bound)
/home/travis/build/RaRe-Technologies/gensim/gensim/interfaces.py:90: UserWarning: corpus.save() stores only the (tiny) iteration object in memory; to serialize the actual corpus content, use e.g. MmCorpus.serialize(corpus)
  "corpus.save() stores only the (tiny) iteration object in memory; "
/home/travis/build/RaRe-Technologies/gensim/gensim/models/phrases.py:598: UserWarning: For a faster implementation, use the gensim.models.phrases.Phraser class
  warnings.warn("For a faster implementation, use the gensim.models.phrases.Phraser class")
/home/travis/build/RaRe-Technologies/gensim/gensim/test/test_similarities.py:605: DeprecationWarning: Call to deprecated `wv` (Attribute will be removed in 4.0.0, use self instead).
  approx_neighbors = model.wv.most_similar([vector], topn=5, indexer=index)
/home/travis/build/RaRe-Technologies/gensim/gensim/test/test_similarities.py:606: DeprecationWarning: Call to deprecated `wv` (Attribute will be removed in 4.0.0, use self instead).
  exact_neighbors = model.wv.most_similar(positive=[vector], topn=5)
/home/travis/build/RaRe-Technologies/gensim/gensim/test/test_word2vec.py:848: DeprecationWarning: Call to deprecated `syn0_lockf` (Attribute will be removed in 4.0.0, use self.trainables.vectors_lockf instead).
  self.assertTrue(hasattr(model, 'syn0_lockf'))
/home/travis/build/RaRe-Technologies/gensim/gensim/models/word2vec.py:1235: DeprecationWarning: Call to deprecated `_minimize_model` (Method will be removed in 4.0.0, keep just_word_vectors = model.wv to retain just the KeyedVectors instance).
  self._minimize_model()
/home/travis/build/RaRe-Technologies/gensim/gensim/test/test_word2vec.py:847: DeprecationWarning: Call to deprecated `syn1neg` (Attribute will be removed in 4.0.0, use self.trainables.syn1neg instead).
  self.assertTrue(hasattr(model, 'syn1neg'))
/home/travis/build/RaRe-Technologies/gensim/gensim/test/test_word2vec.py:848: DeprecationWarning: Call to deprecated `syn0_lockf` (Attribute will be removed in 4.0.0, use self.trainables.vectors_lockf instead).
  self.assertTrue(hasattr(model, 'syn0_lockf'))
/home/travis/build/RaRe-Technologies/gensim/gensim/models/word2vec.py:1235: DeprecationWarning: Call to deprecated `_minimize_model` (Method will be removed in 4.0.0, keep just_word_vectors = model.wv to retain just the KeyedVectors instance).
  self._minimize_model()
/home/travis/build/RaRe-Technologies/gensim/gensim/test/test_word2vec.py:848: DeprecationWarning: Call to deprecated `syn0_lockf` (Attribute will be removed in 4.0.0, use self.trainables.vectors_lockf instead).
  self.assertTrue(hasattr(model, 'syn0_lockf'))
/home/travis/build/RaRe-Technologies/gensim/gensim/models/word2vec.py:1235: DeprecationWarning: Call to deprecated `_minimize_model` (Method will be removed in 4.0.0, keep just_word_vectors = model.wv to retain just the KeyedVectors instance).
  self._minimize_model()
/home/travis/build/RaRe-Technologies/gensim/gensim/test/test_word2vec.py:847: DeprecationWarning: Call to deprecated `syn1neg` (Attribute will be removed in 4.0.0, use self.trainables.syn1neg instead).
  self.assertTrue(hasattr(model, 'syn1neg'))
/home/travis/build/RaRe-Technologies/gensim/gensim/test/test_word2vec.py:848: DeprecationWarning: Call to deprecated `syn0_lockf` (Attribute will be removed in 4.0.0, use self.trainables.vectors_lockf instead).
  self.assertTrue(hasattr(model, 'syn0_lockf'))
/home/travis/build/RaRe-Technologies/gensim/gensim/models/word2vec.py:1235: DeprecationWarning: Call to deprecated `_minimize_model` (Method will be removed in 4.0.0, keep just_word_vectors = model.wv to retain just the KeyedVectors instance).
  self._minimize_model()
/home/travis/build/RaRe-Technologies/gensim/gensim/models/word2vec.py:1235: DeprecationWarning: Call to deprecated `_minimize_model` (Method will be removed in 4.0.0, keep just_word_vectors = model.wv to retain just the KeyedVectors instance).
  self._minimize_model()
/home/travis/build/RaRe-Technologies/gensim/gensim/models/word2vec.py:1140: UserWarning: All the input context words are out-of-vocabulary for the current model.
  warnings.warn("All the input context words are out-of-vocabulary for the current model.")

@menshikh-iv menshikh-iv changed the title Cleanup testing (get rid of Warnings) Get rid most of warnings in testing Sep 23, 2018
@menshikh-iv menshikh-iv merged commit 91857ff into develop Sep 23, 2018
@menshikh-iv menshikh-iv deleted the cleanup-warnings branch September 23, 2018 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Issue related with testing (code, documentation, etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants