intellif-aihub 0.1.11__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.
- {intellif_aihub-0.1.11/src/intellif_aihub.egg-info → intellif_aihub-0.1.12}/PKG-INFO +1 -1
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/pyproject.toml +20 -1
- intellif_aihub-0.1.12/src/aihub/__init__.py +1 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/src/aihub/client.py +19 -1
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/src/aihub/models/model_center.py +20 -2
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/src/aihub/models/model_training_platform.py +28 -2
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/src/aihub/models/task_center.py +2 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/src/aihub/models/workflow_center.py +6 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12/src/intellif_aihub.egg-info}/PKG-INFO +1 -1
- intellif_aihub-0.1.11/src/aihub/__init__.py +0 -1
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/LICENSE +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/README.md +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/setup.cfg +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/src/aihub/exceptions.py +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/src/aihub/models/__init__.py +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/src/aihub/models/artifact.py +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/src/aihub/models/common.py +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/src/aihub/models/data_warehouse.py +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/src/aihub/models/dataset_management.py +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/src/aihub/models/document_center.py +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/src/aihub/models/eval.py +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/src/aihub/models/labelfree.py +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/src/aihub/models/quota_schedule_management.py +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/src/aihub/models/tag_resource_management.py +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/src/aihub/models/user_system.py +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/src/aihub/services/__init__.py +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/src/aihub/services/artifact.py +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/src/aihub/services/data_warehouse.py +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/src/aihub/services/dataset_management.py +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/src/aihub/services/document_center.py +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/src/aihub/services/eval.py +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/src/aihub/services/labelfree.py +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/src/aihub/services/model_center.py +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/src/aihub/services/model_training_platform.py +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/src/aihub/services/quota_schedule_management.py +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/src/aihub/services/reporter.py +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/src/aihub/services/tag_resource_management.py +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/src/aihub/services/task_center.py +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/src/aihub/services/user_system.py +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/src/aihub/services/workflow_center.py +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/src/aihub/utils/__init__.py +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/src/aihub/utils/download.py +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/src/aihub/utils/http.py +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/src/aihub/utils/s3.py +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/src/intellif_aihub.egg-info/SOURCES.txt +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/src/intellif_aihub.egg-info/dependency_links.txt +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/src/intellif_aihub.egg-info/requires.txt +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/src/intellif_aihub.egg-info/top_level.txt +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/tests/test_artifact.py +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/tests/test_data_warehouse.py +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/tests/test_dataset_management.py +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/tests/test_document_center.py +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/tests/test_labelfree.py +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/tests/test_model_center.py +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/tests/test_model_training_platform.py +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/tests/test_quota_schedule_management.py +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/tests/test_s3.py +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/tests/test_tag_resource_management.py +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/tests/test_task_center.py +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/tests/test_user_system.py +0 -0
- {intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/tests/test_workflow_center.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "intellif-aihub"
|
|
3
|
-
version = "0.1.
|
|
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__(
|
|
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 =
|
|
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
|
|
|
@@ -77,6 +84,7 @@ class PreemptPolicy(IntEnum):
|
|
|
77
84
|
|
|
78
85
|
class CreateTrainingRequest(BaseModel):
|
|
79
86
|
"""创建训练任务请求"""
|
|
87
|
+
|
|
80
88
|
framework: str = Field(description="训练框架,如PyTorchJob/MpiJobMpiRun/MpiJobDeepspeed")
|
|
81
89
|
name: str = Field(description="任务名称")
|
|
82
90
|
description: Optional[str] = Field(None, description="描述")
|
|
@@ -101,11 +109,13 @@ class CreateTrainingRequest(BaseModel):
|
|
|
101
109
|
|
|
102
110
|
class CreateTrainingResponse(BaseModel):
|
|
103
111
|
"""创建训练任务返回"""
|
|
112
|
+
|
|
104
113
|
id: int = Field(description="训练任务ID")
|
|
105
114
|
|
|
106
115
|
|
|
107
116
|
class ListTrainingsRequest(BaseModel):
|
|
108
117
|
"""查询训练任务列表请求"""
|
|
118
|
+
|
|
109
119
|
page_size: int = Field(20, alias="page_size", description="每页数量")
|
|
110
120
|
page_num: int = Field(1, alias="page_num", description="当前页码")
|
|
111
121
|
user_id: Optional[int] = Field(None, alias="user_id", description="用户过滤")
|
|
@@ -121,6 +131,7 @@ class ListTrainingsRequest(BaseModel):
|
|
|
121
131
|
|
|
122
132
|
class Training(BaseModel):
|
|
123
133
|
"""训练任务详情"""
|
|
134
|
+
|
|
124
135
|
id: int = Field(description="任务ID")
|
|
125
136
|
framework: str = Field(description="训练框架")
|
|
126
137
|
name: str = Field(description="名称")
|
|
@@ -154,11 +165,12 @@ class Training(BaseModel):
|
|
|
154
165
|
use_new_log: bool = Field(alias="use_new_log", description="是否使用新版日志")
|
|
155
166
|
is_quota_schedule: bool = Field(alias="is_quota_schedule", description="配额调度")
|
|
156
167
|
|
|
157
|
-
model_config =
|
|
168
|
+
model_config = ConfigDict(protected_namespaces=(), use_enum_values=True)
|
|
158
169
|
|
|
159
170
|
|
|
160
171
|
class ListTrainingsResponse(BaseModel):
|
|
161
172
|
"""查询训练任务列表返回"""
|
|
173
|
+
|
|
162
174
|
total: int = Field(description="总条数")
|
|
163
175
|
page_size: int = Field(alias="page_size", description="每页数量")
|
|
164
176
|
page_num: int = Field(alias="page_num", description="当前页码")
|
|
@@ -167,6 +179,7 @@ class ListTrainingsResponse(BaseModel):
|
|
|
167
179
|
|
|
168
180
|
class Pod(BaseModel):
|
|
169
181
|
"""训练任务Pod"""
|
|
182
|
+
|
|
170
183
|
id: int = Field(description="ID")
|
|
171
184
|
namespace: str = Field(description="Namespace")
|
|
172
185
|
name: str = Field(description="名称")
|
|
@@ -183,12 +196,14 @@ class Pod(BaseModel):
|
|
|
183
196
|
|
|
184
197
|
class ListTrainingPodsRequest(BaseModel):
|
|
185
198
|
"""查询训练任务Pod列表请求"""
|
|
199
|
+
|
|
186
200
|
page_size: int = Field(20, alias="page_size", description="每页数量")
|
|
187
201
|
page_num: int = Field(1, alias="page_num", description="当前页码")
|
|
188
202
|
|
|
189
203
|
|
|
190
204
|
class ListTrainingPodsResponse(BaseModel):
|
|
191
205
|
"""查询训练任务Pod列表返回"""
|
|
206
|
+
|
|
192
207
|
total: int = Field(description="总条数")
|
|
193
208
|
page_size: int = Field(alias="page_size", description="每页数量")
|
|
194
209
|
page_num: int = Field(alias="page_num", description="当前页码")
|
|
@@ -197,39 +212,46 @@ class ListTrainingPodsResponse(BaseModel):
|
|
|
197
212
|
|
|
198
213
|
class PodLogInfo(BaseModel):
|
|
199
214
|
"""pod日志信息"""
|
|
215
|
+
|
|
200
216
|
name: str = Field(description="日志名称")
|
|
201
217
|
url: str = Field(description="URL")
|
|
202
218
|
|
|
203
219
|
|
|
204
220
|
class GetTrainingPodLogsNewResponse(BaseModel):
|
|
205
221
|
"""查询训练任务Pod日志返回"""
|
|
222
|
+
|
|
206
223
|
logs: List[PodLogInfo] = Field(description="日志列表")
|
|
207
224
|
|
|
208
225
|
|
|
209
226
|
class GetTrainingPodSpecResponse(BaseModel):
|
|
210
227
|
"""查询训练任务Pod Spec返回"""
|
|
228
|
+
|
|
211
229
|
spec: str = Field(description="Pod YAML Spec")
|
|
212
230
|
|
|
213
231
|
|
|
214
232
|
class GetTrainingPodEventsResponse(BaseModel):
|
|
215
233
|
"""查询训练任务Pod Event返回"""
|
|
234
|
+
|
|
216
235
|
events: str = Field(description="事件内容")
|
|
217
236
|
|
|
218
237
|
|
|
219
238
|
class TrainingUser(BaseModel):
|
|
220
239
|
"""训练任务用户"""
|
|
240
|
+
|
|
221
241
|
user_id: int = Field(alias="user_id", description="用户ID")
|
|
222
242
|
username: str = Field(description="用户名")
|
|
223
243
|
|
|
224
244
|
|
|
225
245
|
class ListTrainingUsersRequest(BaseModel):
|
|
226
246
|
"""查询训练任务用户列表请求"""
|
|
247
|
+
|
|
227
248
|
page_size: int = Field(20, alias="page_size", description="每页数量")
|
|
228
249
|
page_num: int = Field(1, alias="page_num", description="当前页码")
|
|
229
250
|
|
|
230
251
|
|
|
231
252
|
class ListTrainingUsersResponse(BaseModel):
|
|
232
253
|
"""查询训练任务用户列表返回"""
|
|
254
|
+
|
|
233
255
|
total: int = Field(description="总条数")
|
|
234
256
|
page_size: int = Field(alias="page_size", description="每页数量")
|
|
235
257
|
page_num: int = Field(alias="page_num", description="当前页码")
|
|
@@ -238,6 +260,7 @@ class ListTrainingUsersResponse(BaseModel):
|
|
|
238
260
|
|
|
239
261
|
class Container(BaseModel):
|
|
240
262
|
"""容器"""
|
|
263
|
+
|
|
241
264
|
namespace: str = Field(description="Namespace")
|
|
242
265
|
pod_name: str = Field(alias="pod_name", description="Pod名")
|
|
243
266
|
container_name: str = Field(alias="container_name", description="容器名")
|
|
@@ -245,6 +268,7 @@ class Container(BaseModel):
|
|
|
245
268
|
|
|
246
269
|
class TrainingContainer(BaseModel):
|
|
247
270
|
"""训练容器"""
|
|
271
|
+
|
|
248
272
|
training_id: int = Field(alias="training_id", description="训练ID")
|
|
249
273
|
training_name: str = Field(alias="training_name", description="训练名")
|
|
250
274
|
containers: List[Container] = Field(description="容器列表")
|
|
@@ -252,12 +276,14 @@ class TrainingContainer(BaseModel):
|
|
|
252
276
|
|
|
253
277
|
class ListTrainingContainersRequest(BaseModel):
|
|
254
278
|
"""查询训练任务容器列表请求"""
|
|
279
|
+
|
|
255
280
|
page_size: int = Field(20, alias="page_size", description="每页数量")
|
|
256
281
|
page_num: int = Field(1, alias="page_num", description="当前页码")
|
|
257
282
|
|
|
258
283
|
|
|
259
284
|
class ListTrainingContainersResponse(BaseModel):
|
|
260
285
|
"""查询训练任务容器列表返回"""
|
|
286
|
+
|
|
261
287
|
total: int = Field(description="总条数")
|
|
262
288
|
page_size: int = Field(alias="page_size", description="每页数量")
|
|
263
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 +0,0 @@
|
|
|
1
|
-
__version__ = "0.1.11"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/src/aihub/models/quota_schedule_management.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/src/aihub/services/model_training_platform.py
RENAMED
|
File without changes
|
{intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/src/aihub/services/quota_schedule_management.py
RENAMED
|
File without changes
|
|
File without changes
|
{intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/src/aihub/services/tag_resource_management.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{intellif_aihub-0.1.11 → intellif_aihub-0.1.12}/src/intellif_aihub.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|