xinference 0.10.2__py3-none-any.whl → 0.10.2.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 CHANGED
@@ -8,11 +8,11 @@ import json
8
8
 
9
9
  version_json = '''
10
10
  {
11
- "date": "2024-04-19T11:39:12+0800",
11
+ "date": "2024-04-19T14:40:59+0800",
12
12
  "dirty": false,
13
13
  "error": null,
14
- "full-revisionid": "f19e85be09bce966e0c0b3e01bc5690eb6016398",
15
- "version": "0.10.2"
14
+ "full-revisionid": "500171569de25d49f6ddb3c167d9fc0e55cd66c7",
15
+ "version": "0.10.2.post1"
16
16
  }
17
17
  ''' # END VERSION_JSON
18
18
 
@@ -18,8 +18,6 @@ from typing import TYPE_CHECKING, Any, Dict, Iterator, List, Optional, Union
18
18
 
19
19
  import requests
20
20
 
21
- from ...model.utils import convert_float_to_int_or_str
22
- from ...types import LoRA, PeftModelConfig
23
21
  from ..common import streaming_response_iterator
24
22
 
25
23
  if TYPE_CHECKING:
@@ -37,6 +35,17 @@ if TYPE_CHECKING:
37
35
  )
38
36
 
39
37
 
38
+ def convert_float_to_int_or_str(model_size: float) -> Union[int, str]:
39
+ """convert float to int or string
40
+
41
+ if float can be presented as int, convert it to int, otherwise convert it to string
42
+ """
43
+ if int(model_size) == model_size:
44
+ return int(model_size)
45
+ else:
46
+ return str(model_size)
47
+
48
+
40
49
  def _get_error_string(response: requests.Response) -> str:
41
50
  try:
42
51
  if response.content:
@@ -856,18 +865,6 @@ class Client:
856
865
 
857
866
  url = f"{self.base_url}/v1/models"
858
867
 
859
- if peft_model_config is not None:
860
- lora_list = [
861
- LoRA.from_dict(model) for model in peft_model_config["lora_list"]
862
- ]
863
- peft_model = PeftModelConfig(
864
- lora_list,
865
- peft_model_config["image_lora_load_kwargs"],
866
- peft_model_config["image_lora_fuse_kwargs"],
867
- )
868
- else:
869
- peft_model = None
870
-
871
868
  # convert float to int or string since the RESTful API does not accept float.
872
869
  if isinstance(model_size_in_billions, float):
873
870
  model_size_in_billions = convert_float_to_int_or_str(model_size_in_billions)
@@ -875,7 +872,7 @@ class Client:
875
872
  payload = {
876
873
  "model_uid": model_uid,
877
874
  "model_name": model_name,
878
- "peft_model_config": peft_model.to_dict() if peft_model else None,
875
+ "peft_model_config": peft_model_config,
879
876
  "model_type": model_type,
880
877
  "model_size_in_billions": model_size_in_billions,
881
878
  "model_format": model_format,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: xinference
3
- Version: 0.10.2
3
+ Version: 0.10.2.post1
4
4
  Summary: Model Serving Made Easy
5
5
  Home-page: https://github.com/xorbitsai/inference
6
6
  Author: Qin Xuye
@@ -1,6 +1,6 @@
1
1
  xinference/__init__.py,sha256=0LgIveLP6CXxoIaSrxhlFyOh0lOqPgJBVcBe0tkWJjc,987
2
2
  xinference/_compat.py,sha256=SQAjZMGxtBIce45qtW7ob7RWzA0zhv2yB3AxT0rb0uU,1778
3
- xinference/_version.py,sha256=ssSjGx-iKXJNU5J5mSKaxTe1YccRpRUOLSoZ8QSvejo,498
3
+ xinference/_version.py,sha256=AeHhtiziXzjdR6A3u0aZYLBnSda-sNqj8QeMNG424ng,504
4
4
  xinference/conftest.py,sha256=RffV9htxwo6iDEGZwmcj0A_O_XBQM2RRUea4q6XTeGQ,9742
5
5
  xinference/constants.py,sha256=Bu_fOJUGAvvqF_6FY5OzOHl7fQ1Nomek3LY17xr9oz4,2882
6
6
  xinference/device_utils.py,sha256=WNKDD4Eni3Io3AehiyonsuoJaukT77Bc76Es7vNGvjc,2615
@@ -20,7 +20,7 @@ xinference/client/handlers.py,sha256=3gd9C7u4URbcVdR6Eyv8cpEZ175Ll4q_jGL07CnEIpg
20
20
  xinference/client/oscar/__init__.py,sha256=h_JgzSqV5lP6vQ6XX_17kE4IY4BRnvKta_7VLQAL1ms,581
21
21
  xinference/client/oscar/actor_client.py,sha256=CAI8_UGsCIX94aKv9H1QoVinIxQ2Zm7gcMWXEaUQShw,21593
22
22
  xinference/client/restful/__init__.py,sha256=h_JgzSqV5lP6vQ6XX_17kE4IY4BRnvKta_7VLQAL1ms,581
23
- xinference/client/restful/restful_client.py,sha256=COwWrZNZgvHwFRTdHG5MiIAR8l7AJlmpsemT-TNXXJ8,42575
23
+ xinference/client/restful/restful_client.py,sha256=ukox-JX1PRsR1BhIJrUPDlC0-c1Yf9RH8z2lQyygNqQ,42354
24
24
  xinference/core/__init__.py,sha256=Fe5tYCHDbYJ7PhxJhQ68VbfgKgOsAuslNPr4wPhFMJM,612
25
25
  xinference/core/cache_tracker.py,sha256=rBF8MXWK3rP5Q69LuhpWb2ZeF_bqbC3zCTCKs8FlfZE,4261
26
26
  xinference/core/chat_interface.py,sha256=CNqILarZfdMnZebuOaemK4FomouLqKAcd7lt24JF09Q,17073
@@ -15400,9 +15400,9 @@ xinference/web/ui/node_modules/yargs-parser/package.json,sha256=BSwbOzgetKXMK4u0
15400
15400
  xinference/web/ui/node_modules/yocto-queue/package.json,sha256=6U1XHQPGXJTqsiFvT953ORihUtXTblZy4fXBWP9qxC0,725
15401
15401
  xinference/web/ui/node_modules/yup/package.json,sha256=xRFSROB9NKxqSWHEVFvSTsPs9Ll074uo8OS1zEw0qhA,1206
15402
15402
  xinference/web/ui/node_modules/yup/node_modules/type-fest/package.json,sha256=JTv2zTTVgxQ2H82m1-6qEpdMv08lHjFx4Puf_MsbB_Q,1134
15403
- xinference-0.10.2.dist-info/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
15404
- xinference-0.10.2.dist-info/METADATA,sha256=GBKBO2j-z_gJExhHZh42Z2wCEM_t0qSR3qXI707AavE,14990
15405
- xinference-0.10.2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
15406
- xinference-0.10.2.dist-info/entry_points.txt,sha256=-lDyyzqWMFQF0Rgm7VxBNz0V-bMBMQLRR3pvQ-Y8XTY,226
15407
- xinference-0.10.2.dist-info/top_level.txt,sha256=L1rQt7pl6m8tmKXpWVHzP-GtmzAxp663rXxGE7qnK00,11
15408
- xinference-0.10.2.dist-info/RECORD,,
15403
+ xinference-0.10.2.post1.dist-info/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
15404
+ xinference-0.10.2.post1.dist-info/METADATA,sha256=DCneZ5276aJZpp1f20Tx_QBqOSzzkoF5z7QvUvWJgXE,14996
15405
+ xinference-0.10.2.post1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
15406
+ xinference-0.10.2.post1.dist-info/entry_points.txt,sha256=-lDyyzqWMFQF0Rgm7VxBNz0V-bMBMQLRR3pvQ-Y8XTY,226
15407
+ xinference-0.10.2.post1.dist-info/top_level.txt,sha256=L1rQt7pl6m8tmKXpWVHzP-GtmzAxp663rXxGE7qnK00,11
15408
+ xinference-0.10.2.post1.dist-info/RECORD,,