fix(style): gpu selector closable

main
jialin 1 year ago
parent 67e050bd6f
commit fbf2671eaf

@ -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<AdvanceConfigProps> = (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<AdvanceConfigProps> = (props) => {
tagRender={(props) => {
return (
<AutoTooltip
className="m-r-0"
closable={true}
className="m-r-4"
closable={props.closable}
onClose={props.onClose}
maxWidth={240}
>

@ -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'
}
];

@ -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 = {

Loading…
Cancel
Save