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