| @@ -12,7 +12,7 @@ import AutoMLBasic from '../components/AutoMLBasic'; | |||||
| import ExperimentHistory from '../components/ExperimentHistory'; | import ExperimentHistory from '../components/ExperimentHistory'; | ||||
| import ExperimentLog from '../components/ExperimentLog'; | import ExperimentLog from '../components/ExperimentLog'; | ||||
| import ExperimentResult from '../components/ExperimentResult'; | import ExperimentResult from '../components/ExperimentResult'; | ||||
| import TensorBoard from '../components/TensorBoard'; | |||||
| import ExperimentVisualResult from '../components/ExperimentVisualResult'; | |||||
| import { AutoMLData, AutoMLInstanceData } from '../types'; | import { AutoMLData, AutoMLInstanceData } from '../types'; | ||||
| import styles from './index.less'; | import styles from './index.less'; | ||||
| @@ -186,13 +186,13 @@ function AutoMLInstance() { | |||||
| /> | /> | ||||
| ), | ), | ||||
| }, | }, | ||||
| type === AutoMLType.Text | |||||
| type === AutoMLType.Text || type === AutoMLType.Video | |||||
| ? { | ? { | ||||
| key: TabKeys.Visual, | key: TabKeys.Visual, | ||||
| label: '可视化结果', | label: '可视化结果', | ||||
| icon: <KFIcon type="icon-Trialliebiao" />, | icon: <KFIcon type="icon-Trialliebiao" />, | ||||
| children: ( | children: ( | ||||
| <TensorBoard | |||||
| <ExperimentVisualResult | |||||
| path={instanceInfo?.run_history_path} | path={instanceInfo?.run_history_path} | ||||
| namespace={instanceInfo?.argo_ins_ns} | namespace={instanceInfo?.argo_ins_ns} | ||||
| /> | /> | ||||
| @@ -27,6 +27,9 @@ const classificationAlgorithms = [ | |||||
| 'qda', | 'qda', | ||||
| 'random_forest', | 'random_forest', | ||||
| 'sgd', | 'sgd', | ||||
| 'LightGBMClassification', | |||||
| 'XGBoostClassification', | |||||
| 'StackingClassification', | |||||
| ].map((name) => ({ label: name, value: name })); | ].map((name) => ({ label: name, value: name })); | ||||
| // 回归算法 | // 回归算法 | ||||
| @@ -43,6 +46,8 @@ const regressorAlgorithms = [ | |||||
| 'mlp', | 'mlp', | ||||
| 'random_forest', | 'random_forest', | ||||
| 'sgd', | 'sgd', | ||||
| 'LightGBMRegression', | |||||
| 'XGBoostRegression', | |||||
| ].map((name) => ({ label: name, value: name })); | ].map((name) => ({ label: name, value: name })); | ||||
| // 特征预处理算法 | // 特征预处理算法 | ||||
| @@ -289,7 +294,7 @@ function ExecuteConfig() { | |||||
| name="ensemble_nbest" | name="ensemble_nbest" | ||||
| tooltip="仅集成最佳的N个模型" | tooltip="仅集成最佳的N个模型" | ||||
| > | > | ||||
| <InputNumber placeholder="请输入集成最佳模型数量" min={0} precision={0} /> | |||||
| <InputNumber placeholder="请输入集成最佳模型数量" min={1} precision={0} /> | |||||
| </Form.Item> | </Form.Item> | ||||
| </Col> | </Col> | ||||
| </Row> | </Row> | ||||
| @@ -421,7 +426,7 @@ function ExecuteConfig() { | |||||
| }, | }, | ||||
| ]} | ]} | ||||
| > | > | ||||
| <InputNumber placeholder="请输入交叉验证折数" min={0} precision={0} /> | |||||
| <InputNumber placeholder="请输入交叉验证折数" min={1} precision={0} /> | |||||
| </Form.Item> | </Form.Item> | ||||
| </Col> | </Col> | ||||
| </Row> | </Row> | ||||
| @@ -1,5 +1,6 @@ | |||||
| import InfoGroup from '@/components/InfoGroup'; | import InfoGroup from '@/components/InfoGroup'; | ||||
| import { AutoMLType } from '@/enums'; | import { AutoMLType } from '@/enums'; | ||||
| import TrialFileTree from '@/pages/HyperParameter/components/TrialFileTree'; | |||||
| import { getFileReq } from '@/services/file'; | import { getFileReq } from '@/services/file'; | ||||
| import { to } from '@/utils/promise'; | import { to } from '@/utils/promise'; | ||||
| import { Button, Image } from 'antd'; | import { Button, Image } from 'antd'; | ||||
| @@ -40,7 +41,11 @@ function ExperimentResult({ fileUrl, imageUrl, modelPath, type }: ExperimentResu | |||||
| return ( | return ( | ||||
| <div className={styles['experiment-result']}> | <div className={styles['experiment-result']}> | ||||
| <InfoGroup title="实验结果" height={420} width="100%"> | <InfoGroup title="实验结果" height={420} width="100%"> | ||||
| <div className={styles['experiment-result__text']}>{result}</div> | |||||
| {type === AutoMLType.Video ? ( | |||||
| <TrialFileTree title=""></TrialFileTree> | |||||
| ) : ( | |||||
| <div className={styles['experiment-result__text']}>{result}</div> | |||||
| )} | |||||
| </InfoGroup> | </InfoGroup> | ||||
| {type === AutoMLType.Table && ( | {type === AutoMLType.Table && ( | ||||
| <InfoGroup title="可视化结果" style={{ margin: '16px 0' }}> | <InfoGroup title="可视化结果" style={{ margin: '16px 0' }}> | ||||
| @@ -15,7 +15,7 @@ type TensorBoardProps = { | |||||
| path?: string; | path?: string; | ||||
| }; | }; | ||||
| function TensorBoard({ namespace, path }: TensorBoardProps) { | |||||
| function ExperimentVisualResult({ namespace, path }: TensorBoardProps) { | |||||
| const [tensorboardUrl, setTensorboardUrl] = useState(''); | const [tensorboardUrl, setTensorboardUrl] = useState(''); | ||||
| useEffect(() => { | useEffect(() => { | ||||
| // 运行 TensorBoard | // 运行 TensorBoard | ||||
| @@ -40,4 +40,4 @@ function TensorBoard({ namespace, path }: TensorBoardProps) { | |||||
| return <>{tensorboardUrl && <IframePage type={IframePageType.TensorBoard}></IframePage>}</>; | return <>{tensorboardUrl && <IframePage type={IframePageType.TensorBoard}></IframePage>}</>; | ||||
| } | } | ||||
| export default TensorBoard; | |||||
| export default ExperimentVisualResult; | |||||