xinference 0.13.0__py3-none-any.whl → 0.13.1__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 (66) hide show
  1. xinference/_version.py +3 -3
  2. xinference/api/restful_api.py +50 -2
  3. xinference/client/restful/restful_client.py +49 -2
  4. xinference/core/model.py +15 -0
  5. xinference/core/supervisor.py +132 -15
  6. xinference/core/worker.py +165 -8
  7. xinference/deploy/cmdline.py +5 -0
  8. xinference/model/audio/chattts.py +6 -6
  9. xinference/model/audio/core.py +23 -15
  10. xinference/model/core.py +12 -3
  11. xinference/model/embedding/core.py +25 -16
  12. xinference/model/flexible/__init__.py +40 -0
  13. xinference/model/flexible/core.py +228 -0
  14. xinference/model/flexible/launchers/__init__.py +15 -0
  15. xinference/model/flexible/launchers/transformers_launcher.py +63 -0
  16. xinference/model/flexible/utils.py +33 -0
  17. xinference/model/image/core.py +18 -14
  18. xinference/model/image/custom.py +1 -1
  19. xinference/model/llm/__init__.py +0 -2
  20. xinference/model/llm/core.py +3 -2
  21. xinference/model/llm/ggml/llamacpp.py +1 -10
  22. xinference/model/llm/llm_family.json +52 -35
  23. xinference/model/llm/llm_family.py +71 -46
  24. xinference/model/llm/llm_family_modelscope.json +55 -27
  25. xinference/model/llm/pytorch/core.py +0 -80
  26. xinference/model/llm/utils.py +4 -2
  27. xinference/model/rerank/core.py +24 -25
  28. xinference/types.py +0 -1
  29. xinference/web/ui/build/asset-manifest.json +3 -3
  30. xinference/web/ui/build/index.html +1 -1
  31. xinference/web/ui/build/static/js/{main.0fb6f3ab.js → main.95c1d652.js} +3 -3
  32. xinference/web/ui/build/static/js/main.95c1d652.js.map +1 -0
  33. xinference/web/ui/node_modules/.cache/babel-loader/07ce9e632e6aff24d7aa3ad8e48224433bbfeb0d633fca723453f1fcae0c9f1c.json +1 -0
  34. xinference/web/ui/node_modules/.cache/babel-loader/40f17338fc75ae095de7d2b4d8eae0d5ca0193a7e2bcece4ee745b22a7a2f4b7.json +1 -0
  35. xinference/web/ui/node_modules/.cache/babel-loader/5262556baf9207738bf6a8ba141ec6599d0a636345c245d61fdf88d3171998cb.json +1 -0
  36. xinference/web/ui/node_modules/.cache/babel-loader/709711edada3f1596b309d571285fd31f1c364d66f4425bc28723d0088cc351a.json +1 -0
  37. xinference/web/ui/node_modules/.cache/babel-loader/70fa8c07463a5fe57c68bf92502910105a8f647371836fe8c3a7408246ca7ba0.json +1 -0
  38. xinference/web/ui/node_modules/.cache/babel-loader/f3e02274cb1964e99b1fe69cbb6db233d3d8d7dd05d50ebcdb8e66d50b224b7b.json +1 -0
  39. {xinference-0.13.0.dist-info → xinference-0.13.1.dist-info}/METADATA +7 -11
  40. {xinference-0.13.0.dist-info → xinference-0.13.1.dist-info}/RECORD +45 -54
  41. xinference/model/llm/ggml/chatglm.py +0 -457
  42. xinference/thirdparty/ChatTTS/__init__.py +0 -1
  43. xinference/thirdparty/ChatTTS/core.py +0 -200
  44. xinference/thirdparty/ChatTTS/experimental/__init__.py +0 -0
  45. xinference/thirdparty/ChatTTS/experimental/llm.py +0 -40
  46. xinference/thirdparty/ChatTTS/infer/__init__.py +0 -0
  47. xinference/thirdparty/ChatTTS/infer/api.py +0 -125
  48. xinference/thirdparty/ChatTTS/model/__init__.py +0 -0
  49. xinference/thirdparty/ChatTTS/model/dvae.py +0 -155
  50. xinference/thirdparty/ChatTTS/model/gpt.py +0 -265
  51. xinference/thirdparty/ChatTTS/utils/__init__.py +0 -0
  52. xinference/thirdparty/ChatTTS/utils/gpu_utils.py +0 -23
  53. xinference/thirdparty/ChatTTS/utils/infer_utils.py +0 -141
  54. xinference/thirdparty/ChatTTS/utils/io_utils.py +0 -14
  55. xinference/web/ui/build/static/js/main.0fb6f3ab.js.map +0 -1
  56. xinference/web/ui/node_modules/.cache/babel-loader/0f6b391abec76271137faad13a3793fe7acc1024e8cd2269c147b653ecd3a73b.json +0 -1
  57. xinference/web/ui/node_modules/.cache/babel-loader/30a0c79d8025d6441eb75b2df5bc2750a14f30119c869ef02570d294dff65c2f.json +0 -1
  58. xinference/web/ui/node_modules/.cache/babel-loader/40486e655c3c5801f087e2cf206c0b5511aaa0dfdba78046b7181bf9c17e54c5.json +0 -1
  59. xinference/web/ui/node_modules/.cache/babel-loader/b5507cd57f16a3a230aa0128e39fe103e928de139ea29e2679e4c64dcbba3b3a.json +0 -1
  60. xinference/web/ui/node_modules/.cache/babel-loader/d779b915f83f9c7b5a72515b6932fdd114f1822cef90ae01cc0d12bca59abc2d.json +0 -1
  61. xinference/web/ui/node_modules/.cache/babel-loader/d87824cb266194447a9c0c69ebab2d507bfc3e3148976173760d18c035e9dd26.json +0 -1
  62. /xinference/web/ui/build/static/js/{main.0fb6f3ab.js.LICENSE.txt → main.95c1d652.js.LICENSE.txt} +0 -0
  63. {xinference-0.13.0.dist-info → xinference-0.13.1.dist-info}/LICENSE +0 -0
  64. {xinference-0.13.0.dist-info → xinference-0.13.1.dist-info}/WHEEL +0 -0
  65. {xinference-0.13.0.dist-info → xinference-0.13.1.dist-info}/entry_points.txt +0 -0
  66. {xinference-0.13.0.dist-info → xinference-0.13.1.dist-info}/top_level.txt +0 -0
@@ -1 +0,0 @@
1
- {"ast":null,"code":"import _objectSpread from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/objectSpread2.js\";import _toConsumableArray from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\";import _slicedToArray from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import'./styles/modelCardStyle.css';import{ChatOutlined,Close,Delete,EditNote,EditNoteOutlined,ExpandLess,ExpandMore,Grade,HelpCenterOutlined,RocketLaunchOutlined,StarBorder,UndoOutlined}from'@mui/icons-material';import{Alert,Backdrop,Box,Button,Chip,CircularProgress,Collapse,Drawer,FormControl,Grid,IconButton,InputLabel,ListItemButton,ListItemText,MenuItem,Paper,Select,Snackbar,Stack,Table,TableBody,TableCell,TableContainer,TableHead,TablePagination,TableRow,TextField,Tooltip}from'@mui/material';import{styled}from'@mui/material/styles';import React,{useContext,useEffect,useRef,useState}from'react';import{useNavigate}from'react-router-dom';import{ApiContext}from'../../components/apiContext';import CopyComponent from'../../components/copyComponent/copyComponent';import DeleteDialog from'../../components/deleteDialog';import fetchWrapper from'../../components/fetchWrapper';import TitleTypography from'../../components/titleTypography';import AddPair from'./components/addPair';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";import{Fragment as _Fragment}from\"react/jsx-runtime\";var llmAllDataKey=['model_uid','model_name','model_type','model_engine','model_format','model_size_in_billions','quantization','n_gpu','replica','request_limits','worker_ip','gpu_idx','peft_model_config'];var ModelCard=function ModelCard(_ref){var _JSON$parse,_JSON$parse2;var url=_ref.url,modelData=_ref.modelData,gpuAvailable=_ref.gpuAvailable,modelType=_ref.modelType,_ref$is_custom=_ref.is_custom,is_custom=_ref$is_custom===void 0?false:_ref$is_custom,onHandleCompleteDelete=_ref.onHandleCompleteDelete,onHandlecustomDelete=_ref.onHandlecustomDelete,onGetCollectionArr=_ref.onGetCollectionArr;var _useState=useState(false),_useState2=_slicedToArray(_useState,2),hover=_useState2[0],setHover=_useState2[1];var _useState3=useState(false),_useState4=_slicedToArray(_useState3,2),selected=_useState4[0],setSelected=_useState4[1];var _useState5=useState(false),_useState6=_slicedToArray(_useState5,2),requestLimitsAlert=_useState6[0],setRequestLimitsAlert=_useState6[1];var _useState7=useState(false),_useState8=_slicedToArray(_useState7,2),GPUIdxAlert=_useState8[0],setGPUIdxAlert=_useState8[1];var _useState9=useState(false),_useState10=_slicedToArray(_useState9,2),isOther=_useState10[0],setIsOther=_useState10[1];var _useState11=useState(false),_useState12=_slicedToArray(_useState11,2),isPeftModelConfig=_useState12[0],setIsPeftModelConfig=_useState12[1];var _useState13=useState(false),_useState14=_slicedToArray(_useState13,2),openSnackbar=_useState14[0],setOpenSnackbar=_useState14[1];var _useContext=useContext(ApiContext),isCallingApi=_useContext.isCallingApi,setIsCallingApi=_useContext.setIsCallingApi;var _useContext2=useContext(ApiContext),isUpdatingModel=_useContext2.isUpdatingModel;var _useContext3=useContext(ApiContext),setErrorMsg=_useContext3.setErrorMsg;var navigate=useNavigate();// Model parameter selections\nvar _useState15=useState(''),_useState16=_slicedToArray(_useState15,2),modelUID=_useState16[0],setModelUID=_useState16[1];var _useState17=useState(''),_useState18=_slicedToArray(_useState17,2),modelEngine=_useState18[0],setModelEngine=_useState18[1];var _useState19=useState(''),_useState20=_slicedToArray(_useState19,2),modelFormat=_useState20[0],setModelFormat=_useState20[1];var _useState21=useState(''),_useState22=_slicedToArray(_useState21,2),modelSize=_useState22[0],setModelSize=_useState22[1];var _useState23=useState(''),_useState24=_slicedToArray(_useState23,2),quantization=_useState24[0],setQuantization=_useState24[1];var _useState25=useState('auto'),_useState26=_slicedToArray(_useState25,2),nGPU=_useState26[0],setNGPU=_useState26[1];var _useState27=useState(gpuAvailable===0?'CPU':'GPU'),_useState28=_slicedToArray(_useState27,2),nGpu=_useState28[0],setNGpu=_useState28[1];var _useState29=useState(-1),_useState30=_slicedToArray(_useState29,2),nGPULayers=_useState30[0],setNGPULayers=_useState30[1];var _useState31=useState(1),_useState32=_slicedToArray(_useState31,2),replica=_useState32[0],setReplica=_useState32[1];var _useState33=useState(''),_useState34=_slicedToArray(_useState33,2),requestLimits=_useState34[0],setRequestLimits=_useState34[1];var _useState35=useState(''),_useState36=_slicedToArray(_useState35,2),workerIp=_useState36[0],setWorkerIp=_useState36[1];var _useState37=useState(''),_useState38=_slicedToArray(_useState37,2),GPUIdx=_useState38[0],setGPUIdx=_useState38[1];var _useState39=useState({}),_useState40=_slicedToArray(_useState39,2),enginesObj=_useState40[0],setEnginesObj=_useState40[1];var _useState41=useState([]),_useState42=_slicedToArray(_useState41,2),engineOptions=_useState42[0],setEngineOptions=_useState42[1];var _useState43=useState([]),_useState44=_slicedToArray(_useState43,2),formatOptions=_useState44[0],setFormatOptions=_useState44[1];var _useState45=useState([]),_useState46=_slicedToArray(_useState45,2),sizeOptions=_useState46[0],setSizeOptions=_useState46[1];var _useState47=useState([]),_useState48=_slicedToArray(_useState47,2),quantizationOptions=_useState48[0],setQuantizationOptions=_useState48[1];var _useState49=useState(false),_useState50=_slicedToArray(_useState49,2),customDeleted=_useState50[0],setCustomDeleted=_useState50[1];var _useState51=useState([]),_useState52=_slicedToArray(_useState51,2),customParametersArr=_useState52[0],setCustomParametersArr=_useState52[1];var _useState53=useState([]),_useState54=_slicedToArray(_useState53,2),loraListArr=_useState54[0],setLoraListArr=_useState54[1];var _useState55=useState([]),_useState56=_slicedToArray(_useState55,2),imageLoraLoadKwargsArr=_useState56[0],setImageLoraLoadKwargsArr=_useState56[1];var _useState57=useState([]),_useState58=_slicedToArray(_useState57,2),imageLoraFuseKwargsArr=_useState58[0],setImageLoraFuseKwargsArr=_useState58[1];var _useState59=useState(false),_useState60=_slicedToArray(_useState59,2),isOpenCachedList=_useState60[0],setIsOpenCachedList=_useState60[1];var _useState61=useState(false),_useState62=_slicedToArray(_useState61,2),isDeleteCached=_useState62[0],setIsDeleteCached=_useState62[1];var _useState63=useState([]),_useState64=_slicedToArray(_useState63,2),cachedListArr=_useState64[0],setCachedListArr=_useState64[1];var _useState65=useState(''),_useState66=_slicedToArray(_useState65,2),cachedModelVersion=_useState66[0],setCachedModelVersion=_useState66[1];var _useState67=useState(''),_useState68=_slicedToArray(_useState67,2),cachedRealPath=_useState68[0],setCachedRealPath=_useState68[1];var _useState69=useState(0),_useState70=_slicedToArray(_useState69,2),page=_useState70[0],setPage=_useState70[1];var _useState71=useState(false),_useState72=_slicedToArray(_useState71,2),isDeleteCustomModel=_useState72[0],setIsDeleteCustomModel=_useState72[1];var _useState73=useState(false),_useState74=_slicedToArray(_useState73,2),isJsonShow=_useState74[0],setIsJsonShow=_useState74[1];var _useState75=useState(false),_useState76=_slicedToArray(_useState75,2),isHistory=_useState76[0],setIsHistory=_useState76[1];var _useState77=useState([]),_useState78=_slicedToArray(_useState77,2),customArr=_useState78[0],setCustomArr=_useState78[1];var _useState79=useState([]),_useState80=_slicedToArray(_useState79,2),loraArr=_useState80[0],setLoraArr=_useState80[1];var _useState81=useState([]),_useState82=_slicedToArray(_useState81,2),imageLoraLoadArr=_useState82[0],setImageLoraLoadArr=_useState82[1];var _useState83=useState([]),_useState84=_slicedToArray(_useState83,2),imageLoraFuseArr=_useState84[0],setImageLoraFuseArr=_useState84[1];var _useState85=useState(0),_useState86=_slicedToArray(_useState85,2),customParametersArrLength=_useState86[0],setCustomParametersArrLength=_useState86[1];var parentRef=useRef(null);var range=function range(start,end){return new Array(end-start+1).fill(undefined).map(function(_,i){return i+start;});};var isCached=function isCached(spec){if(spec.model_format==='pytorch'){return spec.cache_status&&spec.cache_status===true;}else{return spec.cache_status&&spec.cache_status.some(function(cs){return cs;});}};// model size can be int or string. For string style, \"1_8\" means 1.8 as an example.\nvar convertModelSize=function convertModelSize(size){return size.toString().includes('_')?size:parseInt(size,10);};useEffect(function(){var keyArr=[];for(var key in enginesObj){keyArr.push(key);}if(keyArr.length){handleLlmHistory();}},[enginesObj]);useEffect(function(){if(modelEngine){var format=_toConsumableArray(new Set(enginesObj[modelEngine].map(function(item){return item.model_format;})));setFormatOptions(format);if(!isHistory||!format.includes(modelFormat)){setModelFormat('');}if(format.length===1){setModelFormat(format[0]);}}},[modelEngine]);useEffect(function(){if(modelEngine&&modelFormat){var sizes=_toConsumableArray(new Set(enginesObj[modelEngine].filter(function(item){return item.model_format===modelFormat;}).map(function(item){return item.model_size_in_billions;})));setSizeOptions(sizes);if(!isHistory||!sizes.includes(Number(modelSize))){setModelSize('');}if(sizes.length===1){setModelSize(sizes[0]);}}},[modelEngine,modelFormat]);useEffect(function(){if(modelEngine&&modelFormat&&modelSize){var quants=_toConsumableArray(new Set(enginesObj[modelEngine].filter(function(item){return item.model_format===modelFormat&&item.model_size_in_billions===convertModelSize(modelSize);}).flatMap(function(item){return item.quantizations;})));setQuantizationOptions(quants);if(!isHistory||!quants.includes(quantization)){setQuantization('');}if(quants.length===1){setQuantization(quants[0]);}}},[modelEngine,modelFormat,modelSize]);useEffect(function(){setCustomParametersArrLength(customParametersArr.length);if(parentRef.current&&customParametersArr.length>customParametersArrLength){parentRef.current.scrollTo({top:parentRef.current.scrollHeight,behavior:'smooth'});}},[customParametersArr]);var getNGPURange=function getNGPURange(){if(gpuAvailable===0){// remain 'auto' for distributed situation\nreturn['auto','CPU'];}return['auto','CPU'].concat(range(1,gpuAvailable));};var getNewNGPURange=function getNewNGPURange(){if(gpuAvailable===0){return['CPU'];}else{return['GPU','CPU'];}};var getModelEngine=function getModelEngine(model_name){fetchWrapper.get(\"/v1/engines/\".concat(model_name)).then(function(data){setEnginesObj(data);setEngineOptions(Object.keys(data));setIsCallingApi(false);}).catch(function(error){console.error('Error:',error);if(error.response.status!==403){setErrorMsg(error.message);}setIsCallingApi(false);});};var launchModel=function launchModel(){if(isCallingApi||isUpdatingModel){return;}setIsCallingApi(true);var modelDataWithID_LLM={// If user does not fill model_uid, pass null (None) to server and server generates it.\nmodel_uid:modelUID.trim()===''?null:modelUID.trim(),model_name:modelData.model_name,model_type:modelType,model_engine:modelEngine,model_format:modelFormat,model_size_in_billions:convertModelSize(modelSize),quantization:quantization,n_gpu:parseInt(nGPU,10)===0||nGPU==='CPU'?null:nGPU==='auto'?'auto':parseInt(nGPU,10),replica:replica,request_limits:String(requestLimits).trim()===''?null:Number(String(requestLimits).trim()),worker_ip:workerIp.trim()===''?null:workerIp.trim(),gpu_idx:GPUIdx.trim()===''?null:handleGPUIdx(GPUIdx.trim())};var modelDataWithID_other={model_uid:modelUID.trim()===''?null:modelUID.trim(),model_name:modelData.model_name,model_type:modelType};if(modelType==='embedding'||modelType==='rerank'){modelDataWithID_other=_objectSpread(_objectSpread({},modelDataWithID_other),{},{replica:replica,n_gpu:nGpu==='GPU'?'auto':null,worker_ip:workerIp.trim()===''?null:workerIp.trim(),gpu_idx:GPUIdx.trim()===''?null:handleGPUIdx(GPUIdx.trim())});}if(nGPULayers>=0){modelDataWithID_LLM.n_gpu_layers=nGPULayers;}if(loraListArr.length||imageLoraLoadKwargsArr.length||imageLoraFuseKwargsArr.length){var peft_model_config={};if(imageLoraLoadKwargsArr.length){var image_lora_load_kwargs={};imageLoraLoadKwargsArr.forEach(function(item){image_lora_load_kwargs[item.key]=handleValueType(item.value);});peft_model_config['image_lora_load_kwargs']=image_lora_load_kwargs;}if(imageLoraFuseKwargsArr.length){var image_lora_fuse_kwargs={};imageLoraFuseKwargsArr.forEach(function(item){image_lora_fuse_kwargs[item.key]=handleValueType(item.value);});peft_model_config['image_lora_fuse_kwargs']=image_lora_fuse_kwargs;}if(loraListArr.length){var lora_list=loraListArr;lora_list.map(function(item){delete item.id;});peft_model_config['lora_list']=lora_list;}modelDataWithID_LLM['peft_model_config']=peft_model_config;}if(customParametersArr.length){customParametersArr.forEach(function(item){modelDataWithID_LLM[item.key]=handleValueType(item.value);});}var modelDataWithID=modelType==='LLM'?modelDataWithID_LLM:modelDataWithID_other;// First fetcher request to initiate the model\nfetchWrapper.post('/v1/models',modelDataWithID).then(function(){navigate(\"/running_models/\".concat(modelType));sessionStorage.setItem('runningModelType',\"/running_models/\".concat(modelType));if(isHistory||(modelType==='embedding'||modelType==='rerank')&&(modelUID!==''||replica!==1||workerIp!=='')||(modelType==='image'||modelType==='audio')&&modelUID!==''||modelType==='LLM'){var historyArr=JSON.parse(localStorage.getItem('historyArr'))||[];if(!historyArr.some(function(item){return deepEqual(item,modelDataWithID);})){historyArr=historyArr.filter(function(item){return item.model_name!==modelDataWithID.model_name;});historyArr.push(modelDataWithID);}localStorage.setItem('historyArr',JSON.stringify(historyArr));}setIsCallingApi(false);}).catch(function(error){console.error('Error:',error);if(error.response.status!==403){setErrorMsg(error.message);}setIsCallingApi(false);});};var handleGPUIdx=function handleGPUIdx(data){var arr=[];data.split(',').forEach(function(item){arr.push(Number(item));});return arr;};var handeCustomDelete=function handeCustomDelete(e){e.stopPropagation();var subType=sessionStorage.getItem('subType').split('/');if(subType){subType[3];fetchWrapper.delete(\"/v1/model_registrations/\".concat(subType[3]==='llm'?'LLM':subType[3],\"/\").concat(modelData.model_name)).then(function(){setCustomDeleted(true);onHandlecustomDelete(modelData.model_name);setIsDeleteCustomModel(false);}).catch(function(error){console.error(error);if(error.response.status!==403){setErrorMsg(error.message);}});}};var judgeArr=function judgeArr(arr,keysArr){if(arr.length&&arr[arr.length-1][keysArr[0]]!==''&&arr[arr.length-1][keysArr[1]]!==''){return true;}else if(arr.length===0){return true;}else{return false;}};var handleValueType=function handleValueType(str){str=String(str);if(str.toLowerCase()==='none'){return null;}else if(str.toLowerCase()==='true'){return true;}else if(str.toLowerCase()==='false'){return false;}else if(Number(str)||str!==''&&Number(str)===0){return Number(str);}else{return str;}};var StyledTableRow=styled(TableRow)(function(_ref2){var theme=_ref2.theme;return{'&:nth-of-type(odd)':{backgroundColor:theme.palette.action.hover}};});var emptyRows=page>=0?Math.max(0,(1+page)*5-cachedListArr.length):0;var handleChangePage=function handleChangePage(_,newPage){setPage(newPage);};var handleOpenCachedList=function handleOpenCachedList(){setIsOpenCachedList(true);getCachedList();document.body.style.overflow='hidden';};var handleCloseCachedList=function handleCloseCachedList(){document.body.style.overflow='auto';setHover(false);setIsOpenCachedList(false);if(cachedListArr.length===0){onHandleCompleteDelete(modelData.model_name);}};var getCachedList=function getCachedList(){fetchWrapper.get(\"/v1/cache/models?model_name=\".concat(modelData.model_name)).then(function(data){return setCachedListArr(data.list);}).catch(function(error){console.error(error);if(error.response.status!==403){setErrorMsg(error.message);}});};var handleOpenDeleteCachedDialog=function handleOpenDeleteCachedDialog(real_path,model_version){setCachedRealPath(real_path);setCachedModelVersion(model_version);setIsDeleteCached(true);};var handleDeleteCached=function handleDeleteCached(){fetchWrapper.delete(\"/v1/cache/models?model_version=\".concat(cachedModelVersion)).then(function(){var cachedArr=cachedListArr.filter(function(item){return item.real_path!==cachedRealPath;});setCachedListArr(cachedArr);setIsDeleteCached(false);if(cachedArr.length){if((page+1)*5>=cachedListArr.length&&cachedArr.length%5===0){setPage(cachedArr.length/5-1);}}}).catch(function(error){console.error(error);if(error.response.status!==403){setErrorMsg(error.message);}});};var handleJsonDataPresentation=function handleJsonDataPresentation(){var arr=sessionStorage.getItem('subType').split('/');sessionStorage.setItem('registerModelType',\"/register_model/\".concat(arr[arr.length-1]));sessionStorage.setItem('customJsonData',JSON.stringify(modelData));navigate(\"/register_model/\".concat(arr[arr.length-1],\"/\").concat(modelData.model_name));};var handleGetHistory=function handleGetHistory(){var historyArr=JSON.parse(localStorage.getItem('historyArr'))||[];return historyArr.filter(function(item){return item.model_name===modelData.model_name;});};var handleLlmHistory=function handleLlmHistory(){var arr=handleGetHistory();if(arr.length){var _peft_model_config$lo;var _arr$=arr[0],model_engine=_arr$.model_engine,model_format=_arr$.model_format,model_size_in_billions=_arr$.model_size_in_billions,_quantization=_arr$.quantization,n_gpu=_arr$.n_gpu,_replica=_arr$.replica,model_uid=_arr$.model_uid,request_limits=_arr$.request_limits,worker_ip=_arr$.worker_ip,gpu_idx=_arr$.gpu_idx,peft_model_config=_arr$.peft_model_config;setModelEngine(model_engine||'');setModelFormat(model_format||'');setModelSize(String(model_size_in_billions)||'');setQuantization(_quantization||'');setNGPU(n_gpu||'auto');setReplica(_replica||1);setModelUID(model_uid||'');setRequestLimits(request_limits||'');setWorkerIp(worker_ip||'');setGPUIdx((gpu_idx===null||gpu_idx===void 0?void 0:gpu_idx.join(','))||'');var loraData=[];peft_model_config===null||peft_model_config===void 0?void 0:(_peft_model_config$lo=peft_model_config.lora_list)===null||_peft_model_config$lo===void 0?void 0:_peft_model_config$lo.forEach(function(item){loraData.push({lora_name:item.lora_name,local_path:item.local_path});});setLoraArr(loraData);var ImageLoraLoadData=[];for(var key in peft_model_config===null||peft_model_config===void 0?void 0:peft_model_config.image_lora_load_kwargs){ImageLoraLoadData.push({key:key,value:peft_model_config===null||peft_model_config===void 0?void 0:peft_model_config.image_lora_load_kwargs[key]});}setImageLoraLoadArr(ImageLoraLoadData);var ImageLoraFuseData=[];for(var _key in peft_model_config===null||peft_model_config===void 0?void 0:peft_model_config.image_lora_fuse_kwargs){ImageLoraFuseData.push({key:_key,value:peft_model_config===null||peft_model_config===void 0?void 0:peft_model_config.image_lora_fuse_kwargs[_key]});}setImageLoraFuseArr(ImageLoraFuseData);var customData=[];for(var _key2 in arr[0]){!llmAllDataKey.includes(_key2)&&customData.push({key:_key2,value:arr[0][_key2]});}setCustomArr(customData);if(model_uid||request_limits||worker_ip||gpu_idx!==null&&gpu_idx!==void 0&&gpu_idx.join(','))setIsOther(true);if(loraData.length||ImageLoraLoadData.length||ImageLoraFuseData.length){setIsOther(true);setIsPeftModelConfig(true);}}};var handleOtherHistory=function handleOtherHistory(){var arr=handleGetHistory();if(arr.length){if(modelType==='embedding'||modelType==='rerank'){setModelUID(arr[0].model_uid||'');setReplica(arr[0].replica||1);setWorkerIp(arr[0].worker_ip||'');}else{setModelUID(arr[0].model_uid||'');}}};var deepEqual=function deepEqual(obj1,obj2){if(obj1===obj2)return true;if(typeof obj1!=='object'||typeof obj2!=='object'||obj1==null||obj2==null){return false;}var keysA=Object.keys(obj1);var keysB=Object.keys(obj2);if(keysA.length!==keysB.length)return false;for(var _i=0,_keysA=keysA;_i<_keysA.length;_i++){var key=_keysA[_i];if(!keysB.includes(key)||!deepEqual(obj1[key],obj2[key])){return false;}}return true;};var handleCollection=function handleCollection(bool){setHover(false);var collectionArr=JSON.parse(localStorage.getItem('collectionArr'))||[];if(bool){collectionArr.push(modelData.model_name);}else{collectionArr=collectionArr.filter(function(item){return item!==modelData.model_name;});}localStorage.setItem('collectionArr',JSON.stringify(collectionArr));onGetCollectionArr(collectionArr);};var handleDeleteChip=function handleDeleteChip(){var arr=JSON.parse(localStorage.getItem('historyArr'));var newArr=arr.filter(function(item){return item.model_name!==modelData.model_name;});localStorage.setItem('historyArr',JSON.stringify(newArr));setIsHistory(false);if(modelType==='LLM'){setModelEngine('');setModelFormat('');setModelSize('');setQuantization('');setNGPU('auto');setReplica(1);setModelUID('');setRequestLimits('');setWorkerIp('');setGPUIdx('');setLoraArr([]);setImageLoraLoadArr([]);setImageLoraFuseArr([]);setCustomArr([]);setIsOther(false);setIsPeftModelConfig(false);}else if(modelType==='embedding'||modelType==='rerank'){setModelUID('');setReplica(1);setWorkerIp('');}else{setModelUID('');}};// Set two different states based on mouse hover\nreturn/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(Paper,{id:modelData.model_name,className:\"container\",onMouseEnter:function onMouseEnter(){return setHover(true);},onMouseLeave:function onMouseLeave(){return setHover(false);},onClick:function onClick(){if(!selected&&!customDeleted){var arr=handleGetHistory();if(arr.length)setIsHistory(true);setSelected(true);if(modelType==='LLM'){getModelEngine(modelData.model_name);}else{handleOtherHistory();}}},elevation:hover?24:4,children:modelType==='LLM'?/*#__PURE__*/_jsxs(Box,{className:\"descriptionCard\",children:[is_custom&&/*#__PURE__*/_jsxs(\"div\",{className:\"cardTitle\",children:[/*#__PURE__*/_jsx(TitleTypography,{value:modelData.model_name}),/*#__PURE__*/_jsxs(\"div\",{className:\"iconButtonBox\",children:[/*#__PURE__*/_jsx(Tooltip,{title:'Edit',placement:\"top\",children:/*#__PURE__*/_jsx(IconButton,{\"aria-label\":\"show\",onClick:function onClick(e){e.stopPropagation();setIsJsonShow(true);},children:/*#__PURE__*/_jsx(EditNote,{})})}),/*#__PURE__*/_jsx(Tooltip,{title:'delete',placement:\"top\",children:/*#__PURE__*/_jsx(IconButton,{\"aria-label\":\"delete\",onClick:function onClick(e){e.stopPropagation();setIsDeleteCustomModel(true);},children:/*#__PURE__*/_jsx(Delete,{})})})]})]}),!is_custom&&/*#__PURE__*/_jsxs(\"div\",{className:\"cardTitle\",children:[/*#__PURE__*/_jsx(TitleTypography,{value:modelData.model_name}),/*#__PURE__*/_jsx(\"div\",{className:\"iconButtonBox\",children:(_JSON$parse=JSON.parse(localStorage.getItem('collectionArr')))!==null&&_JSON$parse!==void 0&&_JSON$parse.includes(modelData.model_name)?/*#__PURE__*/_jsx(Tooltip,{title:'Unfavorite',placement:\"top\",children:/*#__PURE__*/_jsx(IconButton,{\"aria-label\":\"collection\",onClick:function onClick(e){e.stopPropagation();handleCollection(false);},children:/*#__PURE__*/_jsx(Grade,{style:{color:'rgb(255, 206, 0)'}})})}):/*#__PURE__*/_jsx(Tooltip,{title:'Favorite',placement:\"top\",children:/*#__PURE__*/_jsx(IconButton,{\"aria-label\":\"cancellation-of-collections\",onClick:function onClick(e){e.stopPropagation();handleCollection(true);},children:/*#__PURE__*/_jsx(StarBorder,{})})})})]}),/*#__PURE__*/_jsxs(Stack,{spacing:1,direction:\"row\",useFlexGap:true,flexWrap:\"wrap\",sx:{marginLeft:1},children:[modelData.model_lang&&function(){return modelData.model_lang.map(function(v){return/*#__PURE__*/_jsx(Chip,{label:v,variant:\"outlined\",size:\"small\"},v);});}(),function(){if(modelData.model_specs&&modelData.model_specs.some(function(spec){return isCached(spec);})){return/*#__PURE__*/_jsx(Chip,{label:\"Cached\",variant:\"outlined\",size:\"small\",deleteIcon:/*#__PURE__*/_jsx(EditNote,{}),onDelete:handleOpenCachedList});}}(),function(){if(is_custom&&customDeleted){return/*#__PURE__*/_jsx(Chip,{label:\"Deleted\",variant:\"outlined\",size:\"small\"});}}()]}),modelData.model_description&&/*#__PURE__*/_jsx(\"p\",{className:\"p\",title:modelData.model_description,children:modelData.model_description}),/*#__PURE__*/_jsxs(\"div\",{className:\"iconRow\",children:[/*#__PURE__*/_jsxs(\"div\",{className:\"iconItem\",children:[/*#__PURE__*/_jsxs(\"span\",{className:\"boldIconText\",children:[Math.floor(modelData.context_length/1000),\"K\"]}),/*#__PURE__*/_jsx(\"small\",{className:\"smallText\",children:\"context length\"})]}),function(){if(modelData.model_ability&&modelData.model_ability.includes('chat')){return/*#__PURE__*/_jsxs(\"div\",{className:\"iconItem\",children:[/*#__PURE__*/_jsx(ChatOutlined,{className:\"muiIcon\"}),/*#__PURE__*/_jsx(\"small\",{className:\"smallText\",children:\"chat model\"})]});}else if(modelData.model_ability&&modelData.model_ability.includes('generate')){return/*#__PURE__*/_jsxs(\"div\",{className:\"iconItem\",children:[/*#__PURE__*/_jsx(EditNoteOutlined,{className:\"muiIcon\"}),/*#__PURE__*/_jsx(\"small\",{className:\"smallText\",children:\"generate model\"})]});}else{return/*#__PURE__*/_jsxs(\"div\",{className:\"iconItem\",children:[/*#__PURE__*/_jsx(HelpCenterOutlined,{className:\"muiIcon\"}),/*#__PURE__*/_jsx(\"small\",{className:\"smallText\",children:\"other model\"})]});}}()]})]}):/*#__PURE__*/_jsxs(Box,{className:\"descriptionCard\",children:[/*#__PURE__*/_jsxs(\"div\",{className:\"titleContainer\",children:[is_custom&&/*#__PURE__*/_jsxs(\"div\",{className:\"cardTitle\",children:[/*#__PURE__*/_jsx(TitleTypography,{value:modelData.model_name}),/*#__PURE__*/_jsxs(\"div\",{className:\"iconButtonBox\",children:[/*#__PURE__*/_jsx(Tooltip,{title:'Edit',placement:\"top\",children:/*#__PURE__*/_jsx(IconButton,{\"aria-label\":\"show\",onClick:function onClick(e){e.stopPropagation();setIsJsonShow(true);},children:/*#__PURE__*/_jsx(EditNote,{})})}),/*#__PURE__*/_jsx(Tooltip,{title:'delete',placement:\"top\",children:/*#__PURE__*/_jsx(IconButton,{\"aria-label\":\"delete\",onClick:function onClick(e){e.stopPropagation();setIsDeleteCustomModel(true);},disabled:customDeleted,children:/*#__PURE__*/_jsx(Delete,{})})})]})]}),!is_custom&&/*#__PURE__*/_jsxs(\"div\",{className:\"cardTitle\",children:[/*#__PURE__*/_jsx(TitleTypography,{value:modelData.model_name}),/*#__PURE__*/_jsx(\"div\",{className:\"iconButtonBox\",children:(_JSON$parse2=JSON.parse(localStorage.getItem('collectionArr')))!==null&&_JSON$parse2!==void 0&&_JSON$parse2.includes(modelData.model_name)?/*#__PURE__*/_jsx(Tooltip,{title:'Unfavorite',placement:\"top\",children:/*#__PURE__*/_jsx(IconButton,{\"aria-label\":\"collection\",onClick:function onClick(e){e.stopPropagation();handleCollection(false);},children:/*#__PURE__*/_jsx(Grade,{style:{color:'rgb(255, 206, 0)'}})})}):/*#__PURE__*/_jsx(Tooltip,{title:'Favorite',placement:\"top\",children:/*#__PURE__*/_jsx(IconButton,{\"aria-label\":\"cancellation-of-collections\",onClick:function onClick(e){e.stopPropagation();handleCollection(true);},children:/*#__PURE__*/_jsx(StarBorder,{})})})})]}),/*#__PURE__*/_jsxs(Stack,{spacing:1,direction:\"row\",useFlexGap:true,flexWrap:\"wrap\",sx:{marginLeft:1},children:[function(){if(modelData.language){return modelData.language.map(function(v){return/*#__PURE__*/_jsx(Chip,{label:v,variant:\"outlined\",size:\"small\"});});}else if(modelData.model_family){return/*#__PURE__*/_jsx(Chip,{label:modelData.model_family,variant:\"outlined\",size:\"small\"});}}(),function(){if(modelData.cache_status){return/*#__PURE__*/_jsx(Chip,{label:\"Cached\",variant:\"outlined\",size:\"small\",deleteIcon:/*#__PURE__*/_jsx(EditNote,{}),onDelete:handleOpenCachedList});}}(),function(){if(is_custom&&customDeleted){return/*#__PURE__*/_jsx(Chip,{label:\"Deleted\",variant:\"outlined\",size:\"small\"});}}()]})]}),modelData.dimensions&&/*#__PURE__*/_jsxs(\"div\",{className:\"iconRow\",children:[/*#__PURE__*/_jsxs(\"div\",{className:\"iconItem\",children:[/*#__PURE__*/_jsx(\"span\",{className:\"boldIconText\",children:modelData.dimensions}),/*#__PURE__*/_jsx(\"small\",{className:\"smallText\",children:\"dimensions\"})]}),/*#__PURE__*/_jsxs(\"div\",{className:\"iconItem\",children:[/*#__PURE__*/_jsx(\"span\",{className:\"boldIconText\",children:modelData.max_tokens}),/*#__PURE__*/_jsx(\"small\",{className:\"smallText\",children:\"max tokens\"})]})]}),!selected&&hover&&/*#__PURE__*/_jsx(\"p\",{className:\"instructionText\",children:\"Click with mouse to launch the model\"})]})}),/*#__PURE__*/_jsx(DeleteDialog,{text:'Are you sure to delete this custom model? This behavior is irreversible.',isDelete:isDeleteCustomModel,onHandleIsDelete:function onHandleIsDelete(){return setIsDeleteCustomModel(false);},onHandleDelete:handeCustomDelete}),/*#__PURE__*/_jsx(Drawer,{open:selected,onClose:function onClose(){setSelected(false);setHover(false);},anchor:'right',children:/*#__PURE__*/_jsxs(\"div\",{className:\"drawerCard\",children:[/*#__PURE__*/_jsxs(\"div\",{style:{display:'flex',alignItems:'center'},children:[/*#__PURE__*/_jsx(TitleTypography,{value:modelData.model_name}),isHistory&&/*#__PURE__*/_jsx(Chip,{label:\"Last Config\",variant:\"outlined\",size:\"small\",color:\"primary\",onDelete:handleDeleteChip})]}),modelType==='LLM'?/*#__PURE__*/_jsx(Box,{ref:parentRef,className:\"formContainer\",display:\"flex\",flexDirection:\"column\",width:\"100%\",mx:\"auto\",children:/*#__PURE__*/_jsxs(Grid,{rowSpacing:0,columnSpacing:1,children:[/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:[/*#__PURE__*/_jsx(InputLabel,{id:\"modelEngine-label\",children:\"Model Engine\"}),/*#__PURE__*/_jsx(Select,{labelId:\"modelEngine-label\",value:modelEngine,onChange:function onChange(e){return setModelEngine(e.target.value);},label:\"Model Engine\",children:engineOptions.map(function(engine){var subArr=[];enginesObj[engine].forEach(function(item){subArr.push(item.model_format);});var arr=_toConsumableArray(new Set(subArr));var specs=modelData.model_specs.filter(function(spec){return arr.includes(spec.model_format);});var cached=specs.some(function(spec){return isCached(spec);});var displayedEngine=cached?engine+' (cached)':engine;return/*#__PURE__*/_jsx(MenuItem,{value:engine,children:displayedEngine},engine);})})]})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,disabled:!modelEngine,children:[/*#__PURE__*/_jsx(InputLabel,{id:\"modelFormat-label\",children:\"Model Format\"}),/*#__PURE__*/_jsx(Select,{labelId:\"modelFormat-label\",value:modelFormat,onChange:function onChange(e){return setModelFormat(e.target.value);},label:\"Model Format\",children:formatOptions.map(function(format){var specs=modelData.model_specs.filter(function(spec){return spec.model_format===format;});var cached=specs.some(function(spec){return isCached(spec);});var displayedFormat=cached?format+' (cached)':format;return/*#__PURE__*/_jsx(MenuItem,{value:format,children:displayedFormat},format);})})]})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,disabled:!modelFormat,children:[/*#__PURE__*/_jsx(InputLabel,{id:\"modelSize-label\",children:\"Model Size\"}),/*#__PURE__*/_jsx(Select,{labelId:\"modelSize-label\",value:modelSize,onChange:function onChange(e){return setModelSize(e.target.value);},label:\"Model Size\",children:sizeOptions.map(function(size){var specs=modelData.model_specs.filter(function(spec){return spec.model_format===modelFormat;}).filter(function(spec){return spec.model_size_in_billions===size;});var cached=specs.some(function(spec){return isCached(spec);});var displayedSize=cached?size+' (cached)':size;return/*#__PURE__*/_jsx(MenuItem,{value:size,children:displayedSize},size);})})]})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,disabled:!modelFormat||!modelSize,children:[/*#__PURE__*/_jsx(InputLabel,{id:\"quantization-label\",children:\"Quantization\"}),/*#__PURE__*/_jsx(Select,{labelId:\"quantization-label\",value:quantization,onChange:function onChange(e){return setQuantization(e.target.value);},label:\"Quantization\",children:quantizationOptions.map(function(quant,index){var _specs$0$cache_status,_specs$,_specs$0$cache_status2,_specs$2,_specs$2$cache_status;var specs=modelData.model_specs.filter(function(spec){return spec.model_format===modelFormat;}).filter(function(spec){return spec.model_size_in_billions===convertModelSize(modelSize);});var cached=modelFormat==='pytorch'?(_specs$0$cache_status=(_specs$=specs[0])===null||_specs$===void 0?void 0:_specs$.cache_status)!==null&&_specs$0$cache_status!==void 0?_specs$0$cache_status:false===true:(_specs$0$cache_status2=(_specs$2=specs[0])===null||_specs$2===void 0?void 0:(_specs$2$cache_status=_specs$2.cache_status)===null||_specs$2$cache_status===void 0?void 0:_specs$2$cache_status[index])!==null&&_specs$0$cache_status2!==void 0?_specs$0$cache_status2:false===true;var displayedQuant=cached?quant+' (cached)':quant;return/*#__PURE__*/_jsx(MenuItem,{value:quant,children:displayedQuant},quant);})})]})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:modelFormat!=='ggufv2'&&modelFormat!=='ggmlv3'?/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,disabled:!modelFormat||!modelSize||!quantization,children:[/*#__PURE__*/_jsx(InputLabel,{id:\"n-gpu-label\",children:\"N-GPU\"}),/*#__PURE__*/_jsx(Select,{labelId:\"n-gpu-label\",value:nGPU,onChange:function onChange(e){return setNGPU(e.target.value);},label:\"N-GPU\",children:getNGPURange().map(function(v){return/*#__PURE__*/_jsx(MenuItem,{value:v,children:v},v);})})]}):/*#__PURE__*/_jsx(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:/*#__PURE__*/_jsx(TextField,{disabled:!modelFormat||!modelSize||!quantization,type:\"number\",label:\"N GPU Layers\",InputProps:{inputProps:{min:-1}},value:nGPULayers,onChange:function onChange(e){return setNGPULayers(parseInt(e.target.value,10));}})})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsx(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:/*#__PURE__*/_jsx(TextField,{disabled:!modelFormat||!modelSize||!quantization,type:\"number\",InputProps:{inputProps:{min:1}},label:\"Replica\",value:replica,onChange:function onChange(e){return setReplica(parseInt(e.target.value,10));}})})}),/*#__PURE__*/_jsx(ListItemButton,{onClick:function onClick(){return setIsOther(!isOther);},children:/*#__PURE__*/_jsxs(\"div\",{style:{display:'flex',alignItems:'center'},children:[/*#__PURE__*/_jsx(ListItemText,{primary:\"Optional Configurations\",style:{marginRight:10}}),isOther?/*#__PURE__*/_jsx(ExpandLess,{}):/*#__PURE__*/_jsx(ExpandMore,{})]})}),/*#__PURE__*/_jsxs(Collapse,{in:isOther,timeout:\"auto\",unmountOnExit:true,children:[/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsx(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:/*#__PURE__*/_jsx(TextField,{variant:\"outlined\",value:modelUID,label:\"(Optional) Model UID, model name by default\",onChange:function onChange(e){return setModelUID(e.target.value);}})})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:[/*#__PURE__*/_jsx(TextField,{value:requestLimits,label:\"(Optional) Request Limits, the number of request limits for this model\\uFF0Cdefault is None\",onChange:function onChange(e){setRequestLimitsAlert(false);setRequestLimits(e.target.value);if(e.target.value!==''&&(!Number(e.target.value)||Number(e.target.value)<1||parseInt(e.target.value)!==parseFloat(e.target.value))){setRequestLimitsAlert(true);}}}),requestLimitsAlert&&/*#__PURE__*/_jsx(Alert,{severity:\"error\",children:\"Please enter an integer greater than 0\"})]})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsx(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:/*#__PURE__*/_jsx(TextField,{variant:\"outlined\",value:workerIp,label:\"(Optional) Worker Ip, specify the worker ip where the model is located in a distributed scenario\",onChange:function onChange(e){return setWorkerIp(e.target.value);}})})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:[/*#__PURE__*/_jsx(TextField,{value:GPUIdx,label:\"(Optional) GPU Idx, Specify the GPU index where the model is located\",onChange:function onChange(e){setGPUIdxAlert(false);setGPUIdx(e.target.value);var regular=/^\\d+(?:,\\d+)*$/;if(e.target.value!==''&&!regular.test(e.target.value)){setGPUIdxAlert(true);}}}),GPUIdxAlert&&/*#__PURE__*/_jsx(Alert,{severity:\"error\",children:\"Please enter numeric data separated by commas, for example: 0,1,2\"})]})}),/*#__PURE__*/_jsxs(ListItemButton,{onClick:function onClick(){return setIsPeftModelConfig(!isPeftModelConfig);},children:[/*#__PURE__*/_jsx(ListItemText,{primary:\"Lora Config\"}),isPeftModelConfig?/*#__PURE__*/_jsx(ExpandLess,{}):/*#__PURE__*/_jsx(ExpandMore,{})]}),/*#__PURE__*/_jsxs(Collapse,{in:isPeftModelConfig,timeout:\"auto\",unmountOnExit:true,style:{marginLeft:'30px'},children:[/*#__PURE__*/_jsx(AddPair,{customData:{title:'Lora Model Config',key:'lora_name',value:'local_path'},onGetArr:function onGetArr(arr){setLoraListArr(arr);},onJudgeArr:judgeArr,pairData:loraArr}),/*#__PURE__*/_jsx(AddPair,{customData:{title:'Lora Load Kwargs for Image Model',key:'key',value:'value'},onGetArr:function onGetArr(arr){setImageLoraLoadKwargsArr(arr);},onJudgeArr:judgeArr,pairData:imageLoraLoadArr}),/*#__PURE__*/_jsx(AddPair,{customData:{title:'Lora Fuse Kwargs for Image Model',key:'key',value:'value'},onGetArr:function onGetArr(arr){setImageLoraFuseKwargsArr(arr);},onJudgeArr:judgeArr,pairData:imageLoraFuseArr})]})]}),/*#__PURE__*/_jsx(AddPair,{customData:{title:\"Additional parameters passed to the inference engine\".concat(modelEngine?': '+modelEngine:''),key:'key',value:'value'},onGetArr:function onGetArr(arr){setCustomParametersArr(arr);},onJudgeArr:judgeArr,pairData:customArr})]})}):/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:[/*#__PURE__*/_jsx(TextField,{variant:\"outlined\",value:modelUID,label:\"(Optional) Model UID, model name by default\",onChange:function onChange(e){return setModelUID(e.target.value);}}),(modelType==='embedding'||modelType==='rerank')&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(TextField,{style:{marginTop:'25px'},type:\"number\",InputProps:{inputProps:{min:1}},label:\"Replica\",value:replica,onChange:function onChange(e){return setReplica(parseInt(e.target.value,10));}}),/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:[/*#__PURE__*/_jsx(InputLabel,{id:\"n-gpu-label\",children:\"Device\"}),/*#__PURE__*/_jsx(Select,{labelId:\"n-gpu-label\",value:nGpu,onChange:function onChange(e){return setNGpu(e.target.value);},label:\"N-GPU\",children:getNewNGPURange().map(function(v){return/*#__PURE__*/_jsx(MenuItem,{value:v,children:v},v);})})]}),nGpu==='GPU'&&/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:[/*#__PURE__*/_jsx(TextField,{value:GPUIdx,label:\"GPU Idx, Specify the GPU index where the model is located\",onChange:function onChange(e){setGPUIdxAlert(false);setGPUIdx(e.target.value);var regular=/^\\d+(?:,\\d+)*$/;if(e.target.value!==''&&!regular.test(e.target.value)){setGPUIdxAlert(true);}}}),GPUIdxAlert&&/*#__PURE__*/_jsx(Alert,{severity:\"error\",children:\"Please enter numeric data separated by commas, for example: 0,1,2\"})]}),/*#__PURE__*/_jsx(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:/*#__PURE__*/_jsx(TextField,{variant:\"outlined\",value:workerIp,label:\"Worker Ip, specify the worker ip where the model is located in a distributed scenario\",onChange:function onChange(e){return setWorkerIp(e.target.value);}})})]})]}),/*#__PURE__*/_jsxs(Box,{className:\"buttonsContainer\",children:[/*#__PURE__*/_jsx(\"button\",{title:\"Launch\",className:\"buttonContainer\",onClick:function onClick(){return launchModel(url,modelData);},disabled:modelType==='LLM'&&(isCallingApi||isUpdatingModel||!(modelFormat&&modelSize&&modelData&&(quantization||!modelData.is_builtin&&modelFormat!=='pytorch'))||!judgeArr(customParametersArr,['key','value'])||!judgeArr(loraListArr,['lora_name','local_path'])||!judgeArr(imageLoraLoadKwargsArr,['key','value'])||!judgeArr(imageLoraFuseKwargsArr,['key','value'])||requestLimitsAlert||GPUIdxAlert)||(modelType==='embedding'||modelType==='rerank')&&GPUIdxAlert,children:function(){if(isCallingApi||isUpdatingModel){return/*#__PURE__*/_jsx(Box,{className:\"buttonItem\",style:{backgroundColor:'#f2f2f2'},children:/*#__PURE__*/_jsx(CircularProgress,{size:\"20px\",sx:{color:'#000000'}})});}else if(!(modelFormat&&modelSize&&modelData&&(quantization||!modelData.is_builtin&&modelFormat!=='pytorch'))){return/*#__PURE__*/_jsx(Box,{className:\"buttonItem\",style:{backgroundColor:'#f2f2f2'},children:/*#__PURE__*/_jsx(RocketLaunchOutlined,{size:\"20px\"})});}else{return/*#__PURE__*/_jsx(Box,{className:\"buttonItem\",children:/*#__PURE__*/_jsx(RocketLaunchOutlined,{color:\"#000000\",size:\"20px\"})});}}()}),/*#__PURE__*/_jsx(\"button\",{title:\"Go Back\",className:\"buttonContainer\",onClick:function onClick(){setSelected(false);setHover(false);},children:/*#__PURE__*/_jsx(Box,{className:\"buttonItem\",children:/*#__PURE__*/_jsx(UndoOutlined,{color:\"#000000\",size:\"20px\"})})})]})]})}),/*#__PURE__*/_jsx(Backdrop,{sx:{color:'#fff',zIndex:function zIndex(theme){return theme.zIndex.drawer+1;}},open:isJsonShow,children:/*#__PURE__*/_jsxs(\"div\",{className:\"jsonDialog\",children:[/*#__PURE__*/_jsxs(\"div\",{className:\"jsonDialog-title\",children:[/*#__PURE__*/_jsx(\"div\",{className:\"title-name\",children:modelData.model_name}),/*#__PURE__*/_jsx(CopyComponent,{tip:'Copy Json',text:JSON.stringify(modelData,null,4)})]}),/*#__PURE__*/_jsx(\"div\",{className:\"main-box\",children:/*#__PURE__*/_jsx(\"textarea\",{readOnly:true,className:\"textarea-box\",value:JSON.stringify(modelData,null,4)})}),/*#__PURE__*/_jsxs(\"div\",{className:\"but-box\",children:[/*#__PURE__*/_jsx(Button,{onClick:function onClick(){setIsJsonShow(false);},style:{marginRight:30},children:\"Cancel\"}),/*#__PURE__*/_jsx(Button,{onClick:handleJsonDataPresentation,children:\"Edit\"})]})]})}),/*#__PURE__*/_jsx(Snackbar,{anchorOrigin:{vertical:'top',horizontal:'center'},open:openSnackbar,onClose:function onClose(){return setOpenSnackbar(false);},message:\"Please fill in the complete parameters before adding!\"},'top'+'center'),/*#__PURE__*/_jsx(Backdrop,{sx:{color:'#fff',zIndex:function zIndex(theme){return theme.zIndex.drawer+1;}},open:isOpenCachedList,children:/*#__PURE__*/_jsxs(\"div\",{className:\"dialogBox\",children:[/*#__PURE__*/_jsxs(\"div\",{className:\"dialogTitle\",children:[/*#__PURE__*/_jsx(\"div\",{className:\"dialogTitle-model_name\",children:modelData.model_name}),/*#__PURE__*/_jsx(Close,{style:{cursor:'pointer'},onClick:handleCloseCachedList})]}),/*#__PURE__*/_jsx(TableContainer,{component:Paper,children:/*#__PURE__*/_jsxs(Table,{sx:{minWidth:500},style:{height:'500px',width:'100%'},stickyHeader:true,\"aria-label\":\"simple pagination table\",children:[/*#__PURE__*/_jsx(TableHead,{children:/*#__PURE__*/_jsxs(TableRow,{children:[modelType==='LLM'&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(TableCell,{align:\"left\",children:\"model_format\"}),/*#__PURE__*/_jsx(TableCell,{align:\"left\",children:\"model_size_in_billions\"}),/*#__PURE__*/_jsx(TableCell,{align:\"left\",children:\"quantizations\"})]}),/*#__PURE__*/_jsx(TableCell,{align:\"left\",style:{width:192},children:\"real_path\"}),/*#__PURE__*/_jsx(TableCell,{align:\"left\",style:{width:46}}),/*#__PURE__*/_jsx(TableCell,{align:\"left\",style:{width:192},children:\"path\"}),/*#__PURE__*/_jsx(TableCell,{align:\"left\",style:{width:46}}),/*#__PURE__*/_jsx(TableCell,{align:\"left\",style:{whiteSpace:'nowrap',minWidth:116},children:\"IP Address\"}),/*#__PURE__*/_jsx(TableCell,{align:\"left\",children:\"operation\"})]})}),/*#__PURE__*/_jsxs(TableBody,{style:{position:'relative'},children:[cachedListArr.slice(page*5,page*5+5).map(function(row){return/*#__PURE__*/_jsxs(StyledTableRow,{style:{maxHeight:90},children:[modelType==='LLM'&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(TableCell,{component:\"th\",scope:\"row\",children:row.model_format===null?'—':row.model_format}),/*#__PURE__*/_jsx(TableCell,{children:row.model_size_in_billions===null?'—':row.model_size_in_billions}),/*#__PURE__*/_jsx(TableCell,{children:row.quantization===null?'—':row.quantization})]}),/*#__PURE__*/_jsx(TableCell,{children:/*#__PURE__*/_jsx(Tooltip,{title:row.real_path,children:/*#__PURE__*/_jsx(\"div\",{className:modelType==='LLM'?'pathBox':'pathBox pathBox2',children:row.real_path})})}),/*#__PURE__*/_jsx(TableCell,{children:/*#__PURE__*/_jsx(CopyComponent,{tip:'Copy real_path',text:row.real_path})}),/*#__PURE__*/_jsx(TableCell,{children:/*#__PURE__*/_jsx(Tooltip,{title:row.path,children:/*#__PURE__*/_jsx(\"div\",{className:modelType==='LLM'?'pathBox':'pathBox pathBox2',children:row.path})})}),/*#__PURE__*/_jsx(TableCell,{children:/*#__PURE__*/_jsx(CopyComponent,{tip:'Copy path',text:row.path})}),/*#__PURE__*/_jsx(TableCell,{children:row.actor_ip_address}),/*#__PURE__*/_jsx(TableCell,{align:modelType==='LLM'?'center':'left',children:/*#__PURE__*/_jsx(IconButton,{\"aria-label\":\"delete\",size:\"large\",onClick:function onClick(){return handleOpenDeleteCachedDialog(row.real_path,row.model_version);},children:/*#__PURE__*/_jsx(Delete,{})})})]},row.model_name);}),emptyRows>0&&/*#__PURE__*/_jsx(TableRow,{style:{height:89.4*emptyRows},children:/*#__PURE__*/_jsx(TableCell,{})}),cachedListArr.length===0&&/*#__PURE__*/_jsx(\"div\",{className:\"empty\",children:\"No cache for now !\"})]})]})}),/*#__PURE__*/_jsx(TablePagination,{style:{float:'right'},rowsPerPageOptions:[5],count:cachedListArr.length,rowsPerPage:5,page:page,onPageChange:handleChangePage})]})}),/*#__PURE__*/_jsx(DeleteDialog,{text:'Confirm deletion of cache files? This action is irreversible.',isDelete:isDeleteCached,onHandleIsDelete:function onHandleIsDelete(){return setIsDeleteCached(false);},onHandleDelete:handleDeleteCached})]});};export default ModelCard;","map":{"version":3,"names":["ChatOutlined","Close","Delete","EditNote","EditNoteOutlined","ExpandLess","ExpandMore","Grade","HelpCenterOutlined","RocketLaunchOutlined","StarBorder","UndoOutlined","Alert","Backdrop","Box","Button","Chip","CircularProgress","Collapse","Drawer","FormControl","Grid","IconButton","InputLabel","ListItemButton","ListItemText","MenuItem","Paper","Select","Snackbar","Stack","Table","TableBody","TableCell","TableContainer","TableHead","TablePagination","TableRow","TextField","Tooltip","styled","React","useContext","useEffect","useRef","useState","useNavigate","ApiContext","CopyComponent","DeleteDialog","fetchWrapper","TitleTypography","AddPair","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","llmAllDataKey","ModelCard","_ref","_JSON$parse","_JSON$parse2","url","modelData","gpuAvailable","modelType","_ref$is_custom","is_custom","onHandleCompleteDelete","onHandlecustomDelete","onGetCollectionArr","_useState","_useState2","_slicedToArray","hover","setHover","_useState3","_useState4","selected","setSelected","_useState5","_useState6","requestLimitsAlert","setRequestLimitsAlert","_useState7","_useState8","GPUIdxAlert","setGPUIdxAlert","_useState9","_useState10","isOther","setIsOther","_useState11","_useState12","isPeftModelConfig","setIsPeftModelConfig","_useState13","_useState14","openSnackbar","setOpenSnackbar","_useContext","isCallingApi","setIsCallingApi","_useContext2","isUpdatingModel","_useContext3","setErrorMsg","navigate","_useState15","_useState16","modelUID","setModelUID","_useState17","_useState18","modelEngine","setModelEngine","_useState19","_useState20","modelFormat","setModelFormat","_useState21","_useState22","modelSize","setModelSize","_useState23","_useState24","quantization","setQuantization","_useState25","_useState26","nGPU","setNGPU","_useState27","_useState28","nGpu","setNGpu","_useState29","_useState30","nGPULayers","setNGPULayers","_useState31","_useState32","replica","setReplica","_useState33","_useState34","requestLimits","setRequestLimits","_useState35","_useState36","workerIp","setWorkerIp","_useState37","_useState38","GPUIdx","setGPUIdx","_useState39","_useState40","enginesObj","setEnginesObj","_useState41","_useState42","engineOptions","setEngineOptions","_useState43","_useState44","formatOptions","setFormatOptions","_useState45","_useState46","sizeOptions","setSizeOptions","_useState47","_useState48","quantizationOptions","setQuantizationOptions","_useState49","_useState50","customDeleted","setCustomDeleted","_useState51","_useState52","customParametersArr","setCustomParametersArr","_useState53","_useState54","loraListArr","setLoraListArr","_useState55","_useState56","imageLoraLoadKwargsArr","setImageLoraLoadKwargsArr","_useState57","_useState58","imageLoraFuseKwargsArr","setImageLoraFuseKwargsArr","_useState59","_useState60","isOpenCachedList","setIsOpenCachedList","_useState61","_useState62","isDeleteCached","setIsDeleteCached","_useState63","_useState64","cachedListArr","setCachedListArr","_useState65","_useState66","cachedModelVersion","setCachedModelVersion","_useState67","_useState68","cachedRealPath","setCachedRealPath","_useState69","_useState70","page","setPage","_useState71","_useState72","isDeleteCustomModel","setIsDeleteCustomModel","_useState73","_useState74","isJsonShow","setIsJsonShow","_useState75","_useState76","isHistory","setIsHistory","_useState77","_useState78","customArr","setCustomArr","_useState79","_useState80","loraArr","setLoraArr","_useState81","_useState82","imageLoraLoadArr","setImageLoraLoadArr","_useState83","_useState84","imageLoraFuseArr","setImageLoraFuseArr","_useState85","_useState86","customParametersArrLength","setCustomParametersArrLength","parentRef","range","start","end","Array","fill","undefined","map","_","i","isCached","spec","model_format","cache_status","some","cs","convertModelSize","size","toString","includes","parseInt","keyArr","key","push","length","handleLlmHistory","format","_toConsumableArray","Set","item","sizes","filter","model_size_in_billions","Number","quants","flatMap","quantizations","current","scrollTo","top","scrollHeight","behavior","getNGPURange","concat","getNewNGPURange","getModelEngine","model_name","get","then","data","Object","keys","catch","error","console","response","status","message","launchModel","modelDataWithID_LLM","model_uid","trim","model_type","model_engine","n_gpu","request_limits","String","worker_ip","gpu_idx","handleGPUIdx","modelDataWithID_other","_objectSpread","n_gpu_layers","peft_model_config","image_lora_load_kwargs","forEach","handleValueType","value","image_lora_fuse_kwargs","lora_list","id","modelDataWithID","post","sessionStorage","setItem","historyArr","JSON","parse","localStorage","getItem","deepEqual","stringify","arr","split","handeCustomDelete","e","stopPropagation","subType","delete","judgeArr","keysArr","str","toLowerCase","StyledTableRow","_ref2","theme","backgroundColor","palette","action","emptyRows","Math","max","handleChangePage","newPage","handleOpenCachedList","getCachedList","document","body","style","overflow","handleCloseCachedList","list","handleOpenDeleteCachedDialog","real_path","model_version","handleDeleteCached","cachedArr","handleJsonDataPresentation","handleGetHistory","_peft_model_config$lo","_arr$","join","loraData","lora_name","local_path","ImageLoraLoadData","ImageLoraFuseData","customData","handleOtherHistory","obj1","obj2","keysA","keysB","_i","_keysA","handleCollection","bool","collectionArr","handleDeleteChip","newArr","children","className","onMouseEnter","onMouseLeave","onClick","elevation","title","placement","color","spacing","direction","useFlexGap","flexWrap","sx","marginLeft","model_lang","v","label","variant","model_specs","deleteIcon","onDelete","model_description","floor","context_length","model_ability","disabled","language","model_family","dimensions","max_tokens","text","isDelete","onHandleIsDelete","onHandleDelete","open","onClose","anchor","display","alignItems","ref","flexDirection","width","mx","rowSpacing","columnSpacing","xs","margin","fullWidth","labelId","onChange","target","engine","subArr","specs","cached","displayedEngine","displayedFormat","displayedSize","quant","index","_specs$0$cache_status","_specs$","_specs$0$cache_status2","_specs$2","_specs$2$cache_status","displayedQuant","type","InputProps","inputProps","min","primary","marginRight","in","timeout","unmountOnExit","parseFloat","severity","regular","test","onGetArr","onJudgeArr","pairData","marginTop","is_builtin","zIndex","drawer","tip","readOnly","anchorOrigin","vertical","horizontal","cursor","component","minWidth","height","stickyHeader","align","whiteSpace","position","slice","row","maxHeight","scope","path","actor_ip_address","float","rowsPerPageOptions","count","rowsPerPage","onPageChange"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/scenes/launch_model/modelCard.js"],"sourcesContent":["import './styles/modelCardStyle.css'\n\nimport {\n ChatOutlined,\n Close,\n Delete,\n EditNote,\n EditNoteOutlined,\n ExpandLess,\n ExpandMore,\n Grade,\n HelpCenterOutlined,\n RocketLaunchOutlined,\n StarBorder,\n UndoOutlined,\n} from '@mui/icons-material'\nimport {\n Alert,\n Backdrop,\n Box,\n Button,\n Chip,\n CircularProgress,\n Collapse,\n Drawer,\n FormControl,\n Grid,\n IconButton,\n InputLabel,\n ListItemButton,\n ListItemText,\n MenuItem,\n Paper,\n Select,\n Snackbar,\n Stack,\n Table,\n TableBody,\n TableCell,\n TableContainer,\n TableHead,\n TablePagination,\n TableRow,\n TextField,\n Tooltip,\n} from '@mui/material'\nimport { styled } from '@mui/material/styles'\nimport React, { useContext, useEffect, useRef, useState } from 'react'\nimport { useNavigate } from 'react-router-dom'\n\nimport { ApiContext } from '../../components/apiContext'\nimport CopyComponent from '../../components/copyComponent/copyComponent'\nimport DeleteDialog from '../../components/deleteDialog'\nimport fetchWrapper from '../../components/fetchWrapper'\nimport TitleTypography from '../../components/titleTypography'\nimport AddPair from './components/addPair'\n\nconst llmAllDataKey = [\n 'model_uid',\n 'model_name',\n 'model_type',\n 'model_engine',\n 'model_format',\n 'model_size_in_billions',\n 'quantization',\n 'n_gpu',\n 'replica',\n 'request_limits',\n 'worker_ip',\n 'gpu_idx',\n 'peft_model_config',\n]\n\nconst ModelCard = ({\n url,\n modelData,\n gpuAvailable,\n modelType,\n is_custom = false,\n onHandleCompleteDelete,\n onHandlecustomDelete,\n onGetCollectionArr,\n}) => {\n const [hover, setHover] = useState(false)\n const [selected, setSelected] = useState(false)\n const [requestLimitsAlert, setRequestLimitsAlert] = useState(false)\n const [GPUIdxAlert, setGPUIdxAlert] = useState(false)\n const [isOther, setIsOther] = useState(false)\n const [isPeftModelConfig, setIsPeftModelConfig] = useState(false)\n const [openSnackbar, setOpenSnackbar] = useState(false)\n const { isCallingApi, setIsCallingApi } = useContext(ApiContext)\n const { isUpdatingModel } = useContext(ApiContext)\n const { setErrorMsg } = useContext(ApiContext)\n const navigate = useNavigate()\n\n // Model parameter selections\n const [modelUID, setModelUID] = useState('')\n const [modelEngine, setModelEngine] = useState('')\n const [modelFormat, setModelFormat] = useState('')\n const [modelSize, setModelSize] = useState('')\n const [quantization, setQuantization] = useState('')\n const [nGPU, setNGPU] = useState('auto')\n const [nGpu, setNGpu] = useState(gpuAvailable === 0 ? 'CPU' : 'GPU')\n const [nGPULayers, setNGPULayers] = useState(-1)\n const [replica, setReplica] = useState(1)\n const [requestLimits, setRequestLimits] = useState('')\n const [workerIp, setWorkerIp] = useState('')\n const [GPUIdx, setGPUIdx] = useState('')\n\n const [enginesObj, setEnginesObj] = useState({})\n const [engineOptions, setEngineOptions] = useState([])\n const [formatOptions, setFormatOptions] = useState([])\n const [sizeOptions, setSizeOptions] = useState([])\n const [quantizationOptions, setQuantizationOptions] = useState([])\n const [customDeleted, setCustomDeleted] = useState(false)\n const [customParametersArr, setCustomParametersArr] = useState([])\n const [loraListArr, setLoraListArr] = useState([])\n const [imageLoraLoadKwargsArr, setImageLoraLoadKwargsArr] = useState([])\n const [imageLoraFuseKwargsArr, setImageLoraFuseKwargsArr] = useState([])\n const [isOpenCachedList, setIsOpenCachedList] = useState(false)\n const [isDeleteCached, setIsDeleteCached] = useState(false)\n const [cachedListArr, setCachedListArr] = useState([])\n const [cachedModelVersion, setCachedModelVersion] = useState('')\n const [cachedRealPath, setCachedRealPath] = useState('')\n const [page, setPage] = useState(0)\n const [isDeleteCustomModel, setIsDeleteCustomModel] = useState(false)\n const [isJsonShow, setIsJsonShow] = useState(false)\n const [isHistory, setIsHistory] = useState(false)\n const [customArr, setCustomArr] = useState([])\n const [loraArr, setLoraArr] = useState([])\n const [imageLoraLoadArr, setImageLoraLoadArr] = useState([])\n const [imageLoraFuseArr, setImageLoraFuseArr] = useState([])\n const [customParametersArrLength, setCustomParametersArrLength] = useState(0)\n\n const parentRef = useRef(null)\n\n const range = (start, end) => {\n return new Array(end - start + 1).fill(undefined).map((_, i) => i + start)\n }\n\n const isCached = (spec) => {\n if (spec.model_format === 'pytorch') {\n return spec.cache_status && spec.cache_status === true\n } else {\n return spec.cache_status && spec.cache_status.some((cs) => cs)\n }\n }\n\n // model size can be int or string. For string style, \"1_8\" means 1.8 as an example.\n const convertModelSize = (size) => {\n return size.toString().includes('_') ? size : parseInt(size, 10)\n }\n\n useEffect(() => {\n let keyArr = []\n for (let key in enginesObj) {\n keyArr.push(key)\n }\n if (keyArr.length) {\n handleLlmHistory()\n }\n }, [enginesObj])\n\n useEffect(() => {\n if (modelEngine) {\n const format = [\n ...new Set(enginesObj[modelEngine].map((item) => item.model_format)),\n ]\n setFormatOptions(format)\n if (!isHistory || !format.includes(modelFormat)) {\n setModelFormat('')\n }\n if (format.length === 1) {\n setModelFormat(format[0])\n }\n }\n }, [modelEngine])\n\n useEffect(() => {\n if (modelEngine && modelFormat) {\n const sizes = [\n ...new Set(\n enginesObj[modelEngine]\n .filter((item) => item.model_format === modelFormat)\n .map((item) => item.model_size_in_billions)\n ),\n ]\n setSizeOptions(sizes)\n if (!isHistory || !sizes.includes(Number(modelSize))) {\n setModelSize('')\n }\n if (sizes.length === 1) {\n setModelSize(sizes[0])\n }\n }\n }, [modelEngine, modelFormat])\n\n useEffect(() => {\n if (modelEngine && modelFormat && modelSize) {\n const quants = [\n ...new Set(\n enginesObj[modelEngine]\n .filter(\n (item) =>\n item.model_format === modelFormat &&\n item.model_size_in_billions === convertModelSize(modelSize)\n )\n .flatMap((item) => item.quantizations)\n ),\n ]\n setQuantizationOptions(quants)\n if (!isHistory || !quants.includes(quantization)) {\n setQuantization('')\n }\n if (quants.length === 1) {\n setQuantization(quants[0])\n }\n }\n }, [modelEngine, modelFormat, modelSize])\n\n useEffect(() => {\n setCustomParametersArrLength(customParametersArr.length)\n if (\n parentRef.current &&\n customParametersArr.length > customParametersArrLength\n ) {\n parentRef.current.scrollTo({\n top: parentRef.current.scrollHeight,\n behavior: 'smooth',\n })\n }\n }, [customParametersArr])\n\n const getNGPURange = () => {\n if (gpuAvailable === 0) {\n // remain 'auto' for distributed situation\n return ['auto', 'CPU']\n }\n return ['auto', 'CPU'].concat(range(1, gpuAvailable))\n }\n\n const getNewNGPURange = () => {\n if (gpuAvailable === 0) {\n return ['CPU']\n } else {\n return ['GPU', 'CPU']\n }\n }\n\n const getModelEngine = (model_name) => {\n fetchWrapper\n .get(`/v1/engines/${model_name}`)\n .then((data) => {\n setEnginesObj(data)\n setEngineOptions(Object.keys(data))\n setIsCallingApi(false)\n })\n .catch((error) => {\n console.error('Error:', error)\n if (error.response.status !== 403) {\n setErrorMsg(error.message)\n }\n setIsCallingApi(false)\n })\n }\n\n const launchModel = () => {\n if (isCallingApi || isUpdatingModel) {\n return\n }\n\n setIsCallingApi(true)\n\n const modelDataWithID_LLM = {\n // If user does not fill model_uid, pass null (None) to server and server generates it.\n model_uid: modelUID.trim() === '' ? null : modelUID.trim(),\n model_name: modelData.model_name,\n model_type: modelType,\n model_engine: modelEngine,\n model_format: modelFormat,\n model_size_in_billions: convertModelSize(modelSize),\n quantization: quantization,\n n_gpu:\n parseInt(nGPU, 10) === 0 || nGPU === 'CPU'\n ? null\n : nGPU === 'auto'\n ? 'auto'\n : parseInt(nGPU, 10),\n replica: replica,\n request_limits:\n String(requestLimits).trim() === ''\n ? null\n : Number(String(requestLimits).trim()),\n worker_ip: workerIp.trim() === '' ? null : workerIp.trim(),\n gpu_idx: GPUIdx.trim() === '' ? null : handleGPUIdx(GPUIdx.trim()),\n }\n\n let modelDataWithID_other = {\n model_uid: modelUID.trim() === '' ? null : modelUID.trim(),\n model_name: modelData.model_name,\n model_type: modelType,\n }\n\n if (modelType === 'embedding' || modelType === 'rerank') {\n modelDataWithID_other = {\n ...modelDataWithID_other,\n replica: replica,\n n_gpu: nGpu === 'GPU' ? 'auto' : null,\n worker_ip: workerIp.trim() === '' ? null : workerIp.trim(),\n gpu_idx: GPUIdx.trim() === '' ? null : handleGPUIdx(GPUIdx.trim()),\n }\n }\n\n if (nGPULayers >= 0) {\n modelDataWithID_LLM.n_gpu_layers = nGPULayers\n }\n\n if (\n loraListArr.length ||\n imageLoraLoadKwargsArr.length ||\n imageLoraFuseKwargsArr.length\n ) {\n const peft_model_config = {}\n if (imageLoraLoadKwargsArr.length) {\n const image_lora_load_kwargs = {}\n imageLoraLoadKwargsArr.forEach((item) => {\n image_lora_load_kwargs[item.key] = handleValueType(item.value)\n })\n peft_model_config['image_lora_load_kwargs'] = image_lora_load_kwargs\n }\n if (imageLoraFuseKwargsArr.length) {\n const image_lora_fuse_kwargs = {}\n imageLoraFuseKwargsArr.forEach((item) => {\n image_lora_fuse_kwargs[item.key] = handleValueType(item.value)\n })\n peft_model_config['image_lora_fuse_kwargs'] = image_lora_fuse_kwargs\n }\n if (loraListArr.length) {\n const lora_list = loraListArr\n lora_list.map((item) => {\n delete item.id\n })\n peft_model_config['lora_list'] = lora_list\n }\n modelDataWithID_LLM['peft_model_config'] = peft_model_config\n }\n\n if (customParametersArr.length) {\n customParametersArr.forEach((item) => {\n modelDataWithID_LLM[item.key] = handleValueType(item.value)\n })\n }\n\n const modelDataWithID =\n modelType === 'LLM' ? modelDataWithID_LLM : modelDataWithID_other\n\n // First fetcher request to initiate the model\n fetchWrapper\n .post('/v1/models', modelDataWithID)\n .then(() => {\n navigate(`/running_models/${modelType}`)\n sessionStorage.setItem(\n 'runningModelType',\n `/running_models/${modelType}`\n )\n\n if (\n isHistory ||\n ((modelType === 'embedding' || modelType === 'rerank') &&\n (modelUID !== '' || replica !== 1 || workerIp !== '')) ||\n ((modelType === 'image' || modelType === 'audio') &&\n modelUID !== '') ||\n modelType === 'LLM'\n ) {\n let historyArr = JSON.parse(localStorage.getItem('historyArr')) || []\n if (!historyArr.some((item) => deepEqual(item, modelDataWithID))) {\n historyArr = historyArr.filter(\n (item) => item.model_name !== modelDataWithID.model_name\n )\n historyArr.push(modelDataWithID)\n }\n localStorage.setItem('historyArr', JSON.stringify(historyArr))\n }\n setIsCallingApi(false)\n })\n .catch((error) => {\n console.error('Error:', error)\n if (error.response.status !== 403) {\n setErrorMsg(error.message)\n }\n setIsCallingApi(false)\n })\n }\n\n const handleGPUIdx = (data) => {\n const arr = []\n data.split(',').forEach((item) => {\n arr.push(Number(item))\n })\n return arr\n }\n\n const handeCustomDelete = (e) => {\n e.stopPropagation()\n const subType = sessionStorage.getItem('subType').split('/')\n if (subType) {\n subType[3]\n fetchWrapper\n .delete(\n `/v1/model_registrations/${\n subType[3] === 'llm' ? 'LLM' : subType[3]\n }/${modelData.model_name}`\n )\n .then(() => {\n setCustomDeleted(true)\n onHandlecustomDelete(modelData.model_name)\n setIsDeleteCustomModel(false)\n })\n .catch((error) => {\n console.error(error)\n if (error.response.status !== 403) {\n setErrorMsg(error.message)\n }\n })\n }\n }\n\n const judgeArr = (arr, keysArr) => {\n if (\n arr.length &&\n arr[arr.length - 1][keysArr[0]] !== '' &&\n arr[arr.length - 1][keysArr[1]] !== ''\n ) {\n return true\n } else if (arr.length === 0) {\n return true\n } else {\n return false\n }\n }\n\n const handleValueType = (str) => {\n str = String(str)\n if (str.toLowerCase() === 'none') {\n return null\n } else if (str.toLowerCase() === 'true') {\n return true\n } else if (str.toLowerCase() === 'false') {\n return false\n } else if (Number(str) || (str !== '' && Number(str) === 0)) {\n return Number(str)\n } else {\n return str\n }\n }\n\n const StyledTableRow = styled(TableRow)(({ theme }) => ({\n '&:nth-of-type(odd)': {\n backgroundColor: theme.palette.action.hover,\n },\n }))\n\n const emptyRows =\n page >= 0 ? Math.max(0, (1 + page) * 5 - cachedListArr.length) : 0\n\n const handleChangePage = (_, newPage) => {\n setPage(newPage)\n }\n\n const handleOpenCachedList = () => {\n setIsOpenCachedList(true)\n getCachedList()\n document.body.style.overflow = 'hidden'\n }\n\n const handleCloseCachedList = () => {\n document.body.style.overflow = 'auto'\n setHover(false)\n setIsOpenCachedList(false)\n if (cachedListArr.length === 0) {\n onHandleCompleteDelete(modelData.model_name)\n }\n }\n\n const getCachedList = () => {\n fetchWrapper\n .get(`/v1/cache/models?model_name=${modelData.model_name}`)\n .then((data) => setCachedListArr(data.list))\n .catch((error) => {\n console.error(error)\n if (error.response.status !== 403) {\n setErrorMsg(error.message)\n }\n })\n }\n\n const handleOpenDeleteCachedDialog = (real_path, model_version) => {\n setCachedRealPath(real_path)\n setCachedModelVersion(model_version)\n setIsDeleteCached(true)\n }\n\n const handleDeleteCached = () => {\n fetchWrapper\n .delete(`/v1/cache/models?model_version=${cachedModelVersion}`)\n .then(() => {\n const cachedArr = cachedListArr.filter(\n (item) => item.real_path !== cachedRealPath\n )\n setCachedListArr(cachedArr)\n setIsDeleteCached(false)\n if (cachedArr.length) {\n if (\n (page + 1) * 5 >= cachedListArr.length &&\n cachedArr.length % 5 === 0\n ) {\n setPage(cachedArr.length / 5 - 1)\n }\n }\n })\n .catch((error) => {\n console.error(error)\n if (error.response.status !== 403) {\n setErrorMsg(error.message)\n }\n })\n }\n\n const handleJsonDataPresentation = () => {\n const arr = sessionStorage.getItem('subType').split('/')\n sessionStorage.setItem(\n 'registerModelType',\n `/register_model/${arr[arr.length - 1]}`\n )\n sessionStorage.setItem('customJsonData', JSON.stringify(modelData))\n navigate(`/register_model/${arr[arr.length - 1]}/${modelData.model_name}`)\n }\n\n const handleGetHistory = () => {\n const historyArr = JSON.parse(localStorage.getItem('historyArr')) || []\n return historyArr.filter((item) => item.model_name === modelData.model_name)\n }\n\n const handleLlmHistory = () => {\n const arr = handleGetHistory()\n if (arr.length) {\n const {\n model_engine,\n model_format,\n model_size_in_billions,\n quantization,\n n_gpu,\n replica,\n model_uid,\n request_limits,\n worker_ip,\n gpu_idx,\n peft_model_config,\n } = arr[0]\n\n setModelEngine(model_engine || '')\n setModelFormat(model_format || '')\n setModelSize(String(model_size_in_billions) || '')\n setQuantization(quantization || '')\n setNGPU(n_gpu || 'auto')\n setReplica(replica || 1)\n setModelUID(model_uid || '')\n setRequestLimits(request_limits || '')\n setWorkerIp(worker_ip || '')\n setGPUIdx(gpu_idx?.join(',') || '')\n\n let loraData = []\n peft_model_config?.lora_list?.forEach((item) => {\n loraData.push({\n lora_name: item.lora_name,\n local_path: item.local_path,\n })\n })\n setLoraArr(loraData)\n\n let ImageLoraLoadData = []\n for (let key in peft_model_config?.image_lora_load_kwargs) {\n ImageLoraLoadData.push({\n key: key,\n value: peft_model_config?.image_lora_load_kwargs[key],\n })\n }\n setImageLoraLoadArr(ImageLoraLoadData)\n\n let ImageLoraFuseData = []\n for (let key in peft_model_config?.image_lora_fuse_kwargs) {\n ImageLoraFuseData.push({\n key: key,\n value: peft_model_config?.image_lora_fuse_kwargs[key],\n })\n }\n setImageLoraFuseArr(ImageLoraFuseData)\n\n let customData = []\n for (let key in arr[0]) {\n !llmAllDataKey.includes(key) &&\n customData.push({ key: key, value: arr[0][key] })\n }\n setCustomArr(customData)\n\n if (model_uid || request_limits || worker_ip || gpu_idx?.join(','))\n setIsOther(true)\n\n if (\n loraData.length ||\n ImageLoraLoadData.length ||\n ImageLoraFuseData.length\n ) {\n setIsOther(true)\n setIsPeftModelConfig(true)\n }\n }\n }\n\n const handleOtherHistory = () => {\n const arr = handleGetHistory()\n if (arr.length) {\n if (modelType === 'embedding' || modelType === 'rerank') {\n setModelUID(arr[0].model_uid || '')\n setReplica(arr[0].replica || 1)\n setWorkerIp(arr[0].worker_ip || '')\n } else {\n setModelUID(arr[0].model_uid || '')\n }\n }\n }\n\n const deepEqual = (obj1, obj2) => {\n if (obj1 === obj2) return true\n if (\n typeof obj1 !== 'object' ||\n typeof obj2 !== 'object' ||\n obj1 == null ||\n obj2 == null\n ) {\n return false\n }\n\n let keysA = Object.keys(obj1)\n let keysB = Object.keys(obj2)\n if (keysA.length !== keysB.length) return false\n for (let key of keysA) {\n if (!keysB.includes(key) || !deepEqual(obj1[key], obj2[key])) {\n return false\n }\n }\n return true\n }\n\n const handleCollection = (bool) => {\n setHover(false)\n\n let collectionArr = JSON.parse(localStorage.getItem('collectionArr')) || []\n if (bool) {\n collectionArr.push(modelData.model_name)\n } else {\n collectionArr = collectionArr.filter(\n (item) => item !== modelData.model_name\n )\n }\n localStorage.setItem('collectionArr', JSON.stringify(collectionArr))\n\n onGetCollectionArr(collectionArr)\n }\n\n const handleDeleteChip = () => {\n const arr = JSON.parse(localStorage.getItem('historyArr'))\n const newArr = arr.filter(\n (item) => item.model_name !== modelData.model_name\n )\n localStorage.setItem('historyArr', JSON.stringify(newArr))\n setIsHistory(false)\n if (modelType === 'LLM') {\n setModelEngine('')\n setModelFormat('')\n setModelSize('')\n setQuantization('')\n setNGPU('auto')\n setReplica(1)\n setModelUID('')\n setRequestLimits('')\n setWorkerIp('')\n setGPUIdx('')\n setLoraArr([])\n setImageLoraLoadArr([])\n setImageLoraFuseArr([])\n setCustomArr([])\n setIsOther(false)\n setIsPeftModelConfig(false)\n } else if (modelType === 'embedding' || modelType === 'rerank') {\n setModelUID('')\n setReplica(1)\n setWorkerIp('')\n } else {\n setModelUID('')\n }\n }\n\n // Set two different states based on mouse hover\n return (\n <>\n <Paper\n id={modelData.model_name}\n className=\"container\"\n onMouseEnter={() => setHover(true)}\n onMouseLeave={() => setHover(false)}\n onClick={() => {\n if (!selected && !customDeleted) {\n const arr = handleGetHistory()\n if (arr.length) setIsHistory(true)\n setSelected(true)\n if (modelType === 'LLM') {\n getModelEngine(modelData.model_name)\n } else {\n handleOtherHistory()\n }\n }\n }}\n elevation={hover ? 24 : 4}\n >\n {modelType === 'LLM' ? (\n <Box className=\"descriptionCard\">\n {is_custom && (\n <div className=\"cardTitle\">\n <TitleTypography value={modelData.model_name} />\n <div className=\"iconButtonBox\">\n <Tooltip title={'Edit'} placement=\"top\">\n <IconButton\n aria-label=\"show\"\n onClick={(e) => {\n e.stopPropagation()\n setIsJsonShow(true)\n }}\n >\n <EditNote />\n </IconButton>\n </Tooltip>\n <Tooltip title={'delete'} placement=\"top\">\n <IconButton\n aria-label=\"delete\"\n onClick={(e) => {\n e.stopPropagation()\n setIsDeleteCustomModel(true)\n }}\n >\n <Delete />\n </IconButton>\n </Tooltip>\n </div>\n </div>\n )}\n {!is_custom && (\n <div className=\"cardTitle\">\n <TitleTypography value={modelData.model_name} />\n <div className=\"iconButtonBox\">\n {JSON.parse(localStorage.getItem('collectionArr'))?.includes(\n modelData.model_name\n ) ? (\n <Tooltip title={'Unfavorite'} placement=\"top\">\n <IconButton\n aria-label=\"collection\"\n onClick={(e) => {\n e.stopPropagation()\n handleCollection(false)\n }}\n >\n <Grade style={{ color: 'rgb(255, 206, 0)' }} />\n </IconButton>\n </Tooltip>\n ) : (\n <Tooltip title={'Favorite'} placement=\"top\">\n <IconButton\n aria-label=\"cancellation-of-collections\"\n onClick={(e) => {\n e.stopPropagation()\n handleCollection(true)\n }}\n >\n <StarBorder />\n </IconButton>\n </Tooltip>\n )}\n </div>\n </div>\n )}\n\n <Stack\n spacing={1}\n direction=\"row\"\n useFlexGap\n flexWrap=\"wrap\"\n sx={{ marginLeft: 1 }}\n >\n {modelData.model_lang &&\n (() => {\n return modelData.model_lang.map((v) => {\n return (\n <Chip key={v} label={v} variant=\"outlined\" size=\"small\" />\n )\n })\n })()}\n {(() => {\n if (\n modelData.model_specs &&\n modelData.model_specs.some((spec) => isCached(spec))\n ) {\n return (\n <Chip\n label=\"Cached\"\n variant=\"outlined\"\n size=\"small\"\n deleteIcon={<EditNote />}\n onDelete={handleOpenCachedList}\n />\n )\n }\n })()}\n {(() => {\n if (is_custom && customDeleted) {\n return (\n <Chip label=\"Deleted\" variant=\"outlined\" size=\"small\" />\n )\n }\n })()}\n </Stack>\n {modelData.model_description && (\n <p className=\"p\" title={modelData.model_description}>\n {modelData.model_description}\n </p>\n )}\n\n <div className=\"iconRow\">\n <div className=\"iconItem\">\n <span className=\"boldIconText\">\n {Math.floor(modelData.context_length / 1000)}K\n </span>\n <small className=\"smallText\">context length</small>\n </div>\n {(() => {\n if (\n modelData.model_ability &&\n modelData.model_ability.includes('chat')\n ) {\n return (\n <div className=\"iconItem\">\n <ChatOutlined className=\"muiIcon\" />\n <small className=\"smallText\">chat model</small>\n </div>\n )\n } else if (\n modelData.model_ability &&\n modelData.model_ability.includes('generate')\n ) {\n return (\n <div className=\"iconItem\">\n <EditNoteOutlined className=\"muiIcon\" />\n <small className=\"smallText\">generate model</small>\n </div>\n )\n } else {\n return (\n <div className=\"iconItem\">\n <HelpCenterOutlined className=\"muiIcon\" />\n <small className=\"smallText\">other model</small>\n </div>\n )\n }\n })()}\n </div>\n </Box>\n ) : (\n <Box className=\"descriptionCard\">\n <div className=\"titleContainer\">\n {is_custom && (\n <div className=\"cardTitle\">\n <TitleTypography value={modelData.model_name} />\n <div className=\"iconButtonBox\">\n <Tooltip title={'Edit'} placement=\"top\">\n <IconButton\n aria-label=\"show\"\n onClick={(e) => {\n e.stopPropagation()\n setIsJsonShow(true)\n }}\n >\n <EditNote />\n </IconButton>\n </Tooltip>\n <Tooltip title={'delete'} placement=\"top\">\n <IconButton\n aria-label=\"delete\"\n onClick={(e) => {\n e.stopPropagation()\n setIsDeleteCustomModel(true)\n }}\n disabled={customDeleted}\n >\n <Delete />\n </IconButton>\n </Tooltip>\n </div>\n </div>\n )}\n {!is_custom && (\n <div className=\"cardTitle\">\n <TitleTypography value={modelData.model_name} />\n <div className=\"iconButtonBox\">\n {JSON.parse(\n localStorage.getItem('collectionArr')\n )?.includes(modelData.model_name) ? (\n <Tooltip title={'Unfavorite'} placement=\"top\">\n <IconButton\n aria-label=\"collection\"\n onClick={(e) => {\n e.stopPropagation()\n handleCollection(false)\n }}\n >\n <Grade style={{ color: 'rgb(255, 206, 0)' }} />\n </IconButton>\n </Tooltip>\n ) : (\n <Tooltip title={'Favorite'} placement=\"top\">\n <IconButton\n aria-label=\"cancellation-of-collections\"\n onClick={(e) => {\n e.stopPropagation()\n handleCollection(true)\n }}\n >\n <StarBorder />\n </IconButton>\n </Tooltip>\n )}\n </div>\n </div>\n )}\n\n <Stack\n spacing={1}\n direction=\"row\"\n useFlexGap\n flexWrap=\"wrap\"\n sx={{ marginLeft: 1 }}\n >\n {(() => {\n if (modelData.language) {\n return modelData.language.map((v) => {\n return <Chip label={v} variant=\"outlined\" size=\"small\" />\n })\n } else if (modelData.model_family) {\n return (\n <Chip\n label={modelData.model_family}\n variant=\"outlined\"\n size=\"small\"\n />\n )\n }\n })()}\n {(() => {\n if (modelData.cache_status) {\n return (\n <Chip\n label=\"Cached\"\n variant=\"outlined\"\n size=\"small\"\n deleteIcon={<EditNote />}\n onDelete={handleOpenCachedList}\n />\n )\n }\n })()}\n {(() => {\n if (is_custom && customDeleted) {\n return (\n <Chip label=\"Deleted\" variant=\"outlined\" size=\"small\" />\n )\n }\n })()}\n </Stack>\n </div>\n {modelData.dimensions && (\n <div className=\"iconRow\">\n <div className=\"iconItem\">\n <span className=\"boldIconText\">{modelData.dimensions}</span>\n <small className=\"smallText\">dimensions</small>\n </div>\n <div className=\"iconItem\">\n <span className=\"boldIconText\">{modelData.max_tokens}</span>\n <small className=\"smallText\">max tokens</small>\n </div>\n </div>\n )}\n {!selected && hover && (\n <p className=\"instructionText\">\n Click with mouse to launch the model\n </p>\n )}\n </Box>\n )}\n </Paper>\n\n <DeleteDialog\n text={\n 'Are you sure to delete this custom model? This behavior is irreversible.'\n }\n isDelete={isDeleteCustomModel}\n onHandleIsDelete={() => setIsDeleteCustomModel(false)}\n onHandleDelete={handeCustomDelete}\n />\n <Drawer\n open={selected}\n onClose={() => {\n setSelected(false)\n setHover(false)\n }}\n anchor={'right'}\n >\n <div className=\"drawerCard\">\n <div style={{ display: 'flex', alignItems: 'center' }}>\n <TitleTypography value={modelData.model_name} />\n {isHistory && (\n <Chip\n label=\"Last Config\"\n variant=\"outlined\"\n size=\"small\"\n color=\"primary\"\n onDelete={handleDeleteChip}\n />\n )}\n </div>\n\n {modelType === 'LLM' ? (\n <Box\n ref={parentRef}\n className=\"formContainer\"\n display=\"flex\"\n flexDirection=\"column\"\n width=\"100%\"\n mx=\"auto\"\n >\n <Grid rowSpacing={0} columnSpacing={1}>\n <Grid item xs={12}>\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <InputLabel id=\"modelEngine-label\">Model Engine</InputLabel>\n <Select\n labelId=\"modelEngine-label\"\n value={modelEngine}\n onChange={(e) => setModelEngine(e.target.value)}\n label=\"Model Engine\"\n >\n {engineOptions.map((engine) => {\n const subArr = []\n enginesObj[engine].forEach((item) => {\n subArr.push(item.model_format)\n })\n const arr = [...new Set(subArr)]\n const specs = modelData.model_specs.filter((spec) =>\n arr.includes(spec.model_format)\n )\n\n const cached = specs.some((spec) => isCached(spec))\n\n const displayedEngine = cached\n ? engine + ' (cached)'\n : engine\n\n return (\n <MenuItem key={engine} value={engine}>\n {displayedEngine}\n </MenuItem>\n )\n })}\n </Select>\n </FormControl>\n </Grid>\n <Grid item xs={12}>\n <FormControl\n variant=\"outlined\"\n margin=\"normal\"\n fullWidth\n disabled={!modelEngine}\n >\n <InputLabel id=\"modelFormat-label\">Model Format</InputLabel>\n <Select\n labelId=\"modelFormat-label\"\n value={modelFormat}\n onChange={(e) => setModelFormat(e.target.value)}\n label=\"Model Format\"\n >\n {formatOptions.map((format) => {\n const specs = modelData.model_specs.filter(\n (spec) => spec.model_format === format\n )\n\n const cached = specs.some((spec) => isCached(spec))\n\n const displayedFormat = cached\n ? format + ' (cached)'\n : format\n\n return (\n <MenuItem key={format} value={format}>\n {displayedFormat}\n </MenuItem>\n )\n })}\n </Select>\n </FormControl>\n </Grid>\n <Grid item xs={12}>\n <FormControl\n variant=\"outlined\"\n margin=\"normal\"\n fullWidth\n disabled={!modelFormat}\n >\n <InputLabel id=\"modelSize-label\">Model Size</InputLabel>\n <Select\n labelId=\"modelSize-label\"\n value={modelSize}\n onChange={(e) => setModelSize(e.target.value)}\n label=\"Model Size\"\n >\n {sizeOptions.map((size) => {\n const specs = modelData.model_specs\n .filter((spec) => spec.model_format === modelFormat)\n .filter(\n (spec) => spec.model_size_in_billions === size\n )\n const cached = specs.some((spec) => isCached(spec))\n\n const displayedSize = cached ? size + ' (cached)' : size\n\n return (\n <MenuItem key={size} value={size}>\n {displayedSize}\n </MenuItem>\n )\n })}\n </Select>\n </FormControl>\n </Grid>\n <Grid item xs={12}>\n <FormControl\n variant=\"outlined\"\n margin=\"normal\"\n fullWidth\n disabled={!modelFormat || !modelSize}\n >\n <InputLabel id=\"quantization-label\">\n Quantization\n </InputLabel>\n <Select\n labelId=\"quantization-label\"\n value={quantization}\n onChange={(e) => setQuantization(e.target.value)}\n label=\"Quantization\"\n >\n {quantizationOptions.map((quant, index) => {\n const specs = modelData.model_specs\n .filter((spec) => spec.model_format === modelFormat)\n .filter(\n (spec) =>\n spec.model_size_in_billions ===\n convertModelSize(modelSize)\n )\n\n const cached =\n modelFormat === 'pytorch'\n ? specs[0]?.cache_status ?? false === true\n : specs[0]?.cache_status?.[index] ?? false === true\n\n const displayedQuant = cached\n ? quant + ' (cached)'\n : quant\n\n return (\n <MenuItem key={quant} value={quant}>\n {displayedQuant}\n </MenuItem>\n )\n })}\n </Select>\n </FormControl>\n </Grid>\n <Grid item xs={12}>\n {modelFormat !== 'ggufv2' && modelFormat !== 'ggmlv3' ? (\n <FormControl\n variant=\"outlined\"\n margin=\"normal\"\n fullWidth\n disabled={!modelFormat || !modelSize || !quantization}\n >\n <InputLabel id=\"n-gpu-label\">N-GPU</InputLabel>\n <Select\n labelId=\"n-gpu-label\"\n value={nGPU}\n onChange={(e) => setNGPU(e.target.value)}\n label=\"N-GPU\"\n >\n {getNGPURange().map((v) => {\n return (\n <MenuItem key={v} value={v}>\n {v}\n </MenuItem>\n )\n })}\n </Select>\n </FormControl>\n ) : (\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n disabled={!modelFormat || !modelSize || !quantization}\n type=\"number\"\n label=\"N GPU Layers\"\n InputProps={{\n inputProps: {\n min: -1,\n },\n }}\n value={nGPULayers}\n onChange={(e) =>\n setNGPULayers(parseInt(e.target.value, 10))\n }\n />\n </FormControl>\n )}\n </Grid>\n <Grid item xs={12}>\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n disabled={!modelFormat || !modelSize || !quantization}\n type=\"number\"\n InputProps={{\n inputProps: {\n min: 1,\n },\n }}\n label=\"Replica\"\n value={replica}\n onChange={(e) => setReplica(parseInt(e.target.value, 10))}\n />\n </FormControl>\n </Grid>\n <ListItemButton onClick={() => setIsOther(!isOther)}>\n <div style={{ display: 'flex', alignItems: 'center' }}>\n <ListItemText\n primary=\"Optional Configurations\"\n style={{ marginRight: 10 }}\n />\n {isOther ? <ExpandLess /> : <ExpandMore />}\n </div>\n </ListItemButton>\n <Collapse in={isOther} timeout=\"auto\" unmountOnExit>\n <Grid item xs={12}>\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n variant=\"outlined\"\n value={modelUID}\n label=\"(Optional) Model UID, model name by default\"\n onChange={(e) => setModelUID(e.target.value)}\n />\n </FormControl>\n </Grid>\n <Grid item xs={12}>\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n value={requestLimits}\n label=\"(Optional) Request Limits, the number of request limits for this model,default is None\"\n onChange={(e) => {\n setRequestLimitsAlert(false)\n setRequestLimits(e.target.value)\n if (\n e.target.value !== '' &&\n (!Number(e.target.value) ||\n Number(e.target.value) < 1 ||\n parseInt(e.target.value) !==\n parseFloat(e.target.value))\n ) {\n setRequestLimitsAlert(true)\n }\n }}\n />\n {requestLimitsAlert && (\n <Alert severity=\"error\">\n Please enter an integer greater than 0\n </Alert>\n )}\n </FormControl>\n </Grid>\n <Grid item xs={12}>\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n variant=\"outlined\"\n value={workerIp}\n label=\"(Optional) Worker Ip, specify the worker ip where the model is located in a distributed scenario\"\n onChange={(e) => setWorkerIp(e.target.value)}\n />\n </FormControl>\n </Grid>\n <Grid item xs={12}>\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n value={GPUIdx}\n label=\"(Optional) GPU Idx, Specify the GPU index where the model is located\"\n onChange={(e) => {\n setGPUIdxAlert(false)\n setGPUIdx(e.target.value)\n const regular = /^\\d+(?:,\\d+)*$/\n if (\n e.target.value !== '' &&\n !regular.test(e.target.value)\n ) {\n setGPUIdxAlert(true)\n }\n }}\n />\n {GPUIdxAlert && (\n <Alert severity=\"error\">\n Please enter numeric data separated by commas, for\n example: 0,1,2\n </Alert>\n )}\n </FormControl>\n </Grid>\n <ListItemButton\n onClick={() => setIsPeftModelConfig(!isPeftModelConfig)}\n >\n <ListItemText primary=\"Lora Config\" />\n {isPeftModelConfig ? <ExpandLess /> : <ExpandMore />}\n </ListItemButton>\n <Collapse\n in={isPeftModelConfig}\n timeout=\"auto\"\n unmountOnExit\n style={{ marginLeft: '30px' }}\n >\n <AddPair\n customData={{\n title: 'Lora Model Config',\n key: 'lora_name',\n value: 'local_path',\n }}\n onGetArr={(arr) => {\n setLoraListArr(arr)\n }}\n onJudgeArr={judgeArr}\n pairData={loraArr}\n />\n <AddPair\n customData={{\n title: 'Lora Load Kwargs for Image Model',\n key: 'key',\n value: 'value',\n }}\n onGetArr={(arr) => {\n setImageLoraLoadKwargsArr(arr)\n }}\n onJudgeArr={judgeArr}\n pairData={imageLoraLoadArr}\n />\n <AddPair\n customData={{\n title: 'Lora Fuse Kwargs for Image Model',\n key: 'key',\n value: 'value',\n }}\n onGetArr={(arr) => {\n setImageLoraFuseKwargsArr(arr)\n }}\n onJudgeArr={judgeArr}\n pairData={imageLoraFuseArr}\n />\n </Collapse>\n </Collapse>\n <AddPair\n customData={{\n title: `Additional parameters passed to the inference engine${\n modelEngine ? ': ' + modelEngine : ''\n }`,\n key: 'key',\n value: 'value',\n }}\n onGetArr={(arr) => {\n setCustomParametersArr(arr)\n }}\n onJudgeArr={judgeArr}\n pairData={customArr}\n />\n </Grid>\n </Box>\n ) : (\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n variant=\"outlined\"\n value={modelUID}\n label=\"(Optional) Model UID, model name by default\"\n onChange={(e) => setModelUID(e.target.value)}\n />\n {(modelType === 'embedding' || modelType === 'rerank') && (\n <>\n <TextField\n style={{ marginTop: '25px' }}\n type=\"number\"\n InputProps={{\n inputProps: {\n min: 1,\n },\n }}\n label=\"Replica\"\n value={replica}\n onChange={(e) => setReplica(parseInt(e.target.value, 10))}\n />\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <InputLabel id=\"n-gpu-label\">Device</InputLabel>\n <Select\n labelId=\"n-gpu-label\"\n value={nGpu}\n onChange={(e) => setNGpu(e.target.value)}\n label=\"N-GPU\"\n >\n {getNewNGPURange().map((v) => {\n return (\n <MenuItem key={v} value={v}>\n {v}\n </MenuItem>\n )\n })}\n </Select>\n </FormControl>\n {nGpu === 'GPU' && (\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n value={GPUIdx}\n label=\"GPU Idx, Specify the GPU index where the model is located\"\n onChange={(e) => {\n setGPUIdxAlert(false)\n setGPUIdx(e.target.value)\n const regular = /^\\d+(?:,\\d+)*$/\n if (\n e.target.value !== '' &&\n !regular.test(e.target.value)\n ) {\n setGPUIdxAlert(true)\n }\n }}\n />\n {GPUIdxAlert && (\n <Alert severity=\"error\">\n Please enter numeric data separated by commas, for\n example: 0,1,2\n </Alert>\n )}\n </FormControl>\n )}\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n variant=\"outlined\"\n value={workerIp}\n label=\"Worker Ip, specify the worker ip where the model is located in a distributed scenario\"\n onChange={(e) => setWorkerIp(e.target.value)}\n />\n </FormControl>\n </>\n )}\n </FormControl>\n )}\n <Box className=\"buttonsContainer\">\n <button\n title=\"Launch\"\n className=\"buttonContainer\"\n onClick={() => launchModel(url, modelData)}\n disabled={\n (modelType === 'LLM' &&\n (isCallingApi ||\n isUpdatingModel ||\n !(\n modelFormat &&\n modelSize &&\n modelData &&\n (quantization ||\n (!modelData.is_builtin && modelFormat !== 'pytorch'))\n ) ||\n !judgeArr(customParametersArr, ['key', 'value']) ||\n !judgeArr(loraListArr, ['lora_name', 'local_path']) ||\n !judgeArr(imageLoraLoadKwargsArr, ['key', 'value']) ||\n !judgeArr(imageLoraFuseKwargsArr, ['key', 'value']) ||\n requestLimitsAlert ||\n GPUIdxAlert)) ||\n ((modelType === 'embedding' || modelType === 'rerank') &&\n GPUIdxAlert)\n }\n >\n {(() => {\n if (isCallingApi || isUpdatingModel) {\n return (\n <Box\n className=\"buttonItem\"\n style={{\n backgroundColor: '#f2f2f2',\n }}\n >\n <CircularProgress\n size=\"20px\"\n sx={{\n color: '#000000',\n }}\n />\n </Box>\n )\n } else if (\n !(\n modelFormat &&\n modelSize &&\n modelData &&\n (quantization ||\n (!modelData.is_builtin && modelFormat !== 'pytorch'))\n )\n ) {\n return (\n <Box\n className=\"buttonItem\"\n style={{\n backgroundColor: '#f2f2f2',\n }}\n >\n <RocketLaunchOutlined size=\"20px\" />\n </Box>\n )\n } else {\n return (\n <Box className=\"buttonItem\">\n <RocketLaunchOutlined color=\"#000000\" size=\"20px\" />\n </Box>\n )\n }\n })()}\n </button>\n <button\n title=\"Go Back\"\n className=\"buttonContainer\"\n onClick={() => {\n setSelected(false)\n setHover(false)\n }}\n >\n <Box className=\"buttonItem\">\n <UndoOutlined color=\"#000000\" size=\"20px\" />\n </Box>\n </button>\n </Box>\n </div>\n </Drawer>\n <Backdrop\n sx={{ color: '#fff', zIndex: (theme) => theme.zIndex.drawer + 1 }}\n open={isJsonShow}\n >\n <div className=\"jsonDialog\">\n <div className=\"jsonDialog-title\">\n <div className=\"title-name\">{modelData.model_name}</div>\n <CopyComponent\n tip={'Copy Json'}\n text={JSON.stringify(modelData, null, 4)}\n />\n </div>\n <div className=\"main-box\">\n <textarea\n readOnly\n className=\"textarea-box\"\n value={JSON.stringify(modelData, null, 4)}\n />\n </div>\n <div className=\"but-box\">\n <Button\n onClick={() => {\n setIsJsonShow(false)\n }}\n style={{ marginRight: 30 }}\n >\n Cancel\n </Button>\n <Button onClick={handleJsonDataPresentation}>Edit</Button>\n </div>\n </div>\n </Backdrop>\n <Snackbar\n anchorOrigin={{ vertical: 'top', horizontal: 'center' }}\n open={openSnackbar}\n onClose={() => setOpenSnackbar(false)}\n message=\"Please fill in the complete parameters before adding!\"\n key={'top' + 'center'}\n />\n\n <Backdrop\n sx={{ color: '#fff', zIndex: (theme) => theme.zIndex.drawer + 1 }}\n open={isOpenCachedList}\n >\n <div className=\"dialogBox\">\n <div className=\"dialogTitle\">\n <div className=\"dialogTitle-model_name\">{modelData.model_name}</div>\n <Close\n style={{ cursor: 'pointer' }}\n onClick={handleCloseCachedList}\n />\n </div>\n <TableContainer component={Paper}>\n <Table\n sx={{ minWidth: 500 }}\n style={{ height: '500px', width: '100%' }}\n stickyHeader\n aria-label=\"simple pagination table\"\n >\n <TableHead>\n <TableRow>\n {modelType === 'LLM' && (\n <>\n <TableCell align=\"left\">model_format</TableCell>\n <TableCell align=\"left\">model_size_in_billions</TableCell>\n <TableCell align=\"left\">quantizations</TableCell>\n </>\n )}\n <TableCell align=\"left\" style={{ width: 192 }}>\n real_path\n </TableCell>\n <TableCell align=\"left\" style={{ width: 46 }}></TableCell>\n <TableCell align=\"left\" style={{ width: 192 }}>\n path\n </TableCell>\n <TableCell align=\"left\" style={{ width: 46 }}></TableCell>\n <TableCell\n align=\"left\"\n style={{ whiteSpace: 'nowrap', minWidth: 116 }}\n >\n IP Address\n </TableCell>\n <TableCell align=\"left\">operation</TableCell>\n </TableRow>\n </TableHead>\n <TableBody style={{ position: 'relative' }}>\n {cachedListArr.slice(page * 5, page * 5 + 5).map((row) => (\n <StyledTableRow\n style={{ maxHeight: 90 }}\n key={row.model_name}\n >\n {modelType === 'LLM' && (\n <>\n <TableCell component=\"th\" scope=\"row\">\n {row.model_format === null ? '—' : row.model_format}\n </TableCell>\n <TableCell>\n {row.model_size_in_billions === null\n ? '—'\n : row.model_size_in_billions}\n </TableCell>\n <TableCell>\n {row.quantization === null ? '—' : row.quantization}\n </TableCell>\n </>\n )}\n <TableCell>\n <Tooltip title={row.real_path}>\n <div\n className={\n modelType === 'LLM' ? 'pathBox' : 'pathBox pathBox2'\n }\n >\n {row.real_path}\n </div>\n </Tooltip>\n </TableCell>\n <TableCell>\n <CopyComponent\n tip={'Copy real_path'}\n text={row.real_path}\n />\n </TableCell>\n <TableCell>\n <Tooltip title={row.path}>\n <div\n className={\n modelType === 'LLM' ? 'pathBox' : 'pathBox pathBox2'\n }\n >\n {row.path}\n </div>\n </Tooltip>\n </TableCell>\n <TableCell>\n <CopyComponent tip={'Copy path'} text={row.path} />\n </TableCell>\n <TableCell>{row.actor_ip_address}</TableCell>\n <TableCell align={modelType === 'LLM' ? 'center' : 'left'}>\n <IconButton\n aria-label=\"delete\"\n size=\"large\"\n onClick={() =>\n handleOpenDeleteCachedDialog(\n row.real_path,\n row.model_version\n )\n }\n >\n <Delete />\n </IconButton>\n </TableCell>\n </StyledTableRow>\n ))}\n {emptyRows > 0 && (\n <TableRow style={{ height: 89.4 * emptyRows }}>\n <TableCell />\n </TableRow>\n )}\n {cachedListArr.length === 0 && (\n <div className=\"empty\">No cache for now !</div>\n )}\n </TableBody>\n </Table>\n </TableContainer>\n <TablePagination\n style={{ float: 'right' }}\n rowsPerPageOptions={[5]}\n count={cachedListArr.length}\n rowsPerPage={5}\n page={page}\n onPageChange={handleChangePage}\n />\n </div>\n </Backdrop>\n <DeleteDialog\n text={'Confirm deletion of cache files? This action is irreversible.'}\n isDelete={isDeleteCached}\n onHandleIsDelete={() => setIsDeleteCached(false)}\n onHandleDelete={handleDeleteCached}\n />\n </>\n )\n}\n\nexport default ModelCard\n"],"mappings":"8aAAA,MAAO,6BAA6B,CAEpC,OACEA,YAAY,CACZC,KAAK,CACLC,MAAM,CACNC,QAAQ,CACRC,gBAAgB,CAChBC,UAAU,CACVC,UAAU,CACVC,KAAK,CACLC,kBAAkB,CAClBC,oBAAoB,CACpBC,UAAU,CACVC,YAAY,KACP,qBAAqB,CAC5B,OACEC,KAAK,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ACP,CAAC,CACM,CAAC,cACjB9V,IAAA,CAAClB,eAAe,EACdgV,KAAK,CAAE,CAAE0I,KAAK,CAAE,OAAQ,CAAE,CAC1BC,kBAAkB,CAAE,CAAC,CAAC,CAAE,CACxBC,KAAK,CAAEhT,aAAa,CAACsE,MAAO,CAC5B2O,WAAW,CAAE,CAAE,CACfrS,IAAI,CAAEA,IAAK,CACXsS,YAAY,CAAEpJ,gBAAiB,CAChC,CAAC,EACC,CAAC,CACE,CAAC,cACXxT,IAAA,CAACL,YAAY,EACXkY,IAAI,CAAE,+DAAgE,CACtEC,QAAQ,CAAExO,cAAe,CACzByO,gBAAgB,CAAE,SAAAA,iBAAA,QAAM,CAAAxO,iBAAiB,CAAC,KAAK,CAAC,EAAC,CACjDyO,cAAc,CAAE3D,kBAAmB,CACpC,CAAC,EACF,CAAC,CAEP,CAAC,CAED,cAAe,CAAA/T,SAAS","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -1 +0,0 @@
1
- {"ast":null,"code":"import _toConsumableArray from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\";import _slicedToArray from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import{Box,Chip,FormControl,InputLabel,MenuItem,Select}from'@mui/material';import React,{useContext,useEffect,useState}from'react';import{useCookies}from'react-cookie';import{ApiContext}from'../../components/apiContext';import fetchWrapper from'../../components/fetchWrapper';import HotkeyFocusTextField from'../../components/hotkeyFocusTextField';import ModelCard from'./modelCard';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var modelAbilityArr=['generate','chat','vision'];var LaunchLLM=function LaunchLLM(_ref){var gpuAvailable=_ref.gpuAvailable;var _useContext=useContext(ApiContext),isCallingApi=_useContext.isCallingApi,setIsCallingApi=_useContext.setIsCallingApi,endPoint=_useContext.endPoint;var _useContext2=useContext(ApiContext),isUpdatingModel=_useContext2.isUpdatingModel;var _useContext3=useContext(ApiContext),setErrorMsg=_useContext3.setErrorMsg;var _useCookies=useCookies(['token']),_useCookies2=_slicedToArray(_useCookies,1),cookie=_useCookies2[0];var _useState=useState([]),_useState2=_slicedToArray(_useState,2),registrationData=_useState2[0],setRegistrationData=_useState2[1];// States used for filtering\nvar _useState3=useState(''),_useState4=_slicedToArray(_useState3,2),searchTerm=_useState4[0],setSearchTerm=_useState4[1];var _useState5=useState(''),_useState6=_slicedToArray(_useState5,2),modelAbility=_useState6[0],setModelAbility=_useState6[1];var _useState7=useState(''),_useState8=_slicedToArray(_useState7,2),status=_useState8[0],setStatus=_useState8[1];var _useState9=useState([]),_useState10=_slicedToArray(_useState9,2),statusArr=_useState10[0],setStatusArr=_useState10[1];var _useState11=useState([]),_useState12=_slicedToArray(_useState11,2),completeDeleteArr=_useState12[0],setCompleteDeleteArr=_useState12[1];var _useState13=useState([]),_useState14=_slicedToArray(_useState13,2),collectionArr=_useState14[0],setCollectionArr=_useState14[1];var _useState15=useState([]),_useState16=_slicedToArray(_useState15,2),filterArr=_useState16[0],setFilterArr=_useState16[1];var filter=function filter(registration){if(searchTerm!==''){if(!registration||typeof searchTerm!=='string')return false;var modelName=registration.model_name?registration.model_name.toLowerCase():'';var modelDescription=registration.model_description?registration.model_description.toLowerCase():'';if(!modelName.includes(searchTerm.toLowerCase())&&!modelDescription.includes(searchTerm.toLowerCase())){return false;}}if(modelAbility&&registration.model_ability.indexOf(modelAbility)<0)return false;if(completeDeleteArr.includes(registration.model_name)){registration.model_specs.forEach(function(item){item.cache_status=Array.isArray(item)?[false]:false;});}if(statusArr.length===1){if(statusArr[0]==='cached'){var judge=registration.model_specs.some(function(spec){return filterCache(spec);});return judge&&!completeDeleteArr.includes(registration.model_name);}else{return collectionArr===null||collectionArr===void 0?void 0:collectionArr.includes(registration.model_name);}}else if(statusArr.length>1){var _judge=registration.model_specs.some(function(spec){return filterCache(spec);});return _judge&&!completeDeleteArr.includes(registration.model_name)&&(collectionArr===null||collectionArr===void 0?void 0:collectionArr.includes(registration.model_name));}return true;};var filterCache=function filterCache(spec){if(spec.model_format==='pytorch'){return spec.cache_status&&spec.cache_status===true;}else{return spec.cache_status&&spec.cache_status.some(function(cs){return cs;});}};var handleCompleteDelete=function handleCompleteDelete(model_name){setCompleteDeleteArr([].concat(_toConsumableArray(completeDeleteArr),[model_name]));};var update=function update(){if(isCallingApi||isUpdatingModel||cookie.token!=='no_auth'&&!sessionStorage.getItem('token'))return;try{setIsCallingApi(true);fetchWrapper.get('/v1/model_registrations/LLM?detailed=true').then(function(data){var builtinRegistrations=data.filter(function(v){return v.is_builtin;});setRegistrationData(builtinRegistrations);var collectionData=JSON.parse(localStorage.getItem('collectionArr'));setCollectionArr(collectionData);}).catch(function(error){console.error('Error:',error);if(error.response.status!==403&&error.response.status!==401){setErrorMsg(error.message);}});}catch(error){console.error('Error:',error);}finally{setIsCallingApi(false);}};useEffect(function(){update();},[cookie.token]);var getCollectionArr=function getCollectionArr(data){setCollectionArr(data);};var handleChangeFilter=function handleChangeFilter(type,value){if(type==='modelAbility'){setModelAbility(value);setFilterArr([].concat(_toConsumableArray(filterArr.filter(function(item){return!modelAbilityArr.includes(item);})),[value]));}else{setStatus(value);var arr=[].concat(_toConsumableArray(filterArr.filter(function(item){return item!==value;})),[value]);setFilterArr(arr);setStatusArr(arr.filter(function(item){return!modelAbilityArr.includes(item);}));}};var handleDeleteChip=function handleDeleteChip(item){setFilterArr(filterArr.filter(function(subItem){return subItem!==item;}));if(item===modelAbility){setModelAbility('');}else{setStatusArr(statusArr.filter(function(subItem){return subItem!==item;}));if(item===status)setStatus('');}};return/*#__PURE__*/_jsxs(Box,{m:\"20px\",children:[/*#__PURE__*/_jsxs(\"div\",{style:{display:'grid',gridTemplateColumns:'150px 150px 1fr',columnGap:'20px',margin:'30px 2rem'},children:[/*#__PURE__*/_jsxs(FormControl,{sx:{marginTop:2,minWidth:120},size:\"small\",children:[/*#__PURE__*/_jsx(InputLabel,{id:\"ability-select-label\",children:\"Model Ability\"}),/*#__PURE__*/_jsxs(Select,{id:\"ability\",labelId:\"ability-select-label\",label:\"Model Ability\",onChange:function onChange(e){return handleChangeFilter('modelAbility',e.target.value);},value:modelAbility,size:\"small\",sx:{width:'150px'},children:[/*#__PURE__*/_jsx(MenuItem,{value:\"generate\",children:\"generate\"}),/*#__PURE__*/_jsx(MenuItem,{value:\"chat\",children:\"chat\"}),/*#__PURE__*/_jsx(MenuItem,{value:\"vision\",children:\"vl-chat\"})]})]}),/*#__PURE__*/_jsxs(FormControl,{sx:{marginTop:2,minWidth:120},size:\"small\",children:[/*#__PURE__*/_jsx(InputLabel,{id:\"select-status\",children:\"Status\"}),/*#__PURE__*/_jsxs(Select,{id:\"status\",labelId:\"select-status\",label:\"Status\",onChange:function onChange(e){return handleChangeFilter('status',e.target.value);},value:status,size:\"small\",sx:{width:'150px'},children:[/*#__PURE__*/_jsx(MenuItem,{value:\"cached\",children:\"cached\"}),/*#__PURE__*/_jsx(MenuItem,{value:\"favorite\",children:\"favorite\"})]})]}),/*#__PURE__*/_jsx(FormControl,{variant:\"outlined\",margin:\"normal\",children:/*#__PURE__*/_jsx(HotkeyFocusTextField,{id:\"search\",type:\"search\",label:\"Search for model name and description\",value:searchTerm,onChange:function onChange(e){return setSearchTerm(e.target.value);},size:\"small\",hotkey:\"/\"})})]}),/*#__PURE__*/_jsx(\"div\",{style:{margin:'0 0 30px 30px'},children:filterArr.map(function(item,index){return/*#__PURE__*/_jsx(Chip,{label:item,variant:\"outlined\",size:\"small\",color:\"primary\",style:{marginRight:10},onDelete:function onDelete(){return handleDeleteChip(item);}},index);})}),/*#__PURE__*/_jsx(\"div\",{style:{display:'grid',gridTemplateColumns:'repeat(auto-fill, minmax(300px, 1fr))',paddingLeft:'2rem',gridGap:'2rem 0rem'},children:registrationData.filter(function(registration){return filter(registration);}).map(function(filteredRegistration){return/*#__PURE__*/_jsx(ModelCard,{url:endPoint,modelData:filteredRegistration,gpuAvailable:gpuAvailable,modelType:'LLM',onHandleCompleteDelete:handleCompleteDelete,onGetCollectionArr:getCollectionArr},filteredRegistration.model_name);})})]});};export default LaunchLLM;","map":{"version":3,"names":["Box","Chip","FormControl","InputLabel","MenuItem","Select","React","useContext","useEffect","useState","useCookies","ApiContext","fetchWrapper","HotkeyFocusTextField","ModelCard","jsx","_jsx","jsxs","_jsxs","modelAbilityArr","LaunchLLM","_ref","gpuAvailable","_useContext","isCallingApi","setIsCallingApi","endPoint","_useContext2","isUpdatingModel","_useContext3","setErrorMsg","_useCookies","_useCookies2","_slicedToArray","cookie","_useState","_useState2","registrationData","setRegistrationData","_useState3","_useState4","searchTerm","setSearchTerm","_useState5","_useState6","modelAbility","setModelAbility","_useState7","_useState8","status","setStatus","_useState9","_useState10","statusArr","setStatusArr","_useState11","_useState12","completeDeleteArr","setCompleteDeleteArr","_useState13","_useState14","collectionArr","setCollectionArr","_useState15","_useState16","filterArr","setFilterArr","filter","registration","modelName","model_name","toLowerCase","modelDescription","model_description","includes","model_ability","indexOf","model_specs","forEach","item","cache_status","Array","isArray","length","judge","some","spec","filterCache","model_format","cs","handleCompleteDelete","concat","_toConsumableArray","update","token","sessionStorage","getItem","get","then","data","builtinRegistrations","v","is_builtin","collectionData","JSON","parse","localStorage","catch","error","console","response","message","getCollectionArr","handleChangeFilter","type","value","arr","handleDeleteChip","subItem","m","children","style","display","gridTemplateColumns","columnGap","margin","sx","marginTop","minWidth","size","id","labelId","label","onChange","e","target","width","variant","hotkey","map","index","color","marginRight","onDelete","paddingLeft","gridGap","filteredRegistration","url","modelData","modelType","onHandleCompleteDelete","onGetCollectionArr"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/scenes/launch_model/launchLLM.js"],"sourcesContent":["import {\n Box,\n Chip,\n FormControl,\n InputLabel,\n MenuItem,\n Select,\n} from '@mui/material'\nimport React, { useContext, useEffect, useState } from 'react'\nimport { useCookies } from 'react-cookie'\n\nimport { ApiContext } from '../../components/apiContext'\nimport fetchWrapper from '../../components/fetchWrapper'\nimport HotkeyFocusTextField from '../../components/hotkeyFocusTextField'\nimport ModelCard from './modelCard'\n\nconst modelAbilityArr = ['generate', 'chat', 'vision']\n\nconst LaunchLLM = ({ gpuAvailable }) => {\n const { isCallingApi, setIsCallingApi, endPoint } = useContext(ApiContext)\n const { isUpdatingModel } = useContext(ApiContext)\n const { setErrorMsg } = useContext(ApiContext)\n const [cookie] = useCookies(['token'])\n\n const [registrationData, setRegistrationData] = useState([])\n // States used for filtering\n const [searchTerm, setSearchTerm] = useState('')\n const [modelAbility, setModelAbility] = useState('')\n const [status, setStatus] = useState('')\n const [statusArr, setStatusArr] = useState([])\n const [completeDeleteArr, setCompleteDeleteArr] = useState([])\n const [collectionArr, setCollectionArr] = useState([])\n const [filterArr, setFilterArr] = useState([])\n\n const filter = (registration) => {\n if (searchTerm !== '') {\n if (!registration || typeof searchTerm !== 'string') return false\n const modelName = registration.model_name\n ? registration.model_name.toLowerCase()\n : ''\n const modelDescription = registration.model_description\n ? registration.model_description.toLowerCase()\n : ''\n\n if (\n !modelName.includes(searchTerm.toLowerCase()) &&\n !modelDescription.includes(searchTerm.toLowerCase())\n ) {\n return false\n }\n }\n\n if (modelAbility && registration.model_ability.indexOf(modelAbility) < 0)\n return false\n\n if (completeDeleteArr.includes(registration.model_name)) {\n registration.model_specs.forEach((item) => {\n item.cache_status = Array.isArray(item) ? [false] : false\n })\n }\n\n if (statusArr.length === 1) {\n if (statusArr[0] === 'cached') {\n const judge = registration.model_specs.some((spec) => filterCache(spec))\n return judge && !completeDeleteArr.includes(registration.model_name)\n } else {\n return collectionArr?.includes(registration.model_name)\n }\n } else if (statusArr.length > 1) {\n const judge = registration.model_specs.some((spec) => filterCache(spec))\n return (\n judge &&\n !completeDeleteArr.includes(registration.model_name) &&\n collectionArr?.includes(registration.model_name)\n )\n }\n\n return true\n }\n\n const filterCache = (spec) => {\n if (spec.model_format === 'pytorch') {\n return spec.cache_status && spec.cache_status === true\n } else {\n return spec.cache_status && spec.cache_status.some((cs) => cs)\n }\n }\n\n const handleCompleteDelete = (model_name) => {\n setCompleteDeleteArr([...completeDeleteArr, model_name])\n }\n\n const update = () => {\n if (\n isCallingApi ||\n isUpdatingModel ||\n (cookie.token !== 'no_auth' && !sessionStorage.getItem('token'))\n )\n return\n\n try {\n setIsCallingApi(true)\n\n fetchWrapper\n .get('/v1/model_registrations/LLM?detailed=true')\n .then((data) => {\n const builtinRegistrations = data.filter((v) => v.is_builtin)\n setRegistrationData(builtinRegistrations)\n const collectionData = JSON.parse(\n localStorage.getItem('collectionArr')\n )\n setCollectionArr(collectionData)\n })\n .catch((error) => {\n console.error('Error:', error)\n if (error.response.status !== 403 && error.response.status !== 401) {\n setErrorMsg(error.message)\n }\n })\n } catch (error) {\n console.error('Error:', error)\n } finally {\n setIsCallingApi(false)\n }\n }\n\n useEffect(() => {\n update()\n }, [cookie.token])\n\n const getCollectionArr = (data) => {\n setCollectionArr(data)\n }\n\n const handleChangeFilter = (type, value) => {\n if (type === 'modelAbility') {\n setModelAbility(value)\n setFilterArr([\n ...filterArr.filter((item) => {\n return !modelAbilityArr.includes(item)\n }),\n value,\n ])\n } else {\n setStatus(value)\n const arr = [\n ...filterArr.filter((item) => {\n return item !== value\n }),\n value,\n ]\n setFilterArr(arr)\n setStatusArr(\n arr.filter((item) => {\n return !modelAbilityArr.includes(item)\n })\n )\n }\n }\n\n const handleDeleteChip = (item) => {\n setFilterArr(\n filterArr.filter((subItem) => {\n return subItem !== item\n })\n )\n if (item === modelAbility) {\n setModelAbility('')\n } else {\n setStatusArr(\n statusArr.filter((subItem) => {\n return subItem !== item\n })\n )\n if (item === status) setStatus('')\n }\n }\n\n return (\n <Box m=\"20px\">\n <div\n style={{\n display: 'grid',\n gridTemplateColumns: '150px 150px 1fr',\n columnGap: '20px',\n margin: '30px 2rem',\n }}\n >\n <FormControl sx={{ marginTop: 2, minWidth: 120 }} size=\"small\">\n <InputLabel id=\"ability-select-label\">Model Ability</InputLabel>\n <Select\n id=\"ability\"\n labelId=\"ability-select-label\"\n label=\"Model Ability\"\n onChange={(e) => handleChangeFilter('modelAbility', e.target.value)}\n value={modelAbility}\n size=\"small\"\n sx={{ width: '150px' }}\n >\n <MenuItem value=\"generate\">generate</MenuItem>\n <MenuItem value=\"chat\">chat</MenuItem>\n <MenuItem value=\"vision\">vl-chat</MenuItem>\n </Select>\n </FormControl>\n <FormControl sx={{ marginTop: 2, minWidth: 120 }} size=\"small\">\n <InputLabel id=\"select-status\">Status</InputLabel>\n <Select\n id=\"status\"\n labelId=\"select-status\"\n label=\"Status\"\n onChange={(e) => handleChangeFilter('status', e.target.value)}\n value={status}\n size=\"small\"\n sx={{ width: '150px' }}\n >\n <MenuItem value=\"cached\">cached</MenuItem>\n <MenuItem value=\"favorite\">favorite</MenuItem>\n </Select>\n </FormControl>\n\n <FormControl variant=\"outlined\" margin=\"normal\">\n <HotkeyFocusTextField\n id=\"search\"\n type=\"search\"\n label=\"Search for model name and description\"\n value={searchTerm}\n onChange={(e) => setSearchTerm(e.target.value)}\n size=\"small\"\n hotkey=\"/\"\n />\n </FormControl>\n </div>\n <div style={{ margin: '0 0 30px 30px' }}>\n {filterArr.map((item, index) => (\n <Chip\n key={index}\n label={item}\n variant=\"outlined\"\n size=\"small\"\n color=\"primary\"\n style={{ marginRight: 10 }}\n onDelete={() => handleDeleteChip(item)}\n />\n ))}\n </div>\n <div\n style={{\n display: 'grid',\n gridTemplateColumns: 'repeat(auto-fill, minmax(300px, 1fr))',\n paddingLeft: '2rem',\n gridGap: '2rem 0rem',\n }}\n >\n {registrationData\n .filter((registration) => filter(registration))\n .map((filteredRegistration) => (\n <ModelCard\n key={filteredRegistration.model_name}\n url={endPoint}\n modelData={filteredRegistration}\n gpuAvailable={gpuAvailable}\n modelType={'LLM'}\n onHandleCompleteDelete={handleCompleteDelete}\n onGetCollectionArr={getCollectionArr}\n />\n ))}\n </div>\n </Box>\n )\n}\n\nexport default LaunchLLM\n"],"mappings":"kS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