-
Notifications
You must be signed in to change notification settings - Fork 734
Description
System Info / 系統信息
2025-04-08 19:52:16,661 xinference.api.restful_api 1 ERROR [address=0.0.0.0:41591, pid=307] unsupported operand type(s) for -: 'NoneType' and 'int'
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/xinference/api/restful_api.py", line 1498, in rerank
scores = await model.rerank(
File "/usr/local/lib/python3.10/dist-packages/xoscar/backends/context.py", line 262, in send
return self._process_result_message(result)
File "/usr/local/lib/python3.10/dist-packages/xoscar/backends/context.py", line 111, in _process_result_message
raise message.as_instanceof_cause()
File "/usr/local/lib/python3.10/dist-packages/xoscar/backends/pool.py", line 689, in send
result = await self._run_coro(message.message_id, coro)
File "/usr/local/lib/python3.10/dist-packages/xoscar/backends/pool.py", line 389, in _run_coro
return await coro
File "/usr/local/lib/python3.10/dist-packages/xoscar/api.py", line 418, in on_receive
return await super().on_receive(message) # type: ignore
File "xoscar/core.pyx", line 564, in on_receive
raise ex
File "xoscar/core.pyx", line 526, in xoscar.core._BaseActor.on_receive
async with self._lock:
File "xoscar/core.pyx", line 527, in xoscar.core._BaseActor.on_receive
with debug_async_timeout('actor_lock_timeout',
File "xoscar/core.pyx", line 532, in xoscar.core._BaseActor.on_receive
result = await result
File "/opt/inference/xinference/core/model.py", line 112, in wrapped_func
ret = await fn(self, *args, **kwargs)
File "/opt/inference/xinference/core/utils.py", line 93, in wrapped
ret = await func(*args, **kwargs)
File "/opt/inference/xinference/core/model.py", line 951, in rerank
return await self._call_wrapper_json(
File "/opt/inference/xinference/core/model.py", line 672, in _call_wrapper_json
return await self._call_wrapper("json", fn, *args, **kwargs)
File "/opt/inference/xinference/core/model.py", line 147, in _async_wrapper
return await fn(self, *args, **kwargs)
File "/opt/inference/xinference/core/model.py", line 697, in _call_wrapper
ret = await asyncio.to_thread(fn, *args, **kwargs)
File "/usr/lib/python3.10/asyncio/threads.py", line 25, in to_thread
return await loop.run_in_executor(None, func_call)
File "/usr/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/opt/inference/xinference/model/rerank/core.py", line 376, in rerank
inputs = self.process_inputs(pairs)
File "/opt/inference/xinference/model/rerank/core.py", line 280, in process_inputs
max_length=max_length - len(prefix_tokens) - len(suffix_tokens),
TypeError: [address=0.0.0.0:41591, pid=307] unsupported operand type(s) for -: 'NoneType' and 'int'
Running Xinference with Docker? / 是否使用 Docker 运行 Xinfernece?
- docker / docker
- pip install / 通过 pip install 安装
- installation from source / 从源码安装
Version info / 版本信息
v1.7.0.post1
The command used to start Xinference / 用以启动 xinference 的命令
docker run -d --name xinference -p 9999:9997 --gpus all --shm-size 24g -v /model:/model -e XINFERENCE_HOME=/model/xinference_home docker.m.daocloud.io/xprobe/xinference:v1.7.0.post1 xinference-local -H 0.0.0.0 --log-level debug
Reproduction / 复现过程
curl -X 'POST' 'http://127.0.0.1:9999/v1/rerank'
-H 'Content-Type: application/json'
-d '{
"model": "Qwen3-Reranker-4B",
"query": "A man is eating pasta.",
"documents": [
"A man is eating food.",
"A man is eating a piece of bread.",
"The girl is carrying a baby.",
"A man is riding a horse.",
"A woman is playing violin."
]
}'
Expected behavior / 期待表现
回复正常