-
Notifications
You must be signed in to change notification settings - Fork 369
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
[BUG] #104
Comments
저도 같은 오류가 발생하여 hugging face를 이용하는 방법으로 해결했습니다. blog |
hugging face 와 blog !pip install mxnet from kobert_tokenizer import KoBERTTokenizer import torch tokenizer = KoBERTTokenizer.from_pretrained('skt/kobert-base-v1') tok = tokenizer.tokenize |
I have the same issue! |
BERTSentenceTransform 클래스 선언할때, 19번째 줄 부분에 tokens_a = self._tokenizer(text_a) 대신 |
BERTSentenceTransform 클래스에서,
input_ids 가 dataset 길이만큼 전부 같은 형식으로 바뀌어 정확도가 매우 낮아지는 겁니다. 그리고 만약
tok = tokenizer.tokenize 로 변환해 BERTSentenceTransform 클래스에 넣으면, 아마도 convert_tokens_to_ids를 불러올 수 없다는 오류가 나올겁니다.
직접 코드를 수정하면 오류가 없을거에요 |
설명 감사합니다! |
I installed it with transformers! Use python10 and the gluonnlp !=0.10.0 |
@AbdirayimovS Could you please share some library installation code? |
data_train = BERTDataset(dataset_train, 0, 1, tokenizer,vocab, max_len, True, False)
data_test = BERTDataset(dataset_test, 0, 1, tokenizer, vocab, max_len, True, False)
코드를 이렇게 바꿔보세요
…-----Original Message-----
From: "Yeongseo ***@***.***>
To: ***@***.***>;
Cc: ***@***.***>; ***@***.***>;
Sent: 2023-07-31 (월) 18:26:25 (GMT+09:00)
Subject: Re: [SKTBrain/KoBERT] [BUG] (Issue #104)
data_train = BERTDataset(dataset_train, 0, 1, tok , vocab, max_len, True, False)
data_test = BERTDataset(dataset_test, 0, 1, tok , vocab, max_len, True, False)
이 코드를 실행하면
---> 80 tokens_a = self._tokenizer.tokenize(text_a)
81 tokens_b = None
82
AttributeError: 'function' object has no attribute 'tokenize'
이런 에러가 뜹니다.. 왜그러는 거죠?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
I wonder if there are any contradictions in this installation dependencies |
when I ues pip install git+https://[email protected]/SKTBrain/KoBERT.git@master The conflict is caused by: To fix this you could try to:
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts plesae tell how to deal with it |
🐛 Bug
No module named 'kobert'
To Reproduce
from kobert.utils import get_tokenizer
from kobert.pytorch_kobert import get_pytorch_kobert_model
이거를 돌리려 할 때
ModuleNotFoundError Traceback (most recent call last)
in <cell line: 2>()
1 #kobert
----> 2 from kobert.utils import get_tokenizer
3 from kobert.pytorch_kobert import get_pytorch_kobert_model
ModuleNotFoundError: No module named 'kobert'
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.
To view examples of installing some common dependencies, click the
"Open Examples" button below.
이러한 에러 발생
gluonnlp 버전 문제를 해결하니 kobert 문제 발생
버그를 재현하기 위한 재현절차를 작성해주세요.
Expected behavior
Environment
Additional context
The text was updated successfully, but these errors were encountered: