diff --git a/src/layouts/extraRender.tsx b/src/layouts/extraRender.tsx index 497e7834..9f6dad01 100644 --- a/src/layouts/extraRender.tsx +++ b/src/layouts/extraRender.tsx @@ -274,7 +274,7 @@ export const ExtraContent = () => { {originNode} - + {intl?.formatMessage?.({ id: 'common.button.logout' })} diff --git a/src/locales/en-US/models.ts b/src/locales/en-US/models.ts index a7fa6c9d..a09bf8ca 100644 --- a/src/locales/en-US/models.ts +++ b/src/locales/en-US/models.ts @@ -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', diff --git a/src/locales/ja-JP/models.ts b/src/locales/ja-JP/models.ts index 3643fbd8..b282dff5 100644 --- a/src/locales/ja-JP/models.ts +++ b/src/locales/ja-JP/models.ts @@ -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', diff --git a/src/locales/ru-RU/models.ts b/src/locales/ru-RU/models.ts index c7f6ba61..e202e8a2 100644 --- a/src/locales/ru-RU/models.ts +++ b/src/locales/ru-RU/models.ts @@ -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 ========== diff --git a/src/locales/zh-CN/models.ts b/src/locales/zh-CN/models.ts index 7535d2c6..a68d077a 100644 --- a/src/locales/zh-CN/models.ts +++ b/src/locales/zh-CN/models.ts @@ -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': '在低并发请求下优化响应延迟。', diff --git a/src/pages/dashboard/components/resource-utilization.tsx b/src/pages/dashboard/components/resource-utilization.tsx index 891b44fd..d6001ba3 100644 --- a/src/pages/dashboard/components/resource-utilization.tsx +++ b/src/pages/dashboard/components/resource-utilization.tsx @@ -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) }; }) diff --git a/src/pages/dashboard/components/system-load.tsx b/src/pages/dashboard/components/system-load.tsx index 3fa37fd2..d2e90e52 100644 --- a/src/pages/dashboard/components/system-load.tsx +++ b/src/pages/dashboard/components/system-load.tsx @@ -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 })); diff --git a/src/pages/llmodels/catalog.tsx b/src/pages/llmodels/catalog.tsx index 018b6c66..3e380376 100644 --- a/src/pages/llmodels/catalog.tsx +++ b/src/pages/llmodels/catalog.tsx @@ -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([]); const sourceRef = React.useRef(''); @@ -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) {} }; diff --git a/src/pages/llmodels/components/scaling.tsx b/src/pages/llmodels/components/scaling.tsx index 8d073e15..a0926d37 100644 --- a/src/pages/llmodels/components/scaling.tsx +++ b/src/pages/llmodels/components/scaling.tsx @@ -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 ( <>
diff --git a/src/pages/llmodels/forms/basic.tsx b/src/pages/llmodels/forms/basic.tsx index 215f6cec..d655ceea 100644 --- a/src/pages/llmodels/forms/basic.tsx +++ b/src/pages/llmodels/forms/basic.tsx @@ -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 = (props) => { onSourceChange } = props; const intl = useIntl(); - const { formKey } = useFormContext(); const { getRuleMessage } = useAppUtils(); - const form = Form.useFormInstance(); const handleOnSourceChange = (val: string) => { onSourceChange?.(val); diff --git a/src/pages/llmodels/forms/kv-cache.tsx b/src/pages/llmodels/forms/kv-cache.tsx index 4884d037..a1283e34 100644 --- a/src/pages/llmodels/forms/kv-cache.tsx +++ b/src/pages/llmodels/forms/kv-cache.tsx @@ -106,7 +106,7 @@ const KVCacheForm = () => { )} min={0} step={1} - precision={0} + precision={1} /> name={['extended_kv_cache', 'chunk_size']}>