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

[Do it 자연어 처리] 코드 오류 문의드립니다. #37

Closed
yhlee1627 opened this issue Jul 22, 2022 · 1 comment
Closed

[Do it 자연어 처리] 코드 오류 문의드립니다. #37

yhlee1627 opened this issue Jul 22, 2022 · 1 comment

Comments

@yhlee1627
Copy link

교재 206페이지의 아래 트레이너 정의를 하였을 때
trainer = nlpbook.get_trainer(args)
다음과 같은 에러가 나옵니다.


MisconfigurationException Traceback (most recent call last)
in ()
----> 1 trainer = nlpbook.get_trainer(args)

4 frames
/usr/local/lib/python3.7/dist-packages/pytorch_lightning/trainer/connectors/accelerator_connector.py in _set_parallel_devices_and_init_accelerator(self)
513 ]
514 raise MisconfigurationException(
--> 515 f"{self.accelerator.class.qualname} can not run on your system"
516 " since the accelerator is not available. The following accelerator(s)"
517 " is available and can be passed into accelerator argument of"

MisconfigurationException: TPUAccelerator can not run on your system since the accelerator is not available. The following accelerator(s) is available and can be passed into accelerator argument of Trainer: ['cpu'].

혹시 어떻게 해결하면 될까요?
답변 부탁드립니다.

@ratsgo
Copy link
Owner

ratsgo commented Jul 25, 2022

@yhlee1627 님 안녕하세요, 제 환경에서는 재현이 어렵네요ㅠㅠ
혹시 코랩 런타임 유형은 어떻게 지정하셨을까요? 가급적 GPU로 지정하시길 권해드립니다. 아울러 TPU 관련 패키지는 설치하지 않으시길 부탁드립니다.
마지막으로 런타임 유형을 GPU로 하셨다면 QATrainArguments에서 tpu_cores=0(다음 그림처럼 지정)으로 지정해보시고 실행하시면 더욱 확실할 것 같습니다.

스크린샷 2022-07-26 오전 12 39 45

@ratsgo ratsgo closed this as completed Nov 7, 2022
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

2 participants