AIChallenger / AI_Challenger_2017

AI Challenger, a platform for open datasets and programming competitions to artificial intelligence (AI) talents around the world.
https://challenger.ai/
474 stars 196 forks source link

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

Open NingHongKe opened 6 years ago

NingHongKe commented 6 years ago

翻译任务中,直接利用给定的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 commented 6 years ago

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

wasifferoze commented 6 years ago

same problem. how to resolve it? any help?

brightmart commented 6 years ago

same problem. how to resolve it? any help?

brightmart commented 6 years ago

any update?

brightmart commented 6 years ago

any update?

brightmart commented 6 years ago

any update?

zm274310577 commented 5 years ago

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

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

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

nusselttech commented 4 years ago

我也是,折腾了好久了