[Error]AttributeError: module ‘numpy’ has no attribute ‘int’

Date:     Updated:

카테고리:

Problem Statement

DeBERTa-v3-base를 huggingface에서 import하여 모델 학습 시 다음과 같은 에러 발생.

AttributeError: module 'numpy' has no attribute 'int'.
`np.int` was a deprecated alias for the builtin `int`. To avoid this error in existing code, use `int` by itself. Doing this will not modify any behaviore e.g. `np.int64` or `np.int32` to specify the precision.
If you wish to review your current use, check the release note link for additional information.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

Solution

numpy의 버전을 1.23.0 이하로 downgrade하면 된다.

pip install numy==1.23.0

ERR 카테고리 내 다른 글 보러가기

첫 번째 글입니다 가장 최근 글입니다

댓글 남기기