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

30쪽 코드 1-5에 살짝 오류가 있지 않나요? #33

Closed
shashashak opened this issue May 23, 2022 · 1 comment
Closed

30쪽 코드 1-5에 살짝 오류가 있지 않나요? #33

shashashak opened this issue May 23, 2022 · 1 comment

Comments

@shashashak
Copy link

shashashak commented May 23, 2022

우선 훌륭한 교재 써주셔서 감사합니다. 덕분에 비교적 쉽게 NLP에 접근할 수 있습니다. 직접 하나하나 써서 구글 colab에서 돌려보고 있습니다.

그런데 30쪽 코드 1-5, train_dataloader 변수를 정의하면서 collate_fn=nlpbook.data_collator 부분에서 nlpbook.data_collator가 정의되지 않았다는 오류가 뜨더라고요. 그래서 3번째 줄에 ratsnlp에서 nlpbook을 따로 불러와야 하지 않나 싶더라고요.

from ratsnlp import nlpbook를 추가했더니 위 오류가 뜨지 않고 실행되었습니다. 혹시 한 번 확인해주실 수 있으실까요

이렇게 nlpbook을 로드해야 뒤에 trainer를 정의할 때도 사용할 수 있을 것 같기도 하고요. trainer = nlpbook.get_trainer(args)

@ratsgo
Copy link
Owner

ratsgo commented Jun 28, 2022

@shashashak 님 말씀하신 게 정확한 지적입니다.
집필 당시에는 30쪽 코드는 맛보기용 코드로 적어두었는데 더 엄밀했어야 하지 않았나 싶습니다.
부족한 책에 관심 가져주셔서 감사드립니다.

@ratsgo ratsgo closed this as completed Jul 25, 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