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

Errorcode: 500 #4

Open
deliciouscat opened this issue Dec 7, 2023 · 3 comments
Open

Errorcode: 500 #4

deliciouscat opened this issue Dec 7, 2023 · 3 comments
Labels
bug Something isn't working invalid This doesn't seem right

Comments

@deliciouscat
Copy link

안녕하세요.

제가 가지고 있는 데이터셋에 대해 클로바의 벤치마크 성능을 측정하고자 하는데, Errorcode 500오류가 발생해서 문의를 드리고자 합니다.
코드는 다음과 같습니다.

import pandas as pd
from clovax import ClovaX
data = pd.read_csv('~/spam552_final_test_small.csv')

content = """8개의 class중 하나로 주어진 텍스트를 분류해줘. 이 분류는 텍스트 마이닝을 위한 전처리야.
Classes: [`생활광고`, `생활거래`, ... , `정상글`]
아래에는 few-shot 예제가 있어.

Text: (생략)
Class: `생활광고`

... (생략) ...

"""

c = ClovaX()
c.get_cookie("~/clova-x.naver.com_cookies.txt")
def clova_gen(text):
    return c.start(content + text)['text']

outs=[clova_gen(text) for text in data['제목']+'\n'+data['내용']]

이에 대한 전체 오류메세지가 다음과 같이 발생했습니다.

---------------------------------------------------------------------------
Exception                                 Traceback (most recent call last)
Cell In[14], line 1
----> 1 outs=[clova_gen(text) for text in data['제목']+'\n'+data['내용']]

Cell In[14], line 1, in (.0)
----> 1 outs=[clova_gen(text) for text in data['제목']+'\n'+data['내용']]

Cell In[11], line 4, in clova_gen(text)
      3 def clova_gen(text):
----> 4     return c.start(content + text)['text']

File [~/anaconda3/envs/garbagespam/lib/python3.11/site-packages/clovax/clovax.py:170](https://vscode-remote+wsl-002bubuntu-002d22-002e04.vscode-resource.vscode-cdn.net/home/workspace/electra_garbagespam/~/anaconda3/envs/lucy3/lib/python3.11/site-packages/clovax/clovax.py:170), in ClovaX.start(self, prompt, skillsets)
    167 data = self._build_data("new", prompt, skillsets=skillsets)
    168 self.conversation_id = ""
--> 170 r = self._do_conversation(data)
    172 # Iterate event stream, get event and datas
    173 for line in r.iter_lines(decode_unicode=True):

File [~/anaconda3/envs/garbagespam/lib/python3.11/site-packages/clovax/clovax.py:132](https://vscode-remote+wsl-002bubuntu-002d22-002e04.vscode-resource.vscode-cdn.net/home/workspace/electra_garbagespam/~/anaconda3/envs/lucy3/lib/python3.11/site-packages/clovax/clovax.py:132), in ClovaX._do_conversation(self, data)
    130         raise clovax.errors.TooManyRequestsError()
    131     else:
--> 132         raise Exception(
    133             f"Error occurred while starting conversation. Error code: {r.status_code}"
    134         )
    135 r.encoding = "utf-8"
    136 return r

Exception: Error occurred while starting conversation. Error code: 500

혹시 Errorcode 500이 어떤 유형의 문제에서 비롯되는지에 대해 정보를 공유해주실 수 있는지 여쭤보고 싶습니다.
좋은 레포 만들어주셔서 감사합니다.

@deliciouscat
Copy link
Author

혹시 최대 토큰 수의 문제일까요?

@mirusu400
Copy link
Owner

안녕하세요. 혹시 CSV 파일 또한 첨부가 가능할까요? 제 생각엔 파일 크기가 너무 크거나 문자열 전달에 오류가 있었던 것 같습니다. 다음 pip 버전 이후로 백엔드의 에러 메시지 또한 전달하도록 수정하겠습니다.

@mirusu400 mirusu400 added the bug Something isn't working label Dec 27, 2023
@mirusu400
Copy link
Owner

방금 업로드한 clovax-0.1.1 버전부터 백엔드의 에러 메시지가 포함되게 변경되었습니다. 확인후 구체적인 에러 메시지 다시 남겨주시면 확인해보겠습니다

@mirusu400 mirusu400 added the invalid This doesn't seem right label May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants