seq2seq icon indicating copy to clipboard operation
seq2seq copied to clipboard

Two error when running seq2seq.test.pipeline_test with Anaconda3 on win7

Open fanjingwei opened this issue 8 years ago • 1 comments

When i run python -m unittest seq2seq.test.pipeline_test, i get the follow errors:

ERROR: seq2seq (unittest.loader._FailedTest)

ImportError: Failed to import test module: seq2seq Traceback (most recent call last): File "C:\Program Files\Anaconda3\lib\unittest\loader.py", line 153, in loadTestsFromName module = import(module_name) File "E:\git\seq2seq\seq2seq_init_.py", line 26, in from seq2seq import decoders File "E:\git\seq2seq\seq2seq\decoders_init_.py", line 20, in from seq2seq.decoders.attention_decoder import * File "E:\git\seq2seq\seq2seq\decoders\attention_decoder.py", line 27, in from seq2seq.contrib.seq2seq.helper import CustomHelper File "E:\git\seq2seq\seq2seq\contrib\seq2seq\helper.py", line 35, in from tensorflow.contrib.distributions.python.ops import bernoulli ImportError: cannot import name 'bernoulli'


====================================================================== ERROR: seq2seq (unittest.loader._FailedTest)

ImportError: Failed to import test module: seq2seq Traceback (most recent call last): File "C:\Program Files\Anaconda3\lib\unittest\loader.py", line 153, in loadTestsFromName module = import(module_name) File "E:\git\seq2seq\seq2seq_init_.py", line 26, in from seq2seq import decoders File "E:\git\seq2seq\seq2seq\decoders_init_.py", line 20, in from seq2seq.decoders.attention_decoder import * File "E:\git\seq2seq\seq2seq\decoders\attention_decoder.py", line 27, in from seq2seq.contrib.seq2seq.helper import CustomHelper File "E:\git\seq2seq\seq2seq\contrib\seq2seq\helper.py", line 36, in from tensorflow.contrib.distributions.python.ops import categorical ImportError: cannot import name 'categorical'


I modify the follow two lines in /seq2seq/seq2seq/contrib/seq2seq/helper.py from tensorflow.contrib.distributions.python.ops import bernoulli from tensorflow.contrib.distributions.python.ops import categorical to from tensorflow.python.ops.distributions import bernoulli from tensorflow.python.ops.distributions import categorical to fix the erros.

But i think this is not the official way to fix this error, and i don't know why this happen.

fanjingwei avatar Aug 31 '17 13:08 fanjingwei

This looks like the same error as this (also including fixes).

hermansje avatar Oct 29 '17 00:10 hermansje