style: adjust ram prcision
This commit is contained in:
@@ -274,7 +274,7 @@ export const ExtraContent = () => {
|
||||
{originNode}
|
||||
<Divider style={{ marginBlock: 4 }} />
|
||||
<CustomItem onClick={handleLogout} className="border-top">
|
||||
<LogoutOutlined />
|
||||
<LogoutOutlined rotate={180} />
|
||||
<span>{intl?.formatMessage?.({ id: 'common.button.logout' })}</span>
|
||||
</CustomItem>
|
||||
</DropdownWrapper>
|
||||
|
||||
@@ -206,7 +206,7 @@ export default {
|
||||
'models.form.gpusAllocationType.auto': 'Auto',
|
||||
'models.form.gpusAllocationType.custom': 'Custom',
|
||||
'models.form.gpusAllocationType.auto.tips':
|
||||
'System calculates GPUs per replica automatically.',
|
||||
'The system automatically calculates the GPU count per replica, using powers of two by default and capped by the selected GPUs.',
|
||||
'models.form.gpusAllocationType.custom.tips':
|
||||
'You can specify the exact number of GPUs per replica.',
|
||||
'models.mymodels.status.inactive': 'Stopped',
|
||||
|
||||
@@ -206,7 +206,7 @@ export default {
|
||||
'models.form.gpusAllocationType.auto': 'Auto',
|
||||
'models.form.gpusAllocationType.custom': 'Custom',
|
||||
'models.form.gpusAllocationType.auto.tips':
|
||||
'System calculates GPUs per replica automatically.',
|
||||
'The system automatically calculates the GPU count per replica, using powers of two by default and capped by the selected GPUs.',
|
||||
'models.form.gpusAllocationType.custom.tips':
|
||||
'You can specify the exact number of GPUs per replica.',
|
||||
'models.mymodels.status.inactive': 'Stopped',
|
||||
@@ -293,7 +293,7 @@ export default {
|
||||
// 34. 'models.form.gpusAllocationType': 'GPU Allocation Type',
|
||||
// 35. 'models.form.gpusAllocationType.auto': 'Auto',
|
||||
// 36. 'models.form.gpusAllocationType.custom': 'Custom',
|
||||
// 37. 'models.form.gpusAllocationType.auto.tips': 'System calculates GPUs per replica automatically.',
|
||||
// 37. 'models.form.gpusAllocationType.auto.tips': 'The system automatically calculates the GPU count per replica, using powers of two by default and capped by the selected GPUs.',
|
||||
// 38. 'models.form.gpusAllocationType.custom.tips': 'You can specify the exact number of GPUs per replica.',
|
||||
// 39. 'models.mymodels.status.inactive': 'Stopped',
|
||||
// 41. 'models.mymodels.status.degrade': 'Abnormal',
|
||||
|
||||
@@ -206,7 +206,7 @@ export default {
|
||||
'models.form.gpusAllocationType.auto': 'Авто',
|
||||
'models.form.gpusAllocationType.custom': 'Вручную',
|
||||
'models.form.gpusAllocationType.auto.tips':
|
||||
'Система автоматически рассчитывает количество GPU на реплику.',
|
||||
'The system automatically calculates the GPU count per replica, using powers of two by default and capped by the selected GPUs.',
|
||||
'models.form.gpusAllocationType.custom.tips':
|
||||
'Вы можете указать точное количество GPU на реплику.',
|
||||
'models.mymodels.status.inactive': 'Остановлен',
|
||||
@@ -264,4 +264,5 @@ export default {
|
||||
// 4. 'models.form.backend.voxbox': 'Only supports NVIDIA GPUs and CPUs.',
|
||||
// 5. 'models.form.backend.mindie': 'Only supports Ascend NPUs.',
|
||||
// 6. 'models.form.backend.sglang': 'Built-in support for NVIDIA/AMD GPUs and Ascend NPUs.',
|
||||
// 7. 'models.form.gpusAllocationType.auto.tips': 'The system automatically calculates the GPU count per replica, using powers of two by default and capped by the selected GPUs.',
|
||||
// ========== End of To-Do List ==========
|
||||
|
||||
@@ -195,7 +195,7 @@ export default {
|
||||
'models.form.gpusAllocationType.auto': '自动',
|
||||
'models.form.gpusAllocationType.custom': '自定义',
|
||||
'models.form.gpusAllocationType.auto.tips':
|
||||
'系统自动计算每个副本的 GPU 数量。',
|
||||
'系统自动计算每个副本的 GPU 数量,默认是 2 的幂,不超过选择的 GPU 数量。',
|
||||
'models.form.gpusAllocationType.custom.tips': '您可以指定每个副本的 GPU 数量',
|
||||
'models.mymodels.status.inactive': '已停止',
|
||||
'models.mymodels.status.degrade': '异常',
|
||||
@@ -217,8 +217,8 @@ export default {
|
||||
'models.form.numDraftTokens': '草稿生成 Token 数',
|
||||
'models.form.ngramMinMatchLength': 'N-gram 最小匹配长度',
|
||||
'models.form.ngramMaxMatchLength': 'N-gram 最大匹配长度',
|
||||
'models.form.mode.throughput': '高吞吐',
|
||||
'models.form.mode.latency': '低延迟',
|
||||
'models.form.mode.throughput': '吞吐',
|
||||
'models.form.mode.latency': '延迟',
|
||||
'models.form.mode.baseline': '标准',
|
||||
'models.form.mode.throughput.tips': '在高并发请求下优化吞吐性能。',
|
||||
'models.form.mode.latency.tips': '在低并发请求下优化响应延迟。',
|
||||
|
||||
@@ -63,20 +63,21 @@ const UtilizationOvertime: React.FC<{
|
||||
const legendData: string[] = [];
|
||||
const xAxisData: string[] = [];
|
||||
let seriesData: { value: number; time: string; type: string }[] = [];
|
||||
seriesData = _.map(typeList, (item: string) => {
|
||||
const itemConfig = _.get(TypeKeyMap, item, {});
|
||||
seriesData = _.map(typeList, (label: string) => {
|
||||
const itemConfig = _.get(TypeKeyMap, label, {});
|
||||
const name = itemConfig.intl
|
||||
? intl.formatMessage({ id: itemConfig.label })
|
||||
: itemConfig.label;
|
||||
legendData.push(name);
|
||||
const itemDataList = _.get(data, item, []);
|
||||
const itemDataList = _.get(data, label, []);
|
||||
return {
|
||||
name: name,
|
||||
color: itemConfig.color,
|
||||
data: _.map(itemDataList, (item: any) => {
|
||||
xAxisData.push(dayjs(item.timestamp * 1000).format('HH:mm:ss'));
|
||||
const time = dayjs(item.timestamp * 1000).format('HH:mm:ss');
|
||||
xAxisData.push(time);
|
||||
return {
|
||||
time: dayjs(item.timestamp * 1000).format('HH:mm:ss'),
|
||||
time: item,
|
||||
value: _.round(_.get(item, 'value', 0), 1)
|
||||
};
|
||||
})
|
||||
|
||||
@@ -57,7 +57,7 @@ const SystemLoad = () => {
|
||||
const fetchClusters = async () => {
|
||||
try {
|
||||
const res = await queryClusterList({ page: -1 });
|
||||
const options = res.items.map((cluster) => ({
|
||||
const options = res.items.map((cluster: any) => ({
|
||||
label: cluster.name,
|
||||
value: cluster.id
|
||||
}));
|
||||
|
||||
@@ -24,7 +24,6 @@ const Catalog: React.FC = () => {
|
||||
const intl = useIntl();
|
||||
const { saveScrollHeight, restoreScrollHeight } = useBodyScroll();
|
||||
const navigate = useNavigate();
|
||||
const [activeId, setActiveId] = React.useState(-1);
|
||||
const [dataSource, setDataSource] = useState<{
|
||||
dataList: CatalogItemType[];
|
||||
loading: boolean;
|
||||
@@ -50,7 +49,7 @@ const Catalog: React.FC = () => {
|
||||
current: {},
|
||||
source: modelSourceMap.huggingface_value
|
||||
});
|
||||
const [modelsExpandKeys, setModelsExpandKeys] = useAtom(modelsExpandKeysAtom);
|
||||
const [, setModelsExpandKeys] = useAtom(modelsExpandKeysAtom);
|
||||
const [, setModelsSession] = useAtom(modelsSessionAtom);
|
||||
const cacheData = React.useRef<CatalogItemType[]>([]);
|
||||
const sourceRef = React.useRef<string>('');
|
||||
@@ -109,7 +108,6 @@ const Catalog: React.FC = () => {
|
||||
...queryParams,
|
||||
...query
|
||||
});
|
||||
console.log('error', error);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -119,12 +117,10 @@ const Catalog: React.FC = () => {
|
||||
show: false
|
||||
});
|
||||
restoreScrollHeight();
|
||||
setActiveId(-1);
|
||||
};
|
||||
|
||||
const handleOnDeploy = useCallback(async (item: CatalogItemType) => {
|
||||
saveScrollHeight();
|
||||
setActiveId(item.id);
|
||||
setOpenDeployModal({
|
||||
show: true,
|
||||
source: sourceRef.current,
|
||||
@@ -185,7 +181,6 @@ const Catalog: React.FC = () => {
|
||||
});
|
||||
|
||||
const handleDeployFromOtherHubs = async () => {
|
||||
console.log('sourceRef.current', sourceRef.current);
|
||||
try {
|
||||
setModelsSession({
|
||||
source: sourceRef.current || modelSourceMap.huggingface_value
|
||||
@@ -203,7 +198,7 @@ const Catalog: React.FC = () => {
|
||||
const getCatalogSource = async () => {
|
||||
try {
|
||||
const id = dataSource.dataList?.[0]?.id;
|
||||
const res: any = await queryCatalogItemSpec({ id });
|
||||
const res: any = await queryCatalogItemSpec({ id, cluster_id: 0 });
|
||||
sourceRef.current = res?.items?.[0]?.source;
|
||||
} catch (error) {}
|
||||
};
|
||||
|
||||
@@ -45,14 +45,10 @@ const CheckboxField: React.FC<{
|
||||
|
||||
const Scaling: React.FC = () => {
|
||||
const intl = useIntl();
|
||||
const { onValuesChange, onQuantizationChange } = useFormContext();
|
||||
const { onValuesChange } = useFormContext();
|
||||
const { getRuleMessage } = useAppUtils();
|
||||
const form = Form.useFormInstance();
|
||||
|
||||
const handleOnQuantizationChange = (val: any) => {
|
||||
onQuantizationChange?.(val);
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<div style={{ paddingBottom: 22, paddingLeft: 10 }}>
|
||||
|
||||
@@ -11,7 +11,6 @@ import { useIntl } from '@umijs/max';
|
||||
import { Form } from 'antd';
|
||||
import { useMemo } from 'react';
|
||||
import { sourceOptions } from '../config';
|
||||
import { useFormContext } from '../config/form-context';
|
||||
import { FormData } from '../config/types';
|
||||
import BackendForm from './backend';
|
||||
import CatalogFrom from './catalog';
|
||||
@@ -39,9 +38,7 @@ const BasicForm: React.FC<BasicFormProps> = (props) => {
|
||||
onSourceChange
|
||||
} = props;
|
||||
const intl = useIntl();
|
||||
const { formKey } = useFormContext();
|
||||
const { getRuleMessage } = useAppUtils();
|
||||
const form = Form.useFormInstance();
|
||||
|
||||
const handleOnSourceChange = (val: string) => {
|
||||
onSourceChange?.(val);
|
||||
|
||||
@@ -106,7 +106,7 @@ const KVCacheForm = () => {
|
||||
)}
|
||||
min={0}
|
||||
step={1}
|
||||
precision={0}
|
||||
precision={1}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item<FormData> name={['extended_kv_cache', 'chunk_size']}>
|
||||
|
||||
Reference in New Issue
Block a user