Closed zhuweigang closed 5 months ago
可能是 cohere
和 pydantic
的版本之间存在不兼容问题,请您尝试安装cohere==4.31.0,或者按原步骤重新安装我们更新了安装依赖的easyinstruct
指定安装corehere==4.31.0后,报另一个错。。
Traceback (most recent call last):
File "/root/DeepKE/example/llm/LLMICL/run.py", line 6, in
还是因为版本冲突的问题,您试一试重新pip install git+https://github.com/zjunlp/EasyInstruct吧
重装EasyInstruct后问题解决,谢谢
llm范例按照README.md安装了: pip install git+https://github.com/zjunlp/EasyInstruct pip install hydra-core
然后执行run.py报如下错误:
OS: ubuntu 20.04 Python Version 3.9 NVIDIA RTX 3090
Screenshots: Traceback (most recent call last): File "/root/DeepKE/example/llm/LLMICL/run.py", line 6, in
from easyinstruct.prompts import IEPrompt
File "/root/anaconda3/envs/deepke/lib/python3.9/site-packages/easyinstruct/init.py", line 1, in
from .prompts import *
File "/root/anaconda3/envs/deepke/lib/python3.9/site-packages/easyinstruct/prompts/init.py", line 1, in
from .base_prompt import BasePrompt
File "/root/anaconda3/envs/deepke/lib/python3.9/site-packages/easyinstruct/prompts/base_prompt.py", line 3, in
import cohere
File "/root/anaconda3/envs/deepke/lib/python3.9/site-packages/cohere/init.py", line 3, in
from .types import (
File "/root/anaconda3/envs/deepke/lib/python3.9/site-packages/cohere/types/init.py", line 22, in
from .chat_stream_end_event import ChatStreamEndEvent
File "/root/anaconda3/envs/deepke/lib/python3.9/site-packages/cohere/types/chat_stream_end_event.py", line 10, in
from .non_streamed_chat_response import NonStreamedChatResponse
File "/root/anaconda3/envs/deepke/lib/python3.9/site-packages/cohere/types/non_streamed_chat_response.py", line 15, in
from .message import Message
File "/root/anaconda3/envs/deepke/lib/python3.9/site-packages/cohere/types/message.py", line 17, in
class Message_Chatbot(UncheckedBaseModel):
File "pydantic/main.py", line 197, in pydantic.main.ModelMetaclass.new
File "pydantic/fields.py", line 506, in pydantic.fields.ModelField.infer
File "pydantic/fields.py", line 436, in pydantic.fields.ModelField.init
File "pydantic/fields.py", line 552, in pydantic.fields.ModelField.prepare
File "pydantic/fields.py", line 668, in pydantic.fields.ModelField._type_analysis
File "/root/anaconda3/envs/deepke/lib/python3.9/typing.py", line 852, in subclasscheck
return issubclass(cls, self.origin)
TypeError: issubclass() arg 1 must be a class
麻烦大神帮看一下是什么原因哈