Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into detect-fasttext-…
Browse files Browse the repository at this point in the history
…in-PATH
  • Loading branch information
mpenkov committed Feb 25, 2022
2 parents 0b59ffe + 6fc9e38 commit 76254a2
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@ jobs:
fail-fast: false
matrix:
include:
- {name: Linux, python: 3.6, os: ubuntu-20.04, tox: 'flake8,flake8-docs'}
- {name: Linux, python: 3.6, os: ubuntu-20.04, tox: 'py36-linux'}
- {name: Linux, python: 3.7, os: ubuntu-20.04, tox: 'flake8,flake8-docs'}
- {name: Linux, python: 3.7, os: ubuntu-20.04, tox: 'py37-linux'}
- {name: Linux, python: 3.8, os: ubuntu-20.04, tox: 'py38-linux'}
- {name: Windows, python: 3.6, os: windows-2019, tox: 'py36-win'}
- {name: Linux, python: 3.8, os: ubuntu-20.04, tox: 'py38-linux-cov'}
- {name: Windows, python: 3.7, os: windows-2019, tox: 'py37-win'}
- {name: Windows, python: 3.8, os: windows-2019, tox: 'py38-win'}
env:
Expand Down Expand Up @@ -72,4 +70,4 @@ jobs:
run: |
pwd
COREFILE=$(find . -maxdepth 1 -name "core*" | head -n 1)
if [[ -f "$COREFILE" ]]; then EXECFILE=$(gdb -c "$COREFILE" -batch | grep "Core was generated" | tr -d "\`" | cut -d' ' -f5); file "$COREFILE"; gdb -c "$COREFILE" "$EXECFILE" -x continuous_integration/debug.gdb -batch; fi
if [[ -f "$COREFILE" ]]; then EXECFILE=$(gdb -c "$COREFILE" -batch | grep "Core was generated" | tr -d "\`" | cut -d' ' -f5); file "$COREFILE"; gdb -c "$COREFILE" "$EXECFILE" -x continuous_integration/debug.gdb -batch; fi
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Changes
* [#3250](https://github.com/RaRe-Technologies/gensim/pull/3250): Make negative ns_exponent work correctly, by [@menshikh-iv](https://github.com/menshikh-iv)
* [#3258](https://github.com/RaRe-Technologies/gensim/pull/3258): Adding another check to _check_corpus_sanity for compressed files, adding test, by [@dchaplinsky](https://github.com/dchaplinsky)
* [#3274](https://github.com/RaRe-Technologies/gensim/pull/3274): Migrate setup.py from distutils to setuptools, by [@geojacobm6](https://github.com/geojacobm6)
* [#3286](https://github.com/RaRe-Technologies/gensim/pull/3286): Fixes 'not enough arguments for format string' error, by [@gilbertfrancois](https://github.com/gilbertfrancois)

## 4.1.2, 2021-09-17

Expand Down
4 changes: 3 additions & 1 deletion gensim/models/doc2vec.py
Original file line number Diff line number Diff line change
Expand Up @@ -993,7 +993,9 @@ def _scan_vocab(self, corpus_iterable, progress_per, trim_rule):
logger.warning(
"Highest int doctag (%i) larger than count of documents (%i). This means "
"at least %i excess, unused slots (%i bytes) will be allocated for vectors.",
max_rawint, corpus_count, ((max_rawint - corpus_count) * self.vector_size * 4))
max_rawint, corpus_count, max_rawint - corpus_count,
(max_rawint - corpus_count) * self.vector_size * dtype(REAL).itemsize,
)
if max_rawint > -1:
# adjust indexes/list to account for range of pure-int keyed doctags
for key in doctags_list:
Expand Down
11 changes: 7 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
minversion = 2.0
envlist = {py36,py37,py38, py39}-{win,linux}, flake8, docs, docs-upload, download-wheels, upload-wheels, test-pypi
envlist = {py36,py37,py38, py39}-{win,linux}, py38-linux-cov, flake8, docs, docs-upload, download-wheels, upload-wheels, test-pypi
skipsdist = True
platform = linux: linux
win: win64
Expand Down Expand Up @@ -42,9 +42,11 @@ exclude_lines =

ignore_errors = True

#
# Conditional factors https://tox.wiki/en/latest/config.html#factors
#
[pytest]
addopts = -rfxEXs --durations=20 --showlocals --cov=gensim/ --cov-report=xml

addopts = -rfxEXs --durations=20 --showlocals

[testenv]
recreate = True
Expand Down Expand Up @@ -72,7 +74,8 @@ commands =
python --version
pip --version
python setup.py build_ext --inplace
pytest {posargs:gensim/test}
cov: pytest {posargs:gensim/test} --cov=gensim/ --cov-report=xml
!cov: pytest {posargs:gensim/test}


[testenv:flake8]
Expand Down

0 comments on commit 76254a2

Please sign in to comment.