fix: no backend options from model files
This commit is contained in:
@@ -447,6 +447,15 @@ const AddModal: FC<AddModalProps> = (props) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleOnOpen = async () => {
|
const handleOnOpen = async () => {
|
||||||
|
const [backendOptions, gpuOptions] = await Promise.all([
|
||||||
|
form.current?.getBackendOptions?.({
|
||||||
|
cluster_id: initClusterId()
|
||||||
|
}),
|
||||||
|
form.current?.getGPUOptionList?.({
|
||||||
|
clusterId: initClusterId()
|
||||||
|
})
|
||||||
|
]);
|
||||||
|
|
||||||
if (props.deploymentType === 'modelFiles') {
|
if (props.deploymentType === 'modelFiles') {
|
||||||
form.current?.form?.setFieldsValue({
|
form.current?.form?.setFieldsValue({
|
||||||
...props.initialValues
|
...props.initialValues
|
||||||
@@ -459,14 +468,6 @@ const AddModal: FC<AddModalProps> = (props) => {
|
|||||||
source: source
|
source: source
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
const [backendOptions, gpuOptions] = await Promise.all([
|
|
||||||
form.current?.getBackendOptions?.({
|
|
||||||
cluster_id: initClusterId()
|
|
||||||
}),
|
|
||||||
form.current?.getGPUOptionList?.({
|
|
||||||
clusterId: initClusterId()
|
|
||||||
})
|
|
||||||
]);
|
|
||||||
let backend = checkOnlyAscendNPU(gpuOptions)
|
let backend = checkOnlyAscendNPU(gpuOptions)
|
||||||
? backendOptionsMap.ascendMindie
|
? backendOptionsMap.ascendMindie
|
||||||
: backendOptionsMap.vllm;
|
: backendOptionsMap.vllm;
|
||||||
@@ -480,11 +481,6 @@ const AddModal: FC<AddModalProps> = (props) => {
|
|||||||
versions: { label: string; value: string }[];
|
versions: { label: string; value: string }[];
|
||||||
}) => item.value === backend
|
}) => item.value === backend
|
||||||
);
|
);
|
||||||
console.log(
|
|
||||||
'currentDefaultBackend:',
|
|
||||||
currentDefaultBackend,
|
|
||||||
props.initialValues
|
|
||||||
);
|
|
||||||
form.current?.setFieldsValue?.({
|
form.current?.setFieldsValue?.({
|
||||||
backend,
|
backend,
|
||||||
default_version: currentDefaultBackend?.default_version,
|
default_version: currentDefaultBackend?.default_version,
|
||||||
|
|||||||
Reference in New Issue
Block a user