fix: vox-box gpu-selector
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
|||||||
src/components/icon-font/iconfont/iconfont.js
|
src/components/icon-font/iconfont.js
|
||||||
|
|||||||
+2
-1
@@ -5,5 +5,6 @@ module.exports = {
|
|||||||
'no-unused-vars': 'off',
|
'no-unused-vars': 'off',
|
||||||
'@typescript-eslint/no-unused-vars': 'off',
|
'@typescript-eslint/no-unused-vars': 'off',
|
||||||
'@typescript-eslint/class-name-casing': 'off'
|
'@typescript-eslint/class-name-casing': 'off'
|
||||||
}
|
},
|
||||||
|
ignorePatterns: ['public/static/']
|
||||||
};
|
};
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@@ -124,7 +124,7 @@ const AdvanceConfig: React.FC<AdvanceConfigProps> = (props) => {
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const handleGPUSelectorChange = (gpuIds: any[]) => {
|
const handleGPUSelectorChange = (gpuIds: any[]) => {
|
||||||
console.log('GPU Selector Change:', gpuIds);
|
// only handle for vllm, pick the last selected group
|
||||||
if (
|
if (
|
||||||
backend === backendOptionsMap.llamaBox ||
|
backend === backendOptionsMap.llamaBox ||
|
||||||
backend === backendOptionsMap.voxBox ||
|
backend === backendOptionsMap.voxBox ||
|
||||||
@@ -135,9 +135,6 @@ const AdvanceConfig: React.FC<AdvanceConfigProps> = (props) => {
|
|||||||
const lastGroupName = gpuIds[gpuIds.length - 1][0];
|
const lastGroupName = gpuIds[gpuIds.length - 1][0];
|
||||||
|
|
||||||
const lastGroupItems = gpuIds.filter((item) => item[0] === lastGroupName);
|
const lastGroupItems = gpuIds.filter((item) => item[0] === lastGroupName);
|
||||||
|
|
||||||
console.log('Last Group Items:', lastGroupItems);
|
|
||||||
|
|
||||||
form.setFieldValue(['gpu_selector', 'gpu_ids'], lastGroupItems);
|
form.setFieldValue(['gpu_selector', 'gpu_ids'], lastGroupItems);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -515,12 +515,18 @@ const DataForm: React.FC<DataFormProps> = forwardRef((props, ref) => {
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
const result = _.map(gpu_ids, (item: string[][] | string[]) => {
|
const result = _.reduce(
|
||||||
if (Array.isArray(item)) {
|
gpu_ids,
|
||||||
return item[1];
|
(acc: string[], item: string | string[], index: number) => {
|
||||||
}
|
if (Array.isArray(item)) {
|
||||||
return item;
|
acc.push(item[1]);
|
||||||
});
|
} else if (index === 1) {
|
||||||
|
acc.push(item);
|
||||||
|
}
|
||||||
|
return acc;
|
||||||
|
},
|
||||||
|
[]
|
||||||
|
);
|
||||||
|
|
||||||
if (result.length) {
|
if (result.length) {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -379,12 +379,18 @@ const UpdateModal: React.FC<AddModalProps> = (props) => {
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
const result = _.map(gpu_ids, (item: string[][] | string[]) => {
|
const result = _.reduce(
|
||||||
if (Array.isArray(item)) {
|
gpu_ids,
|
||||||
return item[1];
|
(acc: string[], item: string | string[], index: number) => {
|
||||||
}
|
if (Array.isArray(item)) {
|
||||||
return item;
|
acc.push(item[1]);
|
||||||
});
|
} else if (index === 1) {
|
||||||
|
acc.push(item);
|
||||||
|
}
|
||||||
|
return acc;
|
||||||
|
},
|
||||||
|
[]
|
||||||
|
);
|
||||||
|
|
||||||
if (result.length) {
|
if (result.length) {
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user