fix: add version holder for backend
This commit is contained in:
@@ -42,7 +42,7 @@ const Catalog: React.FC = () => {
|
||||
});
|
||||
const [queryParams, setQueryParams] = useState({
|
||||
page: 1,
|
||||
perPage: 30,
|
||||
perPage: 24,
|
||||
search: '',
|
||||
categories: ''
|
||||
});
|
||||
|
||||
@@ -124,21 +124,24 @@ const AdvanceConfig: React.FC<AdvanceConfigProps> = (props) => {
|
||||
return {
|
||||
backend: 'llama-box',
|
||||
releases: 'https://github.com/gpustack/llama-box/releases',
|
||||
link: 'https://github.com/gpustack/llama-box?tab=readme-ov-file#usage'
|
||||
link: 'https://github.com/gpustack/llama-box?tab=readme-ov-file#usage',
|
||||
version: 'v0.0.140'
|
||||
};
|
||||
}
|
||||
if (backend === backendOptionsMap.vllm) {
|
||||
return {
|
||||
backend: 'vLLM',
|
||||
releases: 'https://github.com/vllm-project/vllm/releases',
|
||||
link: 'https://docs.vllm.ai/en/stable/serving/openai_compatible_server.html#cli-reference'
|
||||
link: 'https://docs.vllm.ai/en/stable/serving/openai_compatible_server.html#cli-reference',
|
||||
version: 'v0.8.5'
|
||||
};
|
||||
}
|
||||
if (backend === backendOptionsMap.ascendMindie) {
|
||||
return {
|
||||
backend: 'Ascend MindIE',
|
||||
releases: '',
|
||||
link: 'http://docs.gpustack.ai/latest/user-guide/inference-backends/#parameters-reference_2'
|
||||
link: 'http://docs.gpustack.ai/latest/user-guide/inference-backends/#parameters-reference_2',
|
||||
version: 'v0.1.0'
|
||||
};
|
||||
}
|
||||
|
||||
@@ -349,6 +352,11 @@ const AdvanceConfig: React.FC<AdvanceConfigProps> = (props) => {
|
||||
|
||||
<Form.Item name="backend_version">
|
||||
<SealInput.Input
|
||||
placeholder={
|
||||
backendParamsTips?.version
|
||||
? `${intl.formatMessage({ id: 'common.help.eg' })} ${backendParamsTips?.version}`
|
||||
: ''
|
||||
}
|
||||
onBlur={handleBackendVersionOnBlur}
|
||||
label={intl.formatMessage({ id: 'models.form.backendVersion' })}
|
||||
description={intl.formatMessage(
|
||||
@@ -357,6 +365,9 @@ const AdvanceConfig: React.FC<AdvanceConfigProps> = (props) => {
|
||||
},
|
||||
{
|
||||
backend: backendLabelMap[backend],
|
||||
version: backendParamsTips?.version
|
||||
? `(${intl.formatMessage({ id: 'common.help.eg' })} ${backendParamsTips?.version})`
|
||||
: '',
|
||||
link: backendParamsTips?.releases && (
|
||||
<span
|
||||
style={{
|
||||
|
||||
@@ -145,12 +145,12 @@ const AddModal: FC<AddModalProps> = (props) => {
|
||||
categories: getCategory(item)
|
||||
});
|
||||
|
||||
if (
|
||||
item.fakeName &&
|
||||
!isHolderRef.current.model &&
|
||||
!isHolderRef.current.file
|
||||
) {
|
||||
handleShowCompatibleAlert(item.evaluateResult);
|
||||
if (item.fakeName) {
|
||||
handleOnValuesChange?.({
|
||||
changedValues: {},
|
||||
allValues: form.current?.form?.getFieldsValue?.(),
|
||||
source: props.source
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -353,7 +353,6 @@ const AddModal: FC<AddModalProps> = (props) => {
|
||||
modelSource={props.source}
|
||||
onSelectFile={handleSelectModelFile}
|
||||
collapsed={collapsed}
|
||||
displayEvaluateStatus={displayEvaluateStatus}
|
||||
gpuOptions={props.gpuOptions}
|
||||
></HFModelFile>
|
||||
)}
|
||||
|
||||
@@ -160,10 +160,8 @@ const RenderWorkerDownloading = (props: {
|
||||
<Tooltip
|
||||
arrow={true}
|
||||
overlayInnerStyle={{
|
||||
width: 300,
|
||||
backgroundColor: 'var(--color-spotlight-bg)'
|
||||
width: 300
|
||||
}}
|
||||
overlayClassName="light-downloading-tooltip"
|
||||
title={
|
||||
<RenderRayactorDownloading
|
||||
severList={rayActors}
|
||||
@@ -477,6 +475,7 @@ const InstanceItem: React.FC<InstanceItemProps> = ({
|
||||
return (
|
||||
<TooltipOverlayScroller
|
||||
toolTipProps={{
|
||||
trigger: 'click',
|
||||
overlayInnerStyle: {
|
||||
width: 'max-content',
|
||||
maxWidth: '520px',
|
||||
|
||||
@@ -261,12 +261,17 @@ const SearchModel: React.FC<SearchInputProps> = (props) => {
|
||||
const currentItem = resultList.find(
|
||||
(item) => item.id === currentRef.current
|
||||
);
|
||||
displayEvaluateStatus?.({
|
||||
show: false,
|
||||
flag: {
|
||||
model: false
|
||||
}
|
||||
});
|
||||
|
||||
// if item is GGUF, the evaluating would be do after selecting the model file.
|
||||
if (currentItem && !currentItem.isGGUF) {
|
||||
displayEvaluateStatus?.({
|
||||
show: false,
|
||||
flag: {
|
||||
model: false
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (currentItem) {
|
||||
handleOnSelectModel(currentItem, true);
|
||||
}
|
||||
@@ -292,12 +297,6 @@ const SearchModel: React.FC<SearchInputProps> = (props) => {
|
||||
return { ...pre };
|
||||
});
|
||||
setLoadingModel?.(true);
|
||||
displayEvaluateStatus?.({
|
||||
show: true,
|
||||
flag: {
|
||||
model: true
|
||||
}
|
||||
});
|
||||
cacheRepoOptions.current = [];
|
||||
let list: any[] = [];
|
||||
if (modelSource === modelSourceMap.huggingface_value) {
|
||||
@@ -306,7 +305,6 @@ const SearchModel: React.FC<SearchInputProps> = (props) => {
|
||||
list = await getModelsFromModelscope(sort);
|
||||
}
|
||||
cacheRepoOptions.current = list;
|
||||
console.log('list=========', list);
|
||||
|
||||
setDataSource({
|
||||
repoOptions: list,
|
||||
@@ -314,6 +312,12 @@ const SearchModel: React.FC<SearchInputProps> = (props) => {
|
||||
networkError: false,
|
||||
sortType: sort
|
||||
});
|
||||
displayEvaluateStatus?.({
|
||||
show: true,
|
||||
flag: {
|
||||
model: true
|
||||
}
|
||||
});
|
||||
handleOnSelectModel(list[0]);
|
||||
setLoadingModel?.(false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user