Crash in test script using dictionary guided decoding
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 39
- Forks
- 7
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 5
Description
The test script is failing on a couple of the experiments with an usual error ("Slice index 113 of dimension 0 out of bounds"). The experiment setup looks like this
- Corpus_pairs: 1) mbt-MBTV / en-MBTBT, and 2) mbt-ArabicDigits_0_9 / en-ArabicDigits_0_9
- The second corpus pair simply has the digits '0' through '9' on separate lines for both the source and target side.
- One experiment (OT-Sequencing/MBTV-MBTBT.AE.1i) uses the Arabic Digits files only for the dictionary; the other experiment (OT-Sequencing/MBTV-MBTBT.AE.1j) uses the Arabic Digits files for the dictionary and for train.
The preprocessing and training appears to run successfully, but the inferencing fails pretty quickly with the following stack trace:
2021-08-01 16:40:37.369377: W tensorflow/core/framework/op_kernel.cc:1763] OP_REQUIRES failed at strided_slice_op.cc:108 : Invalid argument: slice index 113 of dimension 0 out of bounds.
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/content/silnlp/silnlp/nmt/test.py", line 605, in <module>
main()
File "/content/silnlp/silnlp/nmt/test.py", line 568, in main
books,
File "/content/silnlp/silnlp/nmt/test.py", line 383, in test_checkpoint
checkpoint_path=str(checkpoint_path),
File "/content/silnlp/silnlp/nmt/runner.py", line 345, in infer_multiple
predictions = infer_fn(source)
File "/usr/local/lib/python3.7/dist-packages/tensorflow/python/eager/def_function.py", line 828, in __call__
result = self._call(*args, **kwds)
File "/usr/local/lib/python3.7/dist-packages/tensorflow/python/eager/def_function.py", line 855, in _call
return self._stateless_fn(*args, **kwds) # pylint: disable=not-callable
File "/usr/local/lib/python3.7/dist-packages/tensorflow/python/eager/function.py", line 2943, in __call__
filtered_flat_args, captured_inputs=graph_function.captured_inputs) # pylint: disable=protected-access
File "/usr/local/lib/python3.7/dist-packages/tensorflow/python/eager/function.py", line 1919, in _call_flat
ctx, args, cancellation_manager=cancellation_manager))
File "/usr/local/lib/python3.7/dist-packages/tensorflow/python/eager/function.py", line 560, in call
ctx=ctx)
File "/usr/local/lib/python3.7/dist-packages/tensorflow/python/eager/execute.py", line 60, in quick_execute
inputs, attrs, num_outputs)
tensorflow.python.framework.errors_impl.InvalidArgumentError: 2 root error(s) found.
(0) Invalid argument: slice index 113 of dimension 0 out of bounds.
[[{{node sil_transformer_base_alignment_enhanced/map/while/body/_1/sil_transformer_base_alignment_enhanced/map/while/StatefulPartitionedCall/while/body/_1741/while/while/body/_2234/while/while/cond_1/then/_2483/while/while/cond_1/strided_slice_2}}]]
[[sil_transformer_base_alignment_enhanced/map/while/body/_1/sil_transformer_base_alignment_enhanced/map/while/StatefulPartitionedCall/while/body/_1741/while/cond/else/_2324/while/cond/while_1/LoopCond/_2575/_710]]
(1) Invalid argument: slice index 113 of dimension 0 out of bounds.
[[{{node sil_transformer_base_alignment_enhanced/map/while/body/_1/sil_transformer_base_alignment_enhanced/map/while/StatefulPartitionedCall/while/body/_1741/while/while/body/_2234/while/while/cond_1/then/_2483/while/while/cond_1/strided_slice_2}}]]
0 successful operations.
0 derived errors ignored. [Op:__inference_infer_33753]
Function call stack:
infer -> infer
This is the only experiment setup that fails like this. Other experiments (e.g., OT-Sequencing/MBTV-MBTBT.AE.1k and .1l) which use a larger Arabic digits file (0-99, 0-999, etc) do not see this failure.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with silnlp/nmt/test.py, especially test_checkpoint, and follow the inference call into silnlp/nmt/runner.py:345. Reproduce inferencing with the two Arabic-digits corpus setups and inspect the TensorFlow stack trace; done means those dictionary-guided experiments complete without the out-of-bounds failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, tensorflow
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100