intellif-aihub 0.1.10__tar.gz → 0.1.12__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 (61) hide show
  1. {intellif_aihub-0.1.10/src/intellif_aihub.egg-info → intellif_aihub-0.1.12}/PKG-INFO +1 -1
  2. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/pyproject.toml +20 -1
  3. intellif_aihub-0.1.12/src/aihub/__init__.py +1 -0
  4. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/src/aihub/client.py +19 -1
  5. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/src/aihub/models/model_center.py +20 -2
  6. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/src/aihub/models/model_training_platform.py +30 -3
  7. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/src/aihub/models/task_center.py +2 -0
  8. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/src/aihub/models/workflow_center.py +6 -0
  9. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12/src/intellif_aihub.egg-info}/PKG-INFO +1 -1
  10. intellif_aihub-0.1.10/src/aihub/__init__.py +0 -1
  11. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/LICENSE +0 -0
  12. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/README.md +0 -0
  13. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/setup.cfg +0 -0
  14. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/src/aihub/exceptions.py +0 -0
  15. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/src/aihub/models/__init__.py +0 -0
  16. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/src/aihub/models/artifact.py +0 -0
  17. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/src/aihub/models/common.py +0 -0
  18. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/src/aihub/models/data_warehouse.py +0 -0
  19. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/src/aihub/models/dataset_management.py +0 -0
  20. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/src/aihub/models/document_center.py +0 -0
  21. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/src/aihub/models/eval.py +0 -0
  22. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/src/aihub/models/labelfree.py +0 -0
  23. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/src/aihub/models/quota_schedule_management.py +0 -0
  24. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/src/aihub/models/tag_resource_management.py +0 -0
  25. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/src/aihub/models/user_system.py +0 -0
  26. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/src/aihub/services/__init__.py +0 -0
  27. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/src/aihub/services/artifact.py +0 -0
  28. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/src/aihub/services/data_warehouse.py +0 -0
  29. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/src/aihub/services/dataset_management.py +0 -0
  30. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/src/aihub/services/document_center.py +0 -0
  31. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/src/aihub/services/eval.py +0 -0
  32. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/src/aihub/services/labelfree.py +0 -0
  33. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/src/aihub/services/model_center.py +0 -0
  34. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/src/aihub/services/model_training_platform.py +0 -0
  35. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/src/aihub/services/quota_schedule_management.py +0 -0
  36. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/src/aihub/services/reporter.py +0 -0
  37. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/src/aihub/services/tag_resource_management.py +0 -0
  38. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/src/aihub/services/task_center.py +0 -0
  39. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/src/aihub/services/user_system.py +0 -0
  40. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/src/aihub/services/workflow_center.py +0 -0
  41. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/src/aihub/utils/__init__.py +0 -0
  42. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/src/aihub/utils/download.py +0 -0
  43. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/src/aihub/utils/http.py +0 -0
  44. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/src/aihub/utils/s3.py +0 -0
  45. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/src/intellif_aihub.egg-info/SOURCES.txt +0 -0
  46. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/src/intellif_aihub.egg-info/dependency_links.txt +0 -0
  47. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/src/intellif_aihub.egg-info/requires.txt +0 -0
  48. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/src/intellif_aihub.egg-info/top_level.txt +0 -0
  49. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/tests/test_artifact.py +0 -0
  50. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/tests/test_data_warehouse.py +0 -0
  51. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/tests/test_dataset_management.py +0 -0
  52. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/tests/test_document_center.py +0 -0
  53. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/tests/test_labelfree.py +0 -0
  54. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/tests/test_model_center.py +0 -0
  55. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/tests/test_model_training_platform.py +0 -0
  56. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/tests/test_quota_schedule_management.py +0 -0
  57. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/tests/test_s3.py +0 -0
  58. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/tests/test_tag_resource_management.py +0 -0
  59. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/tests/test_task_center.py +0 -0
  60. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/tests/test_user_system.py +0 -0
  61. {intellif_aihub-0.1.10 → intellif_aihub-0.1.12}/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.10
3
+ Version: 0.1.12
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.10"
3
+ version = "0.1.12"
4
4
  description = "Intellif AI-hub SDK."
5
5
  readme = {file = "README.md", content-type = "text/markdown"}
6
6
  requires-python = ">=3.9"
@@ -46,3 +46,22 @@ dev = [
46
46
  "mkdocs-material>=9.6.15",
47
47
  "mkdocstrings-python>=1.11.1",
48
48
  ]
49
+
50
+
51
+ [tool.black]
52
+ line-length = 120
53
+ target-version = ["py39", "py310"]
54
+ include = '\.pyi?$'
55
+ exclude = '''
56
+ /(
57
+ \.git
58
+ | \.hg
59
+ | \.mypy_cache
60
+ | \.tox
61
+ | \.venv
62
+ | _build
63
+ | buck-out
64
+ | build
65
+ | dist
66
+ )/
67
+ '''
@@ -0,0 +1 @@
1
+ __version__ = "0.1.12"
@@ -1,8 +1,10 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  import os
4
+ import sys
4
5
 
5
6
  import httpx
7
+ from loguru import logger
6
8
 
7
9
  from .exceptions import APIError
8
10
  from .services import artifact
@@ -65,7 +67,14 @@ class Client:
65
67
  user_system: UserSystemService = None
66
68
  workflow_center: WorkflowCenterService = None
67
69
 
68
- def __init__(self, *, base_url: str, token: str | None = None, timeout: float = 60.0):
70
+ def __init__(
71
+ self,
72
+ *,
73
+ base_url: str,
74
+ token: str | None = None,
75
+ timeout: float = 60.0,
76
+ log_level: str = "INFO",
77
+ ):
69
78
  """AI-HUB python SDK 客户端
70
79
 
71
80
  Args:
@@ -77,6 +86,15 @@ class Client:
77
86
  >>> client = Client(base_url="xxx", token="xxxx")
78
87
 
79
88
  """
89
+ logger.remove()
90
+ logger.add(
91
+ sys.stdout,
92
+ colorize=True,
93
+ format="<green>{time}</green> <level>{message}</level>",
94
+ level=log_level,
95
+ )
96
+ logger.info(f"AI-HUB Python SDK initialized with log level: {log_level}")
97
+
80
98
  if not base_url:
81
99
  raise ValueError("base_url必须填写")
82
100
 
@@ -3,29 +3,33 @@ from __future__ import annotations
3
3
  from enum import IntEnum
4
4
  from typing import List, Optional
5
5
 
6
- from pydantic import BaseModel, Field
6
+ from pydantic import BaseModel, Field, ConfigDict
7
7
 
8
8
 
9
9
  class User(BaseModel):
10
10
  """用户"""
11
+
11
12
  id: int = Field(description="用户ID")
12
13
  name: str = Field(description="用户名")
13
14
 
14
15
 
15
16
  class ModelType(BaseModel):
16
17
  """模型类型"""
18
+
17
19
  id: int = Field(description="类型ID")
18
20
  name: str = Field(description="类型名称")
19
21
 
20
22
 
21
23
  class DeployPlatform(BaseModel):
22
24
  """部署平台"""
25
+
23
26
  id: int = Field(description="部署平台ID")
24
27
  name: str = Field(description="部署平台名称")
25
28
 
26
29
 
27
30
  class QuantLevel(BaseModel):
28
31
  """量化等级"""
32
+
29
33
  id: int = Field(description="量化等级ID")
30
34
  name: str = Field(description="量化等级名称")
31
35
 
@@ -40,6 +44,7 @@ class ModelStatus(IntEnum):
40
44
 
41
45
  class Model(BaseModel):
42
46
  """模型详情"""
47
+
43
48
  id: int = Field(description="模型ID")
44
49
  name: str = Field(description="模型名称")
45
50
  description: str = Field(description="描述")
@@ -53,17 +58,19 @@ class Model(BaseModel):
53
58
  created_at: int = Field(alias="created_at", description="创建时间戳 (ms)")
54
59
  updated_at: int = Field(alias="updated_at", description="更新时间戳 (ms)")
55
60
 
56
- model_config = {"use_enum_values": True}
61
+ model_config = ConfigDict(protected_namespaces=(), use_enum_values=True)
57
62
 
58
63
 
59
64
  class ListModelTypesRequest(BaseModel):
60
65
  """查询模型类型列表请求"""
66
+
61
67
  page_size: int = Field(999, alias="page_size", description="每页数量")
62
68
  page_num: int = Field(1, alias="page_num", description="当前页码")
63
69
 
64
70
 
65
71
  class ListModelTypesResponse(BaseModel):
66
72
  """查询模型类型列表返回"""
73
+
67
74
  total: int = Field(description="总条数")
68
75
  page_size: int = Field(alias="page_size", description="每页数量")
69
76
  page_num: int = Field(alias="page_num", description="当前页码")
@@ -72,12 +79,14 @@ class ListModelTypesResponse(BaseModel):
72
79
 
73
80
  class ListDeployPlatformsRequest(BaseModel):
74
81
  """查询部署平台列表请求"""
82
+
75
83
  page_size: int = Field(999, alias="page_size", description="每页数量")
76
84
  page_num: int = Field(1, alias="page_num", description="当前页码")
77
85
 
78
86
 
79
87
  class ListDeployPlatformsResponse(BaseModel):
80
88
  """查询部署平台列表返回"""
89
+
81
90
  total: int = Field(description="总条数")
82
91
  page_size: int = Field(alias="page_size", description="每页数量")
83
92
  page_num: int = Field(alias="page_num", description="当前页码")
@@ -86,12 +95,14 @@ class ListDeployPlatformsResponse(BaseModel):
86
95
 
87
96
  class ListQuantLevelsRequest(BaseModel):
88
97
  """查询量化等级列表请求"""
98
+
89
99
  page_size: int = Field(999, alias="page_size", description="每页数量")
90
100
  page_num: int = Field(1, alias="page_num", description="当前页码")
91
101
 
92
102
 
93
103
  class ListQuantLevelsResponse(BaseModel):
94
104
  """查询量化等级列表返回"""
105
+
95
106
  total: int = Field(description="总条数")
96
107
  page_size: int = Field(alias="page_size", description="每页数量")
97
108
  page_num: int = Field(alias="page_num", description="当前页码")
@@ -100,6 +111,7 @@ class ListQuantLevelsResponse(BaseModel):
100
111
 
101
112
  class ListModelsRequest(BaseModel):
102
113
  """查询模型列表请求"""
114
+
103
115
  page_size: int = Field(20, alias="page_size", description="每页数量")
104
116
  page_num: int = Field(1, alias="page_num", description="当前页码")
105
117
  name: Optional[str] = Field(None, description="名称过滤")
@@ -107,6 +119,7 @@ class ListModelsRequest(BaseModel):
107
119
 
108
120
  class ListModelsResponse(BaseModel):
109
121
  """查询模型列表返回"""
122
+
110
123
  total: int = Field(description="总条数")
111
124
  page_size: int = Field(alias="page_size", description="每页数量")
112
125
  page_num: int = Field(alias="page_num", description="当前页码")
@@ -115,6 +128,7 @@ class ListModelsResponse(BaseModel):
115
128
 
116
129
  class CreateModelRequest(BaseModel):
117
130
  """创建模型请求"""
131
+
118
132
  name: str = Field(description="模型名称")
119
133
  description: Optional[str] = Field(None, description="描述")
120
134
  model_type_id: int = Field(alias="model_type_id", description="模型类型ID")
@@ -122,15 +136,18 @@ class CreateModelRequest(BaseModel):
122
136
  deploy_platform_id: Optional[int] = Field(None, alias="deploy_platform_id", description="部署平台ID")
123
137
  param_cnt: Optional[str] = Field(None, alias="param_cnt", description="参数量")
124
138
  quant_level_id: Optional[int] = Field(None, alias="quant_level_id", description="量化等级ID")
139
+ model_config = ConfigDict(protected_namespaces=())
125
140
 
126
141
 
127
142
  class CreateModelResponse(BaseModel):
128
143
  """创建模型返回"""
144
+
129
145
  id: int = Field(description="模型ID")
130
146
 
131
147
 
132
148
  class EditModelRequest(BaseModel):
133
149
  """编辑模型请求"""
150
+
134
151
  id: int = Field(description="模型ID")
135
152
  name: str = Field(description="模型名称")
136
153
  description: Optional[str] = Field(None, description="描述")
@@ -139,3 +156,4 @@ class EditModelRequest(BaseModel):
139
156
  deploy_platform_id: Optional[int] = Field(None, alias="deploy_platform_id", description="部署平台ID")
140
157
  param_cnt: Optional[str] = Field(None, alias="param_cnt", description="参数量")
141
158
  quant_level_id: Optional[int] = Field(None, alias="quant_level_id", description="量化等级ID")
159
+ model_config = ConfigDict(protected_namespaces=())
@@ -3,17 +3,19 @@ from __future__ import annotations
3
3
  from enum import IntEnum
4
4
  from typing import List, Optional
5
5
 
6
- from pydantic import BaseModel, Field
6
+ from pydantic import BaseModel, Field, ConfigDict
7
7
 
8
8
 
9
9
  class Env(BaseModel):
10
10
  """环境变量"""
11
+
11
12
  key: str = Field(description="变量名")
12
13
  value: str = Field(description="变量值")
13
14
 
14
15
 
15
16
  class Sku(BaseModel):
16
17
  """sku"""
18
+
17
19
  cpu: int = Field(description="CPU数")
18
20
  gpu: int = Field(description="GPU数")
19
21
  memory: int = Field(description="内存GiB")
@@ -21,6 +23,7 @@ class Sku(BaseModel):
21
23
 
22
24
  class VirtualCluster(BaseModel):
23
25
  """虚拟集群"""
26
+
24
27
  id: int = Field(description="ID")
25
28
  name: str = Field(description="名称")
26
29
  gpu_type: str = Field(alias="gpu_type", description="GPU类型,A800/4090/3090/2080")
@@ -30,6 +33,7 @@ class VirtualCluster(BaseModel):
30
33
 
31
34
  class Storage(BaseModel):
32
35
  """存储"""
36
+
33
37
  id: int = Field(description="存储ID")
34
38
  name: str = Field(description="存储名称")
35
39
  path: str = Field(description="挂载路径")
@@ -42,12 +46,14 @@ class Storage(BaseModel):
42
46
 
43
47
  class Category(BaseModel):
44
48
  """分类"""
49
+
45
50
  id: int = Field(description="分类ID")
46
51
  name: str = Field(description="分类名称")
47
52
 
48
53
 
49
54
  class Project(BaseModel):
50
55
  """项目"""
56
+
51
57
  id: int = Field(description="项目ID")
52
58
  name: str = Field(description="项目名称")
53
59
  description: str = Field(description="项目描述")
@@ -55,6 +61,7 @@ class Project(BaseModel):
55
61
 
56
62
  class User(BaseModel):
57
63
  """用户"""
64
+
58
65
  id: int = Field(description="用户ID")
59
66
  name: str = Field(description="用户名")
60
67
 
@@ -69,13 +76,15 @@ class TrainingStatus(IntEnum):
69
76
 
70
77
 
71
78
  class PreemptPolicy(IntEnum):
72
- """抢占策略:1-等待任务完成;2-停止任务"""
79
+ """抢占策略:0-非VIP任务;1-等待任务完成;2-停止任务"""
80
+ NONE = 0 # 非VIP任务
73
81
  WAIT = 1 # 等待任务完成
74
82
  STOP = 2 # 停止任务
75
83
 
76
84
 
77
85
  class CreateTrainingRequest(BaseModel):
78
86
  """创建训练任务请求"""
87
+
79
88
  framework: str = Field(description="训练框架,如PyTorchJob/MpiJobMpiRun/MpiJobDeepspeed")
80
89
  name: str = Field(description="任务名称")
81
90
  description: Optional[str] = Field(None, description="描述")
@@ -100,11 +109,13 @@ class CreateTrainingRequest(BaseModel):
100
109
 
101
110
  class CreateTrainingResponse(BaseModel):
102
111
  """创建训练任务返回"""
112
+
103
113
  id: int = Field(description="训练任务ID")
104
114
 
105
115
 
106
116
  class ListTrainingsRequest(BaseModel):
107
117
  """查询训练任务列表请求"""
118
+
108
119
  page_size: int = Field(20, alias="page_size", description="每页数量")
109
120
  page_num: int = Field(1, alias="page_num", description="当前页码")
110
121
  user_id: Optional[int] = Field(None, alias="user_id", description="用户过滤")
@@ -120,6 +131,7 @@ class ListTrainingsRequest(BaseModel):
120
131
 
121
132
  class Training(BaseModel):
122
133
  """训练任务详情"""
134
+
123
135
  id: int = Field(description="任务ID")
124
136
  framework: str = Field(description="训练框架")
125
137
  name: str = Field(description="名称")
@@ -153,11 +165,12 @@ class Training(BaseModel):
153
165
  use_new_log: bool = Field(alias="use_new_log", description="是否使用新版日志")
154
166
  is_quota_schedule: bool = Field(alias="is_quota_schedule", description="配额调度")
155
167
 
156
- model_config = {"use_enum_values": True}
168
+ model_config = ConfigDict(protected_namespaces=(), use_enum_values=True)
157
169
 
158
170
 
159
171
  class ListTrainingsResponse(BaseModel):
160
172
  """查询训练任务列表返回"""
173
+
161
174
  total: int = Field(description="总条数")
162
175
  page_size: int = Field(alias="page_size", description="每页数量")
163
176
  page_num: int = Field(alias="page_num", description="当前页码")
@@ -166,6 +179,7 @@ class ListTrainingsResponse(BaseModel):
166
179
 
167
180
  class Pod(BaseModel):
168
181
  """训练任务Pod"""
182
+
169
183
  id: int = Field(description="ID")
170
184
  namespace: str = Field(description="Namespace")
171
185
  name: str = Field(description="名称")
@@ -182,12 +196,14 @@ class Pod(BaseModel):
182
196
 
183
197
  class ListTrainingPodsRequest(BaseModel):
184
198
  """查询训练任务Pod列表请求"""
199
+
185
200
  page_size: int = Field(20, alias="page_size", description="每页数量")
186
201
  page_num: int = Field(1, alias="page_num", description="当前页码")
187
202
 
188
203
 
189
204
  class ListTrainingPodsResponse(BaseModel):
190
205
  """查询训练任务Pod列表返回"""
206
+
191
207
  total: int = Field(description="总条数")
192
208
  page_size: int = Field(alias="page_size", description="每页数量")
193
209
  page_num: int = Field(alias="page_num", description="当前页码")
@@ -196,39 +212,46 @@ class ListTrainingPodsResponse(BaseModel):
196
212
 
197
213
  class PodLogInfo(BaseModel):
198
214
  """pod日志信息"""
215
+
199
216
  name: str = Field(description="日志名称")
200
217
  url: str = Field(description="URL")
201
218
 
202
219
 
203
220
  class GetTrainingPodLogsNewResponse(BaseModel):
204
221
  """查询训练任务Pod日志返回"""
222
+
205
223
  logs: List[PodLogInfo] = Field(description="日志列表")
206
224
 
207
225
 
208
226
  class GetTrainingPodSpecResponse(BaseModel):
209
227
  """查询训练任务Pod Spec返回"""
228
+
210
229
  spec: str = Field(description="Pod YAML Spec")
211
230
 
212
231
 
213
232
  class GetTrainingPodEventsResponse(BaseModel):
214
233
  """查询训练任务Pod Event返回"""
234
+
215
235
  events: str = Field(description="事件内容")
216
236
 
217
237
 
218
238
  class TrainingUser(BaseModel):
219
239
  """训练任务用户"""
240
+
220
241
  user_id: int = Field(alias="user_id", description="用户ID")
221
242
  username: str = Field(description="用户名")
222
243
 
223
244
 
224
245
  class ListTrainingUsersRequest(BaseModel):
225
246
  """查询训练任务用户列表请求"""
247
+
226
248
  page_size: int = Field(20, alias="page_size", description="每页数量")
227
249
  page_num: int = Field(1, alias="page_num", description="当前页码")
228
250
 
229
251
 
230
252
  class ListTrainingUsersResponse(BaseModel):
231
253
  """查询训练任务用户列表返回"""
254
+
232
255
  total: int = Field(description="总条数")
233
256
  page_size: int = Field(alias="page_size", description="每页数量")
234
257
  page_num: int = Field(alias="page_num", description="当前页码")
@@ -237,6 +260,7 @@ class ListTrainingUsersResponse(BaseModel):
237
260
 
238
261
  class Container(BaseModel):
239
262
  """容器"""
263
+
240
264
  namespace: str = Field(description="Namespace")
241
265
  pod_name: str = Field(alias="pod_name", description="Pod名")
242
266
  container_name: str = Field(alias="container_name", description="容器名")
@@ -244,6 +268,7 @@ class Container(BaseModel):
244
268
 
245
269
  class TrainingContainer(BaseModel):
246
270
  """训练容器"""
271
+
247
272
  training_id: int = Field(alias="training_id", description="训练ID")
248
273
  training_name: str = Field(alias="training_name", description="训练名")
249
274
  containers: List[Container] = Field(description="容器列表")
@@ -251,12 +276,14 @@ class TrainingContainer(BaseModel):
251
276
 
252
277
  class ListTrainingContainersRequest(BaseModel):
253
278
  """查询训练任务容器列表请求"""
279
+
254
280
  page_size: int = Field(20, alias="page_size", description="每页数量")
255
281
  page_num: int = Field(1, alias="page_num", description="当前页码")
256
282
 
257
283
 
258
284
  class ListTrainingContainersResponse(BaseModel):
259
285
  """查询训练任务容器列表返回"""
286
+
260
287
  total: int = Field(description="总条数")
261
288
  page_size: int = Field(alias="page_size", description="每页数量")
262
289
  page_num: int = Field(alias="page_num", description="当前页码")
@@ -57,6 +57,8 @@ class TaskDetailOtherInfo(BaseModel):
57
57
  label_projects: Optional[List[ProjectInfo]] = Field(alias="label_projects", default=None,
58
58
  description="关联标注项目列表")
59
59
 
60
+ model_config = {"use_enum_values": True}
61
+
60
62
 
61
63
  class CreateTaskReq(BaseModel):
62
64
  """创建标注任务请求"""
@@ -329,6 +329,8 @@ class TaskNode(BaseModel):
329
329
  virtual_cluster: VirtualCluster = Field(alias="virtual_cluster", description="虚拟集群")
330
330
  avg_gpu_util: float = Field(alias="avg_gpu_util", description="平均GPU利用率")
331
331
 
332
+ model_config = {"use_enum_values": True}
333
+
332
334
 
333
335
  class Param(BaseModel):
334
336
  """参数"""
@@ -375,6 +377,8 @@ class Run(BaseModel):
375
377
  avg_gpu_util: float = Field(alias="avg_gpu_util", description="平均GPU利用率")
376
378
  total_gpu_time: float = Field(alias="total_gpu_time", description="总的gpu用时")
377
379
 
380
+ model_config = {"use_enum_values": True}
381
+
378
382
 
379
383
  class ListRunsRequest(BaseModel):
380
384
  """查询运行实例列表请求"""
@@ -384,6 +388,8 @@ class ListRunsRequest(BaseModel):
384
388
  user_id: Optional[int] = Field(None, alias="user_id", description="用户过滤")
385
389
  status: Optional[RunStatus] = Field(None, description="状态过滤")
386
390
 
391
+ model_config = {"use_enum_values": True}
392
+
387
393
 
388
394
  class ListRunsResponse(BaseModel):
389
395
  """查询运行实例列表返回"""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: intellif-aihub
3
- Version: 0.1.10
3
+ Version: 0.1.12
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.10"
File without changes