xinference 0.13.4__py3-none-any.whl → 0.14.0.post1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of xinference might be problematic. Click here for more details.
- xinference/_version.py +3 -3
- xinference/api/restful_api.py +8 -1
- xinference/core/worker.py +2 -0
- xinference/model/embedding/core.py +6 -6
- xinference/web/ui/build/asset-manifest.json +3 -3
- xinference/web/ui/build/index.html +1 -1
- xinference/web/ui/build/static/js/{main.af906659.js → main.ef2a203a.js} +3 -3
- xinference/web/ui/build/static/js/{main.af906659.js.map → main.ef2a203a.js.map} +1 -1
- xinference/web/ui/node_modules/.cache/babel-loader/2f40209b32e7e46a2eab6b8c8a355eb42c3caa8bc3228dd929f32fd2b3940294.json +1 -0
- {xinference-0.13.4.dist-info → xinference-0.14.0.post1.dist-info}/METADATA +121 -121
- {xinference-0.13.4.dist-info → xinference-0.14.0.post1.dist-info}/RECORD +16 -16
- {xinference-0.13.4.dist-info → xinference-0.14.0.post1.dist-info}/WHEEL +1 -1
- xinference/web/ui/node_modules/.cache/babel-loader/2cd5e4279ad7e13a1f41d486e9fca7756295bfad5bd77d90992f4ac3e10b496d.json +0 -1
- /xinference/web/ui/build/static/js/{main.af906659.js.LICENSE.txt → main.ef2a203a.js.LICENSE.txt} +0 -0
- {xinference-0.13.4.dist-info → xinference-0.14.0.post1.dist-info}/LICENSE +0 -0
- {xinference-0.13.4.dist-info → xinference-0.14.0.post1.dist-info}/entry_points.txt +0 -0
- {xinference-0.13.4.dist-info → xinference-0.14.0.post1.dist-info}/top_level.txt +0 -0
xinference/_version.py
CHANGED
|
@@ -8,11 +8,11 @@ import json
|
|
|
8
8
|
|
|
9
9
|
version_json = '''
|
|
10
10
|
{
|
|
11
|
-
"date": "2024-08-
|
|
11
|
+
"date": "2024-08-05T11:58:50+0800",
|
|
12
12
|
"dirty": false,
|
|
13
13
|
"error": null,
|
|
14
|
-
"full-revisionid": "
|
|
15
|
-
"version": "0.
|
|
14
|
+
"full-revisionid": "111299317120411f407b015b2b7dbf8402aa35c8",
|
|
15
|
+
"version": "0.14.0.post1"
|
|
16
16
|
}
|
|
17
17
|
''' # END VERSION_JSON
|
|
18
18
|
|
xinference/api/restful_api.py
CHANGED
|
@@ -46,7 +46,7 @@ from fastapi.staticfiles import StaticFiles
|
|
|
46
46
|
from PIL import Image
|
|
47
47
|
from sse_starlette.sse import EventSourceResponse
|
|
48
48
|
from starlette.responses import JSONResponse as StarletteJSONResponse
|
|
49
|
-
from starlette.responses import RedirectResponse
|
|
49
|
+
from starlette.responses import PlainTextResponse, RedirectResponse
|
|
50
50
|
from uvicorn import Config, Server
|
|
51
51
|
from xoscar.utils import get_next_port
|
|
52
52
|
|
|
@@ -235,6 +235,13 @@ class RESTfulAPI:
|
|
|
235
235
|
allow_headers=["*"],
|
|
236
236
|
)
|
|
237
237
|
|
|
238
|
+
@self._app.exception_handler(500)
|
|
239
|
+
async def internal_exception_handler(request: Request, exc: Exception):
|
|
240
|
+
logger.exception("Handling request %s failed: %s", request.url, exc)
|
|
241
|
+
return PlainTextResponse(
|
|
242
|
+
status_code=500, content=f"Internal Server Error: {exc}"
|
|
243
|
+
)
|
|
244
|
+
|
|
238
245
|
# internal interface
|
|
239
246
|
self._router.add_api_route("/status", self.get_status, methods=["GET"])
|
|
240
247
|
# conflict with /v1/models/{model_uid} below, so register this first
|
xinference/core/worker.py
CHANGED
|
@@ -226,6 +226,7 @@ class WorkerActor(xo.StatelessActor):
|
|
|
226
226
|
)
|
|
227
227
|
from ..model.flexible import (
|
|
228
228
|
FlexibleModelSpec,
|
|
229
|
+
generate_flexible_model_description,
|
|
229
230
|
get_flexible_model_descriptions,
|
|
230
231
|
register_flexible_model,
|
|
231
232
|
unregister_flexible_model,
|
|
@@ -287,6 +288,7 @@ class WorkerActor(xo.StatelessActor):
|
|
|
287
288
|
FlexibleModelSpec,
|
|
288
289
|
register_flexible_model,
|
|
289
290
|
unregister_flexible_model,
|
|
291
|
+
generate_flexible_model_description,
|
|
290
292
|
),
|
|
291
293
|
}
|
|
292
294
|
|
|
@@ -151,8 +151,8 @@ class EmbeddingModel:
|
|
|
151
151
|
|
|
152
152
|
patch_trust_remote_code()
|
|
153
153
|
if (
|
|
154
|
-
"gte
|
|
155
|
-
|
|
154
|
+
"gte" in self._model_spec.model_name.lower()
|
|
155
|
+
and "qwen2" in self._model_spec.model_name.lower()
|
|
156
156
|
):
|
|
157
157
|
self._model = XSentenceTransformer(
|
|
158
158
|
self._model_path,
|
|
@@ -260,8 +260,8 @@ class EmbeddingModel:
|
|
|
260
260
|
device = model._target_device
|
|
261
261
|
|
|
262
262
|
if (
|
|
263
|
-
"gte
|
|
264
|
-
and "
|
|
263
|
+
"gte" in self._model_spec.model_name.lower()
|
|
264
|
+
and "qwen2" in self._model_spec.model_name.lower()
|
|
265
265
|
):
|
|
266
266
|
model.to(device)
|
|
267
267
|
|
|
@@ -342,8 +342,8 @@ class EmbeddingModel:
|
|
|
342
342
|
return all_embeddings, all_token_nums
|
|
343
343
|
|
|
344
344
|
if (
|
|
345
|
-
"gte
|
|
346
|
-
|
|
345
|
+
"gte" in self._model_spec.model_name.lower()
|
|
346
|
+
and "qwen2" in self._model_spec.model_name.lower()
|
|
347
347
|
):
|
|
348
348
|
all_embeddings, all_token_nums = encode(
|
|
349
349
|
self._model,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"files": {
|
|
3
3
|
"main.css": "./static/css/main.4bafd904.css",
|
|
4
|
-
"main.js": "./static/js/main.
|
|
4
|
+
"main.js": "./static/js/main.ef2a203a.js",
|
|
5
5
|
"static/media/icon.webp": "./static/media/icon.4603d52c63041e5dfbfd.webp",
|
|
6
6
|
"index.html": "./index.html",
|
|
7
7
|
"main.4bafd904.css.map": "./static/css/main.4bafd904.css.map",
|
|
8
|
-
"main.
|
|
8
|
+
"main.ef2a203a.js.map": "./static/js/main.ef2a203a.js.map"
|
|
9
9
|
},
|
|
10
10
|
"entrypoints": [
|
|
11
11
|
"static/css/main.4bafd904.css",
|
|
12
|
-
"static/js/main.
|
|
12
|
+
"static/js/main.ef2a203a.js"
|
|
13
13
|
]
|
|
14
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="./favicon.svg"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="./logo192.png"/><link rel="manifest" href="./manifest.json"/><title>Xinference</title><script defer="defer" src="./static/js/main.
|
|
1
|
+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="./favicon.svg"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="./logo192.png"/><link rel="manifest" href="./manifest.json"/><title>Xinference</title><script defer="defer" src="./static/js/main.ef2a203a.js"></script><link href="./static/css/main.4bafd904.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|