Closed mausamsion closed 6 years ago
Thank you for the report! This bug appears with tensor2tensor versions higher than 1.3.2. We will try to fix it in next release.
Class 'g2p_trainer_utils.py' tries to import the following classes from 'tensor2tensor.utils':
I managed to find them in a previous version, for example here: https://github.com/tensorflow/tensor2tensor/tree/9a651716367308fe55820dc37578371e177e5d91/tensor2tensor/utils
But, I don't know how stable they are.
Any update on that?
Yes, there are a lot of changes in tensor2tensor starting from version 1.4.0. Now I am trying to modify our code in order to g2p_seq2seq work with the new tensor2tensor.
@nurtas-m is this fixed already?
Fixed partially. We need to upload new pre-trained models.
Fixed with commit 762de8f57eb74bccaa3a9239f4782ab4de44af84
I am trying to run _g2p-seq2seq --interactive --model_dir g2p-seq2seq-cmudict_ command but getting below error. Installed g2p-seq2seq from pip command. Can anyone help, I am not sure what to do next.
Traceback (most recent call last):
File "/root/miniconda2/bin/g2p-seq2seq", line 7, in
Hello, @AshishDagar Install g2p-seq2seq from github, please. Also, current version of g2p-seq2seq toolkit requires tensor2tensor ver=1.5.7.
Hello, @nurtas-m
I tried what you said. Even test was OK. But still interactive session is not opening :
Test Run :
running test
running egg_info
writing entry points to g2p_seq2seq.egg-info/entry_points.txt
writing requirements to g2p_seq2seq.egg-info/requires.txt
writing g2p_seq2seq.egg-info/PKG-INFO
writing dependency_links to g2p_seq2seq.egg-info/dependency_links.txt
writing top-level names to g2p_seq2seq.egg-info/top_level.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
test_decode (tests.g2p_unittest.TestG2P) ... /home/ashishdagar/g2p-seq2seq/g2p_seq2seq/g2p_trainer_utils.py:210: ResourceWarning: unclosed file <_io.TextIOWrapper name='/home/ashishdagar/g2p-seq2seq/tests/models/decode/model.params' mode='r' encoding='UTF-8'>
model_params = json.load(open(params_file_path))
WARNING:tensorflow:From /usr/local/lib/python3.5/dist-packages/tensor2tensor/utils/trainer_lib.py:144: RunConfig.init (from tensorflow.contrib.learn.python.learn.estimators.run_config) is deprecated and will be removed in a future version.
Instructions for updating:
When switching to tf.estimator.Estimator, use tf.estimator.RunConfig instead.
[2018-06-11 17:11:43,397] From /usr/local/lib/python3.5/dist-packages/tensor2tensor/utils/trainer_lib.py:144: RunConfig.init (from tensorflow.contrib.learn.python.learn.estimators.run_config) is deprecated and will be removed in a future version.
Instructions for updating:
When switching to tf.estimator.Estimator, use tf.estimator.RunConfig instead.
/usr/local/lib/python3.5/dist-packages/tensorflow/python/platform/tf_logging.py:121: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead
_get_logger().warn(msg, *args, **kwargs)
WARNING:tensorflow:Schedule=train_and_evaluate. Assuming that training is running on a single machine.
[2018-06-11 17:11:43,397] Schedule=train_and_evaluate. Assuming that training is running on a single machine.
WARNING:tensorflow:Estimator's model_fn (<function T2TModel.make_estimator_model_fn.
Future major versions of TensorFlow will allow gradients to flow into the labels input on backprop by default.
See @{tf.nn.softmax_cross_entropy_with_logits_v2}.
[2018-06-11 17:11:51,778] From /usr/local/lib/python3.5/dist-packages/tensor2tensor/layers/common_layers.py:1828: softmax_cross_entropy_with_logits (from tensorflow.python.ops.nn_ops) is deprecated and will be removed in a future version. Instructions for updating:
Future major versions of TensorFlow will allow gradients to flow into the labels input on backprop by default.
See @{tf.nn.softmax_cross_entropy_with_logits_v2}.
/usr/local/lib/python3.5/dist-packages/tensorflow/python/ops/gradientsimpl.py:100: UserWarning: Converting sparse IndexedSlices to a dense Tensor of unknown shape. This may consume a large amount of memory. "Converting sparse IndexedSlices to a dense Tensor of unknown shape. " /usr/local/lib/python3.5/dist-packages/tensor2tensor/utils/metrics.py:392: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() instead args, , keywords, _ = inspect.getargspec(metric_fn) ok
Ran 3 tests in 37.001s
OK
Interactive Session Run :
root@197NODDT13048:/home/ashishdagar/g2p-seq2seq# g2p-seq2seq --interactive --model g2p-seq2seq-cmudict
Traceback (most recent call last):
File "/root/miniconda2/bin/g2p-seq2seq", line 7, in
Ok, as I understand from the logs, you had launched:
The problem is that you had installed another version of tensor2tensor (not 1.5.7) for python2.7
@nurtas-m
Now working fine after installing tensor2tensor version 1.5.7. Thanks..!!!!
@AshishDagar You welcome))
$ g2p-seq2seq --interactive --model_dir g2p-seq2seq-cmudict
from ._conv import register_converters as _register_converters
Traceback (most recent call last):
File "~/anaconda2/bin/g2p-seq2seq", line 11, in <module> load_entry_point('g2p-seq2seq==6.0.0a0', 'console_scripts', 'g2p-seq2seq')()
File "~/anaconda2/lib/python2.7/site-packages/pkg_resources/__init__.py", line 572, in load_entry_point return get_distribution(dist).load_entry_point(group, name)
File "~/anaconda2/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2755, in load_entry_point
return ep.load()File "~/anaconda2/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2408, in load return self.resolve()
File "~/anaconda2/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2414, in resolve module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "~/anaconda2/lib/python2.7/site-packages/g2p_seq2seq-6.0.0a0-py2.7.egg/g2p_seq2seq/__init__.py", line 24, in <module> from g2p_seq2seq import app
File "~/anaconda2/lib/python2.7/site-packages/g2p_seq2seq-6.0.0a0-py2.7.egg/g2p_seq2seq/app.py", line 31, in <module> from g2p_seq2seq.g2p import G2PModel
File "~/anaconda2/lib/python2.7/site-packages/g2p_seq2seq-6.0.0a0-py2.7.egg/g2p_seq2seq/g2p.py", line 30, in <module> from g2p_seq2seq import g2p_trainer_utils
File "~/anaconda2/lib/python2.7/site-packages/g2p_seq2seq-6.0.0a0-py2.7.egg/g2p_seq2seq/g2p_trainer_utils.py", line 26, in <module> from tensor2tensor.utils import input_fn_builder
ImportError: cannot import name input_fn_builder
I have tensorflow version 1.4.1 and tensor2tensor version 1.5.5 installed.