본문 바로가기
개발관련

ImportError: Using the `Trainer` with `PyTorch` requires `accelerate`: Run `pip install --upgrade accelerate`에러

by 지구킹 2023. 5. 19.
728x90

1. accelerate 설치

 

pip install accelerate

 

하지만 accelerate 설치 후에도 실행해보면, "NameError: name 'PartialState' is not defined" 에러가 또 뜬다.

 

2. 재설치 후, 노트북 재 실행

해결 방안으로는 아래 명령어를 입력한 후, 주피터 노트북을 다시 시작하면 해결된다.

 

pip uninstall -y transformers accelerate
pip install transformers accelerate
728x90

댓글