diff --git a/doc/接口文档code.md b/doc/接口文档code.md index fcff09c..c341b11 100644 --- a/doc/接口文档code.md +++ b/doc/接口文档code.md @@ -397,7 +397,7 @@ Response: ### 2.5 获取已经训练好的模型列表 ```http -GET /api/models/finished +GET /api/models/finished/{experiment_name} Response: { diff --git a/example_model_manager.py b/example_model_manager.py index 5043f34..f356754 100644 --- a/example_model_manager.py +++ b/example_model_manager.py @@ -19,7 +19,12 @@ if result['status'] == 'success': print(f"每页数量: {result['page_size']}") print("\n模型列表:") for model in result['models']: - print(f"\n模型ID: {model['model_id']}") + ''' + 'run_id': run['run_id'], + 'experiment_id': run['experiment_id'], + ''' + print(f"run_id", model['run_id']) + print(f"experiment_id", model['experiment_id']) print(f"算法: {model['algorithm']}") print(f"任务类型: {model['task_type']}") print(f"数据集: {model['dataset']}") diff --git a/function/__pycache__/model_manager.cpython-39.pyc b/function/__pycache__/model_manager.cpython-39.pyc index aab4673..9f96d5f 100644 Binary files a/function/__pycache__/model_manager.cpython-39.pyc and b/function/__pycache__/model_manager.cpython-39.pyc differ diff --git a/function/model_manager.py b/function/model_manager.py index eae8789..c1ec09d 100644 --- a/function/model_manager.py +++ b/function/model_manager.py @@ -96,7 +96,8 @@ class ModelManager: # 构建模型信息 model_info = { - 'model_id': f"model_{pd.to_datetime(run['start_time']).strftime('%Y%m%d_%H%M%S')}", + 'run_id': run['run_id'], + 'experiment_id': run['experiment_id'], 'algorithm': params['algorithm'], # 从配置或其他地方获取 'task_type': params['task_type'], # 从配置或其他地方获取 'dataset': params['dataset'], # 从配置或其他地方获取