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

KeyError: '' #70

Open
resetLi opened this issue Jul 23, 2021 · 0 comments
Open

KeyError: '' #70

resetLi opened this issue Jul 23, 2021 · 0 comments

Comments

@resetLi
Copy link

resetLi commented Jul 23, 2021

你好,我运行run_predicate_classification.py是报错:
Traceback (most recent call last):
File "run_predicate_classification.py", line 812, in
tf.app.run()
File "/root/anaconda3/envs/python367/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 40, in run
_run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
File "/root/anaconda3/envs/python367/lib/python3.6/site-packages/absl/app.py", line 299, in run
_run_main(main, args)
File "/root/anaconda3/envs/python367/lib/python3.6/site-packages/absl/app.py", line 250, in _run_main
sys.exit(main(argv))
File "run_predicate_classification.py", line 690, in main
train_examples, label_list, FLAGS.max_seq_length, tokenizer, train_file)
File "run_predicate_classification.py", line 381, in file_based_convert_examples_to_features
max_seq_length, tokenizer)
File "run_predicate_classification.py", line 343, in convert_single_example
label_ids = _predicate_label_to_id(label_list, label_map)
File "run_predicate_classification.py", line 367, in _predicate_label_to_id
predicate_label_ids[predicate_label_map[label]] = 1
KeyError: ''
请教一下该如何处理?看了之前的issue,没有看懂如何处理

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

1 participant