Code Monkey home page Code Monkey logo

Comments (2)

sputnik7565 avatar sputnik7565 commented on July 18, 2024

Chapter4. [4-4 모델환경설정 사전 작업]에서 문제가 있습니다.

from ratsnlp.nlpbook.classification import ClassificationTrainArguments
실행시

ImportError: cannot import name 'get_num_classes' from 'torchmetrics.utilities.data' (/usr/local/lib/python3.7/dist-packages/torchmetrics/utilities/data.py)

에러가 발생합니다.


리서치 후 해결방안
파이토치 라이트닝을 1.5.10 버전으로 다운그레이드하면 정상 로드 되는 것을 확인했습니다.

!pip install pytorch_lightning==1.5.10


4-4 환경 세팅 순서 정리합니다.

  1. 본인 cuda 환경에 맞는 파이토치 및 토치비전, 토치 텍스트 설치
    !pip install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchtext==0.10.0 -f https://download.pytorch.org/whl/cu111/torch_stable.html

  2. 의존성 라이브러리 설치
    !pip install ratsnlp --user

  3. 토치라이트닝 다운그레이드
    !pip install pytorch_lightning==1.5.10

from nlpbook.

ratsgo avatar ratsgo commented on July 18, 2024

코랩 환경이 변화무쌍하게 바뀌면서 의존성 패키지들 문제가 생긴 것 같네요ㅠㅠ
불편 드려 죄송합니다.
의존성 문제를 해결한 ratsnlp 1.0.5를 배포하였습니다.
지금은 pip install ratsnlp만 입력해도 실행이 가능한 상태입니다.

from nlpbook.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.