| @@ -93,7 +93,7 @@ function ExperimentHistory({ calcMetrics, fileUrl, isClassification }: Experimen | |||||
| title: '状态', | title: '状态', | ||||
| dataIndex: 'status', | dataIndex: 'status', | ||||
| key: 'status', | key: 'status', | ||||
| width: 120, | |||||
| width: 150, | |||||
| render: TrialStatusCell, | render: TrialStatusCell, | ||||
| }, | }, | ||||
| ]; | ]; | ||||
| @@ -40,6 +40,11 @@ export const statusInfo: Record<AutoMLTrailStatus, ExperimentStatusInfo> = { | |||||
| color: themes.textColor, | color: themes.textColor, | ||||
| icon: '/assets/images/experiment-status/omitted-icon.png', | icon: '/assets/images/experiment-status/omitted-icon.png', | ||||
| }, | }, | ||||
| [AutoMLTrailStatus.MEMOUT]: { | |||||
| label: '内存溢出', | |||||
| color: themes.errorColor, | |||||
| icon: '/assets/images/experiment-status/fail-icon.png', | |||||
| }, | |||||
| }; | }; | ||||
| function TrialStatusCell(status?: AutoMLTrailStatus | null) { | function TrialStatusCell(status?: AutoMLTrailStatus | null) { | ||||
| @@ -58,7 +63,7 @@ function TrialStatusCell(status?: AutoMLTrailStatus | null) { | |||||
| style={{ color: statusInfo[status] ? statusInfo[status].color : themes.textColor }} | style={{ color: statusInfo[status] ? statusInfo[status].color : themes.textColor }} | ||||
| className={styles['trial-status-cell__label']} | className={styles['trial-status-cell__label']} | ||||
| > | > | ||||
| {statusInfo[status] ? statusInfo[status].label : status} | |||||
| {statusInfo[status] ? statusInfo[status].label : '未知'} | |||||
| </span> | </span> | ||||
| </div> | </div> | ||||
| ); | ); | ||||
| @@ -36,7 +36,7 @@ interface VersionCompareModalProps extends Omit<ModalProps, 'onOk'> { | |||||
| repo_id: number; | repo_id: number; | ||||
| } | } | ||||
| const formatDataset = (datasets?: DatasetData[]) => { | |||||
| const formatDatasets = (datasets?: DatasetData[]) => { | |||||
| if (!datasets || datasets.length === 0) { | if (!datasets || datasets.length === 0) { | ||||
| return undefined; | return undefined; | ||||
| } | } | ||||
| @@ -105,12 +105,12 @@ function VersionCompareModal({ | |||||
| { | { | ||||
| key: 'train_datasets', | key: 'train_datasets', | ||||
| text: '训练数据集', | text: '训练数据集', | ||||
| format: formatDataset, | |||||
| format: formatDatasets, | |||||
| }, | }, | ||||
| { | { | ||||
| key: 'test_datasets', | key: 'test_datasets', | ||||
| text: '测试数据集', | text: '测试数据集', | ||||
| format: formatDataset, | |||||
| format: formatDatasets, | |||||
| }, | }, | ||||
| { | { | ||||
| key: 'model_source', | key: 'model_source', | ||||
| @@ -3,7 +3,7 @@ import { ServiceRunStatus } from '@/enums'; | |||||
| import { useComputingResource } from '@/hooks/useComputingResource'; | import { useComputingResource } from '@/hooks/useComputingResource'; | ||||
| import { ServiceVersionData } from '@/pages/ModelDeployment/types'; | import { ServiceVersionData } from '@/pages/ModelDeployment/types'; | ||||
| import { formatDate } from '@/utils/date'; | import { formatDate } from '@/utils/date'; | ||||
| import { formatCodeConfig, formatModel } from '@/utils/format'; | |||||
| import { formatCodeConfig, formatMirror, formatModel } from '@/utils/format'; | |||||
| import { Flex } from 'antd'; | import { Flex } from 'antd'; | ||||
| import ModelDeployStatusCell from '../ModelDeployStatusCell'; | import ModelDeployStatusCell from '../ModelDeployStatusCell'; | ||||
| @@ -55,6 +55,7 @@ function VersionBasicInfo({ info }: BasicInfoProps) { | |||||
| { | { | ||||
| label: '镜像', | label: '镜像', | ||||
| value: info?.image, | value: info?.image, | ||||
| format: formatMirror, | |||||
| }, | }, | ||||
| { | { | ||||
| label: '状态', | label: '状态', | ||||
| @@ -60,6 +60,9 @@ function VersionCompareModal({ version1, version2, ...rest }: VersionCompareModa | |||||
| { | { | ||||
| key: 'image', | key: 'image', | ||||
| text: '镜像', | text: '镜像', | ||||
| format: (data: any) => { | |||||
| return data?.path; | |||||
| }, | |||||
| }, | }, | ||||
| { | { | ||||
| key: 'code_config', | key: 'code_config', | ||||
| @@ -30,7 +30,7 @@ export const formatDatasets = (datasets?: DatasetData[]): BasicInfoLink[] | unde | |||||
| return undefined; | return undefined; | ||||
| } | } | ||||
| return datasets.map((item) => ({ | return datasets.map((item) => ({ | ||||
| value: item.name, | |||||
| value: `${item.name}:${item.version}`, | |||||
| link: `/dataset/dataset/info/${item.id}?tab=${ResourceInfoTabKeys.Introduction}&version=${item.version}&name=${item.name}&owner=${item.owner}&identifier=${item.identifier}`, | link: `/dataset/dataset/info/${item.id}?tab=${ResourceInfoTabKeys.Introduction}&version=${item.version}&name=${item.name}&owner=${item.owner}&identifier=${item.identifier}`, | ||||
| })); | })); | ||||
| }; | }; | ||||
| @@ -46,7 +46,7 @@ export const formatDataset = (dataset?: DatasetData): BasicInfoLink | undefined | |||||
| return undefined; | return undefined; | ||||
| } | } | ||||
| return { | return { | ||||
| value: dataset.name, | |||||
| value: `${dataset.name}:${dataset.version}`, | |||||
| link: `/dataset/dataset/info/${dataset.id}?tab=${ResourceInfoTabKeys.Introduction}&version=${dataset.version}&name=${dataset.name}&owner=${dataset.owner}&identifier=${dataset.identifier}`, | link: `/dataset/dataset/info/${dataset.id}?tab=${ResourceInfoTabKeys.Introduction}&version=${dataset.version}&name=${dataset.name}&owner=${dataset.owner}&identifier=${dataset.identifier}`, | ||||
| }; | }; | ||||
| }; | }; | ||||
| @@ -62,7 +62,7 @@ export const formatModel = (model: ModelData): BasicInfoLink | undefined => { | |||||
| return undefined; | return undefined; | ||||
| } | } | ||||
| return { | return { | ||||
| value: model.name, | |||||
| value: `${model.name}:${model.version}`, | |||||
| link: `/dataset/model/info/${model.id}?tab=${ResourceInfoTabKeys.Introduction}&version=${model.version}&name=${model.name}&owner=${model.owner}&identifier=${model.identifier}`, | link: `/dataset/model/info/${model.id}?tab=${ResourceInfoTabKeys.Introduction}&version=${model.version}&name=${model.name}&owner=${model.owner}&identifier=${model.identifier}`, | ||||
| }; | }; | ||||
| }; | }; | ||||