@vince62s Thanks for the suggestion. It works when I remove both tgt
and replace_unk
lines.
However, I want to have the option of replace_unk: true
in order to reproduce the results from a research paper. But, when I just remove tgt
, and keep replace_unk
, I get the following errors:
Running on CPU
Traceback (most recent call last):
File "/data/envs/open_nmt/bin/onmt_translate", line 8, in <module>
sys.exit(main())
File "/data/envs/open_nmt/lib/python3.8/site-packages/onmt/bin/translate.py", line 60, in main
translate(opt)
File "/data/envs/open_nmt/lib/python3.8/site-packages/onmt/bin/translate.py", line 41, in translate
_, _ = translator._translate(
File "/data/envs/open_nmt/lib/python3.8/site-packages/onmt/translate/translator.py", line 345, in _translate
batch_data = self.translate_batch(
File "/data/envs/open_nmt/lib/python3.8/site-packages/onmt/translate/translator.py", line 723, in translate_batch
return self._translate_batch_with_strategy(
File "/data/envs/open_nmt/lib/python3.8/site-packages/onmt/translate/translator.py", line 813, in _translate_batch_with_strategy
decode_strategy.advance(log_probs, attn)
File "/data/envs/open_nmt/lib/python3.8/site-packages/onmt/translate/beam_search.py", line 295, in advance
current_attn = attn.index_select(1, self.select_indices)
RuntimeError: INDICES element is out of DATA bounds, id=4 axis_dim=1
Running on GPU (gpu: 0
in config file):
../aten/src/ATen/native/cuda/Indexing.cu:922: indexSelectSmallIndex: block: [0,0,0], thread: [64,0,0] Assertion `srcIndex < srcSelectDimSize` failed.
../aten/src/ATen/native/cuda/Indexing.cu:922: indexSelectSmallIndex: block: [0,0,0], thread: [65,0,0] Assertion `srcIndex < srcSelectDimSize` failed.
../aten/src/ATen/native/cuda/Indexing.cu:922: indexSelectSmallIndex: block: [0,0,0], thread: [66,0,0] Assertion `srcIndex < srcSelectDimSize` failed.
../aten/src/ATen/native/cuda/Indexing.cu:922: indexSelectSmallIndex: block: [0,0,0], thread: [67,0,0] Assertion `srcIndex < srcSelectDimSize` failed.
../aten/src/ATen/native/cuda/Indexing.cu:922: indexSelectSmallIndex: block: [0,0,0], thread: [68,0,0] Assertion `srcIndex < srcSelectDimSize` failed.
../aten/src/ATen/native/cuda/Indexing.cu:922: indexSelectSmallIndex: block: [0,0,0], thread: [69,0,0] Assertion `srcIndex < srcSelectDimSize` failed.
../aten/src/ATen/native/cuda/Indexing.cu:922: indexSelectSmallIndex: block: [0,0,0], thread: [70,0,0] Assertion `srcIndex < srcSelectDimSize` failed.
../aten/src/ATen/native/cuda/Indexing.cu:922: indexSelectSmallIndex: block: [0,0,0], thread: [71,0,0] Assertion `srcIndex < srcSelectDimSize` failed.
../aten/src/ATen/native/cuda/Indexing.cu:922: indexSelectSmallIndex: block: [0,0,0], thread: [72,0,0] Assertion `srcIndex < srcSelectDimSize` failed.
../aten/src/ATen/native/cuda/Indexing.cu:922: indexSelectSmallIndex: block: [0,0,0], thread: [73,0,0] Assertion `srcIndex < srcSelectDimSize` failed.
../aten/src/ATen/native/cuda/Indexing.cu:922: indexSelectSmallIndex: block: [0,0,0], thread: [74,0,0] Assertion `srcIndex < srcSelectDimSize` failed.
../aten/src/ATen/native/cuda/Indexing.cu:922: indexSelectSmallIndex: block: [0,0,0], thread: [75,0,0] Assertion `srcIndex < srcSelectDimSize` failed.
../aten/src/ATen/native/cuda/Indexing.cu:922: indexSelectSmallIndex: block: [0,0,0], thread: [76,0,0] Assertion `srcIndex < srcSelectDimSize` failed.
../aten/src/ATen/native/cuda/Indexing.cu:922: indexSelectSmallIndex: block: [0,0,0], thread: [77,0,0] Assertion `srcIndex < srcSelectDimSize` failed.
../aten/src/ATen/native/cuda/Indexing.cu:922: indexSelectSmallIndex: block: [0,0,0], thread: [78,0,0] Assertion `srcIndex < srcSelectDimSize` failed.
../aten/src/ATen/native/cuda/Indexing.cu:922: indexSelectSmallIndex: block: [0,0,0], thread: [79,0,0] Assertion `srcIndex < srcSelectDimSize` failed.
Traceback (most recent call last):
File "/data/envs/open_nmt/bin/onmt_translate", line 8, in <module>
sys.exit(main())
File "/data/envs/open_nmt/lib/python3.8/site-packages/onmt/bin/translate.py", line 60, in main
translate(opt)
File "/data/envs/open_nmt/lib/python3.8/site-packages/onmt/bin/translate.py", line 41, in translate
_, _ = translator._translate(
File "/data/envs/open_nmt/lib/python3.8/site-packages/onmt/translate/translator.py", line 345, in _translate
batch_data = self.translate_batch(
File "/data/envs/open_nmt/lib/python3.8/site-packages/onmt/translate/translator.py", line 723, in translate_batch
return self._translate_batch_with_strategy(
File "/data/envs/open_nmt/lib/python3.8/site-packages/onmt/translate/translator.py", line 815, in _translate_batch_with_strategy
if any_finished:
RuntimeError: CUDA error: device-side assert triggered
CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.