Open kudou1994 opened 5 years ago
I have the same error Translation walkthrough: --problem=translate_ende_wmt32k tensor2tensor==1.13.4 tensorflow==1.13.1 Python 3.6.6 Centos 7.6
Traceback (most recent call last):
File "/mnt/mt/py/tensorflow/bin/t2t-insights-server", line 17, in <module>
tf.app.run()
File "/mnt/mt/py/tensorflow/lib64/python3.6/site-packages/tensorflow/python/platform/app.py", line 125, in run
_sys.exit(main(argv))
File "/mnt/mt/py/tensorflow/bin/t2t-insights-server", line 12, in main
server.main(argv)
File "/mnt/mt/py/tensorflow/lib64/python3.6/site-packages/tensor2tensor/insights/server.py", line 108, in main
processor_configuration)
File "/mnt/mt/py/tensorflow/lib64/python3.6/site-packages/tensor2tensor/insights/transformer_model.py", line 121, in __init__
decode_hp.add_hparam("shards", 1)
File "/mnt/mt/py/tensorflow/lib64/python3.6/site-packages/tensor2tensor/utils/hparam.py", line 433, in add_hparam
raise ValueError('Hyperparameter name is reserved: %s' % name)
ValueError: Hyperparameter name is reserved: shards
+1
I think this error happens when add_hparam()
is called twice with the same hyperparameter name. I noticed the same problem in universal_transformer. update_hparams_for_universal_transformer()
is called first in universal_transformer_base()
: https://github.com/tensorflow/tensor2tensor/blob/master/tensor2tensor/models/research/universal_transformer.py#L454
And then in universal_transformer_big()
:
https://github.com/tensorflow/tensor2tensor/blob/master/tensor2tensor/models/research/universal_transformer.py#L470
The latter causes the error "Hyperparameter name is reserved".
Description
when i try to use insights(https://github.com/tensorflow/tensor2tensor/tree/master/tensor2tensor/insights), an error occurred, ValueError: Hyperparameter name is reserved: shards, ...
Environment information
For bugs: reproduction and error logs