From c89d1907a4ac535a3ab258385ab86c333c2b44a3 Mon Sep 17 00:00:00 2001 From: haotian <2421912570@qq.com> Date: Thu, 20 Feb 2025 14:06:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9--=E4=BF=AE=E6=94=B9=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E6=96=87=E6=A1=A3code=E5=92=8C=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E8=AE=A1=E5=88=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/接口文档code.md | 51 ++++++++++++++++++++++----------------------- doc/时间计划.md | 24 +++++++++++---------- 2 files changed, 38 insertions(+), 37 deletions(-) diff --git a/doc/接口文档code.md b/doc/接口文档code.md index e4832e7..39a40d5 100644 --- a/doc/接口文档code.md +++ b/doc/接口文档code.md @@ -476,31 +476,7 @@ Response: } } ``` - -### 2.8 获取训练状态 -```http -GET /api/train/status/{task_id} - -Response: -{ - "status": "success", - "task": { - "id": "train_20230820_001", - "status": "running", - "progress": 0.75, - "current_epoch": 15, - "total_epochs": 20, - "metrics": { - "train_loss": 0.234, - "val_loss": 0.245 - }, - "start_time": "2023-08-20T10:00:00", - "estimated_completion": "2023-08-20T10:30:00" - } -} -``` - -### 2.9 模型预测 +### 2.8 模型预测 ```http POST /api/model/predict Content-Type: application/json @@ -705,7 +681,30 @@ Error Response: } ``` -### 3.3 获取系统日志 +### 3.3 获取系统中训练状态 +```http +GET /api/train/status/{task_id} + +Response: +{ + "status": "success", + "task": { + "id": "train_20230820_001", + "status": "running", + "progress": 0.75, + "current_epoch": 15, + "total_epochs": 20, + "metrics": { + "train_loss": 0.234, + "val_loss": 0.245 + }, + "start_time": "2023-08-20T10:00:00", + "estimated_completion": "2023-08-20T10:30:00" + } +} +``` + +### 3.4 获取系统日志 ```http GET /api/system/logs?level=error&start_time=2023-08-20T00:00:00 diff --git a/doc/时间计划.md b/doc/时间计划.md index 0b4d44f..512e520 100644 --- a/doc/时间计划.md +++ b/doc/时间计划.md @@ -10,14 +10,22 @@ - 20250219~20250220 - [x] 实现模型训练和注册 完成 - [x] 实现获取已有模型 完成 -- [ ] 根据删除模型 -- [ ] 根据已有模型加载模型预测 +- [x] 根据删除模型 +- [x] 根据已有模型加载模型预测 - 2天 - 试着进行模型优化 - AI 辅助开发 -## 4. FastAPI后端服务 (2) +## 4. 监控系统 (1) + - 20250226 + - [ ] 资源监控 + - [ ] 训练监控 + - [ ] 告警系统 + - [ ] 日志聚合 + - 1 天 + +## 5. FastAPI后端服务 (2) - 20250221~20250224 - [ ] API路由设计 - [ ] 请求/响应模型 @@ -25,7 +33,7 @@ - [ ] API文档生成 - 2天 -## 5. 任务队列系统 (2) +## 6. 任务队列系统 (2) - 20250225~20250226 - [ ] Celery配置 - [ ] 任务定义 @@ -33,13 +41,7 @@ - [ ] 错误处理 - 2天 -## 6. 监控系统 (1) - - 20250226 - - [ ] 资源监控 - - [ ] 训练监控 - - [ ] 告警系统 - - [ ] 日志聚合 - - 1 天 + ## 7.整体测试及完善(1) - 20250227 - 1天 \ No newline at end of file