hanjanghoon / BERT_FP

Fine-grained Post-training for Improving Retrieval-based Dialogue Systems - NAACL 2021
97 stars 19 forks source link

RuntimeError: Invalid device, must be cuda device #3

Closed bott1eee closed 2 years ago

bott1eee commented 2 years ago

Traceback (most recent call last): File "FPT/ubuntu_final.py", line 532, in main() File "FPT/ubuntu_final.py", line 465, in main input_ids, input_mask, segment_ids,lm_label_ids, is_next = batch File "FPT/ubuntu_final.py", line 464, in batch = (item.cuda(device=device) for item in batch) RuntimeError: Invalid device, must be cuda device

Hello! When I run the project in torch1.7.0/cuda 10.1 environment, I get the above error. But I can only run it in the above environment at the moment, do I need to make any changes? Thanks!

hanjanghoon commented 2 years ago

Yes, it may need to be changed. I'm sorry, but unfortunately, I don't have time right now, so I think I'll be able to do this later. It seems like you need to change the device allocation part. Thank you!

--

JangHoon Han AI Research Engineer | Professional Language Lab | LG AI Research, Seoul, Korea Mobile : (+82)10-8591-1081 lgresearch.ai

-----Original Message----- From: @.> To: @.>; Cc: @.***>; Sent: 2021-11-05 (금) 12:13:45 (GMT+09:00) Subject: [hanjanghoon/BERT_FP] RuntimeError: Invalid device, must be cuda device (Issue #3)

Traceback (most recent call last): File "FPT/ubuntu_final.py", line 532, in main() File "FPT/ubuntu_final.py", line 465, in main input_ids, input_mask, segment_ids,lm_label_ids, is_next = batch File "FPT/ubuntu_final.py", line 464, in batch = (item.cuda(device=device) for item in batch) RuntimeError: Invalid device, must be cuda device

Hello! When I run the project in torch1.7.0/cuda 10.1 environment, I get the above error. But I can only run it in the above environment at the moment, do I need to make any changes? Thanks! — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

bott1eee commented 2 years ago

Yes, it may need to be changed. I'm sorry, but unfortunately, I don't have time right now, so I think I'll be able to do this later. It seems like you need to change the device allocation part. Thank you! -- JangHoon Han AI Research Engineer | Professional Language Lab | LG AI Research, Seoul, Korea Mobile : (+82)10-8591-1081 lgresearch.ai -----Original Message----- From: @.> To: @.>; Cc: @.***>; Sent: 2021-11-05 (금) 12:13:45 (GMT+09:00) Subject: [hanjanghoon/BERT_FP] RuntimeError: Invalid device, must be cuda device (Issue #3) Traceback (most recent call last): File "FPT/ubuntu_final.py", line 532, in main() File "FPT/ubuntu_final.py", line 465, in main input_ids, input_mask, segment_ids,lm_label_ids, is_next = batch File "FPT/ubuntu_final.py", line 464, in batch = (item.cuda(device=device) for item in batch) RuntimeError: Invalid device, must be cuda device Hello! When I run the project in torch1.7.0/cuda 10.1 environment, I get the above error. But I can only run it in the above environment at the moment, do I need to make any changes? Thanks! — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

well,thanks for you answer!