Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: You must specify one of the supported problems to generate data for: #34

Open
NingHongKe opened this issue Oct 18, 2017 · 8 comments

Comments

@NingHongKe
Copy link

翻译任务中,直接利用给定的run.sh运行,出现下面的错误,有没有人知道为什么呢?

Traceback (most recent call last):
File "../tensor2tensor/tensor2tensor/bin/t2t-datagen", line 213, in
tf.app.run()
File "/home/ninghongke/tensorflow/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "../tensor2tensor/tensor2tensor/bin/t2t-datagen", line 160, in main
raise ValueError(error_msg)
ValueError: You must specify one of the supported problems to generate data for:

Traceback (most recent call last):
File "../tensor2tensor/tensor2tensor/bin/t2t-trainer", line 96, in
tf.app.run()
File "/home/ninghongke/tensorflow/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "../tensor2tensor/tensor2tensor/bin/t2t-trainer", line 92, in main
schedule=FLAGS.schedule)
File "/home/ninghongke/tensorflow/lib/python2.7/site-packages/tensor2tensor/utils/trainer_utils.py", line 352, in run
hparams=hparams)
File "/home/ninghongke/tensorflow/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/learn_runner.py", line 193, in run
experiment = wrapped_experiment_fn(run_config=run_config, hparams=hparams)
File "/home/ninghongke/tensorflow/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/learn_runner.py", line 79, in wrapped_experiment_fn
experiment = experiment_fn(run_config, hparams)
File "/home/ninghongke/tensorflow/lib/python2.7/site-packages/tensor2tensor/utils/trainer_utils.py", line 123, in experiment_fn
run_config=run_config)
File "/home/ninghongke/tensorflow/lib/python2.7/site-packages/tensor2tensor/utils/trainer_utils.py", line 135, in create_experiment
run_config=run_config)
File "/home/ninghongke/tensorflow/lib/python2.7/site-packages/tensor2tensor/utils/trainer_utils.py", line 183, in create_experiment_components
add_problem_hparams(hparams, FLAGS.problems)
File "/home/ninghongke/tensorflow/lib/python2.7/site-packages/tensor2tensor/utils/trainer_utils.py", line 245, in add_problem_hparams
raise LookupError(error_msg)
LookupError: translate_enzh not in the set of supported problems:

@wodeweilai
Copy link

我也遇到这个问题了,请问你解决了么

@wasifferoze
Copy link

same problem. how to resolve it? any help?

1 similar comment
@brightmart
Copy link

same problem. how to resolve it? any help?

@brightmart
Copy link

any update?

2 similar comments
@brightmart
Copy link

any update?

@brightmart
Copy link

any update?

@zm274310577
Copy link

我参考 https://blog.csdn.net/csa121/article/details/79605215 进行了tensor2tensor的自定义problem测试,在实现的过程中也出现了这个问题,不知道我们的问题是不是一样的,下面说下我的解决方法。
在参考文章中需要自定义实现一个problem类,并使用@registry.register_problem进行装饰,即:
#自定义的problem一定要加该装饰器,不然t2t库找不到自定义的problem
@registry.register_problem
class MyProblem(text_problems.Text2TextProblem):

第二个是要创建init.py文件,并引入自定义的problem模块,原文中是这样写的:
self_script/init.py
from . import my_problem

我按照这样的写法,结果就报了上面的错误。其实init的文件名称应该是__init__.py,我这样修改后就没错了。

@nusselttech
Copy link

我也是,折腾了好久了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants