gluon-nlp
gluon-nlp copied to clipboard
nlp version error
Description
(A clear and concise description of what the bug is.) It seems that there is an error in the code due to an import problem. Specifically, the module gluonnlp is being imported, but the module gluonnlp.data.utils is not finding the function _convert_to_unicode that it needs. This may be due to a version compatibility issue or an installation issue.
Error Message
(Paste the complete error message, including stack trace.)
cannot import name '_convert_to_unicode' from 'gluonnlp.data.utils' (/usr/local/lib/python3.10/dist-packages/gluonnlp/data/utils.py)
To Reproduce
(If you developed your own code, please provide a short script that reproduces the error. For existing examples, please provide link.) #필요 패키지 설치
!pip uninstall mxnet-y !pip install mxnet
!pip install gluonnlp==0.8.0 !pip install tqdm pandas !pip install sentencepiece !pip install transformers !pip install torch
#KoBERT 깃허브에서 불러오기 !pip install 'git+https://github.com/SKTBrain/KoBERT.git#egg=kobert_tokenizer&subdirectory=kobert_hf'
!pip install 'git+https://[email protected]/SKTBrain/KoBERT.git@master'
import torch from torch import nn import torch.nn.functional as F import torch.optim as optim from torch.utils.data import Dataset, DataLoader import gluonnlp as nlp import numpy as np from tqdm import tqdm, tqdm_notebook import pandas as pd
Steps to reproduce
(Paste the commands you ran that produced the error.)
What have you tried to solve it?
Environment
We recommend using our script for collecting the diagnositc information. Run the following command and paste the outputs below:
curl --retry 10 -s https://raw.githubusercontent.com/dmlc/gluon-nlp/master/tools/diagnose.py | python
# paste outputs here
나도 똑같아요