|
|
@@ -3,7 +3,9 @@ import TrialStatusCell from '@/pages/HyperParameter/components/TrialStatusCell'; |
|
|
import { HyperParameterTrial } from '@/pages/HyperParameter/types'; |
|
|
import { HyperParameterTrial } from '@/pages/HyperParameter/types'; |
|
|
import { getExpMetricsReq } from '@/services/hyperParameter'; |
|
|
import { getExpMetricsReq } from '@/services/hyperParameter'; |
|
|
import { to } from '@/utils/promise'; |
|
|
import { to } from '@/utils/promise'; |
|
|
|
|
|
import SessionStorage from '@/utils/sessionStorage'; |
|
|
import tableCellRender, { TableCellValueType } from '@/utils/table'; |
|
|
import tableCellRender, { TableCellValueType } from '@/utils/table'; |
|
|
|
|
|
import { useNavigate } from '@umijs/max'; |
|
|
import { App, Button, Table, type TableProps } from 'antd'; |
|
|
import { App, Button, Table, type TableProps } from 'antd'; |
|
|
import classNames from 'classnames'; |
|
|
import classNames from 'classnames'; |
|
|
import { useEffect, useState } from 'react'; |
|
|
import { useEffect, useState } from 'react'; |
|
|
@@ -36,6 +38,7 @@ function ExperimentHistory({ trialList = [] }: ExperimentHistoryProps) { |
|
|
const metricAnalysis: Record<string, any> = first?.metric_analysis ?? {}; |
|
|
const metricAnalysis: Record<string, any> = first?.metric_analysis ?? {}; |
|
|
const paramsNames = Object.keys(config); |
|
|
const paramsNames = Object.keys(config); |
|
|
const metricNames = Object.keys(metricAnalysis); |
|
|
const metricNames = Object.keys(metricAnalysis); |
|
|
|
|
|
const navigate = useNavigate(); |
|
|
|
|
|
|
|
|
const trialColumns: TableProps<HyperParameterTrial>['columns'] = [ |
|
|
const trialColumns: TableProps<HyperParameterTrial>['columns'] = [ |
|
|
{ |
|
|
{ |
|
|
@@ -160,7 +163,8 @@ function ExperimentHistory({ trialList = [] }: ExperimentHistoryProps) { |
|
|
const [res] = await to(getExpMetricsReq(selectedRowKeys)); |
|
|
const [res] = await to(getExpMetricsReq(selectedRowKeys)); |
|
|
if (res && res.data) { |
|
|
if (res && res.data) { |
|
|
const url = res.data; |
|
|
const url = res.data; |
|
|
window.open(url, '_blank'); |
|
|
|
|
|
|
|
|
SessionStorage.setItem(SessionStorage.aimUrlKey, url); |
|
|
|
|
|
navigate('compare-visual'); |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|