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 when running data processing script #6

Open
peluz opened this issue Sep 14, 2020 · 0 comments
Open

KeyError when running data processing script #6

peluz opened this issue Sep 14, 2020 · 0 comments

Comments

@peluz
Copy link

peluz commented Sep 14, 2020

Greetings!

When running the scripts/create_training_data.sh script, I get the following KeyErrors:

Traceback (most recent call last):
File "create_training_data.py", line 430, in
tf.app.run()
File "/tensorflow-1.15.2/python3.6/tensorflow_core/python/platform/app.py", line 40, in run
_run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
File "/usr/local/lib/python3.6/dist-packages/absl/app.py", line 300, in run
_run_main(main, args)
File "/usr/local/lib/python3.6/dist-packages/absl/app.py", line 251, in _run_main
sys.exit(main(argv))
File "create_training_data.py", line 410, in main
rng, is_training=FLAGS.is_training)
File "create_training_data.py", line 210, in create_training_instances
vocab_words, rng, is_training=is_training)
File "create_training_data.py", line 295, in create_instances_from_document
context_document = all_documents[context_document_id]['text']
KeyError: 'A1DB81433C6D9C29'
Traceback (most recent call last):
File "create_training_data.py", line 430, in
tf.app.run()
File "/tensorflow-1.15.2/python3.6/tensorflow_core/python/platform/app.py", line 40, in run
_run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
File "/usr/local/lib/python3.6/dist-packages/absl/app.py", line 300, in run
_run_main(main, args)
File "/usr/local/lib/python3.6/dist-packages/absl/app.py", line 251, in _run_main
sys.exit(main(argv))
File "create_training_data.py", line 410, in main
rng, is_training=FLAGS.is_training)
File "create_training_data.py", line 210, in create_training_instances
vocab_words, rng, is_training=is_training)
File "create_training_data.py", line 295, in create_instances_from_document
context_document = all_documents[context_document_id]['text']
KeyError: '1F92A2A6993DB564'
Traceback (most recent call last):
File "create_training_data.py", line 430, in
tf.app.run()
File "/tensorflow-1.15.2/python3.6/tensorflow_core/python/platform/app.py", line 40, in run
_run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
File "/usr/local/lib/python3.6/dist-packages/absl/app.py", line 300, in run
_run_main(main, args)
File "/usr/local/lib/python3.6/dist-packages/absl/app.py", line 251, in _run_main
sys.exit(main(argv))
File "create_training_data.py", line 410, in main
rng, is_training=FLAGS.is_training)
File "create_training_data.py", line 210, in create_training_instances
vocab_words, rng, is_training=is_training)
File "create_training_data.py", line 295, in create_instances_from_document
context_document = all_documents[context_document_id]['text']
KeyError: '804387C91894D89D'

As a result, I'm not able to prepare the training data: only the validation and test data are able to be processed.

Any idea about why this is happening and how to correct it? Thanks in advance.

@peluz peluz changed the title KeyError when running data creation script KeyError when running data processing script Sep 15, 2020
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