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

在运行test模式,BertAbs模型时,遇到了RuntimeError: "index_select_out_cuda_impl" not implemented for 'Float' #249

Open
Dengguty opened this issue Feb 12, 2024 · 1 comment

Comments

@Dengguty
Copy link

请问有人遇到这个问题吗?
在解码的时候出现的问题,select_indices应该是整数类型的,但是debug发现是float,将其select_indices转为long型后,运行就一直卡住了,不出测试结果

python train.py -task abs -mode test -test_from ../models/abs/model_step_8000.pt -batch_size 3000 -test_batch_size 500 -bert_data_path ../bert_data/bert.pt_data -log_file ../logs/test_abs -model_path ../models/abs -sep_optim true -use_interval true -visible_gpus 0 -max_pos 512 -max_length 200 -alpha 0.95 -min_length 50 -result_path ../logs/abs

Traceback (most recent call last):
File "train.py", line 135, in
test_abs(args, device_id, cp, step)
File "/home/t-kasanishi/PreSumm/src/train_abstractive.py", line 225, in test_abs
predictor.translate(test_iter, step)
File "/home/t-kasanishi/PreSumm/src/models/predictor.py", line 149, in translate
batch_data = self.translate_batch(batch)
File "/home/t-kasanishi/PreSumm/src/models/predictor.py", line 218, in translate_batch
min_length=self.min_length)
File "/home/t-kasanishi/PreSumm/src/models/predictor.py", line 333, in _fast_translate_batch
[alive_seq.index_select(0, select_indices),
RuntimeError: "index_select_out_cuda_impl" not implemented for 'Float'

@Dengguty
Copy link
Author

我的torch版本是1.8,不知道是不是和torch版本的原因

@Dengguty Dengguty changed the title 在运行test模式,BertAba模型时,遇到了RuntimeError: "index_select_out_cuda_impl" not implemented for 'Float' 在运行test模式,BertAbs模型时,遇到了RuntimeError: "index_select_out_cuda_impl" not implemented for 'Float' Feb 12, 2024
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