We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
使用 nvidia/cuda:12.1.0-devel-ubuntu22.04 镜像
1.2.0
docker compose up -d
代码: from xinference import Model
报错: app-1 | warnings.warn( app-1 | Traceback (most recent call last): app-1 | File "/app/app.py", line 11, in app-1 | from routers.query_router import QueryRouter app-1 | File "/app/routers/query_router.py", line 3, in app-1 | from services.model_service import ModelService app-1 | File "/app/services/model_service.py", line 5, in app-1 | from xinference.client import Client app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/xinference/init.py", line 32, in app-1 | _install() app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/xinference/init.py", line 29, in _install app-1 | install_model() app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/xinference/model/init.py", line 19, in _install app-1 | llm_install() app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/xinference/model/llm/init.py", line 50, in _install app-1 | from .ggml.chatglm import ChatglmCppChatModel app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/xinference/model/llm/ggml/chatglm.py", line 22, in app-1 | from ....types import ( app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/xinference/types.py", line 440, in app-1 | CreateChatCompletionOpenAI = create_model_from_typeddict( app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/annotated_types.py", line 55, in create_model_from_typeddict app-1 | return create_model(typeddict_cls.name, **kwargs, **field_definitions) app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/main.py", line 1024, in create_model app-1 | return meta(_model_name, resolved_bases, namespace, **kwds) app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/main.py", line 197, in new app-1 | fields[ann_name] = ModelField.infer( app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/fields.py", line 504, in infer app-1 | return cls( app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/fields.py", line 434, in init app-1 | self.prepare() app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/fields.py", line 550, in prepare app-1 | self.type_analysis() app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/fields.py", line 661, in type_analysis app-1 | self.sub_fields = [self.create_sub_type(t, f'{self.name}{display_as_type(t)}') for t in types] app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/fields.py", line 661, in app-1 | self.sub_fields = [self.create_sub_type(t, f'{self.name}{display_as_type(t)}') for t in types] app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/fields.py", line 806, in create_sub_type app-1 | return self.class( app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/fields.py", line 434, in init app-1 | self.prepare() app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/fields.py", line 555, in prepare app-1 | self.populate_validators() app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/fields.py", line 829, in populate_validators app-1 | *(get_validators() if get_validators else list(find_validators(self.type, self.model_config))), app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/validators.py", line 739, in find_validators app-1 | yield make_typeddict_validator(type, config) app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/validators.py", line 625, in make_typeddict_validator app-1 | TypedDictModel = create_model_from_typeddict( app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/annotated_types.py", line 55, in create_model_from_typeddict app-1 | return create_model(typeddict_cls.name, **kwargs, **field_definitions) app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/main.py", line 1024, in create_model app-1 | return meta(model_name, resolved_bases, namespace, **kwds) app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/main.py", line 197, in new app-1 | fields[ann_name] = ModelField.infer( app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/fields.py", line 504, in infer app-1 | return cls( app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/fields.py", line 434, in init app-1 | self.prepare() app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/fields.py", line 555, in prepare app-1 | self.populate_validators() app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/fields.py", line 829, in populate_validators app-1 | *(get_validators() if get_validators else list(find_validators(self.type, self.model_config))), app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/validators.py", line 739, in find_validators app-1 | yield make_typeddict_validator(type, config) app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/validators.py", line 625, in make_typeddict_validator app-1 | TypedDictModel = create_model_from_typeddict( app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/annotated_types.py", line 55, in create_model_from_typeddict app-1 | return create_model(typeddict_cls.name, **kwargs, **field_definitions) app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/main.py", line 1024, in create_model app-1 | return meta(__model_name, resolved_bases, namespace, **kwds) app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/main.py", line 186, in new app-1 | validate_field_name(bases, ann_name) app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/utils.py", line 168, in validate_field_name app-1 | raise NameError( app-1 | NameError: Field name "schema" shadows a BaseModel attribute; use a different field name with "alias='schema'".
导入 xinference 不会报错
The text was updated successfully, but these errors were encountered:
from xinference import Model
这个本来就无法运行。
Sorry, something went wrong.
This issue is stale because it has been open for 7 days with no activity.
No branches or pull requests
System Info / 系統信息
使用 nvidia/cuda:12.1.0-devel-ubuntu22.04 镜像
Running Xinference with Docker? / 是否使用 Docker 运行 Xinfernece?
Version info / 版本信息
1.2.0
The command used to start Xinference / 用以启动 xinference 的命令
docker compose up -d
Reproduction / 复现过程
代码:
from xinference import Model
报错:
app-1 | warnings.warn(
app-1 | Traceback (most recent call last):
app-1 | File "/app/app.py", line 11, in
app-1 | from routers.query_router import QueryRouter
app-1 | File "/app/routers/query_router.py", line 3, in
app-1 | from services.model_service import ModelService
app-1 | File "/app/services/model_service.py", line 5, in
app-1 | from xinference.client import Client
app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/xinference/init.py", line 32, in
app-1 | _install()
app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/xinference/init.py", line 29, in _install
app-1 | install_model()
app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/xinference/model/init.py", line 19, in _install
app-1 | llm_install()
app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/xinference/model/llm/init.py", line 50, in _install
app-1 | from .ggml.chatglm import ChatglmCppChatModel
app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/xinference/model/llm/ggml/chatglm.py", line 22, in
app-1 | from ....types import (
app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/xinference/types.py", line 440, in
app-1 | CreateChatCompletionOpenAI = create_model_from_typeddict(
app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/annotated_types.py", line 55, in create_model_from_typeddict
app-1 | return create_model(typeddict_cls.name, **kwargs, **field_definitions)
app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/main.py", line 1024, in create_model
app-1 | return meta(_model_name, resolved_bases, namespace, **kwds)
app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/main.py", line 197, in new
app-1 | fields[ann_name] = ModelField.infer(
app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/fields.py", line 504, in infer
app-1 | return cls(
app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/fields.py", line 434, in init
app-1 | self.prepare()
app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/fields.py", line 550, in prepare
app-1 | self.type_analysis()
app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/fields.py", line 661, in type_analysis
app-1 | self.sub_fields = [self.create_sub_type(t, f'{self.name}{display_as_type(t)}') for t in types]
app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/fields.py", line 661, in
app-1 | self.sub_fields = [self.create_sub_type(t, f'{self.name}{display_as_type(t)}') for t in types]
app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/fields.py", line 806, in create_sub_type
app-1 | return self.class(
app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/fields.py", line 434, in init
app-1 | self.prepare()
app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/fields.py", line 555, in prepare
app-1 | self.populate_validators()
app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/fields.py", line 829, in populate_validators
app-1 | *(get_validators() if get_validators else list(find_validators(self.type, self.model_config))),
app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/validators.py", line 739, in find_validators
app-1 | yield make_typeddict_validator(type, config)
app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/validators.py", line 625, in make_typeddict_validator
app-1 | TypedDictModel = create_model_from_typeddict(
app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/annotated_types.py", line 55, in create_model_from_typeddict
app-1 | return create_model(typeddict_cls.name, **kwargs, **field_definitions)
app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/main.py", line 1024, in create_model
app-1 | return meta(model_name, resolved_bases, namespace, **kwds)
app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/main.py", line 197, in new
app-1 | fields[ann_name] = ModelField.infer(
app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/fields.py", line 504, in infer
app-1 | return cls(
app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/fields.py", line 434, in init
app-1 | self.prepare()
app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/fields.py", line 555, in prepare
app-1 | self.populate_validators()
app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/fields.py", line 829, in populate_validators
app-1 | *(get_validators() if get_validators else list(find_validators(self.type, self.model_config))),
app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/validators.py", line 739, in find_validators
app-1 | yield make_typeddict_validator(type, config)
app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/validators.py", line 625, in make_typeddict_validator
app-1 | TypedDictModel = create_model_from_typeddict(
app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/annotated_types.py", line 55, in create_model_from_typeddict
app-1 | return create_model(typeddict_cls.name, **kwargs, **field_definitions)
app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/main.py", line 1024, in create_model
app-1 | return meta(__model_name, resolved_bases, namespace, **kwds)
app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/main.py", line 186, in new
app-1 | validate_field_name(bases, ann_name)
app-1 | File "/root/.cache/pypoetry/virtualenvs/reading-copilot-9TtSrW0h-py3.10/lib/python3.10/site-packages/pydantic/v1/utils.py", line 168, in validate_field_name
app-1 | raise NameError(
app-1 | NameError: Field name "schema" shadows a BaseModel attribute; use a different field name with "alias='schema'".
Expected behavior / 期待表现
导入 xinference 不会报错
The text was updated successfully, but these errors were encountered: