fix: miss cluster id in evaluation
This commit is contained in:
@@ -23,7 +23,7 @@
|
|||||||
"version_configs": {
|
"version_configs": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"patternProperties": {
|
"patternProperties": {
|
||||||
"^[a-zA-Z0-9._-]+$": {
|
"^[a-zA-Z0-9._-]+-custom$": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"image_name": {
|
"image_name": {
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
"description": "multiple backend versions"
|
"description": "multiple backend versions ending with -custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": ["version_configs"],
|
"required": ["version_configs"],
|
||||||
|
|||||||
@@ -197,6 +197,16 @@ const AddModal: FC<AddModalProps> = (props) => {
|
|||||||
return categories || null;
|
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(
|
const { run: onSelectFile } = useDeferredRequest(
|
||||||
async (item: any, modelInfo: any, manual?: boolean) => {
|
async (item: any, modelInfo: any, manual?: boolean) => {
|
||||||
unlockWarningStatus();
|
unlockWarningStatus();
|
||||||
@@ -342,7 +352,6 @@ const AddModal: FC<AddModalProps> = (props) => {
|
|||||||
if (manual) {
|
if (manual) {
|
||||||
form.current?.resetFields(resetFields);
|
form.current?.resetFields(resetFields);
|
||||||
}
|
}
|
||||||
console.log('isgguf==================> select 2', item.isGGUF);
|
|
||||||
// If the item is empty
|
// If the item is empty
|
||||||
setIsGGUF(item.isGGUF);
|
setIsGGUF(item.isGGUF);
|
||||||
updateSelectedModel(item);
|
updateSelectedModel(item);
|
||||||
@@ -371,20 +380,13 @@ const AddModal: FC<AddModalProps> = (props) => {
|
|||||||
categories: getCategory(item)
|
categories: getCategory(item)
|
||||||
};
|
};
|
||||||
|
|
||||||
console.log('newFormValues:', newFormValues);
|
|
||||||
|
|
||||||
form.current?.form?.setFieldsValue?.(newFormValues);
|
form.current?.form?.setFieldsValue?.(newFormValues);
|
||||||
|
|
||||||
handleOnValuesChangeBefore({
|
onClickModel();
|
||||||
changedValues: {},
|
|
||||||
allValues: newFormValues,
|
|
||||||
source: props.source
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleOnOk = async (allValues: FormData) => {
|
const handleOnOk = async (allValues: FormData) => {
|
||||||
console.log('handleOnOk:', allValues);
|
|
||||||
onOk(allValues);
|
onOk(allValues);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -408,19 +410,13 @@ const AddModal: FC<AddModalProps> = (props) => {
|
|||||||
if (res.show) {
|
if (res.show) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (data.local_path || props.source !== modelSourceMap.local_path_value) {
|
|
||||||
// TODO confirm whether it is gguf by model file not by backend
|
// TODO: confirm gguf change backend behavior
|
||||||
handleOnValuesChange?.({
|
handleOnValuesChange?.({
|
||||||
changedValues: {},
|
changedValues: {},
|
||||||
allValues: isGGUF
|
allValues: data,
|
||||||
? data
|
source: props.source
|
||||||
: _.omit(data, [
|
});
|
||||||
'cpu_offloading',
|
|
||||||
'distributed_inference_across_workers'
|
|
||||||
]),
|
|
||||||
source: props.source
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const onValuesChange = async (changedValues: any, allValues: any) => {
|
const onValuesChange = async (changedValues: any, allValues: any) => {
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import React, { useEffect, useMemo, useRef } from 'react';
|
|||||||
import ColumnWrapper from '../../_components/column-wrapper';
|
import ColumnWrapper from '../../_components/column-wrapper';
|
||||||
import {
|
import {
|
||||||
deployFormKeyMap,
|
deployFormKeyMap,
|
||||||
modelSourceMap,
|
|
||||||
ScheduleValueMap,
|
ScheduleValueMap,
|
||||||
updateIgnoreFields
|
updateIgnoreFields
|
||||||
} from '../config';
|
} from '../config';
|
||||||
@@ -133,19 +132,11 @@ const UpdateModal: React.FC<AddModalProps> = (props) => {
|
|||||||
if (res.show) {
|
if (res.show) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (data.local_path || data.source !== modelSourceMap.local_path_value) {
|
handleOnValuesChange?.({
|
||||||
handleOnValuesChange?.({
|
changedValues: {},
|
||||||
changedValues: {},
|
allValues: data,
|
||||||
allValues:
|
source: data.source
|
||||||
backend === backendOptionsMap.llamaBox
|
});
|
||||||
? data
|
|
||||||
: _.omit(data, [
|
|
||||||
'cpu_offloading',
|
|
||||||
'distributed_inference_across_workers'
|
|
||||||
]),
|
|
||||||
source: data.source
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleAsyncBackendChange = (backend: string) => {
|
const handleAsyncBackendChange = (backend: string) => {
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import IconFont from '@/components/icon-font';
|
import IconFont from '@/components/icon-font';
|
||||||
import AutoComplete from '@/components/seal-form/auto-complete';
|
|
||||||
import SealInput from '@/components/seal-form/seal-input';
|
import SealInput from '@/components/seal-form/seal-input';
|
||||||
import SealSelect from '@/components/seal-form/seal-select';
|
import SealSelect from '@/components/seal-form/seal-select';
|
||||||
import SealTextArea from '@/components/seal-form/seal-textarea';
|
import SealTextArea from '@/components/seal-form/seal-textarea';
|
||||||
@@ -71,7 +70,7 @@ const BackendFields: React.FC = () => {
|
|||||||
</Form.Item>
|
</Form.Item>
|
||||||
{backendOptionsMap.custom !== backend && (
|
{backendOptionsMap.custom !== backend && (
|
||||||
<Form.Item name="backend_version">
|
<Form.Item name="backend_version">
|
||||||
<AutoComplete
|
<SealSelect
|
||||||
options={backendVersions}
|
options={backendVersions}
|
||||||
placeholder={intl.formatMessage({
|
placeholder={intl.formatMessage({
|
||||||
id: 'models.form.backendVersion.holder'
|
id: 'models.form.backendVersion.holder'
|
||||||
@@ -111,7 +110,7 @@ const BackendFields: React.FC = () => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
)}
|
)}
|
||||||
></AutoComplete>
|
></SealSelect>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
)}
|
)}
|
||||||
{backend === backendOptionsMap.custom && (
|
{backend === backendOptionsMap.custom && (
|
||||||
|
|||||||
@@ -81,6 +81,7 @@ const DataForm: React.FC<DataFormProps> = forwardRef((props, ref) => {
|
|||||||
sourceList,
|
sourceList,
|
||||||
clusterList = [],
|
clusterList = [],
|
||||||
fields = ['source'],
|
fields = ['source'],
|
||||||
|
onBackendChange,
|
||||||
onSourceChange,
|
onSourceChange,
|
||||||
onValuesChange,
|
onValuesChange,
|
||||||
onOk
|
onOk
|
||||||
@@ -190,7 +191,7 @@ const DataForm: React.FC<DataFormProps> = forwardRef((props, ref) => {
|
|||||||
backend_parameters: option.default_backend_param || [],
|
backend_parameters: option.default_backend_param || [],
|
||||||
...updateGPUSelector(val)
|
...updateGPUSelector(val)
|
||||||
});
|
});
|
||||||
props.onBackendChange?.(val);
|
onBackendChange?.(val);
|
||||||
};
|
};
|
||||||
|
|
||||||
// generate the data is available for the backend including the gpu_ids
|
// generate the data is available for the backend including the gpu_ids
|
||||||
|
|||||||
@@ -34,12 +34,8 @@ const LocalPathForm: React.FC = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const handleOnBlur = (e: any) => {
|
const handleOnBlur = (e: any) => {
|
||||||
form.setFieldsValue({
|
const value = e.target.value;
|
||||||
backend_parameters: [],
|
onValuesChange?.({ local_path: value }, form.getFieldsValue());
|
||||||
backend_version: '',
|
|
||||||
backend: '',
|
|
||||||
env: {}
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleLocalPathBlur = async (e: any) => {
|
const handleLocalPathBlur = async (e: any) => {
|
||||||
@@ -99,6 +95,7 @@ const LocalPathForm: React.FC = () => {
|
|||||||
allowClear
|
allowClear
|
||||||
required
|
required
|
||||||
onFocus={handleOnFocus}
|
onFocus={handleOnFocus}
|
||||||
|
onBlur={handleOnBlur}
|
||||||
label={intl.formatMessage({ id: 'models.form.filePath' })}
|
label={intl.formatMessage({ id: 'models.form.filePath' })}
|
||||||
description={<TooltipList list={localPathTipsList}></TooltipList>}
|
description={<TooltipList list={localPathTipsList}></TooltipList>}
|
||||||
></SealInput.Input>
|
></SealInput.Input>
|
||||||
|
|||||||
Reference in New Issue
Block a user