Last active
September 17, 2020 22:18
-
-
Save risicle/a34a7c1e6105b52fdb7dd819ce6c38dd to your computer and use it in GitHub Desktop.
macos 10.14 failures
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=================================== FAILURES =================================== | |
____________________________ test_run_word2clusters ____________________________ | |
@pytest.mark.data | |
def test_run_word2clusters(): | |
> word2vec.word2clusters(input_text, output_clusters, 10) | |
word2vec/tests/test_core.py:45: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
word2vec/scripts_interface.py:182: in word2clusters | |
run_cmd(command, verbose=verbose) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
command = ['word2vec', '-train', '/private/tmp/nix-build-python3.7-word2vec-0.11.1.drv-0/word2vec-0.11.1/data/text8-small', '-ou...rivate/tmp/nix-build-python3.7-word2vec-0.11.1.drv-0/word2vec-0.11.1/data/test-output-text-clusters.txt', '-size', ...] | |
verbose = False | |
def run_cmd(command, verbose=False): | |
if verbose: | |
print("Running command:", " ".join(command)) | |
proc = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE) | |
if verbose: | |
while proc.poll() is None: | |
string = b"" | |
for c in iter(lambda: proc.stdout.read(1), string): | |
c = c.decode("ascii") | |
sys.stdout.write(c) | |
sys.stdout.flush() | |
proc.wait() | |
if proc.returncode != 0: | |
out, err = proc.communicate() | |
raise Exception( | |
"The training could not be completed (returncode=%i): %s %s" | |
> % (proc.returncode, out, err) | |
) | |
E Exception: The training could not be completed (returncode=-6): b'' b'' | |
word2vec/scripts_interface.py:285: Exception | |
________________________________ test_clusters _________________________________ | |
@pytest.mark.data | |
def test_clusters(): | |
> clusters = word2vec.load_clusters(output_clusters) | |
word2vec/tests/test_core.py:119: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
word2vec/io.py:29: in load_clusters | |
return word2vec.WordClusters.from_text(fname) | |
word2vec/wordclusters.py:34: in from_text | |
vocab = np.genfromtxt(fname, dtype=str, delimiter=" ", usecols=0) | |
/nix/store/wzv1wm8bhm2x0al5d054f2dr397nzmk1-python3.7-numpy-1.19.1/lib/python3.7/site-packages/numpy/lib/npyio.py:1749: in genfromtxt | |
fid = np.lib._datasource.open(fname, 'rt', encoding=encoding) | |
/nix/store/wzv1wm8bhm2x0al5d054f2dr397nzmk1-python3.7-numpy-1.19.1/lib/python3.7/site-packages/numpy/lib/_datasource.py:195: in open | |
return ds.open(path, mode, encoding=encoding, newline=newline) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <numpy.DataSource object at 0x11be1ac90> | |
path = '/private/tmp/nix-build-python3.7-word2vec-0.11.1.drv-0/word2vec-0.11.1/data/test-output-text-clusters.txt' | |
mode = 'rt', encoding = None, newline = None | |
def open(self, path, mode='r', encoding=None, newline=None): | |
""" | |
Open and return file-like object. | |
If `path` is an URL, it will be downloaded, stored in the | |
`DataSource` directory and opened from there. | |
Parameters | |
---------- | |
path : str | |
Local file path or URL to open. | |
mode : {'r', 'w', 'a'}, optional | |
Mode to open `path`. Mode 'r' for reading, 'w' for writing, | |
'a' to append. Available modes depend on the type of object | |
specified by `path`. Default is 'r'. | |
encoding : {None, str}, optional | |
Open text file with given encoding. The default encoding will be | |
what `io.open` uses. | |
newline : {None, str}, optional | |
Newline to use when reading text file. | |
Returns | |
------- | |
out : file object | |
File object. | |
""" | |
# TODO: There is no support for opening a file for writing which | |
# doesn't exist yet (creating a file). Should there be? | |
# TODO: Add a ``subdir`` parameter for specifying the subdirectory | |
# used to store URLs in self._destpath. | |
if self._isurl(path) and self._iswritemode(mode): | |
raise ValueError("URLs are not writeable") | |
# NOTE: _findfile will fail on a new file opened for writing. | |
found = self._findfile(path) | |
if found: | |
_fname, ext = self._splitzipext(found) | |
if ext == 'bz2': | |
mode.replace("+", "") | |
return _file_openers[ext](found, mode=mode, | |
encoding=encoding, newline=newline) | |
else: | |
> raise IOError("%s not found." % path) | |
E OSError: /private/tmp/nix-build-python3.7-word2vec-0.11.1.drv-0/word2vec-0.11.1/data/test-output-text-clusters.txt not found. | |
/nix/store/wzv1wm8bhm2x0al5d054f2dr397nzmk1-python3.7-numpy-1.19.1/lib/python3.7/site-packages/numpy/lib/_datasource.py:535: OSError | |
___________________________ test_model_with_clusters ___________________________ | |
@pytest.mark.data | |
def test_model_with_clusters(): | |
> clusters = word2vec.load_clusters(output_clusters) | |
word2vec/tests/test_core.py:126: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
word2vec/io.py:29: in load_clusters | |
return word2vec.WordClusters.from_text(fname) | |
word2vec/wordclusters.py:34: in from_text | |
vocab = np.genfromtxt(fname, dtype=str, delimiter=" ", usecols=0) | |
/nix/store/wzv1wm8bhm2x0al5d054f2dr397nzmk1-python3.7-numpy-1.19.1/lib/python3.7/site-packages/numpy/lib/npyio.py:1749: in genfromtxt | |
fid = np.lib._datasource.open(fname, 'rt', encoding=encoding) | |
/nix/store/wzv1wm8bhm2x0al5d054f2dr397nzmk1-python3.7-numpy-1.19.1/lib/python3.7/site-packages/numpy/lib/_datasource.py:195: in open | |
return ds.open(path, mode, encoding=encoding, newline=newline) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <numpy.DataSource object at 0x11bfb1ed0> | |
path = '/private/tmp/nix-build-python3.7-word2vec-0.11.1.drv-0/word2vec-0.11.1/data/test-output-text-clusters.txt' | |
mode = 'rt', encoding = None, newline = None | |
def open(self, path, mode='r', encoding=None, newline=None): | |
""" | |
Open and return file-like object. | |
If `path` is an URL, it will be downloaded, stored in the | |
`DataSource` directory and opened from there. | |
Parameters | |
---------- | |
path : str | |
Local file path or URL to open. | |
mode : {'r', 'w', 'a'}, optional | |
Mode to open `path`. Mode 'r' for reading, 'w' for writing, | |
'a' to append. Available modes depend on the type of object | |
specified by `path`. Default is 'r'. | |
encoding : {None, str}, optional | |
Open text file with given encoding. The default encoding will be | |
what `io.open` uses. | |
newline : {None, str}, optional | |
Newline to use when reading text file. | |
Returns | |
------- | |
out : file object | |
File object. | |
""" | |
# TODO: There is no support for opening a file for writing which | |
# doesn't exist yet (creating a file). Should there be? | |
# TODO: Add a ``subdir`` parameter for specifying the subdirectory | |
# used to store URLs in self._destpath. | |
if self._isurl(path) and self._iswritemode(mode): | |
raise ValueError("URLs are not writeable") | |
# NOTE: _findfile will fail on a new file opened for writing. | |
found = self._findfile(path) | |
if found: | |
_fname, ext = self._splitzipext(found) | |
if ext == 'bz2': | |
mode.replace("+", "") | |
return _file_openers[ext](found, mode=mode, | |
encoding=encoding, newline=newline) | |
else: | |
> raise IOError("%s not found." % path) | |
E OSError: /private/tmp/nix-build-python3.7-word2vec-0.11.1.drv-0/word2vec-0.11.1/data/test-output-text-clusters.txt not found. | |
/nix/store/wzv1wm8bhm2x0al5d054f2dr397nzmk1-python3.7-numpy-1.19.1/lib/python3.7/site-packages/numpy/lib/_datasource.py:535: OSError | |
---------- coverage: platform darwin, python 3.7.9-final-0 ----------- | |
Name Stmts Miss Branch BrPart Cover | |
----------------------------------------------------------------- | |
word2vec/__init__.py 16 10 0 0 38% | |
word2vec/io.py 17 6 12 5 55% | |
word2vec/scripts_interface.py 70 23 31 4 67% | |
word2vec/utils.py 7 1 2 1 78% | |
word2vec/wordclusters.py 21 12 2 0 39% | |
word2vec/wordvectors.py 107 33 32 3 65% | |
----------------------------------------------------------------- | |
TOTAL 238 85 79 13 62% | |
=========================== short test summary info ============================ | |
FAILED word2vec/tests/test_core.py::test_run_word2clusters - Exception: The t... | |
FAILED word2vec/tests/test_core.py::test_clusters - OSError: /private/tmp/nix... | |
FAILED word2vec/tests/test_core.py::test_model_with_clusters - OSError: /priv... | |
=================== 3 failed, 14 passed, 1 xfailed in 2.61s ==================== |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment