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

RuntimeError: "index_select_out_cuda_impl" not implemented for 'Float' #14

Open
zhanglina94 opened this issue Jul 4, 2023 · 0 comments

Comments

@zhanglina94
Copy link

Dear Dr. michiyasunaga

Hello ,I have a error when I train the dataset,

`TRAIN: 3%|▎ | 4993/150000 [15:45<7:43:02, 5.22it/s]TRAIN @ 5000: (n=838, loss_localize=0.246899, loss_edit=6.836520, acc_localize=73.63%, acc_edit1=21.72%, acc_edit2=0.00%, acc_repair=0.00%, grad_norm=27.990015)
Saving model to checkpoint 5000
Loaded 2010 dev examples

DEV: 0it [00:00, ?it/s]�[A
DEV: 0it [00:00, ?it/s]
Traceback (most recent call last):
File "/workspace/DrRepair/model/main_spoc.py", line 75, in
main()
File "/workspace/DrRepair/model/main_spoc.py", line 65, in main
experiment.train()
File "/workspace/DrRepair/model/repairer/experiments.py", line 146, in train
stats = self.process_batch(dev_batch, train=False, fout=fout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspace/DrRepair/model/repairer/experiments.py", line 224, in process_batch
logit_edit1, label_edit1 = self.model.forward_edit(batch, all_enc_stuff, train_mode=False, beam_size=10) #follow the edit_lineno given
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspace/DrRepair/model/repairer/model/err_localize_edit.py", line 777, in forward_edit
dec_output, padded_gold_code_line = self.forward_helper_decode(batch, packed_dec_input, src_vocabs, src_map, train_mode) #(max_seq_len, batch_size, vocab_size)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspace/DrRepair/model/repairer/model/err_localize_edit.py", line 851, in forward_helper_decode
allHyp, allScores = self.beam_decode(hidden, enc_output, mask, extra_feed, src_vocabs, src_map)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspace/DrRepair/model/repairer/model/err_localize_edit.py", line 971, in beam_decode
beam.advance(log_probs, attn)
File "/workspace/DrRepair/model/repairer/model/beam_search_onmt.py", line 303, in advance
[self.alive_seq.index_select(0, self.select_indices),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: "index_select_out_cuda_impl" not implemented for 'Float'

TRAIN: 3%|▎ | 5000/150000 [15:54<7:41:08, 5.24it/s]`

I've tried many ways to always get an error, maybe it's a problem with the torch/cuda version?

Thanks in advance~

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