xinference 0.14.1.post1__py3-none-any.whl → 0.14.3__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.

Files changed (194) hide show
  1. xinference/_version.py +3 -3
  2. xinference/api/restful_api.py +15 -34
  3. xinference/client/restful/restful_client.py +2 -2
  4. xinference/core/chat_interface.py +45 -10
  5. xinference/core/image_interface.py +9 -0
  6. xinference/core/model.py +8 -5
  7. xinference/core/scheduler.py +1 -2
  8. xinference/core/worker.py +49 -42
  9. xinference/deploy/cmdline.py +2 -2
  10. xinference/deploy/test/test_cmdline.py +7 -7
  11. xinference/model/audio/chattts.py +24 -9
  12. xinference/model/audio/core.py +8 -2
  13. xinference/model/audio/fish_speech.py +228 -0
  14. xinference/model/audio/model_spec.json +8 -0
  15. xinference/model/embedding/core.py +23 -1
  16. xinference/model/image/model_spec.json +2 -1
  17. xinference/model/image/model_spec_modelscope.json +2 -1
  18. xinference/model/image/stable_diffusion/core.py +49 -1
  19. xinference/model/llm/__init__.py +26 -27
  20. xinference/model/llm/{ggml/llamacpp.py → llama_cpp/core.py} +2 -35
  21. xinference/model/llm/llm_family.json +606 -1266
  22. xinference/model/llm/llm_family.py +16 -139
  23. xinference/model/llm/llm_family_modelscope.json +276 -313
  24. xinference/model/llm/lmdeploy/__init__.py +0 -0
  25. xinference/model/llm/lmdeploy/core.py +557 -0
  26. xinference/model/llm/memory.py +9 -9
  27. xinference/model/llm/sglang/core.py +2 -2
  28. xinference/model/llm/{pytorch → transformers}/chatglm.py +6 -13
  29. xinference/model/llm/{pytorch → transformers}/cogvlm2.py +4 -45
  30. xinference/model/llm/transformers/cogvlm2_video.py +524 -0
  31. xinference/model/llm/{pytorch → transformers}/core.py +3 -10
  32. xinference/model/llm/{pytorch → transformers}/glm4v.py +2 -23
  33. xinference/model/llm/transformers/intern_vl.py +540 -0
  34. xinference/model/llm/{pytorch → transformers}/internlm2.py +4 -8
  35. xinference/model/llm/{pytorch → transformers}/minicpmv25.py +2 -23
  36. xinference/model/llm/{pytorch → transformers}/minicpmv26.py +66 -41
  37. xinference/model/llm/{pytorch → transformers}/utils.py +1 -2
  38. xinference/model/llm/{pytorch → transformers}/yi_vl.py +2 -24
  39. xinference/model/llm/utils.py +85 -70
  40. xinference/model/llm/vllm/core.py +110 -11
  41. xinference/model/utils.py +1 -95
  42. xinference/thirdparty/fish_speech/__init__.py +0 -0
  43. xinference/thirdparty/fish_speech/fish_speech/__init__.py +0 -0
  44. xinference/thirdparty/fish_speech/fish_speech/callbacks/__init__.py +3 -0
  45. xinference/thirdparty/fish_speech/fish_speech/callbacks/grad_norm.py +113 -0
  46. xinference/thirdparty/fish_speech/fish_speech/configs/__init__.py +0 -0
  47. xinference/thirdparty/fish_speech/fish_speech/configs/lora/__init__.py +0 -0
  48. xinference/thirdparty/fish_speech/fish_speech/conversation.py +2 -0
  49. xinference/thirdparty/fish_speech/fish_speech/datasets/__init__.py +0 -0
  50. xinference/thirdparty/fish_speech/fish_speech/datasets/concat_repeat.py +53 -0
  51. xinference/thirdparty/fish_speech/fish_speech/datasets/protos/__init__.py +0 -0
  52. xinference/thirdparty/fish_speech/fish_speech/datasets/protos/text_data_pb2.py +33 -0
  53. xinference/thirdparty/fish_speech/fish_speech/datasets/protos/text_data_stream.py +36 -0
  54. xinference/thirdparty/fish_speech/fish_speech/datasets/semantic.py +496 -0
  55. xinference/thirdparty/fish_speech/fish_speech/datasets/vqgan.py +147 -0
  56. xinference/thirdparty/fish_speech/fish_speech/i18n/__init__.py +3 -0
  57. xinference/thirdparty/fish_speech/fish_speech/i18n/core.py +40 -0
  58. xinference/thirdparty/fish_speech/fish_speech/i18n/locale/__init__.py +0 -0
  59. xinference/thirdparty/fish_speech/fish_speech/i18n/locale/en_US.json +122 -0
  60. xinference/thirdparty/fish_speech/fish_speech/i18n/locale/es_ES.json +122 -0
  61. xinference/thirdparty/fish_speech/fish_speech/i18n/locale/ja_JP.json +123 -0
  62. xinference/thirdparty/fish_speech/fish_speech/i18n/locale/pt_BR.json +133 -0
  63. xinference/thirdparty/fish_speech/fish_speech/i18n/locale/zh_CN.json +122 -0
  64. xinference/thirdparty/fish_speech/fish_speech/i18n/scan.py +122 -0
  65. xinference/thirdparty/fish_speech/fish_speech/models/__init__.py +0 -0
  66. xinference/thirdparty/fish_speech/fish_speech/models/text2semantic/__init__.py +0 -0
  67. xinference/thirdparty/fish_speech/fish_speech/models/text2semantic/lit_module.py +202 -0
  68. xinference/thirdparty/fish_speech/fish_speech/models/text2semantic/llama.py +779 -0
  69. xinference/thirdparty/fish_speech/fish_speech/models/text2semantic/lora.py +92 -0
  70. xinference/thirdparty/fish_speech/fish_speech/models/vqgan/__init__.py +3 -0
  71. xinference/thirdparty/fish_speech/fish_speech/models/vqgan/lit_module.py +442 -0
  72. xinference/thirdparty/fish_speech/fish_speech/models/vqgan/modules/__init__.py +0 -0
  73. xinference/thirdparty/fish_speech/fish_speech/models/vqgan/modules/discriminator.py +44 -0
  74. xinference/thirdparty/fish_speech/fish_speech/models/vqgan/modules/firefly.py +625 -0
  75. xinference/thirdparty/fish_speech/fish_speech/models/vqgan/modules/fsq.py +139 -0
  76. xinference/thirdparty/fish_speech/fish_speech/models/vqgan/modules/reference.py +115 -0
  77. xinference/thirdparty/fish_speech/fish_speech/models/vqgan/modules/wavenet.py +225 -0
  78. xinference/thirdparty/fish_speech/fish_speech/models/vqgan/utils.py +94 -0
  79. xinference/thirdparty/fish_speech/fish_speech/scheduler.py +40 -0
  80. xinference/thirdparty/fish_speech/fish_speech/text/__init__.py +4 -0
  81. xinference/thirdparty/fish_speech/fish_speech/text/chn_text_norm/__init__.py +0 -0
  82. xinference/thirdparty/fish_speech/fish_speech/text/chn_text_norm/basic_class.py +172 -0
  83. xinference/thirdparty/fish_speech/fish_speech/text/chn_text_norm/basic_constant.py +30 -0
  84. xinference/thirdparty/fish_speech/fish_speech/text/chn_text_norm/basic_util.py +342 -0
  85. xinference/thirdparty/fish_speech/fish_speech/text/chn_text_norm/cardinal.py +32 -0
  86. xinference/thirdparty/fish_speech/fish_speech/text/chn_text_norm/date.py +75 -0
  87. xinference/thirdparty/fish_speech/fish_speech/text/chn_text_norm/digit.py +32 -0
  88. xinference/thirdparty/fish_speech/fish_speech/text/chn_text_norm/fraction.py +35 -0
  89. xinference/thirdparty/fish_speech/fish_speech/text/chn_text_norm/money.py +43 -0
  90. xinference/thirdparty/fish_speech/fish_speech/text/chn_text_norm/percentage.py +33 -0
  91. xinference/thirdparty/fish_speech/fish_speech/text/chn_text_norm/telephone.py +51 -0
  92. xinference/thirdparty/fish_speech/fish_speech/text/chn_text_norm/text.py +177 -0
  93. xinference/thirdparty/fish_speech/fish_speech/text/clean.py +69 -0
  94. xinference/thirdparty/fish_speech/fish_speech/text/spliter.py +130 -0
  95. xinference/thirdparty/fish_speech/fish_speech/train.py +139 -0
  96. xinference/thirdparty/fish_speech/fish_speech/utils/__init__.py +23 -0
  97. xinference/thirdparty/fish_speech/fish_speech/utils/braceexpand.py +217 -0
  98. xinference/thirdparty/fish_speech/fish_speech/utils/context.py +13 -0
  99. xinference/thirdparty/fish_speech/fish_speech/utils/file.py +16 -0
  100. xinference/thirdparty/fish_speech/fish_speech/utils/instantiators.py +50 -0
  101. xinference/thirdparty/fish_speech/fish_speech/utils/logger.py +55 -0
  102. xinference/thirdparty/fish_speech/fish_speech/utils/logging_utils.py +48 -0
  103. xinference/thirdparty/fish_speech/fish_speech/utils/rich_utils.py +100 -0
  104. xinference/thirdparty/fish_speech/fish_speech/utils/spectrogram.py +122 -0
  105. xinference/thirdparty/fish_speech/fish_speech/utils/utils.py +114 -0
  106. xinference/thirdparty/fish_speech/fish_speech/webui/__init__.py +0 -0
  107. xinference/thirdparty/fish_speech/fish_speech/webui/launch_utils.py +120 -0
  108. xinference/thirdparty/fish_speech/fish_speech/webui/manage.py +1237 -0
  109. xinference/thirdparty/fish_speech/tools/__init__.py +0 -0
  110. xinference/thirdparty/fish_speech/tools/api.py +495 -0
  111. xinference/thirdparty/fish_speech/tools/auto_rerank.py +159 -0
  112. xinference/thirdparty/fish_speech/tools/download_models.py +55 -0
  113. xinference/thirdparty/fish_speech/tools/extract_model.py +21 -0
  114. xinference/thirdparty/fish_speech/tools/file.py +108 -0
  115. xinference/thirdparty/fish_speech/tools/gen_ref.py +36 -0
  116. xinference/thirdparty/fish_speech/tools/llama/__init__.py +0 -0
  117. xinference/thirdparty/fish_speech/tools/llama/build_dataset.py +169 -0
  118. xinference/thirdparty/fish_speech/tools/llama/eval_in_context.py +171 -0
  119. xinference/thirdparty/fish_speech/tools/llama/generate.py +698 -0
  120. xinference/thirdparty/fish_speech/tools/llama/merge_lora.py +95 -0
  121. xinference/thirdparty/fish_speech/tools/llama/quantize.py +497 -0
  122. xinference/thirdparty/fish_speech/tools/llama/rebuild_tokenizer.py +57 -0
  123. xinference/thirdparty/fish_speech/tools/merge_asr_files.py +55 -0
  124. xinference/thirdparty/fish_speech/tools/post_api.py +164 -0
  125. xinference/thirdparty/fish_speech/tools/sensevoice/__init__.py +0 -0
  126. xinference/thirdparty/fish_speech/tools/sensevoice/auto_model.py +573 -0
  127. xinference/thirdparty/fish_speech/tools/sensevoice/fun_asr.py +332 -0
  128. xinference/thirdparty/fish_speech/tools/sensevoice/vad_utils.py +61 -0
  129. xinference/thirdparty/fish_speech/tools/smart_pad.py +47 -0
  130. xinference/thirdparty/fish_speech/tools/vqgan/__init__.py +0 -0
  131. xinference/thirdparty/fish_speech/tools/vqgan/create_train_split.py +83 -0
  132. xinference/thirdparty/fish_speech/tools/vqgan/extract_vq.py +227 -0
  133. xinference/thirdparty/fish_speech/tools/vqgan/inference.py +120 -0
  134. xinference/thirdparty/fish_speech/tools/webui.py +619 -0
  135. xinference/thirdparty/fish_speech/tools/whisper_asr.py +176 -0
  136. xinference/thirdparty/internvl/__init__.py +0 -0
  137. xinference/thirdparty/internvl/conversation.py +393 -0
  138. xinference/thirdparty/omnilmm/model/utils.py +16 -1
  139. xinference/web/ui/build/asset-manifest.json +3 -3
  140. xinference/web/ui/build/index.html +1 -1
  141. xinference/web/ui/build/static/js/main.661c7b0a.js +3 -0
  142. xinference/web/ui/build/static/js/{main.17ca0398.js.map → main.661c7b0a.js.map} +1 -1
  143. xinference/web/ui/node_modules/.cache/babel-loader/070d8c6b3b0f3485c6d3885f0b6bbfdf9643e088a468acbd5d596f2396071c16.json +1 -0
  144. xinference/web/ui/node_modules/.cache/babel-loader/213b5913e164773c2b0567455377765715f5f07225fbac77ad8e1e9dc9648a47.json +1 -0
  145. xinference/web/ui/node_modules/.cache/babel-loader/4de9a6942c5f1749d6cbfdd54279699975f16016b182848bc253886f52ec2ec3.json +1 -0
  146. xinference/web/ui/node_modules/.cache/babel-loader/5391543180fead1eeef5364300301498d58a7d91d62de3841a32768b67f4552f.json +1 -0
  147. xinference/web/ui/node_modules/.cache/babel-loader/5c26a23b5eacf5b752a08531577ae3840bb247745ef9a39583dc2d05ba93a82a.json +1 -0
  148. xinference/web/ui/node_modules/.cache/babel-loader/714c37ce0ec5b5c591033f02be2f3f491fdd70da3ef568ee4a4f94689a3d5ca2.json +1 -0
  149. xinference/web/ui/node_modules/.cache/babel-loader/822586ed1077201b64b954f12f25e3f9b45678c1acbabe53d8af3ca82ca71f33.json +1 -0
  150. xinference/web/ui/node_modules/.cache/babel-loader/978b57d1a04a701bc3fcfebc511f5f274eed6ed7eade67f6fb76c27d5fd9ecc8.json +1 -0
  151. xinference/web/ui/node_modules/.cache/babel-loader/a797831de0dc74897f4b50b3426555d748f328b4c2cc391de709eadaf6a5f3e3.json +1 -0
  152. xinference/web/ui/node_modules/.cache/babel-loader/bd6ad8159341315a1764c397621a560809f7eb7219ab5174c801fca7e969d943.json +1 -0
  153. xinference/web/ui/node_modules/.cache/babel-loader/e64b7e8cedcf43d4c95deba60ec1341855c887705805bb62431693118b870c69.json +1 -0
  154. xinference/web/ui/node_modules/.cache/babel-loader/e91938976f229ce986b2907e51e1f00540b584ced0a315d498c172d13220739d.json +1 -0
  155. xinference/web/ui/node_modules/.cache/babel-loader/f72f011744c4649fabddca6f7a9327861ac0a315a89b1a2e62a39774e7863845.json +1 -0
  156. {xinference-0.14.1.post1.dist-info → xinference-0.14.3.dist-info}/METADATA +22 -13
  157. {xinference-0.14.1.post1.dist-info → xinference-0.14.3.dist-info}/RECORD +170 -79
  158. xinference/locale/utils.py +0 -39
  159. xinference/locale/zh_CN.json +0 -26
  160. xinference/model/llm/ggml/tools/__init__.py +0 -15
  161. xinference/model/llm/ggml/tools/convert_ggml_to_gguf.py +0 -498
  162. xinference/model/llm/ggml/tools/gguf.py +0 -884
  163. xinference/model/llm/pytorch/__init__.py +0 -13
  164. xinference/model/llm/pytorch/baichuan.py +0 -81
  165. xinference/model/llm/pytorch/falcon.py +0 -138
  166. xinference/model/llm/pytorch/intern_vl.py +0 -352
  167. xinference/model/llm/pytorch/vicuna.py +0 -69
  168. xinference/web/ui/build/static/js/main.17ca0398.js +0 -3
  169. xinference/web/ui/node_modules/.cache/babel-loader/1444c41a4d04494f1cbc2d8c1537df107b451cb569cb2c1fbf5159f3a4841a5f.json +0 -1
  170. xinference/web/ui/node_modules/.cache/babel-loader/2f40209b32e7e46a2eab6b8c8a355eb42c3caa8bc3228dd929f32fd2b3940294.json +0 -1
  171. xinference/web/ui/node_modules/.cache/babel-loader/44774c783428f952d8e2e4ad0998a9c5bc16a57cd9c68b7c5ff18aaa5a41d65c.json +0 -1
  172. xinference/web/ui/node_modules/.cache/babel-loader/5262556baf9207738bf6a8ba141ec6599d0a636345c245d61fdf88d3171998cb.json +0 -1
  173. xinference/web/ui/node_modules/.cache/babel-loader/6450605fac003812485f6251b9f0caafbf2e5bfc3bbe2f000050d9e2fdb8dcd3.json +0 -1
  174. xinference/web/ui/node_modules/.cache/babel-loader/71684495d995c7e266eecc6a0ad8ea0284cc785f80abddf863789c57a6134969.json +0 -1
  175. xinference/web/ui/node_modules/.cache/babel-loader/80acd1edf31542ab1dcccfad02cb4b38f3325cff847a781fcce97500cfd6f878.json +0 -1
  176. xinference/web/ui/node_modules/.cache/babel-loader/8a9742ddd8ba8546ef42dc14caca443f2b4524fabed7bf269e0eff3b7b64ee7d.json +0 -1
  177. xinference/web/ui/node_modules/.cache/babel-loader/d06a96a3c9c32e42689094aa3aaad41c8125894e956b8f84a70fadce6e3f65b3.json +0 -1
  178. xinference/web/ui/node_modules/.cache/babel-loader/d93730e2b5d7e8c957b4d0965d2ed1dac9045a649adbd47c220d11f255d4b1e0.json +0 -1
  179. xinference/web/ui/node_modules/.cache/babel-loader/e656dc00b4d8b387f0a81ba8fc558767df1601c66369e2eb86a5ef27cf080572.json +0 -1
  180. xinference/web/ui/node_modules/.cache/babel-loader/f28b83886159d83b84f099b05d607a822dca4dd7f2d8aa6d56fe08bab0b5b086.json +0 -1
  181. xinference/web/ui/node_modules/.cache/babel-loader/f3e02274cb1964e99b1fe69cbb6db233d3d8d7dd05d50ebcdb8e66d50b224b7b.json +0 -1
  182. /xinference/{locale → model/llm/llama_cpp}/__init__.py +0 -0
  183. /xinference/model/llm/{ggml → transformers}/__init__.py +0 -0
  184. /xinference/model/llm/{pytorch → transformers}/compression.py +0 -0
  185. /xinference/model/llm/{pytorch → transformers}/deepseek_vl.py +0 -0
  186. /xinference/model/llm/{pytorch → transformers}/llama_2.py +0 -0
  187. /xinference/model/llm/{pytorch → transformers}/omnilmm.py +0 -0
  188. /xinference/model/llm/{pytorch → transformers}/qwen_vl.py +0 -0
  189. /xinference/model/llm/{pytorch → transformers}/tensorizer_utils.py +0 -0
  190. /xinference/web/ui/build/static/js/{main.17ca0398.js.LICENSE.txt → main.661c7b0a.js.LICENSE.txt} +0 -0
  191. {xinference-0.14.1.post1.dist-info → xinference-0.14.3.dist-info}/LICENSE +0 -0
  192. {xinference-0.14.1.post1.dist-info → xinference-0.14.3.dist-info}/WHEEL +0 -0
  193. {xinference-0.14.1.post1.dist-info → xinference-0.14.3.dist-info}/entry_points.txt +0 -0
  194. {xinference-0.14.1.post1.dist-info → xinference-0.14.3.dist-info}/top_level.txt +0 -0
@@ -0,0 +1 @@
1
+ {"ast":null,"code":"import _objectSpread from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/objectSpread2.js\";import _slicedToArray from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import DeleteOutlineOutlinedIcon from'@mui/icons-material/DeleteOutlineOutlined';import OpenInBrowserOutlinedIcon from'@mui/icons-material/OpenInBrowserOutlined';import{TabContext,TabList,TabPanel}from'@mui/lab';import{Box,Stack,Tab}from'@mui/material';import{DataGrid}from'@mui/x-data-grid';import React,{useContext,useEffect,useState}from'react';import{useCookies}from'react-cookie';import{useNavigate}from'react-router-dom';import{ApiContext}from'../../components/apiContext';import ErrorMessageSnackBar from'../../components/errorMessageSnackBar';import fetcher from'../../components/fetcher';import fetchWrapper from'../../components/fetchWrapper';import Title from'../../components/Title';import{isValidBearerToken}from'../../components/utils';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var RunningModels=function RunningModels(){var _React$useState=React.useState(sessionStorage.getItem('runningModelType')),_React$useState2=_slicedToArray(_React$useState,2),tabValue=_React$useState2[0],setTabValue=_React$useState2[1];var _useState=useState([]),_useState2=_slicedToArray(_useState,2),llmData=_useState2[0],setLlmData=_useState2[1];var _useState3=useState([]),_useState4=_slicedToArray(_useState3,2),embeddingModelData=_useState4[0],setEmbeddingModelData=_useState4[1];var _useState5=useState([]),_useState6=_slicedToArray(_useState5,2),imageModelData=_useState6[0],setImageModelData=_useState6[1];var _useState7=useState([]),_useState8=_slicedToArray(_useState7,2),audioModelData=_useState8[0],setAudioModelData=_useState8[1];var _useState9=useState([]),_useState10=_slicedToArray(_useState9,2),videoModelData=_useState10[0],setVideoModelData=_useState10[1];var _useState11=useState([]),_useState12=_slicedToArray(_useState11,2),rerankModelData=_useState12[0],setRerankModelData=_useState12[1];var _useState13=useState([]),_useState14=_slicedToArray(_useState13,2),flexibleModelData=_useState14[0],setFlexibleModelData=_useState14[1];var _useContext=useContext(ApiContext),isCallingApi=_useContext.isCallingApi,setIsCallingApi=_useContext.setIsCallingApi;var _useContext2=useContext(ApiContext),isUpdatingModel=_useContext2.isUpdatingModel,setIsUpdatingModel=_useContext2.setIsUpdatingModel;var _useContext3=useContext(ApiContext),setErrorMsg=_useContext3.setErrorMsg;var _useCookies=useCookies(['token']),_useCookies2=_slicedToArray(_useCookies,1),cookie=_useCookies2[0];var navigate=useNavigate();var endPoint=useContext(ApiContext).endPoint;var handleTabChange=function handleTabChange(event,newValue){setTabValue(newValue);navigate(newValue);sessionStorage.setItem('runningModelType',newValue);};var update=function update(isCallingApi){if(sessionStorage.getItem('auth')==='true'&&!isValidBearerToken(sessionStorage.getItem('token'))&&!isValidBearerToken(cookie.token)){navigate('/login',{replace:true});return;}if(isCallingApi){setLlmData([{id:'Loading, do not refresh page...',url:'IS_LOADING'}]);setEmbeddingModelData([{id:'Loading, do not refresh page...',url:'IS_LOADING'}]);setAudioModelData([{id:'Loading, do not refresh page...',url:'IS_LOADING'}]);setVideoModelData([{id:'Loading, do not refresh page...',url:'IS_LOADING'}]);setImageModelData([{id:'Loading, do not refresh page...',url:'IS_LOADING'}]);setRerankModelData([{id:'Loading, do not refresh page...',url:'IS_LOADING'}]);setFlexibleModelData([{id:'Loading, do not refresh page...',url:'IS_LOADING'}]);}else{setIsUpdatingModel(true);fetchWrapper.get('/v1/models').then(function(response){var newLlmData=[];var newEmbeddingModelData=[];var newImageModelData=[];var newAudioModelData=[];var newVideoModelData=[];var newRerankModelData=[];var newFlexibleModelData=[];response.data.forEach(function(model){var newValue=_objectSpread(_objectSpread({},model),{},{id:model.id,url:model.id});if(newValue.model_type==='LLM'){newLlmData.push(newValue);}else if(newValue.model_type==='embedding'){newEmbeddingModelData.push(newValue);}else if(newValue.model_type==='audio'){newAudioModelData.push(newValue);}else if(newValue.model_type==='video'){newVideoModelData.push(newValue);}else if(newValue.model_type==='image'){newImageModelData.push(newValue);}else if(newValue.model_type==='rerank'){newRerankModelData.push(newValue);}else if(newValue.model_type==='flexible'){newFlexibleModelData.push(newValue);}});setLlmData(newLlmData);setEmbeddingModelData(newEmbeddingModelData);setAudioModelData(newAudioModelData);setVideoModelData(newVideoModelData);setImageModelData(newImageModelData);setRerankModelData(newRerankModelData);setFlexibleModelData(newFlexibleModelData);setIsUpdatingModel(false);}).catch(function(error){console.error('Error:',error);setIsUpdatingModel(false);if(error.response.status!==403&&error.response.status!==401){setErrorMsg(error.message);}});}};useEffect(function(){update(isCallingApi);// eslint-disable-next-line\n},[isCallingApi,cookie.token]);var llmColumns=[{field:'id',headerName:'ID',flex:1,minWidth:250},{field:'model_name',headerName:'Name',flex:1},{field:'address',headerName:'Address',flex:1},{field:'accelerators',headerName:'GPU Indexes',flex:1},{field:'model_size_in_billions',headerName:'Size',flex:1},{field:'quantization',headerName:'Quantization',flex:1},{field:'replica',headerName:'Replica',flex:1},{field:'url',headerName:'Actions',flex:1,minWidth:200,sortable:false,filterable:false,disableColumnMenu:true,renderCell:function renderCell(_ref){var row=_ref.row;var url=row.url;var openUrl=\"\".concat(endPoint,\"/\")+url;var closeUrl=\"\".concat(endPoint,\"/v1/models/\")+url;var gradioUrl=\"\".concat(endPoint,\"/v1/ui/\")+url;if(url==='IS_LOADING'){return/*#__PURE__*/_jsx(\"div\",{});}return/*#__PURE__*/_jsxs(Box,{style:{width:'100%',display:'flex',justifyContent:'left',alignItems:'left'},children:[/*#__PURE__*/_jsx(\"button\",{title:\"Launch Web UI\",style:{borderWidth:'0px',backgroundColor:'transparent',paddingLeft:'0px',paddingRight:'10px'},onClick:function onClick(){if(isCallingApi||isUpdatingModel){// Make sure no ongoing call\nreturn;}setIsCallingApi(true);fetcher(openUrl,{method:'HEAD'}).then(function(response){if(response.status===404){// If web UI doesn't exist (404 Not Found)\nconsole.log('UI does not exist, creating new...');return fetcher(gradioUrl,{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({model_type:row.model_type,model_name:row.model_family,model_size_in_billions:row.model_size_in_billions,model_format:row.model_format,quantization:row.quantization,context_length:row.context_length,model_ability:row.model_ability,model_description:row.model_description,model_lang:row.model_lang})}).then(function(response){return response.json();}).then(function(){return window.open(openUrl,'_blank','noopener noreferrer');}).finally(function(){return setIsCallingApi(false);});}else if(response.ok){// If web UI does exist\nconsole.log('UI exists, opening...');window.open(openUrl,'_blank','noopener noreferrer');setIsCallingApi(false);}else{// Other HTTP errors\nconsole.error(\"Unexpected response status: \".concat(response.status));setIsCallingApi(false);}}).catch(function(error){console.error('Error:',error);setIsCallingApi(false);});},children:/*#__PURE__*/_jsx(Box,{width:\"40px\",m:\"0 auto\",p:\"5px\",display:\"flex\",justifyContent:\"center\",borderRadius:\"4px\",style:{border:'1px solid #e5e7eb',borderWidth:'1px',borderColor:'#e5e7eb'},children:/*#__PURE__*/_jsx(OpenInBrowserOutlinedIcon,{})})}),/*#__PURE__*/_jsx(\"button\",{title:\"Terminate Model\",style:{borderWidth:'0px',backgroundColor:'transparent',paddingLeft:'0px',paddingRight:'10px'},onClick:function onClick(){if(isCallingApi||isUpdatingModel){return;}setIsCallingApi(true);fetcher(closeUrl,{method:'DELETE'}).then(function(response){response.json();}).then(function(){setIsCallingApi(false);}).catch(function(error){console.error('Error:',error);setIsCallingApi(false);});},children:/*#__PURE__*/_jsx(Box,{width:\"40px\",m:\"0 auto\",p:\"5px\",display:\"flex\",justifyContent:\"center\",borderRadius:\"4px\",style:{border:'1px solid #e5e7eb',borderWidth:'1px',borderColor:'#e5e7eb'},children:/*#__PURE__*/_jsx(DeleteOutlineOutlinedIcon,{})})})]});}}];var embeddingModelColumns=[{field:'id',headerName:'ID',flex:1,minWidth:250},{field:'model_name',headerName:'Name',flex:1},{field:'address',headerName:'Address',flex:1},{field:'accelerators',headerName:'GPU Indexes',flex:1},{field:'replica',headerName:'Replica',flex:1},{field:'url',headerName:'Actions',flex:1,minWidth:200,sortable:false,filterable:false,disableColumnMenu:true,renderCell:function renderCell(_ref2){var row=_ref2.row;var url=row.url;var closeUrl=\"\".concat(endPoint,\"/v1/models/\")+url;if(url==='IS_LOADING'){return/*#__PURE__*/_jsx(\"div\",{});}return/*#__PURE__*/_jsx(Box,{style:{width:'100%',display:'flex',justifyContent:'left',alignItems:'left'},children:/*#__PURE__*/_jsx(\"button\",{title:\"Terminate Model\",style:{borderWidth:'0px',backgroundColor:'transparent',paddingLeft:'0px',paddingRight:'10px'},onClick:function onClick(){if(isCallingApi||isUpdatingModel){return;}setIsCallingApi(true);fetcher(closeUrl,{method:'DELETE'}).then(function(response){response.json();}).then(function(){setIsCallingApi(false);}).catch(function(error){console.error('Error:',error);setIsCallingApi(false);});},children:/*#__PURE__*/_jsx(Box,{width:\"40px\",m:\"0 auto\",p:\"5px\",display:\"flex\",justifyContent:\"center\",borderRadius:\"4px\",style:{border:'1px solid #e5e7eb',borderWidth:'1px',borderColor:'#e5e7eb'},children:/*#__PURE__*/_jsx(DeleteOutlineOutlinedIcon,{})})})});}}];var imageModelColumns=[{field:'id',headerName:'ID',flex:1,minWidth:250},{field:'model_name',headerName:'Name',flex:1},{field:'address',headerName:'Address',flex:1},{field:'accelerators',headerName:'GPU Indexes',flex:1},{field:'url',headerName:'Actions',flex:1,minWidth:200,sortable:false,filterable:false,disableColumnMenu:true,renderCell:function renderCell(_ref3){var row=_ref3.row;//这个url指的是model_uid\nvar url=row.url;console.log('url: '+url);var openUrl=\"\".concat(endPoint,\"/\")+url;var closeUrl=\"\".concat(endPoint,\"/v1/models/\")+url;var gradioUrl=\"\".concat(endPoint,\"/v1/ui/images/\")+url;if(url==='IS_LOADING'){return/*#__PURE__*/_jsx(\"div\",{});}return/*#__PURE__*/_jsxs(Box,{style:{width:'100%',display:'flex',justifyContent:'left',alignItems:'left'},children:[/*#__PURE__*/_jsx(\"button\",{title:\"Launch Web UI\",style:{borderWidth:'0px',backgroundColor:'transparent',paddingLeft:'0px',paddingRight:'10px'},onClick:function onClick(){if(isCallingApi||isUpdatingModel){// Make sure no ongoing call\nreturn;}setIsCallingApi(true);fetcher(openUrl,{method:'HEAD'}).then(function(response){if(response.status===404){// If web UI doesn't exist (404 Not Found)\nconsole.log('UI does not exist, creating new...');return fetcher(gradioUrl,{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({model_type:row.model_type,model_family:row.model_family,model_id:row.id,controlnet:row.controlnet,model_revision:row.model_revision,model_name:row.model_name,model_ability:row.model_ability})}).then(function(response){return response.json();}).then(function(){return window.open(openUrl,'_blank','noopener noreferrer');}).finally(function(){return setIsCallingApi(false);});}else if(response.ok){// If web UI does exist\nconsole.log('UI exists, opening...');window.open(openUrl,'_blank','noopener noreferrer');setIsCallingApi(false);}else{// Other HTTP errors\nconsole.error(\"Unexpected response status: \".concat(response.status));setIsCallingApi(false);}}).catch(function(error){console.error('Error:',error);setIsCallingApi(false);});},children:/*#__PURE__*/_jsx(Box,{width:\"40px\",m:\"0 auto\",p:\"5px\",display:\"flex\",justifyContent:\"center\",borderRadius:\"4px\",style:{border:'1px solid #e5e7eb',borderWidth:'1px',borderColor:'#e5e7eb'},children:/*#__PURE__*/_jsx(OpenInBrowserOutlinedIcon,{})})}),/*#__PURE__*/_jsx(\"button\",{title:\"Terminate Model\",style:{borderWidth:'0px',backgroundColor:'transparent',paddingLeft:'0px',paddingRight:'10px'},onClick:function onClick(){if(isCallingApi||isUpdatingModel){return;}setIsCallingApi(true);fetcher(closeUrl,{method:'DELETE'}).then(function(response){response.json();}).then(function(){setIsCallingApi(false);}).catch(function(error){console.error('Error:',error);setIsCallingApi(false);});},children:/*#__PURE__*/_jsx(Box,{width:\"40px\",m:\"0 auto\",p:\"5px\",display:\"flex\",justifyContent:\"center\",borderRadius:\"4px\",style:{border:'1px solid #e5e7eb',borderWidth:'1px',borderColor:'#e5e7eb'},children:/*#__PURE__*/_jsx(DeleteOutlineOutlinedIcon,{})})})]});}}];var audioModelColumns=embeddingModelColumns;var videoModelColumns=embeddingModelColumns;var rerankModelColumns=embeddingModelColumns;var flexibleModelColumns=embeddingModelColumns;var dataGridStyle={'& .MuiDataGrid-cell':{borderBottom:'none'},'& .MuiDataGrid-columnHeaders':{borderBottom:'none'},'& .MuiDataGrid-columnHeaderTitle':{fontWeight:'bold'},'& .MuiDataGrid-virtualScroller':{overflowX:'visible !important',overflow:'visible'},'& .MuiDataGrid-footerContainer':{borderTop:'none'},'border-width':'0px'};var noRowsOverlay=function noRowsOverlay(){return/*#__PURE__*/_jsx(Stack,{height:\"100%\",alignItems:\"center\",justifyContent:\"center\",children:\"No Running Models\"});};var noResultsOverlay=function noResultsOverlay(){return/*#__PURE__*/_jsx(Stack,{height:\"100%\",alignItems:\"center\",justifyContent:\"center\",children:\"No Running Models Matches\"});};return/*#__PURE__*/_jsxs(Box,{sx:{height:'100%',width:'100%',padding:'20px 20px 0 20px'},children:[/*#__PURE__*/_jsx(Title,{title:\"Running Models\"}),/*#__PURE__*/_jsx(ErrorMessageSnackBar,{}),/*#__PURE__*/_jsxs(TabContext,{value:tabValue,children:[/*#__PURE__*/_jsx(Box,{sx:{borderBottom:1,borderColor:'divider'},children:/*#__PURE__*/_jsxs(TabList,{value:tabValue,onChange:handleTabChange,\"aria-label\":\"tabs\",children:[/*#__PURE__*/_jsx(Tab,{label:\"Language Models\",value:\"/running_models/LLM\"}),/*#__PURE__*/_jsx(Tab,{label:\"Embedding Models\",value:\"/running_models/embedding\"}),/*#__PURE__*/_jsx(Tab,{label:\"Rerank models\",value:\"/running_models/rerank\"}),/*#__PURE__*/_jsx(Tab,{label:\"Image models\",value:\"/running_models/image\"}),/*#__PURE__*/_jsx(Tab,{label:\"Audio models\",value:\"/running_models/audio\"}),/*#__PURE__*/_jsx(Tab,{label:\"Video models\",value:\"/running_models/video\"}),/*#__PURE__*/_jsx(Tab,{label:\"Flexible models\",value:\"/running_models/flexible\"})]})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/running_models/LLM\",sx:{padding:0},children:/*#__PURE__*/_jsx(Box,{sx:{height:'100%',width:'100%'},children:/*#__PURE__*/_jsx(DataGrid,{rows:llmData,columns:llmColumns,autoHeight:true,sx:dataGridStyle,slots:{noRowsOverlay:noRowsOverlay,noResultsOverlay:noResultsOverlay}})})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/running_models/embedding\",sx:{padding:0},children:/*#__PURE__*/_jsx(Box,{sx:{height:'100%',width:'100%'},children:/*#__PURE__*/_jsx(DataGrid,{rows:embeddingModelData,columns:embeddingModelColumns,autoHeight:true,sx:dataGridStyle,slots:{noRowsOverlay:noRowsOverlay,noResultsOverlay:noResultsOverlay}})})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/running_models/rerank\",sx:{padding:0},children:/*#__PURE__*/_jsx(Box,{sx:{height:'100%',width:'100%'},children:/*#__PURE__*/_jsx(DataGrid,{rows:rerankModelData,columns:rerankModelColumns,autoHeight:true,sx:dataGridStyle,slots:{noRowsOverlay:noRowsOverlay,noResultsOverlay:noResultsOverlay}})})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/running_models/image\",sx:{padding:0},children:/*#__PURE__*/_jsx(Box,{sx:{height:'100%',width:'100%'},children:/*#__PURE__*/_jsx(DataGrid,{rows:imageModelData,columns:imageModelColumns,autoHeight:true,sx:dataGridStyle,slots:{noRowsOverlay:noRowsOverlay,noResultsOverlay:noResultsOverlay}})})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/running_models/audio\",sx:{padding:0},children:/*#__PURE__*/_jsx(Box,{sx:{height:'100%',width:'100%'},children:/*#__PURE__*/_jsx(DataGrid,{rows:audioModelData,columns:audioModelColumns,autoHeight:true,sx:dataGridStyle,slots:{noRowsOverlay:noRowsOverlay,noResultsOverlay:noResultsOverlay}})})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/running_models/video\",sx:{padding:0},children:/*#__PURE__*/_jsx(Box,{sx:{height:'100%',width:'100%'},children:/*#__PURE__*/_jsx(DataGrid,{rows:videoModelData,columns:videoModelColumns,autoHeight:true,sx:dataGridStyle,slots:{noRowsOverlay:noRowsOverlay,noResultsOverlay:noResultsOverlay}})})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/running_models/flexible\",sx:{padding:0},children:/*#__PURE__*/_jsx(Box,{sx:{height:'100%',width:'100%'},children:/*#__PURE__*/_jsx(DataGrid,{rows:flexibleModelData,columns:flexibleModelColumns,autoHeight:true,sx:dataGridStyle,slots:{noRowsOverlay:noRowsOverlay,noResultsOverlay:noResultsOverlay}})})})]})]});};export default RunningModels;","map":{"version":3,"names":["DeleteOutlineOutlinedIcon","OpenInBrowserOutlinedIcon","TabContext","TabList","TabPanel","Box","Stack","Tab","DataGrid","React","useContext","useEffect","useState","useCookies","useNavigate","ApiContext","ErrorMessageSnackBar","fetcher","fetchWrapper","Title","isValidBearerToken","jsx","_jsx","jsxs","_jsxs","RunningModels","_React$useState","sessionStorage","getItem","_React$useState2","_slicedToArray","tabValue","setTabValue","_useState","_useState2","llmData","setLlmData","_useState3","_useState4","embeddingModelData","setEmbeddingModelData","_useState5","_useState6","imageModelData","setImageModelData","_useState7","_useState8","audioModelData","setAudioModelData","_useState9","_useState10","videoModelData","setVideoModelData","_useState11","_useState12","rerankModelData","setRerankModelData","_useState13","_useState14","flexibleModelData","setFlexibleModelData","_useContext","isCallingApi","setIsCallingApi","_useContext2","isUpdatingModel","setIsUpdatingModel","_useContext3","setErrorMsg","_useCookies","_useCookies2","cookie","navigate","endPoint","handleTabChange","event","newValue","setItem","update","token","replace","id","url","get","then","response","newLlmData","newEmbeddingModelData","newImageModelData","newAudioModelData","newVideoModelData","newRerankModelData","newFlexibleModelData","data","forEach","model","_objectSpread","model_type","push","catch","error","console","status","message","llmColumns","field","headerName","flex","minWidth","sortable","filterable","disableColumnMenu","renderCell","_ref","row","openUrl","concat","closeUrl","gradioUrl","style","width","display","justifyContent","alignItems","children","title","borderWidth","backgroundColor","paddingLeft","paddingRight","onClick","method","log","headers","body","JSON","stringify","model_name","model_family","model_size_in_billions","model_format","quantization","context_length","model_ability","model_description","model_lang","json","window","open","finally","ok","m","p","borderRadius","border","borderColor","embeddingModelColumns","_ref2","imageModelColumns","_ref3","model_id","controlnet","model_revision","audioModelColumns","videoModelColumns","rerankModelColumns","flexibleModelColumns","dataGridStyle","borderBottom","fontWeight","overflowX","overflow","borderTop","noRowsOverlay","height","noResultsOverlay","sx","padding","value","onChange","label","rows","columns","autoHeight","slots"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/scenes/running_models/index.js"],"sourcesContent":["import DeleteOutlineOutlinedIcon from '@mui/icons-material/DeleteOutlineOutlined'\nimport OpenInBrowserOutlinedIcon from '@mui/icons-material/OpenInBrowserOutlined'\nimport { TabContext, TabList, TabPanel } from '@mui/lab'\nimport { Box, Stack, Tab } from '@mui/material'\nimport { DataGrid } from '@mui/x-data-grid'\nimport React, { useContext, useEffect, useState } from 'react'\nimport { useCookies } from 'react-cookie'\nimport { useNavigate } from 'react-router-dom'\n\nimport { ApiContext } from '../../components/apiContext'\nimport ErrorMessageSnackBar from '../../components/errorMessageSnackBar'\nimport fetcher from '../../components/fetcher'\nimport fetchWrapper from '../../components/fetchWrapper'\nimport Title from '../../components/Title'\nimport { isValidBearerToken } from '../../components/utils'\n\nconst RunningModels = () => {\n const [tabValue, setTabValue] = React.useState(\n sessionStorage.getItem('runningModelType')\n )\n const [llmData, setLlmData] = useState([])\n const [embeddingModelData, setEmbeddingModelData] = useState([])\n const [imageModelData, setImageModelData] = useState([])\n const [audioModelData, setAudioModelData] = useState([])\n const [videoModelData, setVideoModelData] = useState([])\n const [rerankModelData, setRerankModelData] = useState([])\n const [flexibleModelData, setFlexibleModelData] = useState([])\n const { isCallingApi, setIsCallingApi } = useContext(ApiContext)\n const { isUpdatingModel, setIsUpdatingModel } = useContext(ApiContext)\n const { setErrorMsg } = useContext(ApiContext)\n const [cookie] = useCookies(['token'])\n const navigate = useNavigate()\n const endPoint = useContext(ApiContext).endPoint\n\n const handleTabChange = (event, newValue) => {\n setTabValue(newValue)\n navigate(newValue)\n sessionStorage.setItem('runningModelType', newValue)\n }\n\n const update = (isCallingApi) => {\n if (\n sessionStorage.getItem('auth') === 'true' &&\n !isValidBearerToken(sessionStorage.getItem('token')) &&\n !isValidBearerToken(cookie.token)\n ) {\n navigate('/login', { replace: true })\n return\n }\n if (isCallingApi) {\n setLlmData([{ id: 'Loading, do not refresh page...', url: 'IS_LOADING' }])\n setEmbeddingModelData([\n { id: 'Loading, do not refresh page...', url: 'IS_LOADING' },\n ])\n setAudioModelData([\n { id: 'Loading, do not refresh page...', url: 'IS_LOADING' },\n ])\n setVideoModelData([\n { id: 'Loading, do not refresh page...', url: 'IS_LOADING' },\n ])\n setImageModelData([\n { id: 'Loading, do not refresh page...', url: 'IS_LOADING' },\n ])\n setRerankModelData([\n { id: 'Loading, do not refresh page...', url: 'IS_LOADING' },\n ])\n setFlexibleModelData([\n { id: 'Loading, do not refresh page...', url: 'IS_LOADING' },\n ])\n } else {\n setIsUpdatingModel(true)\n\n fetchWrapper\n .get('/v1/models')\n .then((response) => {\n const newLlmData = []\n const newEmbeddingModelData = []\n const newImageModelData = []\n const newAudioModelData = []\n const newVideoModelData = []\n const newRerankModelData = []\n const newFlexibleModelData = []\n response.data.forEach((model) => {\n let newValue = {\n ...model,\n id: model.id,\n url: model.id,\n }\n if (newValue.model_type === 'LLM') {\n newLlmData.push(newValue)\n } else if (newValue.model_type === 'embedding') {\n newEmbeddingModelData.push(newValue)\n } else if (newValue.model_type === 'audio') {\n newAudioModelData.push(newValue)\n } else if (newValue.model_type === 'video') {\n newVideoModelData.push(newValue)\n } else if (newValue.model_type === 'image') {\n newImageModelData.push(newValue)\n } else if (newValue.model_type === 'rerank') {\n newRerankModelData.push(newValue)\n } else if (newValue.model_type === 'flexible') {\n newFlexibleModelData.push(newValue)\n }\n })\n setLlmData(newLlmData)\n setEmbeddingModelData(newEmbeddingModelData)\n setAudioModelData(newAudioModelData)\n setVideoModelData(newVideoModelData)\n setImageModelData(newImageModelData)\n setRerankModelData(newRerankModelData)\n setFlexibleModelData(newFlexibleModelData)\n setIsUpdatingModel(false)\n })\n .catch((error) => {\n console.error('Error:', error)\n setIsUpdatingModel(false)\n if (error.response.status !== 403 && error.response.status !== 401) {\n setErrorMsg(error.message)\n }\n })\n }\n }\n\n useEffect(() => {\n update(isCallingApi)\n // eslint-disable-next-line\n }, [isCallingApi, cookie.token])\n\n const llmColumns = [\n {\n field: 'id',\n headerName: 'ID',\n flex: 1,\n minWidth: 250,\n },\n {\n field: 'model_name',\n headerName: 'Name',\n flex: 1,\n },\n {\n field: 'address',\n headerName: 'Address',\n flex: 1,\n },\n {\n field: 'accelerators',\n headerName: 'GPU Indexes',\n flex: 1,\n },\n {\n field: 'model_size_in_billions',\n headerName: 'Size',\n flex: 1,\n },\n {\n field: 'quantization',\n headerName: 'Quantization',\n flex: 1,\n },\n {\n field: 'replica',\n headerName: 'Replica',\n flex: 1,\n },\n {\n field: 'url',\n headerName: 'Actions',\n flex: 1,\n minWidth: 200,\n sortable: false,\n filterable: false,\n disableColumnMenu: true,\n renderCell: ({ row }) => {\n const url = row.url\n const openUrl = `${endPoint}/` + url\n const closeUrl = `${endPoint}/v1/models/` + url\n const gradioUrl = `${endPoint}/v1/ui/` + url\n\n if (url === 'IS_LOADING') {\n return <div></div>\n }\n\n return (\n <Box\n style={{\n width: '100%',\n display: 'flex',\n justifyContent: 'left',\n alignItems: 'left',\n }}\n >\n <button\n title=\"Launch Web UI\"\n style={{\n borderWidth: '0px',\n backgroundColor: 'transparent',\n paddingLeft: '0px',\n paddingRight: '10px',\n }}\n onClick={() => {\n if (isCallingApi || isUpdatingModel) {\n // Make sure no ongoing call\n return\n }\n\n setIsCallingApi(true)\n\n fetcher(openUrl, {\n method: 'HEAD',\n })\n .then((response) => {\n if (response.status === 404) {\n // If web UI doesn't exist (404 Not Found)\n console.log('UI does not exist, creating new...')\n return fetcher(gradioUrl, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n model_type: row.model_type,\n model_name: row.model_family,\n model_size_in_billions: row.model_size_in_billions,\n model_format: row.model_format,\n quantization: row.quantization,\n context_length: row.context_length,\n model_ability: row.model_ability,\n model_description: row.model_description,\n model_lang: row.model_lang,\n }),\n })\n .then((response) => response.json())\n .then(() =>\n window.open(openUrl, '_blank', 'noopener noreferrer')\n )\n .finally(() => setIsCallingApi(false))\n } else if (response.ok) {\n // If web UI does exist\n console.log('UI exists, opening...')\n window.open(openUrl, '_blank', 'noopener noreferrer')\n setIsCallingApi(false)\n } else {\n // Other HTTP errors\n console.error(\n `Unexpected response status: ${response.status}`\n )\n setIsCallingApi(false)\n }\n })\n .catch((error) => {\n console.error('Error:', error)\n setIsCallingApi(false)\n })\n }}\n >\n <Box\n width=\"40px\"\n m=\"0 auto\"\n p=\"5px\"\n display=\"flex\"\n justifyContent=\"center\"\n borderRadius=\"4px\"\n style={{\n border: '1px solid #e5e7eb',\n borderWidth: '1px',\n borderColor: '#e5e7eb',\n }}\n >\n <OpenInBrowserOutlinedIcon />\n </Box>\n </button>\n <button\n title=\"Terminate Model\"\n style={{\n borderWidth: '0px',\n backgroundColor: 'transparent',\n paddingLeft: '0px',\n paddingRight: '10px',\n }}\n onClick={() => {\n if (isCallingApi || isUpdatingModel) {\n return\n }\n setIsCallingApi(true)\n fetcher(closeUrl, {\n method: 'DELETE',\n })\n .then((response) => {\n response.json()\n })\n .then(() => {\n setIsCallingApi(false)\n })\n .catch((error) => {\n console.error('Error:', error)\n setIsCallingApi(false)\n })\n }}\n >\n <Box\n width=\"40px\"\n m=\"0 auto\"\n p=\"5px\"\n display=\"flex\"\n justifyContent=\"center\"\n borderRadius=\"4px\"\n style={{\n border: '1px solid #e5e7eb',\n borderWidth: '1px',\n borderColor: '#e5e7eb',\n }}\n >\n <DeleteOutlineOutlinedIcon />\n </Box>\n </button>\n </Box>\n )\n },\n },\n ]\n\n const embeddingModelColumns = [\n {\n field: 'id',\n headerName: 'ID',\n flex: 1,\n minWidth: 250,\n },\n {\n field: 'model_name',\n headerName: 'Name',\n flex: 1,\n },\n {\n field: 'address',\n headerName: 'Address',\n flex: 1,\n },\n {\n field: 'accelerators',\n headerName: 'GPU Indexes',\n flex: 1,\n },\n {\n field: 'replica',\n headerName: 'Replica',\n flex: 1,\n },\n {\n field: 'url',\n headerName: 'Actions',\n flex: 1,\n minWidth: 200,\n sortable: false,\n filterable: false,\n disableColumnMenu: true,\n renderCell: ({ row }) => {\n const url = row.url\n const closeUrl = `${endPoint}/v1/models/` + url\n\n if (url === 'IS_LOADING') {\n return <div></div>\n }\n\n return (\n <Box\n style={{\n width: '100%',\n display: 'flex',\n justifyContent: 'left',\n alignItems: 'left',\n }}\n >\n <button\n title=\"Terminate Model\"\n style={{\n borderWidth: '0px',\n backgroundColor: 'transparent',\n paddingLeft: '0px',\n paddingRight: '10px',\n }}\n onClick={() => {\n if (isCallingApi || isUpdatingModel) {\n return\n }\n setIsCallingApi(true)\n fetcher(closeUrl, {\n method: 'DELETE',\n })\n .then((response) => {\n response.json()\n })\n .then(() => {\n setIsCallingApi(false)\n })\n .catch((error) => {\n console.error('Error:', error)\n setIsCallingApi(false)\n })\n }}\n >\n <Box\n width=\"40px\"\n m=\"0 auto\"\n p=\"5px\"\n display=\"flex\"\n justifyContent=\"center\"\n borderRadius=\"4px\"\n style={{\n border: '1px solid #e5e7eb',\n borderWidth: '1px',\n borderColor: '#e5e7eb',\n }}\n >\n <DeleteOutlineOutlinedIcon />\n </Box>\n </button>\n </Box>\n )\n },\n },\n ]\n const imageModelColumns = [\n {\n field: 'id',\n headerName: 'ID',\n flex: 1,\n minWidth: 250,\n },\n {\n field: 'model_name',\n headerName: 'Name',\n flex: 1,\n },\n {\n field: 'address',\n headerName: 'Address',\n flex: 1,\n },\n {\n field: 'accelerators',\n headerName: 'GPU Indexes',\n flex: 1,\n },\n {\n field: 'url',\n headerName: 'Actions',\n flex: 1,\n minWidth: 200,\n sortable: false,\n filterable: false,\n disableColumnMenu: true,\n renderCell: ({ row }) => {\n //这个url指的是model_uid\n const url = row.url\n console.log('url: ' + url)\n const openUrl = `${endPoint}/` + url\n const closeUrl = `${endPoint}/v1/models/` + url\n const gradioUrl = `${endPoint}/v1/ui/images/` + url\n\n if (url === 'IS_LOADING') {\n return <div></div>\n }\n\n return (\n <Box\n style={{\n width: '100%',\n display: 'flex',\n justifyContent: 'left',\n alignItems: 'left',\n }}\n >\n <button\n title=\"Launch Web UI\"\n style={{\n borderWidth: '0px',\n backgroundColor: 'transparent',\n paddingLeft: '0px',\n paddingRight: '10px',\n }}\n onClick={() => {\n if (isCallingApi || isUpdatingModel) {\n // Make sure no ongoing call\n return\n }\n\n setIsCallingApi(true)\n\n fetcher(openUrl, {\n method: 'HEAD',\n })\n .then((response) => {\n if (response.status === 404) {\n // If web UI doesn't exist (404 Not Found)\n console.log('UI does not exist, creating new...')\n return fetcher(gradioUrl, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n model_type: row.model_type,\n model_family: row.model_family,\n model_id: row.id,\n controlnet: row.controlnet,\n model_revision: row.model_revision,\n model_name: row.model_name,\n model_ability: row.model_ability,\n }),\n })\n .then((response) => response.json())\n .then(() =>\n window.open(openUrl, '_blank', 'noopener noreferrer')\n )\n .finally(() => setIsCallingApi(false))\n } else if (response.ok) {\n // If web UI does exist\n console.log('UI exists, opening...')\n window.open(openUrl, '_blank', 'noopener noreferrer')\n setIsCallingApi(false)\n } else {\n // Other HTTP errors\n console.error(\n `Unexpected response status: ${response.status}`\n )\n setIsCallingApi(false)\n }\n })\n .catch((error) => {\n console.error('Error:', error)\n setIsCallingApi(false)\n })\n }}\n >\n <Box\n width=\"40px\"\n m=\"0 auto\"\n p=\"5px\"\n display=\"flex\"\n justifyContent=\"center\"\n borderRadius=\"4px\"\n style={{\n border: '1px solid #e5e7eb',\n borderWidth: '1px',\n borderColor: '#e5e7eb',\n }}\n >\n <OpenInBrowserOutlinedIcon />\n </Box>\n </button>\n <button\n title=\"Terminate Model\"\n style={{\n borderWidth: '0px',\n backgroundColor: 'transparent',\n paddingLeft: '0px',\n paddingRight: '10px',\n }}\n onClick={() => {\n if (isCallingApi || isUpdatingModel) {\n return\n }\n setIsCallingApi(true)\n fetcher(closeUrl, {\n method: 'DELETE',\n })\n .then((response) => {\n response.json()\n })\n .then(() => {\n setIsCallingApi(false)\n })\n .catch((error) => {\n console.error('Error:', error)\n setIsCallingApi(false)\n })\n }}\n >\n <Box\n width=\"40px\"\n m=\"0 auto\"\n p=\"5px\"\n display=\"flex\"\n justifyContent=\"center\"\n borderRadius=\"4px\"\n style={{\n border: '1px solid #e5e7eb',\n borderWidth: '1px',\n borderColor: '#e5e7eb',\n }}\n >\n <DeleteOutlineOutlinedIcon />\n </Box>\n </button>\n </Box>\n )\n },\n },\n ]\n const audioModelColumns = embeddingModelColumns\n const videoModelColumns = embeddingModelColumns\n const rerankModelColumns = embeddingModelColumns\n const flexibleModelColumns = embeddingModelColumns\n\n const dataGridStyle = {\n '& .MuiDataGrid-cell': {\n borderBottom: 'none',\n },\n '& .MuiDataGrid-columnHeaders': {\n borderBottom: 'none',\n },\n '& .MuiDataGrid-columnHeaderTitle': {\n fontWeight: 'bold',\n },\n '& .MuiDataGrid-virtualScroller': {\n overflowX: 'visible !important',\n overflow: 'visible',\n },\n '& .MuiDataGrid-footerContainer': {\n borderTop: 'none',\n },\n 'border-width': '0px',\n }\n\n const noRowsOverlay = () => {\n return (\n <Stack height=\"100%\" alignItems=\"center\" justifyContent=\"center\">\n No Running Models\n </Stack>\n )\n }\n\n const noResultsOverlay = () => {\n return (\n <Stack height=\"100%\" alignItems=\"center\" justifyContent=\"center\">\n No Running Models Matches\n </Stack>\n )\n }\n\n return (\n <Box\n sx={{\n height: '100%',\n width: '100%',\n padding: '20px 20px 0 20px',\n }}\n >\n <Title title=\"Running Models\" />\n <ErrorMessageSnackBar />\n <TabContext value={tabValue}>\n <Box sx={{ borderBottom: 1, borderColor: 'divider' }}>\n <TabList\n value={tabValue}\n onChange={handleTabChange}\n aria-label=\"tabs\"\n >\n <Tab label=\"Language Models\" value=\"/running_models/LLM\" />\n <Tab label=\"Embedding Models\" value=\"/running_models/embedding\" />\n <Tab label=\"Rerank models\" value=\"/running_models/rerank\" />\n <Tab label=\"Image models\" value=\"/running_models/image\" />\n <Tab label=\"Audio models\" value=\"/running_models/audio\" />\n <Tab label=\"Video models\" value=\"/running_models/video\" />\n <Tab label=\"Flexible models\" value=\"/running_models/flexible\" />\n </TabList>\n </Box>\n <TabPanel value=\"/running_models/LLM\" sx={{ padding: 0 }}>\n <Box sx={{ height: '100%', width: '100%' }}>\n <DataGrid\n rows={llmData}\n columns={llmColumns}\n autoHeight={true}\n sx={dataGridStyle}\n slots={{\n noRowsOverlay: noRowsOverlay,\n noResultsOverlay: noResultsOverlay,\n }}\n />\n </Box>\n </TabPanel>\n <TabPanel value=\"/running_models/embedding\" sx={{ padding: 0 }}>\n <Box sx={{ height: '100%', width: '100%' }}>\n <DataGrid\n rows={embeddingModelData}\n columns={embeddingModelColumns}\n autoHeight={true}\n sx={dataGridStyle}\n slots={{\n noRowsOverlay: noRowsOverlay,\n noResultsOverlay: noResultsOverlay,\n }}\n />\n </Box>\n </TabPanel>\n <TabPanel value=\"/running_models/rerank\" sx={{ padding: 0 }}>\n <Box sx={{ height: '100%', width: '100%' }}>\n <DataGrid\n rows={rerankModelData}\n columns={rerankModelColumns}\n autoHeight={true}\n sx={dataGridStyle}\n slots={{\n noRowsOverlay: noRowsOverlay,\n noResultsOverlay: noResultsOverlay,\n }}\n />\n </Box>\n </TabPanel>\n <TabPanel value=\"/running_models/image\" sx={{ padding: 0 }}>\n <Box sx={{ height: '100%', width: '100%' }}>\n <DataGrid\n rows={imageModelData}\n columns={imageModelColumns}\n autoHeight={true}\n sx={dataGridStyle}\n slots={{\n noRowsOverlay: noRowsOverlay,\n noResultsOverlay: noResultsOverlay,\n }}\n />\n </Box>\n </TabPanel>\n <TabPanel value=\"/running_models/audio\" sx={{ padding: 0 }}>\n <Box sx={{ height: '100%', width: '100%' }}>\n <DataGrid\n rows={audioModelData}\n columns={audioModelColumns}\n autoHeight={true}\n sx={dataGridStyle}\n slots={{\n noRowsOverlay: noRowsOverlay,\n noResultsOverlay: noResultsOverlay,\n }}\n />\n </Box>\n </TabPanel>\n <TabPanel value=\"/running_models/video\" sx={{ padding: 0 }}>\n <Box sx={{ height: '100%', width: '100%' }}>\n <DataGrid\n rows={videoModelData}\n columns={videoModelColumns}\n autoHeight={true}\n sx={dataGridStyle}\n slots={{\n noRowsOverlay: noRowsOverlay,\n noResultsOverlay: noResultsOverlay,\n }}\n />\n </Box>\n </TabPanel>\n <TabPanel value=\"/running_models/flexible\" sx={{ padding: 0 }}>\n <Box sx={{ height: '100%', width: '100%' }}>\n <DataGrid\n rows={flexibleModelData}\n columns={flexibleModelColumns}\n autoHeight={true}\n sx={dataGridStyle}\n slots={{\n noRowsOverlay: noRowsOverlay,\n noResultsOverlay: noResultsOverlay,\n }}\n />\n </Box>\n </TabPanel>\n </TabContext>\n </Box>\n )\n}\n\nexport default RunningModels\n"],"mappings":"yRAAA,MAAO,CAAAA,yBAAyB,KAAM,2CAA2C,CACjF,MAAO,CAAAC,yBAAyB,KAAM,2CAA2C,CACjF,OAASC,UAAU,CAAEC,OAAO,CAAEC,QAAQ,KAAQ,UAAU,CACxD,OAASC,GAAG,CAAEC,KAAK,CAAEC,GAAG,KAAQ,eAAe,CAC/C,OAASC,QAAQ,KAAQ,kBAAkB,CAC3C,MAAO,CAAAC,KAAK,EAAIC,UAAU,CAAEC,SAAS,CAAEC,QAAQ,KAAQ,OAAO,CAC9D,OAASC,UAAU,KAAQ,cAAc,CACzC,OAASC,WAAW,KAAQ,kBAAkB,CAE9C,OAASC,UAAU,KAAQ,6BAA6B,CACxD,MAAO,CAAAC,oBAAoB,KAAM,uCAAuC,CACxE,MAAO,CAAAC,OAAO,KAAM,0BAA0B,CAC9C,MAAO,CAAAC,YAAY,K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I,QAAA,cACzCtG,IAAA,CAACd,QAAQ,EACP6K,IAAI,CAAElI,cAAe,CACrBmI,OAAO,CAAElB,iBAAkB,CAC3BmB,UAAU,CAAE,IAAK,CACjBP,EAAE,CAAET,aAAc,CAClBiB,KAAK,CAAE,CACLX,aAAa,CAAEA,aAAa,CAC5BE,gBAAgB,CAAEA,gBACpB,CAAE,CACH,CAAC,CACC,CAAC,CACE,CAAC,cACXzJ,IAAA,CAAClB,QAAQ,EAAC8K,KAAK,CAAC,0BAA0B,CAACF,EAAE,CAAE,CAAEC,OAAO,CAAE,CAAE,CAAE,CAAArD,QAAA,cAC5DtG,IAAA,CAACjB,GAAG,EAAC2K,EAAE,CAAE,CAAEF,MAAM,CAAE,MAAM,CAAEtD,KAAK,CAAE,MAAO,CAAE,CAAAI,QAAA,cACzCtG,IAAA,CAACd,QAAQ,EACP6K,IAAI,CAAE1H,iBAAkB,CACxB2H,OAAO,CAAEhB,oBAAqB,CAC9BiB,UAAU,CAAE,IAAK,CACjBP,EAAE,CAAET,aAAc,CAClBiB,KAAK,CAAE,CACLX,aAAa,CAAEA,aAAa,CAC5BE,gBAAgB,CAAEA,gBACpB,CAAE,CACH,CAAC,CACC,CAAC,CACE,CAAC,EACD,CAAC,EACV,CAAC,CAEV,CAAC,CAED,cAAe,CAAAtJ,aAAa","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -0,0 +1 @@
1
+ {"ast":null,"code":"import _slicedToArray from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import ExitToAppIcon from'@mui/icons-material/ExitToApp';import{Box,Stack,Typography}from'@mui/material';import Button from'@mui/material/Button';import{useCookies}from'react-cookie';import{useNavigate}from'react-router-dom';import{isValidBearerToken}from'./utils';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var Title=function Title(_ref){var title=_ref.title;var _useCookies=useCookies(['token']),_useCookies2=_slicedToArray(_useCookies,3),cookie=_useCookies2[0],removeCookie=_useCookies2[2];var navigate=useNavigate();var handleLogout=function handleLogout(){removeCookie('token',{path:'/'});sessionStorage.removeItem('token');sessionStorage.removeItem('auth');sessionStorage.removeItem('modelType');sessionStorage.removeItem('lastActiveUrl');sessionStorage.removeItem('runningModelType');sessionStorage.removeItem('registerModelType');navigate('/login',{replace:true});};return/*#__PURE__*/_jsx(Box,{mb:\"30px\",children:/*#__PURE__*/_jsxs(Stack,{direction:\"row\",alignItems:\"center\",justifyContent:\"space-between\",children:[/*#__PURE__*/_jsx(Typography,{variant:\"h2\",color:\"#141414\",fontWeight:\"bold\",sx:{m:'0 0 5px 0'},children:title}),(isValidBearerToken(cookie.token)||isValidBearerToken(sessionStorage.getItem('token')))&&/*#__PURE__*/_jsx(Button,{variant:\"outlined\",size:\"large\",onClick:handleLogout,startIcon:/*#__PURE__*/_jsx(ExitToAppIcon,{}),children:\"LOG OUT\"})]})});};export default Title;","map":{"version":3,"names":["ExitToAppIcon","Box","Stack","Typography","Button","useCookies","useNavigate","isValidBearerToken","jsx","_jsx","jsxs","_jsxs","Title","_ref","title","_useCookies","_useCookies2","_slicedToArray","cookie","removeCookie","navigate","handleLogout","path","sessionStorage","removeItem","replace","mb","children","direction","alignItems","justifyContent","variant","color","fontWeight","sx","m","token","getItem","size","onClick","startIcon"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/components/Title.js"],"sourcesContent":["import ExitToAppIcon from '@mui/icons-material/ExitToApp'\nimport { Box, Stack, Typography } from '@mui/material'\nimport Button from '@mui/material/Button'\nimport { useCookies } from 'react-cookie'\nimport { useNavigate } from 'react-router-dom'\n\nimport { isValidBearerToken } from './utils'\n\nconst Title = ({ title }) => {\n const [cookie, , removeCookie] = useCookies(['token'])\n const navigate = useNavigate()\n\n const handleLogout = () => {\n removeCookie('token', { path: '/' })\n sessionStorage.removeItem('token')\n sessionStorage.removeItem('auth')\n sessionStorage.removeItem('modelType')\n sessionStorage.removeItem('lastActiveUrl')\n sessionStorage.removeItem('runningModelType')\n sessionStorage.removeItem('registerModelType')\n navigate('/login', { replace: true })\n }\n\n return (\n <Box mb=\"30px\">\n <Stack direction=\"row\" alignItems=\"center\" justifyContent=\"space-between\">\n <Typography\n variant=\"h2\"\n color=\"#141414\"\n fontWeight=\"bold\"\n sx={{ m: '0 0 5px 0' }}\n >\n {title}\n </Typography>\n {(isValidBearerToken(cookie.token) ||\n isValidBearerToken(sessionStorage.getItem('token'))) && (\n <Button\n variant=\"outlined\"\n size=\"large\"\n onClick={handleLogout}\n startIcon={<ExitToAppIcon />}\n >\n LOG OUT\n </Button>\n )}\n </Stack>\n </Box>\n )\n}\n\nexport default Title\n"],"mappings":"6IAAA,MAAO,CAAAA,aAAa,KAAM,+BAA+B,CACzD,OAASC,GAAG,CAAEC,KAAK,CAAEC,UAAU,KAAQ,eAAe,CACtD,MAAO,CAAAC,MAAM,KAAM,sBAAsB,CACzC,OAASC,UAAU,KAAQ,cAAc,CACzC,OAASC,WAAW,KAAQ,kBAAkB,CAE9C,OAASC,kBAAkB,KAAQ,SAAS,QAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,IAAAC,KAAA,yBAE5C,GAAM,CAAAC,KAAK,CAAG,QAAR,CAAAA,KAAKA,CAAAC,IAAA,CAAkB,IAAZ,CAAAC,KAAK,CAAAD,IAAA,CAALC,KAAK,CACpB,IAAAC,WAAA,CAAiCV,UAAU,CAAC,CAAC,OAAO,CAAC,CAAC,CAAAW,YAAA,CAAAC,cAAA,CAAAF,WAAA,IAA/CG,MAAM,CAAAF,YAAA,IAAIG,YAAY,CAAAH,YAAA,IAC7B,GAAM,CAAAI,QAAQ,CAAGd,WAAW,CAAC,CAAC,CAE9B,GAAM,CAAAe,YAAY,CAAG,QAAf,CAAAA,YAAYA,CAAA,CAAS,CACzBF,YAAY,CAAC,OAAO,CAAE,CAAEG,IAAI,CAAE,GAAI,CAAC,CAAC,CACpCC,cAAc,CAACC,UAAU,CAAC,OAAO,CAAC,CAClCD,cAAc,CAACC,UAAU,CAAC,MAAM,CAAC,CACjCD,cAAc,CAACC,UAAU,CAAC,WAAW,CAAC,CACtCD,cAAc,CAACC,UAAU,CAAC,eAAe,CAAC,CAC1CD,cAAc,CAACC,UAAU,CAAC,kBAAkB,CAAC,CAC7CD,cAAc,CAACC,UAAU,CAAC,mBAAmB,CAAC,CAC9CJ,QAAQ,CAAC,QAAQ,CAAE,CAAEK,OAAO,CAAE,IAAK,CAAC,CAAC,CACvC,CAAC,CAED,mBACEhB,IAAA,CAACR,GAAG,EAACyB,EAAE,CAAC,MAAM,CAAAC,QAAA,cACZhB,KAAA,CAACT,KAAK,EAAC0B,SAAS,CAAC,KAAK,CAACC,UAAU,CAAC,QAAQ,CAACC,cAAc,CAAC,eAAe,CAAAH,QAAA,eACvElB,IAAA,CAACN,UAAU,EACT4B,OAAO,CAAC,IAAI,CACZC,KAAK,CAAC,SAAS,CACfC,UAAU,CAAC,MAAM,CACjBC,EAAE,CAAE,CAAEC,CAAC,CAAE,WAAY,CAAE,CAAAR,QAAA,CAEtBb,KAAK,CACI,CAAC,CACZ,CAACP,kBAAkB,CAACW,MAAM,CAACkB,KAAK,CAAC,EAChC7B,kBAAkB,CAACgB,cAAc,CAACc,OAAO,CAAC,OAAO,CAAC,CAAC,gBACnD5B,IAAA,CAACL,MAAM,EACL2B,OAAO,CAAC,UAAU,CAClBO,IAAI,CAAC,OAAO,CACZC,OAAO,CAAElB,YAAa,CACtBmB,SAAS,cAAE/B,IAAA,CAACT,aAAa,GAAE,CAAE,CAAA2B,QAAA,CAC9B,SAED,CAAQ,CACT,EACI,CAAC,CACL,CAAC,CAEV,CAAC,CAED,cAAe,CAAAf,KAAK","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -0,0 +1 @@
1
+ {"ast":null,"code":"import _objectSpread from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/objectSpread2.js\";import{Cookies}from'react-cookie';var cookies=new Cookies();var updateOptions=function updateOptions(url,options){var update=_objectSpread({},options);if(cookies.get('token')!=='no_auth'&&sessionStorage.getItem('token')!=='no_auth'){update.headers=_objectSpread(_objectSpread({},update.headers),{},{Authorization:'Bearer '+sessionStorage.getItem('token')});}return update;};export default function fetcher(url,options){return fetch(url,updateOptions(url,options)).then(function(res){// For the situation that server has already been restarted, the current token may become invalid,\n// which leads to UI hangs.\nif(res.status==401&&localStorage.getItem('authStatus')!=='401'){localStorage.setItem('authStatus','401');window.dispatchEvent(new Event('auth-status'));}else if(res.status==403&&localStorage.getItem('authStatus')!=='403'){localStorage.setItem('authStatus','403');window.dispatchEvent(new Event('auth-status'));}else{return res;}});}","map":{"version":3,"names":["Cookies","cookies","updateOptions","url","options","update","_objectSpread","get","sessionStorage","getItem","headers","Authorization","fetcher","fetch","then","res","status","localStorage","setItem","window","dispatchEvent","Event"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/components/fetcher.js"],"sourcesContent":["import { Cookies } from 'react-cookie'\n\nconst cookies = new Cookies()\n\nconst updateOptions = (url, options) => {\n const update = { ...options }\n if (\n cookies.get('token') !== 'no_auth' &&\n sessionStorage.getItem('token') !== 'no_auth'\n ) {\n update.headers = {\n ...update.headers,\n Authorization: 'Bearer ' + sessionStorage.getItem('token'),\n }\n }\n return update\n}\n\nexport default function fetcher(url, options) {\n return fetch(url, updateOptions(url, options)).then((res) => {\n // For the situation that server has already been restarted, the current token may become invalid,\n // which leads to UI hangs.\n if (res.status == 401 && localStorage.getItem('authStatus') !== '401') {\n localStorage.setItem('authStatus', '401')\n window.dispatchEvent(new Event('auth-status'))\n } else if (\n res.status == 403 &&\n localStorage.getItem('authStatus') !== '403'\n ) {\n localStorage.setItem('authStatus', '403')\n window.dispatchEvent(new Event('auth-status'))\n } else {\n return res\n }\n })\n}\n"],"mappings":"4IAAA,OAASA,OAAO,KAAQ,cAAc,CAEtC,GAAM,CAAAC,OAAO,CAAG,GAAI,CAAAD,OAAO,CAAC,CA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":{},"sourceType":"module","externalDependencies":[]}
@@ -0,0 +1 @@
1
+ {"ast":null,"code":"import _slicedToArray from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import{Box}from'@mui/material';import Paper from'@mui/material/Paper';import Grid from'@mui/material/Unstable_Grid2';import React,{useContext,useEffect}from'react';import{useCookies}from'react-cookie';import{useNavigate}from'react-router-dom';import{ApiContext}from'../../components/apiContext';import TableTitle from'../../components/tableTitle';import Title from'../../components/Title';import{isValidBearerToken}from'../../components/utils';import NodeInfo from'./nodeInfo';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var ClusterInfo=function ClusterInfo(){var endPoint=useContext(ApiContext).endPoint;var _useCookies=useCookies(['token']),_useCookies2=_slicedToArray(_useCookies,1),cookie=_useCookies2[0];var navigate=useNavigate();useEffect(function(){if(sessionStorage.getItem('auth')==='true'&&!isValidBearerToken(sessionStorage.getItem('token'))&&!isValidBearerToken(cookie.token)){navigate('/login',{replace:true});}},[cookie.token]);var handleGoBack=function handleGoBack(){var lastUrl=sessionStorage.getItem('lastActiveUrl');if(lastUrl==='launch_model'){navigate(sessionStorage.getItem('modelType'));}else if(lastUrl==='running_models'){navigate(sessionStorage.getItem('runningModelType'));}else if(lastUrl==='register_model'){navigate(sessionStorage.getItem('registerModelType'));}else{navigate('/launch_model/llm');}};return/*#__PURE__*/_jsxs(Box,{sx:{height:'100%',width:'100%',padding:'20px 20px 0 20px'},children:[/*#__PURE__*/_jsx(Title,{title:\"Cluster Information\"}),/*#__PURE__*/_jsxs(Grid,{container:true,spacing:3,style:{width:'100%'},children:[/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsxs(Paper,{sx:{padding:2,display:'flex',overflow:'auto',flexDirection:'column'},children:[/*#__PURE__*/_jsx(TableTitle,{children:\"Supervisor\"}),/*#__PURE__*/_jsx(NodeInfo,{nodeRole:\"Supervisor\",endpoint:endPoint,cookie:cookie,handleGoBack:handleGoBack})]})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsxs(Paper,{sx:{padding:2,display:'flex',overflow:'auto',flexDirection:'column'},children:[/*#__PURE__*/_jsx(TableTitle,{children:\"Workers\"}),/*#__PURE__*/_jsx(NodeInfo,{nodeRole:\"Worker\",endpoint:endPoint,cookie:cookie,handleGoBack:handleGoBack})]})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsxs(Paper,{sx:{padding:2,display:'flex',overflow:'auto',flexDirection:'column'},children:[/*#__PURE__*/_jsx(TableTitle,{children:\"Worker Details\"}),/*#__PURE__*/_jsx(NodeInfo,{nodeRole:\"Worker-Details\",endpoint:endPoint,cookie:cookie,handleGoBack:handleGoBack})]})})]})]});};export default ClusterInfo;","map":{"version":3,"names":["Box","Paper","Grid","React","useContext","useEffect","useCookies","useNavigate","ApiContext","TableTitle","Title","isValidBearerToken","NodeInfo","jsx","_jsx","jsxs","_jsxs","ClusterInfo","endPoint","_useCookies","_useCookies2","_slicedToArray","cookie","navigate","sessionStorage","getItem","token","replace","handleGoBack","lastUrl","sx","height","width","padding","children","title","container","spacing","style","item","xs","display","overflow","flexDirection","nodeRole","endpoint"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/scenes/cluster_info/index.js"],"sourcesContent":["import { Box } from '@mui/material'\nimport Paper from '@mui/material/Paper'\nimport Grid from '@mui/material/Unstable_Grid2'\nimport React, { useContext, useEffect } from 'react'\nimport { useCookies } from 'react-cookie'\nimport { useNavigate } from 'react-router-dom'\n\nimport { ApiContext } from '../../components/apiContext'\nimport TableTitle from '../../components/tableTitle'\nimport Title from '../../components/Title'\nimport { isValidBearerToken } from '../../components/utils'\nimport NodeInfo from './nodeInfo'\n\nconst ClusterInfo = () => {\n const endPoint = useContext(ApiContext).endPoint\n const [cookie] = useCookies(['token'])\n const navigate = useNavigate()\n\n useEffect(() => {\n if (\n sessionStorage.getItem('auth') === 'true' &&\n !isValidBearerToken(sessionStorage.getItem('token')) &&\n !isValidBearerToken(cookie.token)\n ) {\n navigate('/login', { replace: true })\n }\n }, [cookie.token])\n\n const handleGoBack = () => {\n const lastUrl = sessionStorage.getItem('lastActiveUrl')\n if (lastUrl === 'launch_model') {\n navigate(sessionStorage.getItem('modelType'))\n } else if (lastUrl === 'running_models') {\n navigate(sessionStorage.getItem('runningModelType'))\n } else if (lastUrl === 'register_model') {\n navigate(sessionStorage.getItem('registerModelType'))\n } else {\n navigate('/launch_model/llm')\n }\n }\n\n return (\n <Box\n sx={{\n height: '100%',\n width: '100%',\n padding: '20px 20px 0 20px',\n }}\n >\n <Title title=\"Cluster Information\" />\n <Grid container spacing={3} style={{ width: '100%' }}>\n <Grid item xs={12}>\n <Paper\n sx={{\n padding: 2,\n display: 'flex',\n overflow: 'auto',\n flexDirection: 'column',\n }}\n >\n <TableTitle>Supervisor</TableTitle>\n <NodeInfo\n nodeRole=\"Supervisor\"\n endpoint={endPoint}\n cookie={cookie}\n handleGoBack={handleGoBack}\n />\n </Paper>\n </Grid>\n <Grid item xs={12}>\n <Paper\n sx={{\n padding: 2,\n display: 'flex',\n overflow: 'auto',\n flexDirection: 'column',\n }}\n >\n <TableTitle>Workers</TableTitle>\n <NodeInfo\n nodeRole=\"Worker\"\n endpoint={endPoint}\n cookie={cookie}\n handleGoBack={handleGoBack}\n />\n </Paper>\n </Grid>\n <Grid item xs={12}>\n <Paper\n sx={{\n padding: 2,\n display: 'flex',\n overflow: 'auto',\n flexDirection: 'column',\n }}\n >\n <TableTitle>Worker Details</TableTitle>\n <NodeInfo\n nodeRole=\"Worker-Details\"\n endpoint={endPoint}\n cookie={cookie}\n handleGoBack={handleGoBack}\n />\n </Paper>\n </Grid>\n </Grid>\n </Box>\n )\n}\n\nexport default ClusterInfo\n"],"mappings":"6IAAA,OAASA,GAAG,KAAQ,eAAe,CACnC,MAAO,CAAAC,KAAK,KAAM,qBAAqB,CACvC,MAAO,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,CAAE,EAAG,CAAAN,QAAA,cAChBlB,KAAA,CAACf,KAAK,EACJ6B,EAAE,CAAE,CACFG,OAAO,CAAE,CAAC,CACVQ,OAAO,CAAE,MAAM,CACfC,QAAQ,CAAE,MAAM,CAChBC,aAAa,CAAE,QACjB,CAAE,CAAAT,QAAA,eAEFpB,IAAA,CAACL,UAAU,EAAAyB,QAAA,CAAC,SAAO,CAAY,CAAC,cAChCpB,IAAA,CAACF,QAAQ,EACPgC,QAAQ,CAAC,QAAQ,CACjBC,QAAQ,CAAE3B,QAAS,CACnBI,MAAM,CAAEA,MAAO,CACfM,YAAY,CAAEA,YAAa,CAC5B,CAAC,EACG,CAAC,CACJ,CAAC,cACPd,IAAA,CAACZ,IAAI,EAACqC,IAAI,MAACC,EAAE,CAAE,EAAG,CAAAN,QAAA,cAChBlB,KAAA,CAACf,KAAK,EACJ6B,EAAE,CAAE,CACFG,OAAO,CAAE,CAAC,CACVQ,OAAO,CAAE,MAAM,CACfC,QAAQ,CAAE,MAAM,CAChBC,aAAa,CAAE,QACjB,CAAE,CAAAT,QAAA,eAEFpB,IAAA,CAACL,UAAU,EAAAyB,QAAA,CAAC,gBAAc,CAAY,CAAC,cACvCpB,IAAA,CAACF,QAAQ,EACPgC,QAAQ,CAAC,gBAAgB,CACzBC,QAAQ,CAAE3B,QAAS,CACnBI,MAAM,CAAEA,MAAO,CACfM,YAAY,CAAEA,YAAa,CAC5B,CAAC,EACG,CAAC,CACJ,CAAC,EACH,CAAC,EACJ,CAAC,CAEV,CAAC,CAED,cAAe,CAAAX,WAAW","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: xinference
3
- Version: 0.14.1.post1
3
+ Version: 0.14.3
4
4
  Summary: Model Serving Made Easy
5
5
  Home-page: https://github.com/xorbitsai/inference
6
6
  Author: Qin Xuye
@@ -33,8 +33,6 @@ Requires-Dist: fastapi==0.110.3
33
33
  Requires-Dist: uvicorn
34
34
  Requires-Dist: huggingface-hub>=0.19.4
35
35
  Requires-Dist: typing-extensions
36
- Requires-Dist: fsspec==2023.10.0
37
- Requires-Dist: s3fs==2023.10.0
38
36
  Requires-Dist: modelscope>=1.10.0
39
37
  Requires-Dist: sse-starlette>=1.6.5
40
38
  Requires-Dist: openai<1.40,>1
@@ -45,7 +43,6 @@ Requires-Dist: pynvml
45
43
  Requires-Dist: async-timeout
46
44
  Requires-Dist: peft
47
45
  Requires-Dist: timm
48
- Requires-Dist: opencv-contrib-python
49
46
  Provides-Extra: all
50
47
  Requires-Dist: llama-cpp-python!=0.2.58,>=0.2.25; extra == "all"
51
48
  Requires-Dist: transformers>=4.43.2; extra == "all"
@@ -58,7 +55,7 @@ Requires-Dist: protobuf; extra == "all"
58
55
  Requires-Dist: einops; extra == "all"
59
56
  Requires-Dist: tiktoken; extra == "all"
60
57
  Requires-Dist: sentence-transformers>=2.7.0; extra == "all"
61
- Requires-Dist: diffusers>=0.25.0; extra == "all"
58
+ Requires-Dist: diffusers>=0.30.0; extra == "all"
62
59
  Requires-Dist: imageio-ffmpeg; extra == "all"
63
60
  Requires-Dist: controlnet-aux; extra == "all"
64
61
  Requires-Dist: orjson; extra == "all"
@@ -77,11 +74,18 @@ Requires-Dist: xxhash; extra == "all"
77
74
  Requires-Dist: torchaudio; extra == "all"
78
75
  Requires-Dist: ChatTTS>0.1; extra == "all"
79
76
  Requires-Dist: HyperPyYAML; extra == "all"
80
- Requires-Dist: matcha-tts; extra == "all"
77
+ Requires-Dist: matcha-tts>=0.0.7; extra == "all"
81
78
  Requires-Dist: onnxruntime==1.16.0; extra == "all"
82
79
  Requires-Dist: openai-whisper; extra == "all"
83
80
  Requires-Dist: boto3<1.28.65,>=1.28.55; extra == "all"
84
81
  Requires-Dist: tensorizer~=2.9.0; extra == "all"
82
+ Requires-Dist: eva-decord; extra == "all"
83
+ Requires-Dist: jj-pytorchvideo; extra == "all"
84
+ Requires-Dist: loguru; extra == "all"
85
+ Requires-Dist: natsort; extra == "all"
86
+ Requires-Dist: loralib; extra == "all"
87
+ Requires-Dist: opencc==1.1.6; extra == "all"
88
+ Requires-Dist: faster-whisper; extra == "all"
85
89
  Requires-Dist: auto-gptq; sys_platform != "darwin" and extra == "all"
86
90
  Requires-Dist: autoawq<0.2.6; sys_platform != "darwin" and extra == "all"
87
91
  Requires-Dist: mlx-lm; (sys_platform == "darwin" and platform_machine == "arm64") and extra == "all"
@@ -97,9 +101,14 @@ Requires-Dist: xxhash; extra == "audio"
97
101
  Requires-Dist: torchaudio; extra == "audio"
98
102
  Requires-Dist: ChatTTS>0.1; extra == "audio"
99
103
  Requires-Dist: HyperPyYAML; extra == "audio"
100
- Requires-Dist: matcha-tts; extra == "audio"
104
+ Requires-Dist: matcha-tts>=0.0.7; extra == "audio"
101
105
  Requires-Dist: onnxruntime==1.16.0; extra == "audio"
102
106
  Requires-Dist: openai-whisper; extra == "audio"
107
+ Requires-Dist: loguru; extra == "audio"
108
+ Requires-Dist: natsort; extra == "audio"
109
+ Requires-Dist: loralib; extra == "audio"
110
+ Requires-Dist: opencc==1.1.6; extra == "audio"
111
+ Requires-Dist: faster-whisper; extra == "audio"
103
112
  Provides-Extra: benchmark
104
113
  Requires-Dist: psutil; extra == "benchmark"
105
114
  Provides-Extra: dev
@@ -118,7 +127,6 @@ Requires-Dist: jieba>=0.42.0; extra == "dev"
118
127
  Requires-Dist: flake8>=3.8.0; extra == "dev"
119
128
  Requires-Dist: black; extra == "dev"
120
129
  Requires-Dist: openai<1.40,>1; extra == "dev"
121
- Requires-Dist: opencv-contrib-python; extra == "dev"
122
130
  Requires-Dist: langchain; extra == "dev"
123
131
  Requires-Dist: langchain-community; extra == "dev"
124
132
  Requires-Dist: orjson; extra == "dev"
@@ -133,17 +141,16 @@ Requires-Dist: sphinx-tabs; extra == "doc"
133
141
  Requires-Dist: sphinx-design; extra == "doc"
134
142
  Requires-Dist: prometheus-client; extra == "doc"
135
143
  Requires-Dist: timm; extra == "doc"
136
- Requires-Dist: opencv-contrib-python; extra == "doc"
137
144
  Provides-Extra: embedding
138
145
  Requires-Dist: sentence-transformers>=2.7.0; extra == "embedding"
139
- Provides-Extra: ggml
140
- Requires-Dist: llama-cpp-python!=0.2.58,>=0.2.25; extra == "ggml"
141
146
  Provides-Extra: image
142
- Requires-Dist: diffusers>=0.25.0; extra == "image"
147
+ Requires-Dist: diffusers>=0.30.0; extra == "image"
143
148
  Requires-Dist: controlnet-aux; extra == "image"
144
149
  Provides-Extra: intel
145
150
  Requires-Dist: torch==2.1.0a0; extra == "intel"
146
151
  Requires-Dist: intel-extension-for-pytorch==2.1.10+xpu; extra == "intel"
152
+ Provides-Extra: llama_cpp
153
+ Requires-Dist: llama-cpp-python!=0.2.58,>=0.2.25; extra == "llama-cpp"
147
154
  Provides-Extra: mlx
148
155
  Requires-Dist: mlx-lm; extra == "mlx"
149
156
  Provides-Extra: rerank
@@ -167,10 +174,12 @@ Requires-Dist: attrdict; extra == "transformers"
167
174
  Requires-Dist: timm>=0.9.16; extra == "transformers"
168
175
  Requires-Dist: torchvision; extra == "transformers"
169
176
  Requires-Dist: peft; extra == "transformers"
177
+ Requires-Dist: eva-decord; extra == "transformers"
178
+ Requires-Dist: jj-pytorchvideo; extra == "transformers"
170
179
  Requires-Dist: auto-gptq; sys_platform != "darwin" and extra == "transformers"
171
180
  Requires-Dist: autoawq<0.2.6; sys_platform != "darwin" and extra == "transformers"
172
181
  Provides-Extra: video
173
- Requires-Dist: diffusers; extra == "video"
182
+ Requires-Dist: diffusers>=0.30.0; extra == "video"
174
183
  Requires-Dist: imageio-ffmpeg; extra == "video"
175
184
  Provides-Extra: vllm
176
185
  Requires-Dist: vllm>=0.2.6; extra == "vllm"