diff --git a/src/pages/llmodels/components/advance-config.tsx b/src/pages/llmodels/components/advance-config.tsx index ed8cb877..e556a075 100644 --- a/src/pages/llmodels/components/advance-config.tsx +++ b/src/pages/llmodels/components/advance-config.tsx @@ -27,6 +27,7 @@ import { FormData } from '../config/types'; import vllmConfig from '../config/vllm-config'; import dataformStyles from '../style/data-form.less'; import GPUCard from './gpu-card'; +import gpuOptions from './test'; interface AdvanceConfigProps { isGGUF: boolean; @@ -37,7 +38,8 @@ interface AdvanceConfigProps { } const AdvanceConfig: React.FC = (props) => { - const { form, gpuOptions, isGGUF, action, source } = props; + const { form, isGGUF, action, source } = props; + console.log('gpucardoptions', gpuOptions); const intl = useIntl(); const wokerSelector = Form.useWatch('worker_selector', form); @@ -254,8 +256,8 @@ const AdvanceConfig: React.FC = (props) => { tagRender={(props) => { return ( diff --git a/src/pages/llmodels/components/test.ts b/src/pages/llmodels/components/test.ts new file mode 100644 index 00000000..c9e6d7e7 --- /dev/null +++ b/src/pages/llmodels/components/test.ts @@ -0,0 +1,83 @@ +export default [ + { + name: 'Apple M1 Pro', + uuid: null, + vendor: 'Apple', + index: 0, + core: { + total: 16, + utilization_rate: 40 + }, + memory: { + total: 22906503168, + utilization_rate: 2.2090662913006347, + is_unified_memory: true, + used: 506019840, + allocated: 1747103594 + }, + temperature: 49.78984451293945, + labels: {}, + type: 'mps', + id: 'jialindeMacBook-Pro.local:mps:0', + worker_id: 1, + worker_name: 'jialindeMacBook-Pro.local', + worker_ip: '192.168.50.27', + title: '', + label: ' Apple M1 Pro(jialindeMacBook-Pro.local)[Index:0]', + value: 'jialindeMacBook-Pro.local:mps:0' + }, + { + name: 'Apple M1 Pro', + uuid: null, + vendor: 'Apple', + index: 0, + core: { + total: 16, + utilization_rate: 40 + }, + memory: { + total: 22906503168, + utilization_rate: 2.2090662913006347, + is_unified_memory: true, + used: 506019840, + allocated: 1747103594 + }, + temperature: 49.78984451293945, + labels: {}, + type: 'mps', + id: 'jialindeMacBook-Pro.local:mps:0', + worker_id: 1, + worker_name: 'jialindeMacBook-Pro.local', + worker_ip: '192.168.50.27', + title: '', + label: ' Apple M1 Pro(jialindeMacBook-Pro.local)[Index:0]', + value: 'jialindeMacBook-Pro.local:mps:1' + }, + { + name: 'Apple M1 Pro', + uuid: null, + vendor: 'Apple', + index: 0, + core: { + total: 16, + utilization_rate: 40 + }, + memory: { + total: 22906503168, + utilization_rate: 2.2090662913006347, + is_unified_memory: true, + used: 506019840, + allocated: 1747103594 + }, + temperature: 49.78984451293945, + labels: {}, + type: 'mps', + id: 'jialindeMacBook-Pro.local:mps:0', + worker_id: 1, + worker_name: 'jialindeMacBook-Pro.local', + worker_ip: '192.168.50.27', + title: '', + label: ' Apple M1 Pro(jialindeMacBook-Pro.local)[Index:0]', + value: 'jialindeMacBook-Pro.local:mps:2' + } +]; diff --git a/src/pages/resources/config/index.ts b/src/pages/resources/config/index.ts index 990ddd10..ba327328 100644 --- a/src/pages/resources/config/index.ts +++ b/src/pages/resources/config/index.ts @@ -9,7 +9,7 @@ export const WorkerStatusMap = { export const WorkerStatusMapValue = { [WorkerStatusMap.ready]: 'Ready', [WorkerStatusMap.not_ready]: 'Not Ready', - [WorkerStatusMap.unreachable]: 'Not Ready' + [WorkerStatusMap.unreachable]: 'Unreachable' }; export const status: any = {