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

AttributeError: 'ScatterableList' object has no attribute 'cuda' #14

Open
jaeyun95 opened this issue Mar 13, 2019 · 7 comments
Open

AttributeError: 'ScatterableList' object has no attribute 'cuda' #14

jaeyun95 opened this issue Mar 13, 2019 · 7 comments

Comments

@jaeyun95
Copy link

i have a problem like this:
Traceback (most recent call last):
File "eval_for_leaderboard.py", line 110, in
batch = _to_gpu(batch)
File "eval_for_leaderboard.py", line 74, in _to_gpu
td[k] = {k2: v.cuda(async=True) for k2, v in td[k].items()} if isinstance(td[k], dict) else td[k].cuda(
AttributeError: 'ScatterableList' object has no attribute 'cuda'

what can i do?

thank you:)

@rowanz
Copy link
Owner

rowanz commented Mar 25, 2019

sorry for the delay -- are you trying with 3 GPUs or just 1?

@jaeyun95
Copy link
Author

sorry for the delay -- are you trying with 3 GPUs or just 1?

just 1 GPU!!

@woosikyang
Copy link

안녕하세요 한국인이신거같아서 여쭤보는데 저도 gpu1개라 같은 에러가 나는데 혹시 해결 하셨나요??

@jaeyun95
Copy link
Author

아니요! 저 때 해결 못하고 eval_q2ar.py로만 성능평가했습니다!

@woosikyang
Copy link

코드 까보니까 딕셔너리 키중에 metadata문제더라구요 train.py 보시면 metadata일경우 cuda 변화 안시키게 _to_gpu함수 변경한거 있으니 그거로 바꿔서 다시 돌리시면 돌아갈겁니다!

@yekeren
Copy link

yekeren commented May 2, 2020

I got the same error but found "export CUDA_VISIBLE_DEVICES=0,1,2" is the solution. So, the code assumes we use 3 GPUs.

@arjunsinghrana
Copy link

Hi I am getting the same error right now and it is not being fixed by the above mentioned solutions.
I am using 1 GPU for this.

Any help?

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

5 participants