style: gpu selector info
This commit is contained in:
@@ -119,33 +119,33 @@ const AdvanceConfig: React.FC<AdvanceConfigProps> = (props) => {
|
||||
></SealSelect>
|
||||
</Form.Item>
|
||||
{scheduleType === 'auto' && (
|
||||
<Form.Item<FormData> name="placement_strategy">
|
||||
<SealSelect
|
||||
label={intl.formatMessage({
|
||||
id: 'resources.form.placementStrategy'
|
||||
})}
|
||||
options={placementStrategyOptions}
|
||||
description={renderSelectTips(placementStrategyTips)}
|
||||
></SealSelect>
|
||||
</Form.Item>
|
||||
)}
|
||||
{scheduleType === 'auto' && (
|
||||
<Form.Item<FormData> name="worker_selector">
|
||||
<LabelSelector
|
||||
label={intl.formatMessage({
|
||||
id: 'resources.form.workerSelector'
|
||||
})}
|
||||
labels={wokerSelector}
|
||||
onChange={handleWorkerLabelsChange}
|
||||
description={
|
||||
<span>
|
||||
{intl.formatMessage({
|
||||
id: 'resources.form.workerSelector.description'
|
||||
})}
|
||||
</span>
|
||||
}
|
||||
></LabelSelector>
|
||||
</Form.Item>
|
||||
<>
|
||||
<Form.Item<FormData> name="placement_strategy">
|
||||
<SealSelect
|
||||
label={intl.formatMessage({
|
||||
id: 'resources.form.placementStrategy'
|
||||
})}
|
||||
options={placementStrategyOptions}
|
||||
description={renderSelectTips(placementStrategyTips)}
|
||||
></SealSelect>
|
||||
</Form.Item>
|
||||
<Form.Item<FormData> name="worker_selector">
|
||||
<LabelSelector
|
||||
label={intl.formatMessage({
|
||||
id: 'resources.form.workerSelector'
|
||||
})}
|
||||
labels={wokerSelector}
|
||||
onChange={handleWorkerLabelsChange}
|
||||
description={
|
||||
<span>
|
||||
{intl.formatMessage({
|
||||
id: 'resources.form.workerSelector.description'
|
||||
})}
|
||||
</span>
|
||||
}
|
||||
></LabelSelector>
|
||||
</Form.Item>
|
||||
</>
|
||||
)}
|
||||
{scheduleType === 'manual' && (
|
||||
<Form.Item<FormData>
|
||||
@@ -173,7 +173,7 @@ const AdvanceConfig: React.FC<AdvanceConfigProps> = (props) => {
|
||||
</SealSelect>
|
||||
</Form.Item>
|
||||
)}
|
||||
<div style={{ marginBottom: 22, paddingLeft: 10 }}>
|
||||
<div style={{ paddingBottom: 22, paddingLeft: 10 }}>
|
||||
<Form.Item<FormData>
|
||||
name="partial_offload"
|
||||
valuePropName="checked"
|
||||
@@ -200,7 +200,7 @@ const AdvanceConfig: React.FC<AdvanceConfigProps> = (props) => {
|
||||
</Form.Item>
|
||||
</div>
|
||||
{scheduleType === 'auto' && (
|
||||
<div style={{ marginBottom: 22, paddingLeft: 10 }}>
|
||||
<div style={{ paddingBottom: 22, paddingLeft: 10 }}>
|
||||
<Form.Item<FormData>
|
||||
name="distributed_inference_across_workers"
|
||||
valuePropName="checked"
|
||||
|
||||
@@ -15,17 +15,19 @@ const GPUCard: React.FC<{
|
||||
{intl.formatMessage({ id: 'resources.table.index' })}:{data.index}]
|
||||
</div>
|
||||
<div className="info">
|
||||
<span>{intl.formatMessage({ id: 'resources.table.vram' })}:</span>
|
||||
<span>
|
||||
{intl.formatMessage({ id: 'resources.table.total' })}{' '}
|
||||
{convertFileSize(data?.memory?.total || 0)}
|
||||
{intl.formatMessage({ id: 'resources.table.vram' })}(
|
||||
{intl.formatMessage({ id: 'resources.table.used' })}/
|
||||
{intl.formatMessage({ id: 'resources.table.total' })}):{' '}
|
||||
<span>
|
||||
{convertFileSize(data?.memory?.used || 0)} /{' '}
|
||||
{convertFileSize(data?.memory?.total || 0)}
|
||||
</span>
|
||||
</span>
|
||||
<span>
|
||||
{intl.formatMessage({ id: 'resources.table.used' })}{' '}
|
||||
{convertFileSize(data?.memory?.used || 0)}
|
||||
</span>
|
||||
<span>
|
||||
{intl.formatMessage({ id: 'resources.table.utilization' })}{' '}
|
||||
<span>
|
||||
{intl.formatMessage({ id: 'resources.table.gpuutilization' })}:{' '}
|
||||
</span>
|
||||
{_.round(data?.memory?.utilization_rate || 0, 2)}%
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -64,11 +64,7 @@ const HFModelFile: React.FC<HFModelFileProps> = (props) => {
|
||||
};
|
||||
|
||||
const generateGroupByFilename = useCallback((list: any[]) => {
|
||||
const data = _.find(list, (item: any) => {
|
||||
const parsed = parseFilename(item.path);
|
||||
return !!parsed;
|
||||
});
|
||||
|
||||
// general file
|
||||
const generalFileList = _.filter(list, (item: any) => {
|
||||
const parsed = parseFilename(item.path);
|
||||
return !parsed;
|
||||
@@ -139,12 +135,10 @@ const HFModelFile: React.FC<HFModelFileProps> = (props) => {
|
||||
});
|
||||
|
||||
const newList = generateGroupByFilename(list);
|
||||
|
||||
console.log('newList==========', newList);
|
||||
|
||||
const sortList = _.sortBy(newList, (item: any) => {
|
||||
return sortType === 'size' ? item.size : item.path;
|
||||
});
|
||||
|
||||
handleSelectModelFile(sortList[0]);
|
||||
setDataSource({ fileList: sortList, loading: false });
|
||||
} catch (error) {
|
||||
@@ -162,7 +156,11 @@ const HFModelFile: React.FC<HFModelFileProps> = (props) => {
|
||||
};
|
||||
|
||||
const getModelQuantizationType = useCallback((item: any) => {
|
||||
const quanType = getFileType(item.path);
|
||||
let path = item.path;
|
||||
if (item?.parts?.length) {
|
||||
path = `${item.path}.gguf`;
|
||||
}
|
||||
const quanType = getFileType(path);
|
||||
if (quanType) {
|
||||
return (
|
||||
<Tag
|
||||
|
||||
Reference in New Issue
Block a user