fix: miss cluster id in evaluation

This commit is contained in:
jialin
2025-10-24 17:55:54 +08:00
parent ba80ade643
commit 7e81871118
6 changed files with 32 additions and 48 deletions
+18 -22
View File
@@ -197,6 +197,16 @@ const AddModal: FC<AddModalProps> = (props) => {
return categories || null;
};
const { run: onClickModel } = useDeferredRequest(async () => {
const allValues = form.current?.form?.getFieldsValue?.();
handleOnValuesChangeBefore({
changedValues: {},
allValues: allValues,
source: props.source
});
}, 100);
const { run: onSelectFile } = useDeferredRequest(
async (item: any, modelInfo: any, manual?: boolean) => {
unlockWarningStatus();
@@ -342,7 +352,6 @@ const AddModal: FC<AddModalProps> = (props) => {
if (manual) {
form.current?.resetFields(resetFields);
}
console.log('isgguf==================> select 2', item.isGGUF);
// If the item is empty
setIsGGUF(item.isGGUF);
updateSelectedModel(item);
@@ -371,20 +380,13 @@ const AddModal: FC<AddModalProps> = (props) => {
categories: getCategory(item)
};
console.log('newFormValues:', newFormValues);
form.current?.form?.setFieldsValue?.(newFormValues);
handleOnValuesChangeBefore({
changedValues: {},
allValues: newFormValues,
source: props.source
});
onClickModel();
}
};
const handleOnOk = async (allValues: FormData) => {
console.log('handleOnOk:', allValues);
onOk(allValues);
};
@@ -408,19 +410,13 @@ const AddModal: FC<AddModalProps> = (props) => {
if (res.show) {
return;
}
if (data.local_path || props.source !== modelSourceMap.local_path_value) {
// TODO confirm whether it is gguf by model file not by backend
handleOnValuesChange?.({
changedValues: {},
allValues: isGGUF
? data
: _.omit(data, [
'cpu_offloading',
'distributed_inference_across_workers'
]),
source: props.source
});
}
// TODO: confirm gguf change backend behavior
handleOnValuesChange?.({
changedValues: {},
allValues: data,
source: props.source
});
};
const onValuesChange = async (changedValues: any, allValues: any) => {
+5 -14
View File
@@ -8,7 +8,6 @@ import React, { useEffect, useMemo, useRef } from 'react';
import ColumnWrapper from '../../_components/column-wrapper';
import {
deployFormKeyMap,
modelSourceMap,
ScheduleValueMap,
updateIgnoreFields
} from '../config';
@@ -133,19 +132,11 @@ const UpdateModal: React.FC<AddModalProps> = (props) => {
if (res.show) {
return;
}
if (data.local_path || data.source !== modelSourceMap.local_path_value) {
handleOnValuesChange?.({
changedValues: {},
allValues:
backend === backendOptionsMap.llamaBox
? data
: _.omit(data, [
'cpu_offloading',
'distributed_inference_across_workers'
]),
source: data.source
});
}
handleOnValuesChange?.({
changedValues: {},
allValues: data,
source: data.source
});
};
const handleAsyncBackendChange = (backend: string) => {