intellif-aihub 0.1.7__tar.gz → 0.1.9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of intellif-aihub might be problematic. Click here for more details.

Files changed (62) hide show
  1. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/PKG-INFO +1 -1
  2. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/pyproject.toml +1 -1
  3. intellif_aihub-0.1.9/src/aihub/__init__.py +1 -0
  4. intellif_aihub-0.1.9/src/aihub/models/artifact.py +98 -0
  5. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/src/aihub/models/data_warehouse.py +2 -2
  6. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/src/aihub/models/dataset_management.py +3 -3
  7. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/src/aihub/models/document_center.py +1 -1
  8. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/src/aihub/models/model_center.py +1 -1
  9. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/src/aihub/models/model_training_platform.py +2 -2
  10. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/src/aihub/models/quota_schedule_management.py +2 -2
  11. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/src/aihub/models/task_center.py +6 -6
  12. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/src/aihub/models/workflow_center.py +2 -2
  13. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/src/aihub/services/task_center.py +0 -5
  14. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/src/intellif_aihub.egg-info/PKG-INFO +1 -1
  15. intellif_aihub-0.1.7/src/aihub/__init__.py +0 -1
  16. intellif_aihub-0.1.7/src/aihub/models/artifact.py +0 -137
  17. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/LICENSE +0 -0
  18. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/README.md +0 -0
  19. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/setup.cfg +0 -0
  20. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/src/aihub/client.py +0 -0
  21. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/src/aihub/exceptions.py +0 -0
  22. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/src/aihub/models/__init__.py +0 -0
  23. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/src/aihub/models/common.py +0 -0
  24. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/src/aihub/models/eval.py +0 -0
  25. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/src/aihub/models/labelfree.py +0 -0
  26. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/src/aihub/models/tag_resource_management.py +0 -0
  27. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/src/aihub/models/user_system.py +0 -0
  28. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/src/aihub/services/__init__.py +0 -0
  29. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/src/aihub/services/artifact.py +0 -0
  30. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/src/aihub/services/data_warehouse.py +0 -0
  31. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/src/aihub/services/dataset_management.py +0 -0
  32. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/src/aihub/services/document_center.py +0 -0
  33. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/src/aihub/services/eval.py +0 -0
  34. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/src/aihub/services/labelfree.py +0 -0
  35. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/src/aihub/services/model_center.py +0 -0
  36. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/src/aihub/services/model_training_platform.py +0 -0
  37. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/src/aihub/services/quota_schedule_management.py +0 -0
  38. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/src/aihub/services/reporter.py +0 -0
  39. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/src/aihub/services/tag_resource_management.py +0 -0
  40. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/src/aihub/services/user_system.py +0 -0
  41. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/src/aihub/services/workflow_center.py +0 -0
  42. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/src/aihub/utils/__init__.py +0 -0
  43. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/src/aihub/utils/download.py +0 -0
  44. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/src/aihub/utils/http.py +0 -0
  45. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/src/aihub/utils/s3.py +0 -0
  46. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/src/intellif_aihub.egg-info/SOURCES.txt +0 -0
  47. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/src/intellif_aihub.egg-info/dependency_links.txt +0 -0
  48. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/src/intellif_aihub.egg-info/requires.txt +0 -0
  49. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/src/intellif_aihub.egg-info/top_level.txt +0 -0
  50. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/tests/test_artifact.py +0 -0
  51. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/tests/test_data_warehouse.py +0 -0
  52. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/tests/test_dataset_management.py +0 -0
  53. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/tests/test_document_center.py +0 -0
  54. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/tests/test_labelfree.py +0 -0
  55. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/tests/test_model_center.py +0 -0
  56. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/tests/test_model_training_platform.py +0 -0
  57. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/tests/test_quota_schedule_management.py +0 -0
  58. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/tests/test_s3.py +0 -0
  59. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/tests/test_tag_resource_management.py +0 -0
  60. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/tests/test_task_center.py +0 -0
  61. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/tests/test_user_system.py +0 -0
  62. {intellif_aihub-0.1.7 → intellif_aihub-0.1.9}/tests/test_workflow_center.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: intellif-aihub
3
- Version: 0.1.7
3
+ Version: 0.1.9
4
4
  Summary: Intellif AI-hub SDK.
5
5
  Author-email: Platform Team <aihub@example.com>
6
6
  License-Expression: Apache-2.0
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "intellif-aihub"
3
- version = "0.1.7"
3
+ version = "0.1.9"
4
4
  description = "Intellif AI-hub SDK."
5
5
  readme = {file = "README.md", content-type = "text/markdown"}
6
6
  requires-python = ">=3.9"
@@ -0,0 +1 @@
1
+ __version__ = "0.1.9"
@@ -0,0 +1,98 @@
1
+ # !/usr/bin/env python
2
+ # -*-coding:utf-8 -*-
3
+ """制品管理模型模块
4
+
5
+ 该模块定义了制品管理相关的数据模型,包括制品类型、创建制品请求、制品响应等。
6
+ """
7
+ from __future__ import annotations
8
+
9
+ from enum import Enum
10
+ from typing import List, Optional
11
+
12
+ from pydantic import BaseModel, Field
13
+
14
+
15
+ class ArtifactType(str, Enum):
16
+ """制品类型枚举:"dataset"-数据集类型;"model"-模型类型;"metrics"-指标类型;"log"-日志类型;"checkpoint"-检查点类型;"image"-图像类型;"prediction"-预测结果类型;"other"-其他类型"""
17
+ dataset = "dataset" # 数据集类型
18
+ model = "model" # 模型类型
19
+ metrics = "metrics" # 指标类型
20
+ log = "log" # 日志类型
21
+ checkpoint = "checkpoint" # 检查点类型
22
+ image = "image" # 图像类型
23
+ prediction = "prediction" # 预测结果类型
24
+ other = "other" # 其他类型
25
+
26
+
27
+ class CreateArtifactsReq(BaseModel):
28
+ """创建制品请求"""
29
+ entity_id: str = Field(alias="entity_id", description="实体ID,通常是运行ID,用于关联制品与特定运行")
30
+ entity_type: ArtifactType = Field(default=ArtifactType.other, alias="entity_type",
31
+ description="制品类型,指定制品的类型,默认为other")
32
+ src_path: str = Field(alias="src_path", description="源路径,制品在系统中的路径标识")
33
+ is_dir: bool = Field(default=False, alias="is_dir",
34
+ description="是否为目录,True表示制品是一个目录,False表示是单个文件")
35
+
36
+ model_config = {"use_enum_values": True}
37
+
38
+
39
+ class CreateArtifactsResponseData(BaseModel):
40
+ """创建制品响应数据"""
41
+ id: int = Field(description="制品ID")
42
+ s3_path: str = Field(alias="s3_path", description="S3存储路径")
43
+
44
+
45
+ class CreateArtifactsResponseModel(BaseModel):
46
+ """创建制品响应模型"""
47
+ code: int = Field(description="响应码,0表示成功")
48
+ msg: str = Field(default="", description="响应消息")
49
+ data: Optional[CreateArtifactsResponseData] = Field(default=None, description="响应数据")
50
+
51
+
52
+ class CreateEvalReq(BaseModel):
53
+ """创建评估请求"""
54
+ dataset_id: int = Field(alias="dataset_id", description="数据集ID")
55
+ dataset_version_id: int = Field(alias="dataset_version_id", description="数据集版本ID")
56
+ prediction_artifact_path: str = Field(alias="prediction_artifact_path", description="预测结果制品路径")
57
+ evaled_artifact_path: str = Field(alias="evaled_artifact_path", description="评估结果制品路径")
58
+ run_id: str = Field(alias="run_id", description="运行ID")
59
+ user_id: int = Field(alias="user_id", description="用户ID")
60
+ report: dict = Field(default_factory=dict, description="评估报告")
61
+
62
+
63
+ class ArtifactResp(BaseModel):
64
+ """制品响应模型,表示一个制品的详细信息"""
65
+ id: int = Field(description="制品ID")
66
+ entity_type: str = Field(alias="entity_type", description="实体类型")
67
+ entity_id: str = Field(alias="entity_id", description="实体ID")
68
+ src_path: str = Field(alias="src_path", description="源路径")
69
+ s3_path: str = Field(alias="s3_path", description="S3存储路径")
70
+ is_dir: bool = Field(alias="is_dir", description="是否为目录")
71
+
72
+
73
+ class ArtifactRespData(BaseModel):
74
+ """制品分页数据"""
75
+ total: int = Field(description="总记录数")
76
+ page_size: int = Field(alias="page_size", description="每页大小")
77
+ page_num: int = Field(alias="page_num", description="页码")
78
+ data: List[ArtifactResp] = Field(default_factory=list, description="制品列表")
79
+
80
+
81
+ class ArtifactRespModel(BaseModel):
82
+ """获取制品响应模型"""
83
+ code: int = Field(description="响应码,0表示成功")
84
+ msg: str = Field(default="", description="响应消息")
85
+ data: ArtifactRespData = Field(description="响应数据")
86
+
87
+
88
+ # 无限大的页面大小,用于一次性获取所有制品
89
+ InfinityPageSize = 10000 * 100
90
+
91
+
92
+ class StsResp(BaseModel):
93
+ """STS 临时凭证"""
94
+ access_key_id: Optional[str] = Field(default=None, alias="access_key_id", description="访问密钥ID")
95
+ secret_access_key: Optional[str] = Field(default=None, alias="secret_access_key", description="秘密访问密钥")
96
+ session_token: Optional[str] = Field(default=None, alias="session_token", description="会话令牌")
97
+ expiration: Optional[int] = Field(default=None, alias="expiration", description="过期时间")
98
+ endpoint: Optional[str] = Field(default=None, alias="endpoint", description="端点URL")
@@ -7,14 +7,14 @@ from pydantic import BaseModel, Field
7
7
 
8
8
 
9
9
  class SearchType(IntEnum):
10
- """搜索类型"""
10
+ """搜索类型:1-SQL;2-图片;3-文本"""
11
11
  SQL = 1 # SQL
12
12
  IMAGE = 2 # 图片
13
13
  TEXT = 3 # 文本
14
14
 
15
15
 
16
16
  class SearchStatus(IntEnum):
17
- """搜索任务状态"""
17
+ """搜索任务状态:1-等待中;2-运行中;3-成功;4-失败"""
18
18
  WAITING = 1 # 等待中
19
19
  RUNNING = 2 # 运行中
20
20
  SUCCESS = 3 # 成功
@@ -7,7 +7,7 @@ from pydantic import BaseModel, Field
7
7
 
8
8
 
9
9
  class DatasetVersionStatus(IntEnum):
10
- """数据集版本状态"""
10
+ """数据集版本状态:1-等待中;2-运行中;3-成功;4-失败;5-加载meta;6-构建index"""
11
11
  Waiting = 1 # 等待中
12
12
  Running = 2 # 运行中
13
13
  Success = 3 # 成功
@@ -17,7 +17,7 @@ class DatasetVersionStatus(IntEnum):
17
17
 
18
18
 
19
19
  class UploadType(IntEnum):
20
- """上传类型"""
20
+ """上传类型:1-本地上传;3-服务器路径上传;4-Labelfree;5-数据接入"""
21
21
  LOCAL = 1 # 本地上传
22
22
  SERVER_PATH = 3 # 服务器路径上传
23
23
  LABELFREE = 4 # Labelfree
@@ -28,7 +28,7 @@ class CreateDatasetRequest(BaseModel):
28
28
  """创建数据集请求"""
29
29
  name: str = Field(description="数据集名称")
30
30
  description: str = Field(description="数据集描述")
31
- tags: List[int] = Field(description="标签ID列表")
31
+ tags: List[int] = Field(description="标签ID列表,通过标签管理系统查询")
32
32
  cover_img: Optional[str] = Field(None, alias="cover_img", description="封面图片URL")
33
33
  create_by: Optional[int] = Field(None, alias="create_by", description="创建人")
34
34
  is_private: Optional[bool] = Field(None, alias="is_private", description="是否私有")
@@ -7,7 +7,7 @@ from pydantic import BaseModel, Field
7
7
 
8
8
 
9
9
  class DocumentType(IntEnum):
10
- """文档类型"""
10
+ """文档类型:0-Markdown;1-飞书文档生成的pdf"""
11
11
  MARKDOWN = 0 # Markdown
12
12
  PDF = 1 # 飞书文档生成的pdf
13
13
 
@@ -31,7 +31,7 @@ class QuantLevel(BaseModel):
31
31
 
32
32
 
33
33
  class ModelStatus(IntEnum):
34
- """模型状态"""
34
+ """模型状态:1-Waiting;2-Creating;3-Success;4-Fail"""
35
35
  Waiting = 1
36
36
  Creating = 2
37
37
  Success = 3
@@ -60,7 +60,7 @@ class User(BaseModel):
60
60
 
61
61
 
62
62
  class TrainingStatus(IntEnum):
63
- """训练任务状态"""
63
+ """训练任务状态:1-Waiting;2-Running;3-Success;4-Failed;5-Stopped"""
64
64
  Waiting = 1
65
65
  Running = 2
66
66
  Success = 3
@@ -69,7 +69,7 @@ class TrainingStatus(IntEnum):
69
69
 
70
70
 
71
71
  class PreemptPolicy(IntEnum):
72
- """抢占策略"""
72
+ """抢占策略:1-等待任务完成;2-停止任务"""
73
73
  WAIT = 1 # 等待任务完成
74
74
  STOP = 2 # 停止任务
75
75
 
@@ -66,7 +66,7 @@ class SourceTask(BaseModel):
66
66
 
67
67
 
68
68
  class TaskStatus(IntEnum):
69
- """任务状态"""
69
+ """任务状态:1-Waiting;2-Running;3-Success;4-Failed;5-Stopped;6-Stopping"""
70
70
  Waiting = 1
71
71
  Running = 2
72
72
  Success = 3
@@ -76,7 +76,7 @@ class TaskStatus(IntEnum):
76
76
 
77
77
 
78
78
  class PreemptPolicy(IntEnum):
79
- """抢占策略"""
79
+ """抢占策略:1-等待任务完成;2-停止任务"""
80
80
  WAIT = 1 # 等待任务完成
81
81
  STOP = 2 # 停止任务
82
82
 
@@ -83,13 +83,13 @@ class CreateTaskResp(BaseModel):
83
83
  class LabelTaskDetail(BaseModel):
84
84
  """任务详情"""
85
85
  name: str = Field(description="任务名称")
86
- description: Optional[str] = Field(alias="description", description="任务描述")
87
- task_priority: Optional[str] = Field(alias="task_priority", description="优先级")
88
- type: Optional[str] = Field(alias="type", description="任务类型")
89
- receiver_id: Optional[int] = Field(alias="receiver_id", description="接收人ID")
90
- project_id: Optional[int] = Field(None, description="项目ID")
86
+ description: Optional[str] = Field(default=None, alias="description", description="任务描述")
87
+ task_priority: Optional[str] = Field(default=None, alias="task_priority", description="优先级")
88
+ type: Optional[str] = Field(default=None, alias="type", description="任务类型")
89
+ receiver_id: Optional[int] = Field(default=None, alias="receiver_id", description="接收人ID")
90
+ project_id: Optional[int] = Field(default=None, description="项目ID")
91
91
  other_info: Optional[TaskDetailOtherInfo] = Field(default=None, alias="other_info", description="附加信息")
92
- estimated_delivery_at: Optional[int] = Field(None, description="预计交付时间")
92
+ estimated_delivery_at: Optional[int] = Field(default=None, description="预计交付时间")
93
93
 
94
94
  @field_serializer("other_info")
95
95
  def serialize_other_info(self, value: Optional[TaskDetailOtherInfo]) -> Optional[str]:
@@ -304,7 +304,7 @@ class IOParam(BaseModel):
304
304
 
305
305
 
306
306
  class TaskNodeStatus(IntEnum):
307
- """任务节点状态"""
307
+ """任务节点状态:1-Waiting;2-Running;3-Success;4-Fail"""
308
308
  Waiting = 1
309
309
  Running = 2
310
310
  Success = 3
@@ -343,7 +343,7 @@ class NodeVirtualCluster(BaseModel):
343
343
 
344
344
 
345
345
  class RunStatus(IntEnum):
346
- """运行状态"""
346
+ """运行状态:1-Waiting;2-Running;3-Success;4-Failed;5-Stopped"""
347
347
  Waiting = 1
348
348
  Running = 2
349
349
  Success = 3
@@ -13,7 +13,6 @@ from __future__ import annotations
13
13
  import datetime
14
14
 
15
15
  import httpx
16
- from loguru import logger
17
16
 
18
17
  from .tag_resource_management import TagResourceManagementService
19
18
  from .user_system import UserSystemService
@@ -176,12 +175,10 @@ class _TaskCenter:
176
175
  self._http = http
177
176
 
178
177
  def create(self, payload: CreateTaskReq) -> int:
179
- logger.debug(f"create task: {payload}")
180
178
  resp = self._http.post(
181
179
  f"{_BASE}/tasks",
182
180
  json=payload.model_dump(),
183
181
  )
184
- logger.debug(f"create task response: {resp.text}")
185
182
  if resp.status_code != 200:
186
183
  raise APIError(
187
184
  message="API Error", status=resp.status_code, detail=resp.json()
@@ -191,11 +188,9 @@ class _TaskCenter:
191
188
  return wrapper.data.id
192
189
 
193
190
  def get(self, task_id: int) -> LabelTaskDetail:
194
- logger.debug(f"get task: {task_id}")
195
191
  resp = self._http.get(
196
192
  f"{_BASE}/tasks/{task_id}",
197
193
  )
198
- logger.debug(f"get task response: {resp.text}")
199
194
  if resp.status_code != 200:
200
195
  raise APIError(
201
196
  message="API Error", status=resp.status_code, detail=resp.json()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: intellif-aihub
3
- Version: 0.1.7
3
+ Version: 0.1.9
4
4
  Summary: Intellif AI-hub SDK.
5
5
  Author-email: Platform Team <aihub@example.com>
6
6
  License-Expression: Apache-2.0
@@ -1 +0,0 @@
1
- __version__ = "0.1.7"
@@ -1,137 +0,0 @@
1
- # !/usr/bin/env python
2
- # -*-coding:utf-8 -*-
3
- """制品管理模型模块
4
-
5
- 该模块定义了制品管理相关的数据模型,包括制品类型、创建制品请求、制品响应等。
6
- """
7
- from __future__ import annotations
8
-
9
- from enum import Enum
10
- from typing import List, Optional
11
-
12
- from pydantic import BaseModel
13
-
14
-
15
- class ArtifactType(str, Enum):
16
- """制品类型枚举
17
-
18
- 定义了系统支持的各种制品类型。
19
- """
20
-
21
- dataset = "dataset" # 数据集类型
22
- model = "model" # 模型类型
23
- metrics = "metrics" # 指标类型
24
- log = "log" # 日志类型
25
- checkpoint = "checkpoint" # 检查点类型
26
- image = "image" # 图像类型
27
- prediction = "prediction" # 预测结果类型
28
- other = "other" # 其他类型
29
-
30
-
31
- class CreateArtifactsReq(BaseModel):
32
- """创建制品请求模型
33
-
34
- 用于向服务器发送创建制品的请求。
35
- """
36
-
37
- entity_id: str
38
- """实体ID,通常是运行ID,用于关联制品与特定运行"""
39
-
40
- entity_type: ArtifactType = ArtifactType.other
41
- """制品类型,指定制品的类型,默认为other"""
42
-
43
- src_path: str
44
- """源路径,制品在系统中的路径标识"""
45
-
46
- is_dir: bool = False
47
- """是否为目录,True表示制品是一个目录,False表示是单个文件"""
48
-
49
-
50
- class CreateArtifactsResponseData(BaseModel):
51
- """创建制品响应数据模型
52
-
53
- 服务器创建制品后返回的数据。
54
- """
55
-
56
- id: int # 制品ID
57
- s3_path: str # S3存储路径
58
-
59
-
60
- class CreateArtifactsResponseModel(BaseModel):
61
- """创建制品响应模型
62
-
63
- 服务器对创建制品请求的完整响应。
64
- """
65
-
66
- code: int # 响应码,0表示成功
67
- msg: str = "" # 响应消息
68
- data: Optional[CreateArtifactsResponseData] = None # 响应数据
69
-
70
-
71
- class CreatEvalReq(BaseModel):
72
- """创建评估请求模型
73
-
74
- 用于创建模型评估的请求。
75
- """
76
-
77
- dataset_id: int # 数据集ID
78
- dataset_version_id: int # 数据集版本ID
79
- prediction_artifact_path: str # 预测结果制品路径
80
- evaled_artifact_path: str # 评估结果制品路径
81
- run_id: str # 运行ID
82
- user_id: int # 用户ID
83
- report: dict = {} # 评估报告
84
-
85
-
86
- class ArtifactResp(BaseModel):
87
- """制品响应模型
88
-
89
- 表示一个制品的详细信息。
90
- """
91
-
92
- id: int # 制品ID
93
- entity_type: str # 实体类型
94
- entity_id: str # 实体ID
95
- src_path: str # 源路径
96
- s3_path: str # S3存储路径
97
- is_dir: bool # 是否为目录
98
-
99
-
100
- class ArtifactRespData(BaseModel):
101
- """制品响应数据模型
102
-
103
- 包含分页信息和制品列表的响应数据。
104
- """
105
-
106
- total: int # 总记录数
107
- page_size: int # 每页大小
108
- page_num: int # 页码
109
- data: List[ArtifactResp] # 制品列表
110
-
111
-
112
- class ArtifactRespModel(BaseModel):
113
- """制品响应模型
114
-
115
- 服务器对获取制品请求的完整响应。
116
- """
117
-
118
- code: int # 响应码,0表示成功
119
- msg: str = "" # 响应消息
120
- data: ArtifactRespData # 响应数据
121
-
122
-
123
- # 无限大的页面大小,用于一次性获取所有制品
124
- InfinityPageSize = 10000 * 100
125
-
126
-
127
- class StsResp(BaseModel):
128
- """STS临时凭证响应模型
129
-
130
- 包含访问S3存储所需的临时凭证信息。
131
- """
132
-
133
- access_key_id: Optional[str] = None # 访问密钥ID
134
- secret_access_key: Optional[str] = None # 秘密访问密钥
135
- session_token: Optional[str] = None # 会话令牌
136
- expiration: Optional[int] = None # 过期时间
137
- endpoint: Optional[str] = None # 端点URL
File without changes
File without changes
File without changes