From 4afeb8b5bc71c5f107e821a493e153c80aa82a7c Mon Sep 17 00:00:00 2001 From: zhaowei Date: Tue, 6 May 2025 16:12:07 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E5=9B=9E=E5=BD=92=E7=AE=97=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- react-ui/src/pages/AutoML/Instance/index.tsx | 6 +++--- .../pages/AutoML/components/CreateForm/ExecuteConfig.tsx | 9 +++++++-- .../pages/AutoML/components/ExperimentResult/index.tsx | 7 ++++++- .../{TensorBoard => ExperimentVisualResult}/index.tsx | 4 ++-- 4 files changed, 18 insertions(+), 8 deletions(-) rename react-ui/src/pages/AutoML/components/{TensorBoard => ExperimentVisualResult}/index.tsx (90%) diff --git a/react-ui/src/pages/AutoML/Instance/index.tsx b/react-ui/src/pages/AutoML/Instance/index.tsx index 09a55023..d53ecc17 100644 --- a/react-ui/src/pages/AutoML/Instance/index.tsx +++ b/react-ui/src/pages/AutoML/Instance/index.tsx @@ -12,7 +12,7 @@ import AutoMLBasic from '../components/AutoMLBasic'; import ExperimentHistory from '../components/ExperimentHistory'; import ExperimentLog from '../components/ExperimentLog'; import ExperimentResult from '../components/ExperimentResult'; -import TensorBoard from '../components/TensorBoard'; +import ExperimentVisualResult from '../components/ExperimentVisualResult'; import { AutoMLData, AutoMLInstanceData } from '../types'; import styles from './index.less'; @@ -186,13 +186,13 @@ function AutoMLInstance() { /> ), }, - type === AutoMLType.Text + type === AutoMLType.Text || type === AutoMLType.Video ? { key: TabKeys.Visual, label: '可视化结果', icon: , children: ( - diff --git a/react-ui/src/pages/AutoML/components/CreateForm/ExecuteConfig.tsx b/react-ui/src/pages/AutoML/components/CreateForm/ExecuteConfig.tsx index 3f85f5c5..c548e079 100644 --- a/react-ui/src/pages/AutoML/components/CreateForm/ExecuteConfig.tsx +++ b/react-ui/src/pages/AutoML/components/CreateForm/ExecuteConfig.tsx @@ -27,6 +27,9 @@ const classificationAlgorithms = [ 'qda', 'random_forest', 'sgd', + 'LightGBMClassification', + 'XGBoostClassification', + 'StackingClassification', ].map((name) => ({ label: name, value: name })); // 回归算法 @@ -43,6 +46,8 @@ const regressorAlgorithms = [ 'mlp', 'random_forest', 'sgd', + 'LightGBMRegression', + 'XGBoostRegression', ].map((name) => ({ label: name, value: name })); // 特征预处理算法 @@ -289,7 +294,7 @@ function ExecuteConfig() { name="ensemble_nbest" tooltip="仅集成最佳的N个模型" > - + @@ -421,7 +426,7 @@ function ExecuteConfig() { }, ]} > - + diff --git a/react-ui/src/pages/AutoML/components/ExperimentResult/index.tsx b/react-ui/src/pages/AutoML/components/ExperimentResult/index.tsx index 8900b2a3..375b416d 100644 --- a/react-ui/src/pages/AutoML/components/ExperimentResult/index.tsx +++ b/react-ui/src/pages/AutoML/components/ExperimentResult/index.tsx @@ -1,5 +1,6 @@ import InfoGroup from '@/components/InfoGroup'; import { AutoMLType } from '@/enums'; +import TrialFileTree from '@/pages/HyperParameter/components/TrialFileTree'; import { getFileReq } from '@/services/file'; import { to } from '@/utils/promise'; import { Button, Image } from 'antd'; @@ -40,7 +41,11 @@ function ExperimentResult({ fileUrl, imageUrl, modelPath, type }: ExperimentResu return (
-
{result}
+ {type === AutoMLType.Video ? ( + + ) : ( +
{result}
+ )}
{type === AutoMLType.Table && ( diff --git a/react-ui/src/pages/AutoML/components/TensorBoard/index.tsx b/react-ui/src/pages/AutoML/components/ExperimentVisualResult/index.tsx similarity index 90% rename from react-ui/src/pages/AutoML/components/TensorBoard/index.tsx rename to react-ui/src/pages/AutoML/components/ExperimentVisualResult/index.tsx index e05a9452..1837d625 100644 --- a/react-ui/src/pages/AutoML/components/TensorBoard/index.tsx +++ b/react-ui/src/pages/AutoML/components/ExperimentVisualResult/index.tsx @@ -15,7 +15,7 @@ type TensorBoardProps = { path?: string; }; -function TensorBoard({ namespace, path }: TensorBoardProps) { +function ExperimentVisualResult({ namespace, path }: TensorBoardProps) { const [tensorboardUrl, setTensorboardUrl] = useState(''); useEffect(() => { // 运行 TensorBoard @@ -40,4 +40,4 @@ function TensorBoard({ namespace, path }: TensorBoardProps) { return <>{tensorboardUrl && }; } -export default TensorBoard; +export default ExperimentVisualResult;