From d214d881c298870833e77ea38c5d2ce54b006b7a Mon Sep 17 00:00:00 2001 From: haotian <2421912570@qq.com> Date: Wed, 19 Feb 2025 15:36:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0--=E6=8E=A5=E5=8F=A3=E6=96=87?= =?UTF-8?q?=E6=A1=A3=E4=B8=AD=E6=B7=BB=E5=8A=A0=E8=8E=B7=E5=8F=96=E8=AE=AD?= =?UTF-8?q?=E7=BB=83=E5=A5=BD=E7=9A=84=E6=A8=A1=E5=9E=8B=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/接口文档code.md | 42 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/doc/接口文档code.md b/doc/接口文档code.md index d56cfae..fae567e 100644 --- a/doc/接口文档code.md +++ b/doc/接口文档code.md @@ -395,7 +395,45 @@ Response: } ``` -### 2.5 获取训练状态 +### 2.5 获取已经训练好的模型列表 +```http +GET /api/models/finished + +Response: +{ + "status": "success", + "models": [ + { + "model_id": "model_20250219_001", + "algorithm": "XGBClassifier", + "task_type": "classification", + "dataset": "breast_cancer", + "training_time": "2025-02-19T14:30:00", + "metrics": { + "accuracy": 0.95, + "precision": 0.94, + "recall": 0.93, + "f1": 0.94 + }, + "parameters": { + "n_estimators": 100, + "learning_rate": 0.1, + "max_depth": 6 + }, + "mlflow_run_id": "abc123def456", + "model_path": "models/model_20250219_001" + } + ], + "total_count": 1, + "page": 1, + "page_size": 10 +} + +``` +### 2.6 删除指定的训练好的模型. + + +### 2.7 获取训练状态 ```http GET /api/train/status/{task_id} @@ -418,7 +456,7 @@ Response: } ``` -### 2.6 模型预测 +### 2.8 模型预测 ```http POST /api/predict Content-Type: application/json