Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

nlp version error #1597

Open
IluvRiver opened this issue May 10, 2023 · 1 comment
Open

nlp version error #1597

IluvRiver opened this issue May 10, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@IluvRiver
Copy link

IluvRiver commented May 10, 2023

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
@IluvRiver IluvRiver added the bug Something isn't working label May 10, 2023
@alexxony
Copy link

나도 똑같아요

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants