g2p-seq2seq icon indicating copy to clipboard operation
g2p-seq2seq copied to clipboard

Is it possible to run g2p-seq2seq on tensorflow cpu?

Open michem32 opened this issue 6 years ago • 14 comments

In Readme it says: "This implementation is based on python TensorFlow, which allows an efficient training on both CPU and GPU." Is g2p-seq2seq also able to use CPU only? I am running it on Ubuntu 16.04 Virtual Machine (where I can’t have gpu version) and it throws the following error:

Traceback (most recent call last): File "/usr/local/bin/g2p-seq2seq", line 5, in from pkg_resources import load_entry_point File "/usr/local/lib/python3.5/dist-packages/pkg_resources/init.py", line 3088, in @_call_aside File "/usr/local/lib/python3.5/dist-packages/pkg_resources/init.py", line 3072, in _call_aside f(*args, **kwargs) File "/usr/local/lib/python3.5/dist-packages/pkg_resources/init.py", line 3101, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/usr/local/lib/python3.5/dist-packages/pkg_resources/init.py", line 574, in _build_master ws.require(requires) File "/usr/local/lib/python3.5/dist-packages/pkg_resources/init.py", line 892, in require needed = self.resolve(parse_requirements(requirements)) File "/usr/local/lib/python3.5/dist-packages/pkg_resources/init.py", line 778, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'tensorflow-gpu>=1.1.0' distribution was not found and is required by g2p-seq2seq


I am also trying to run it on Windows 10 (where I have tensorflow-gpu) and it throws the following error:


C:\Users\michem>g2p-seq2seq C:\Users\michem\AppData\Local\Programs\Python\Python36\lib\site-packages\h5py_init_.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type. from ._conv import register_converters as _register_converters Traceback (most recent call last): File "C:\Users\michem\AppData\Local\Programs\Python\Python36\lib\site-packages\absl\flags_flag.py", line 166, in _parse return self.parser.parse(argument) File "C:\Users\michem\AppData\Local\Programs\Python\Python36\lib\site-packages\absl\flags_argument_parser.py", line 152, in parse val = self.convert(argument) File "C:\Users\michem\AppData\Local\Programs\Python\Python36\lib\site-packages\absl\flags_argument_parser.py", line 268, in convert type(argument))) TypeError: Expect argument to be a string or int, found <class 'float'>

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\michem\AppData\Local\Programs\Python\Python36\Scripts\g2p-seq2seq-script.py", line 11, in load_entry_point('g2p-seq2seq==6.0.0a0', 'console_scripts', 'g2p-seq2seq')() File "C:\Users\michem\AppData\Local\Programs\Python\Python36\lib\site-packages\pkg_resources_init_.py", line 572, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "C:\Users\michem\AppData\Local\Programs\Python\Python36\lib\site-packages\pkg_resources_init_.py", line 2755, in load_entry_point return ep.load() File "C:\Users\michem\AppData\Local\Programs\Python\Python36\lib\site-packages\pkg_resources_init_.py", line 2408, in load return self.resolve() File "C:\Users\michem\AppData\Local\Programs\Python\Python36\lib\site-packages\pkg_resources_init_.py", line 2414, in resolve module = import(self.module_name, fromlist=['name'], level=0) File "C:\Users\michem\AppData\Local\Programs\Python\Python36\lib\site-packages\g2p_seq2seq-6.0.0a0-py3.6.egg\g2p_seq2seq_init_.py", line 24, in from g2p_seq2seq import app File "C:\Users\michem\AppData\Local\Programs\Python\Python36\lib\site-packages\g2p_seq2seq-6.0.0a0-py3.6.egg\g2p_seq2seq\app.py", line 61, in of length_bucket_step.""") File "C:\Users\michem\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\platform\flags.py", line 58, in wrapper return original_function(*args, **kwargs) File "C:\Users\michem\AppData\Local\Programs\Python\Python36\lib\site-packages\absl\flags_defines.py", line 315, in DEFINE_integer DEFINE(parser, name, default, help, flag_values, serializer, **args) File "C:\Users\michem\AppData\Local\Programs\Python\Python36\lib\site-packages\absl\flags_defines.py", line 81, in DEFINE DEFINE_flag(_flag.Flag(parser, serializer, name, default, help, **args), File "C:\Users\michem\AppData\Local\Programs\Python\Python36\lib\site-packages\absl\flags_flag.py", line 107, in init self._set_default(default) File "C:\Users\michem\AppData\Local\Programs\Python\Python36\lib\site-packages\absl\flags_flag.py", line 196, in _set_default self.default = self._parse(value) File "C:\Users\michem\AppData\Local\Programs\Python\Python36\lib\site-packages\absl\flags_flag.py", line 169, in _parse 'flag --%s=%s: %s' % (self.name, argument, e)) absl.flags._exceptions.IllegalFlagValueError: flag --length_bucket_step=1.5: Expect argument to be a string or int, found <class 'float'>


Considering that I have Ubuntu only on VM and it’s not possible to use gpu version there, if g2p-seq2seq runs only on gpu version, can you at least help me with the second error?

michem32 avatar Apr 17 '18 13:04 michem32

Our program work with the ordinary tensorflow too, not only tensorflow-gpu. In case when you run this toolkit on the machine without gpu, please, change install requires in setup.py file from 'tensorflow-gpu>=1.1.0' to 'tensorflow>=1.1.0'. Current version of g2p-seq2seq work with tensorflow=1.4.0, tensor2tensor=1.3.2. Please, pull the latest version of g2p-seq2seq from the repository, because of some minor fixes implemented.

nurtas-m avatar Apr 18 '18 17:04 nurtas-m

Currently we working on the issue of launching our program with the new tensor2tensor and tensorflow versions. Sorry, there are a lot of changes were implemented in new tensor2tensor. We will try to commit our fixes as soon as possible.

nurtas-m avatar Apr 18 '18 17:04 nurtas-m

Are you sure that the current version of g2p-seq2seq works with tensor2tensor=1.3.2?

On VMware with Ubuntu 16.04 and Python 3.5 (without gpu) I installed tensorflow=1.4.0, tensor2tensor=1.3.2. Then I downloaded the today's version of g2p-seq2seq, changed the following line in setup.py: install_requires=['tensorflow>=1.4.0', 'tensor2tensor>=1.3.2'], I ran: sudo python3 setup.py install Then I noticed that after running the setup.py, it changed the version of tensor2tensor from 1.3.2 to 1.5.7. So I installed again tensor2tensor 1.3.2.

By running "pip3 list | grep tensor" I see the relevant packages that I have installed: tensor2tensor (1.3.2) tensorflow (1.4.0) tensorflow-tensorboard (0.4.0)

Then when I run: 'python setup.py test' Out of 221 tests, 1 test fails, 21 tests have errors, but when I run g2p-seq2seq it produces the following error:


root@ubuntu:/home/manos/Desktop/tensor2tensor-1.3.2# g2p-seq2seq Traceback (most recent call last): File "/usr/local/bin/g2p-seq2seq", line 11, in load_entry_point('g2p-seq2seq==6.0.0a0', 'console_scripts', 'g2p-seq2seq')() File "/usr/local/lib/python3.5/dist-packages/pkg_resources/init.py", line 480, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/usr/local/lib/python3.5/dist-packages/pkg_resources/init.py", line 2693, in load_entry_point return ep.load() File "/usr/local/lib/python3.5/dist-packages/pkg_resources/init.py", line 2324, in load return self.resolve() File "/usr/local/lib/python3.5/dist-packages/pkg_resources/init.py", line 2330, in resolve module = import(self.module_name, fromlist=['name'], level=0) File "/usr/local/lib/python3.5/dist-packages/g2p_seq2seq-6.0.0a0-py3.5.egg/g2p_seq2seq/init.py", line 24, in from g2p_seq2seq import app File "/usr/local/lib/python3.5/dist-packages/g2p_seq2seq-6.0.0a0-py3.5.egg/g2p_seq2seq/app.py", line 31, in from g2p_seq2seq.g2p import G2PModel File "/usr/local/lib/python3.5/dist-packages/g2p_seq2seq-6.0.0a0-py3.5.egg/g2p_seq2seq/g2p.py", line 35, in from g2p_seq2seq import g2p_trainer_utils File "/usr/local/lib/python3.5/dist-packages/g2p_seq2seq-6.0.0a0-py3.5.egg/g2p_seq2seq/g2p_trainer_utils.py", line 30, in from tensor2tensor.utils import trainer_lib ImportError: cannot import name 'trainer_lib'


'trainer_lib' is not included in t2t 1.3.2 but it is a part of the latest t2t version.

So, probably the latest version of g2p_seq2seq cannot work with t2t 1.3.2. I guess a previous version of g2p_seq2seq would work with t2t 1.3.2. Do you know which one and where can I find it?

(At least until you solve the problem with the incompatibility with the current version of t2t)

michem32 avatar Apr 19 '18 14:04 michem32

Hello, @michem32 Today we implemented new version of g2p-seq2seq that should be compatible with new tensor2tensor=1.5.7

nurtas-m avatar Apr 19 '18 15:04 nurtas-m

Thank you for your reply.

I tried the new version of g2p-seq2seq, by using Ubuntu 16.04 on VMware Python 3.5 Latest tensorflow (1.7.0 cpu) tensor2tensor (1.5.7)

But when I run "g2p-seq2seq --interactive --model g2p-seq2seq-cmudict" I get: AttributeError: module 'tensorflow.contrib.rnn' has no attribute 'core_rnn_cell'

Specifically:


root@ubuntu:/home/manos/Desktop/g2p-seq2seq-old_4_2_2018# g2p-seq2seq --interactive --model g2p-seq2seq-cmudict Loading vocabularies from g2p-seq2seq-cmudict 2018-04-20 03:56:26.559154: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA Creating 2 layers of 512 units. WARNING:tensorflow:From /usr/local/lib/python3.5/dist-packages/tensorflow/contrib/learn/python/learn/datasets/base.py:198: retry (from tensorflow.contrib.learn.python.learn.datasets.base) is deprecated and will be removed in a future version. Instructions for updating: Use the retry module or similar alternatives. Traceback (most recent call last): File "/usr/local/bin/g2p-seq2seq", line 11, in load_entry_point('g2p-seq2seq==5.0.0a0', 'console_scripts', 'g2p-seq2seq')() File "/usr/local/lib/python3.5/dist-packages/g2p_seq2seq-5.0.0a0-py3.5.egg/g2p_seq2seq/app.py", line 87, in main File "/usr/local/lib/python3.5/dist-packages/g2p_seq2seq-5.0.0a0-py3.5.egg/g2p_seq2seq/g2p.py", line 101, in load_decode_model File "/usr/local/lib/python3.5/dist-packages/g2p_seq2seq-5.0.0a0-py3.5.egg/g2p_seq2seq/seq2seq_model.py", line 121, in init AttributeError: module 'tensorflow.contrib.rnn' has no attribute 'core_rnn_cell'


I get the same error when I try with tensorflow-1.5.0 instead of 1.7.0

michem32 avatar Apr 20 '18 10:04 michem32

In my opinion, you still have the old version of g2p-seq2seq: File "/usr/local/bin/g2p-seq2seq", line 11, in load_entry_point('g2p-seq2seq==5.0.0a0', 'console_scripts', 'g2p-seq2seq')()

nurtas-m avatar Apr 20 '18 11:04 nurtas-m

You are right.

However, I'm trying with the latest version and I get the following error.


root@ubuntu:/home/manos/Desktop/g2p-seq2seq-master_20_4_2018new# g2p-seq2seq --interactive --model_dir g2p-seq2seq-cmudict WARNING:tensorflow:From /usr/local/lib/python3.5/dist-packages/tensorflow/contrib/learn/python/learn/datasets/base.py:198: retry (from tensorflow.contrib.learn.python.learn.datasets.base) is deprecated and will be removed in a future version. Instructions for updating: Use the retry module or similar alternatives. INFO:tensorflow:Importing user module g2p_seq2seq from path /usr/local/lib/python3.5/dist-packages/g2p_seq2seq-6.1.0a0-py3.5.egg [2018-04-20 04:25:52,443] Importing user module g2p_seq2seq from path /usr/local/lib/python3.5/dist-packages/g2p_seq2seq-6.1.0a0-py3.5.egg Traceback (most recent call last): File "/usr/local/bin/g2p-seq2seq", line 11, in load_entry_point('g2p-seq2seq==6.1.0a0', 'console_scripts', 'g2p-seq2seq')() File "/usr/local/lib/python3.5/dist-packages/g2p_seq2seq-6.1.0a0-py3.5.egg/g2p_seq2seq/app.py", line 105, in main g2p_model = G2PModel(params, file_path, is_training=False) File "/usr/local/lib/python3.5/dist-packages/g2p_seq2seq-6.1.0a0-py3.5.egg/g2p_seq2seq/g2p.py", line 61, in init self.params.model_dir, file_path=file_path, is_training=is_training) File "/usr/local/lib/python3.5/dist-packages/g2p_seq2seq-6.1.0a0-py3.5.egg/g2p_seq2seq/g2p_problem.py", line 62, in init vocab_filename) File "/usr/local/lib/python3.5/dist-packages/g2p_seq2seq-6.1.0a0-py3.5.egg/g2p_seq2seq/g2p_encoder.py", line 178, in load_create_vocabs vocab_list = build_vocab_list(data_path) File "/usr/local/lib/python3.5/dist-packages/g2p_seq2seq-6.1.0a0-py3.5.egg/g2p_seq2seq/g2p_encoder.py", line 160, in build_vocab_list for line in data_file: File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/lib/io/file_io.py", line 215, in next return self.next() File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/lib/io/file_io.py", line 209, in next retval = self.readline() File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/lib/io/file_io.py", line 178, in readline self._preread_check() File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/lib/io/file_io.py", line 80, in _preread_check compat.as_bytes(self.__name), 1024 * 512, status) File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/util/compat.py", line 68, in as_bytes (bytes_or_text,)) TypeError: Expected binary or unicode string, got None


michem32 avatar Apr 20 '18 12:04 michem32

@michem32, Ok, i fixed some bugs. Can you, please, clone the latest version of g2p-seq2seq (ver 6.1.1a0), and try to retrain a new model?

nurtas-m avatar Apr 20 '18 14:04 nurtas-m

Now it throws the following error:


root@ubuntu:/home/manos/Desktop/g2p-seq2seq-master_23_4_2018# g2p-seq2seq --interactive --model_dir g2p-seq2seq-cmudict

INFO:tensorflow:Importing user module g2p_seq2seq from path /usr/local/lib/python3.5/dist-packages/g2p_seq2seq-6.1.1a0-py3.5.egg [2018-04-23 02:15:43,237] Importing user module g2p_seq2seq from path /usr/local/lib/python3.5/dist-packages/g2p_seq2seq-6.1.1a0-py3.5.egg Traceback (most recent call last): File "/usr/local/bin/g2p-seq2seq", line 11, in load_entry_point('g2p-seq2seq==6.1.1a0', 'console_scripts', 'g2p-seq2seq')() File "/usr/local/lib/python3.5/dist-packages/g2p_seq2seq-6.1.1a0-py3.5.egg/g2p_seq2seq/app.py", line 105, in main g2p_model = G2PModel(params, file_path, is_training=False) File "/usr/local/lib/python3.5/dist-packages/g2p_seq2seq-6.1.1a0-py3.5.egg/g2p_seq2seq/g2p.py", line 61, in init self.params.model_dir, file_path=file_path, is_training=is_training) File "/usr/local/lib/python3.5/dist-packages/g2p_seq2seq-6.1.1a0-py3.5.egg/g2p_seq2seq/g2p_problem.py", line 61, in init raise StandardError("Model not found in {}".format(self._model_dir)) NameError: name 'StandardError' is not defined


When I run the tests I get:


root@ubuntu:/home/manos/Desktop/g2p-seq2seq-master_23_4_2018# python setup.py test running test running egg_info writing requirements to g2p_seq2seq.egg-info/requires.txt writing g2p_seq2seq.egg-info/PKG-INFO writing top-level names to g2p_seq2seq.egg-info/top_level.txt writing dependency_links to g2p_seq2seq.egg-info/dependency_links.txt writing entry points to g2p_seq2seq.egg-info/entry_points.txt reading manifest file 'g2p_seq2seq.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'g2p_seq2seq.egg-info/SOURCES.txt' running build_ext Traceback (most recent call last): File "setup.py", line 48, in test_suite = 'tests' File "/home/manos/.local/lib/python2.7/site-packages/setuptools/init.py", line 129, in setup return distutils.core.setup(**attrs) File "/usr/lib/python2.7/distutils/core.py", line 151, in setup dist.run_commands() File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands self.run_command(cmd) File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/home/manos/.local/lib/python2.7/site-packages/setuptools/command/test.py", line 226, in run self.run_tests() File "/home/manos/.local/lib/python2.7/site-packages/setuptools/command/test.py", line 248, in run_tests exit=False, File "/usr/lib/python2.7/unittest/main.py", line 94, in init self.parseArgs(argv) File "/usr/lib/python2.7/unittest/main.py", line 149, in parseArgs self.createTests() File "/usr/lib/python2.7/unittest/main.py", line 158, in createTests self.module) File "/usr/lib/python2.7/unittest/loader.py", line 130, in loadTestsFromNames suites = [self.loadTestsFromName(name, module) for name in names] File "/usr/lib/python2.7/unittest/loader.py", line 91, in loadTestsFromName module = import('.'.join(parts_copy)) File "/home/manos/Desktop/g2p-seq2seq-master_23_4_2018/tests/init.py", line 23, in from tests import g2p_unittest File "/home/manos/Desktop/g2p-seq2seq-master_23_4_2018/tests/g2p_unittest.py", line 4, in import g2p_seq2seq.g2p as g2p File "/home/manos/Desktop/g2p-seq2seq-master_23_4_2018/g2p_seq2seq/init.py", line 24, in from g2p_seq2seq import app File "/home/manos/Desktop/g2p-seq2seq-master_23_4_2018/g2p_seq2seq/app.py", line 29, in import tensorflow as tf File "/usr/local/lib/python2.7/dist-packages/tensorflow_gpu-1.8.0rc0-py2.7-linux-x86_64.egg/tensorflow/init.py", line 24, in from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import File "/usr/local/lib/python2.7/dist-packages/tensorflow_gpu-1.8.0rc0-py2.7-linux-x86_64.egg/tensorflow/python/init.py", line 49, in from tensorflow.python import pywrap_tensorflow File "/usr/local/lib/python2.7/dist-packages/tensorflow_gpu-1.8.0rc0-py2.7-linux-x86_64.egg/tensorflow/python/pywrap_tensorflow.py", line 74, in raise ImportError(msg) ImportError: Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/tensorflow_gpu-1.8.0rc0-py2.7-linux-x86_64.egg/tensorflow/python/pywrap_tensorflow.py", line 58, in from tensorflow.python.pywrap_tensorflow_internal import * File "/usr/local/lib/python2.7/dist-packages/tensorflow_gpu-1.8.0rc0-py2.7-linux-x86_64.egg/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in _pywrap_tensorflow_internal = swig_import_helper() File "/usr/local/lib/python2.7/dist-packages/tensorflow_gpu-1.8.0rc0-py2.7-linux-x86_64.egg/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description) ImportError: libcudnn.so.7: cannot open shared object file: No such file or directory

Failed to load the native TensorFlow runtime.


I run it on: Ubuntu 16.04 on VMware python3.5 tensor2tensor (1.5.7) tensorboard (1.7.0) tensorflow (1.5.1 cpu) tensorflow-tensorboard (1.5.1)

michem32 avatar Apr 23 '18 09:04 michem32

Actually, after downloading the latest 'g2p-seq2seq-cmudict' model the new error is this one:


root@ubuntu:/home/manos/Desktop/g2p-seq2seq-master_24_4_2018# g2p-seq2seq --interactive --model_dir g2p-seq2seq-cmudict Traceback (most recent call last): File "/usr/local/bin/g2p-seq2seq", line 11, in load_entry_point('g2p-seq2seq==6.1.2a0', 'console_scripts', 'g2p-seq2seq')() File "/usr/local/lib/python3.5/dist-packages/g2p_seq2seq-6.1.2a0-py3.5.egg/g2p_seq2seq/app.py", line 107, in main params.hparams = g2p_trainer_utils.load_params(FLAGS.model_dir) File "/usr/local/lib/python3.5/dist-packages/g2p_seq2seq-6.1.2a0-py3.5.egg/g2p_seq2seq/g2p_trainer_utils.py", line 210, in load_params model_params = json.load(open(params_file_path)) File "/usr/lib/python3.5/json/init.py", line 268, in load parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw) File "/usr/lib/python3.5/json/init.py", line 319, in loads return _default_decoder.decode(s) File "/usr/lib/python3.5/json/decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python3.5/json/decoder.py", line 357, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)


The error while running "python setup.py test" remains the same.

michem32 avatar Apr 24 '18 13:04 michem32

Hello, @michem32 Do you train the new model before launching "--interactive" mode? The model that available by this link is now outdated. We are training new models now, and will upload them as soon as possible. You may train your own model (it takes not much time) and use it for your purposes.

nurtas-m avatar Apr 25 '18 08:04 nurtas-m

Hello nurtas. Since it is the first time I am using g2p-seq2seq, I am gonna need some detailed instructions on how to train a model. First of all, let’s say that I am going to use the dictionary provided here: https://github.com/cmusphinx/cmudict

If I want to continue training a saved model I have to write: g2p-seq2seq --train cmudict.dict --model_dir model_folder_path And, if I want to start training from scratch, I’ ll have to write: g2p-seq2seq --train cmudict.dict --model_dir model_folder_path --reinit Correct?

Second, since the transformer model should be of specific type, can you provide an example model in order to start training?

michem32 avatar May 02 '18 14:05 michem32

If I want to continue training a saved model I have to write: g2p-seq2seq --train cmudict.dict --model_dir model_folder_path And, if I want to start training from scratch, I’ ll have to write: g2p-seq2seq --train cmudict.dict --model_dir model_folder_path --reinit Correct?

Yes, correct.

Second, since the transformer model should be of specific type, can you provide an example model in order to start training?

We use the default transformer_base model. We provide the possibility of modification of only few transformer model's parameters such as: --size (number of neurons in hidden layer), --num_layers (number of hidden layers) and --filter_size (the size of the filter layer). To start the training, just type: g2p-seq2seq --model_dir model_folder_path --train cmudict.dict --size 256 --num_layers 3 --filter_size 512 You don't need any initial model in model_folder_path. The program will create new models' files after launching the training process.

nurtas-m avatar May 02 '18 20:05 nurtas-m

Thank you nutras. Unfortunately, the error is still the same though:

INFO:tensorflow:Importing user module g2p_seq2seq from path /usr/local/lib/python3.5/dist-packages/g2p_seq2seq-6.1.3a0-py3.5.egg [2018-05-02 14:24:31,962] Importing user module g2p_seq2seq from path /usr/local/lib/python3.5/dist-packages/g2p_seq2seq-6.1.3a0-py3.5.egg Traceback (most recent call last): File "/usr/local/bin/g2p-seq2seq", line 11, in load_entry_point('g2p-seq2seq==6.1.3a0', 'console_scripts', 'g2p-seq2seq')() File "/usr/local/lib/python3.5/dist-packages/g2p_seq2seq-6.1.3a0-py3.5.egg/g2p_seq2seq/app.py", line 102, in main g2p_model = G2PModel(params, file_path, is_training=True) File "/usr/local/lib/python3.5/dist-packages/g2p_seq2seq-6.1.3a0-py3.5.egg/g2p_seq2seq/g2p.py", line 61, in init self.params.model_dir, file_path=file_path, is_training=is_training) File "/usr/local/lib/python3.5/dist-packages/g2p_seq2seq-6.1.3a0-py3.5.egg/g2p_seq2seq/g2p_problem.py", line 59, in init vocab_filename, data_path=file_path) File "/usr/local/lib/python3.5/dist-packages/g2p_seq2seq-6.1.3a0-py3.5.egg/g2p_seq2seq/g2p_encoder.py", line 187, in load_create_vocabs source_vocab.store_to_file(vocab_filename) File "/usr/local/lib/python3.5/dist-packages/g2p_seq2seq-6.1.3a0-py3.5.egg/g2p_seq2seq/g2p_encoder.py", line 151, in store_to_file for i in xrange(len(self._id_to_sym)): NameError: name 'xrange' is not defined

michem32 avatar May 02 '18 21:05 michem32