intellif-aihub 0.1.3__py3-none-any.whl → 0.1.5__py3-none-any.whl
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.
- aihub/__init__.py +1 -1
- aihub/client.py +95 -91
- aihub/exceptions.py +18 -18
- aihub/models/artifact.py +137 -137
- aihub/models/common.py +13 -13
- aihub/models/dataset_management.py +99 -99
- aihub/models/document_center.py +28 -28
- aihub/models/eval.py +17 -0
- aihub/models/labelfree.py +53 -31
- aihub/models/model_training_platform.py +234 -230
- aihub/models/quota_schedule_management.py +239 -0
- aihub/models/tag_resource_management.py +50 -50
- aihub/models/task_center.py +117 -117
- aihub/models/user_system.py +262 -262
- aihub/services/artifact.py +353 -353
- aihub/services/dataset_management.py +240 -240
- aihub/services/document_center.py +43 -43
- aihub/services/eval.py +68 -0
- aihub/services/labelfree.py +44 -44
- aihub/services/model_training_platform.py +209 -135
- aihub/services/quota_schedule_management.py +182 -18
- aihub/services/reporter.py +20 -20
- aihub/services/tag_resource_management.py +55 -55
- aihub/services/task_center.py +190 -190
- aihub/services/user_system.py +339 -339
- aihub/utils/download.py +69 -69
- aihub/utils/http.py +13 -13
- aihub/utils/s3.py +77 -77
- {intellif_aihub-0.1.3.dist-info → intellif_aihub-0.1.5.dist-info}/METADATA +1 -1
- intellif_aihub-0.1.5.dist-info/RECORD +36 -0
- {intellif_aihub-0.1.3.dist-info → intellif_aihub-0.1.5.dist-info}/licenses/LICENSE +200 -200
- intellif_aihub-0.1.3.dist-info/RECORD +0 -34
- {intellif_aihub-0.1.3.dist-info → intellif_aihub-0.1.5.dist-info}/WHEEL +0 -0
- {intellif_aihub-0.1.3.dist-info → intellif_aihub-0.1.5.dist-info}/top_level.txt +0 -0
|
@@ -1,99 +1,99 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
from typing import List, Optional
|
|
4
|
-
|
|
5
|
-
from pydantic import BaseModel, Field
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class CreateDatasetRequest(BaseModel):
|
|
9
|
-
name: str
|
|
10
|
-
description: str
|
|
11
|
-
tags: List[int]
|
|
12
|
-
cover_img: Optional[str] = Field(None, alias="cover_img")
|
|
13
|
-
create_by: Optional[int] = Field(None, alias="create_by")
|
|
14
|
-
is_private: Optional[bool] = Field(None, alias="is_private")
|
|
15
|
-
access_user_ids: Optional[List[int]] = Field(None, alias="access_user_ids")
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
class CreateDatasetResponse(BaseModel):
|
|
19
|
-
id: int = Field(alias="id")
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
class DatasetVersionBase(BaseModel):
|
|
23
|
-
id: int
|
|
24
|
-
version: int
|
|
25
|
-
status: int
|
|
26
|
-
parquet_index_path: Optional[str] = Field(None, alias="parquet_index_path")
|
|
27
|
-
data_count: int = Field(alias="data_count")
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
class DatasetDetail(BaseModel):
|
|
31
|
-
id: int
|
|
32
|
-
name: str
|
|
33
|
-
description: str
|
|
34
|
-
cover_img: Optional[str] = Field(None, alias="cover_img")
|
|
35
|
-
created_at: int = Field(alias="created_at")
|
|
36
|
-
updated_at: int = Field(alias="update_at")
|
|
37
|
-
user_id: int = Field(alias="user_id")
|
|
38
|
-
username: str
|
|
39
|
-
tags: List[int]
|
|
40
|
-
access_user_ids: Optional[List[int]] = Field(None, alias="access_user_ids")
|
|
41
|
-
is_private: Optional[bool] = Field(None, alias="is_private")
|
|
42
|
-
versions: List[DatasetVersionBase]
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
class ExtInfo(BaseModel):
|
|
46
|
-
rec_file_path: Optional[str] = Field(None, alias="rec_file_path")
|
|
47
|
-
idx_file_path: Optional[str] = Field(None, alias="idx_file_path")
|
|
48
|
-
json_file_path: Optional[str] = Field(None, alias="json_file_path")
|
|
49
|
-
image_dir_path: Optional[str] = Field(None, alias="image_dir_path")
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
class CreateDatasetVersionRequest(BaseModel):
|
|
53
|
-
upload_path: str = Field(alias="upload_path")
|
|
54
|
-
description: Optional[str] = None
|
|
55
|
-
dataset_id: int = Field(alias="dataset_id")
|
|
56
|
-
object_cnt: Optional[int] = Field(None, alias="object_cnt")
|
|
57
|
-
data_size: Optional[int] = Field(None, alias="data_size")
|
|
58
|
-
create_by: Optional[int] = Field(None, alias="create_by")
|
|
59
|
-
upload_type: Optional[int] = Field(4, alias="upload_type")
|
|
60
|
-
ext_info: Optional[ExtInfo] = Field(None, alias="ext_info")
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
class CreateDatasetVersionResponse(BaseModel):
|
|
64
|
-
id: int = Field(alias="id")
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
class UploadDatasetVersionRequest(BaseModel):
|
|
68
|
-
upload_path: str = Field(alias="upload_path")
|
|
69
|
-
upload_type: int = Field(alias="upload_type")
|
|
70
|
-
dataset_id: int = Field(alias="dataset_id")
|
|
71
|
-
parent_version_id: Optional[int] = Field(None, alias="parent_version_id")
|
|
72
|
-
description: Optional[str] = Field(None, alias="description")
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
class UploadDatasetVersionResponse(BaseModel):
|
|
76
|
-
id: int = Field(alias="id")
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
class DatasetVersionDetail(BaseModel):
|
|
80
|
-
id: int
|
|
81
|
-
version: int
|
|
82
|
-
dataset_id: int = Field(alias="dataset_id")
|
|
83
|
-
upload_path: str = Field(alias="upload_path")
|
|
84
|
-
upload_type: int = Field(alias="upload_type")
|
|
85
|
-
parent_version_id: Optional[int] = Field(None, alias="parent_version_id")
|
|
86
|
-
description: Optional[str] = None
|
|
87
|
-
status: int
|
|
88
|
-
message: Optional[str] = None
|
|
89
|
-
created_at: int = Field(alias="created_at")
|
|
90
|
-
user_id: int = Field(alias="user_id")
|
|
91
|
-
data_size: Optional[int] = Field(None, alias="data_size")
|
|
92
|
-
data_count: Optional[int] = Field(None, alias="data_count")
|
|
93
|
-
parquet_index_path: Optional[str] = Field(None, alias="parquet_index_path")
|
|
94
|
-
ext_info: Optional[ExtInfo] = Field(None, alias="ext_info")
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
class FileUploadData(BaseModel):
|
|
98
|
-
path: str
|
|
99
|
-
url: str
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import List, Optional
|
|
4
|
+
|
|
5
|
+
from pydantic import BaseModel, Field
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class CreateDatasetRequest(BaseModel):
|
|
9
|
+
name: str
|
|
10
|
+
description: str
|
|
11
|
+
tags: List[int]
|
|
12
|
+
cover_img: Optional[str] = Field(None, alias="cover_img")
|
|
13
|
+
create_by: Optional[int] = Field(None, alias="create_by")
|
|
14
|
+
is_private: Optional[bool] = Field(None, alias="is_private")
|
|
15
|
+
access_user_ids: Optional[List[int]] = Field(None, alias="access_user_ids")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class CreateDatasetResponse(BaseModel):
|
|
19
|
+
id: int = Field(alias="id")
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class DatasetVersionBase(BaseModel):
|
|
23
|
+
id: int
|
|
24
|
+
version: int
|
|
25
|
+
status: int
|
|
26
|
+
parquet_index_path: Optional[str] = Field(None, alias="parquet_index_path")
|
|
27
|
+
data_count: int = Field(alias="data_count")
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class DatasetDetail(BaseModel):
|
|
31
|
+
id: int
|
|
32
|
+
name: str
|
|
33
|
+
description: str
|
|
34
|
+
cover_img: Optional[str] = Field(None, alias="cover_img")
|
|
35
|
+
created_at: int = Field(alias="created_at")
|
|
36
|
+
updated_at: int = Field(alias="update_at")
|
|
37
|
+
user_id: int = Field(alias="user_id")
|
|
38
|
+
username: str
|
|
39
|
+
tags: List[int]
|
|
40
|
+
access_user_ids: Optional[List[int]] = Field(None, alias="access_user_ids")
|
|
41
|
+
is_private: Optional[bool] = Field(None, alias="is_private")
|
|
42
|
+
versions: List[DatasetVersionBase]
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class ExtInfo(BaseModel):
|
|
46
|
+
rec_file_path: Optional[str] = Field(None, alias="rec_file_path")
|
|
47
|
+
idx_file_path: Optional[str] = Field(None, alias="idx_file_path")
|
|
48
|
+
json_file_path: Optional[str] = Field(None, alias="json_file_path")
|
|
49
|
+
image_dir_path: Optional[str] = Field(None, alias="image_dir_path")
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class CreateDatasetVersionRequest(BaseModel):
|
|
53
|
+
upload_path: str = Field(alias="upload_path")
|
|
54
|
+
description: Optional[str] = None
|
|
55
|
+
dataset_id: int = Field(alias="dataset_id")
|
|
56
|
+
object_cnt: Optional[int] = Field(None, alias="object_cnt")
|
|
57
|
+
data_size: Optional[int] = Field(None, alias="data_size")
|
|
58
|
+
create_by: Optional[int] = Field(None, alias="create_by")
|
|
59
|
+
upload_type: Optional[int] = Field(4, alias="upload_type")
|
|
60
|
+
ext_info: Optional[ExtInfo] = Field(None, alias="ext_info")
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
class CreateDatasetVersionResponse(BaseModel):
|
|
64
|
+
id: int = Field(alias="id")
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
class UploadDatasetVersionRequest(BaseModel):
|
|
68
|
+
upload_path: str = Field(alias="upload_path")
|
|
69
|
+
upload_type: int = Field(alias="upload_type")
|
|
70
|
+
dataset_id: int = Field(alias="dataset_id")
|
|
71
|
+
parent_version_id: Optional[int] = Field(None, alias="parent_version_id")
|
|
72
|
+
description: Optional[str] = Field(None, alias="description")
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
class UploadDatasetVersionResponse(BaseModel):
|
|
76
|
+
id: int = Field(alias="id")
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
class DatasetVersionDetail(BaseModel):
|
|
80
|
+
id: int
|
|
81
|
+
version: int
|
|
82
|
+
dataset_id: int = Field(alias="dataset_id")
|
|
83
|
+
upload_path: str = Field(alias="upload_path")
|
|
84
|
+
upload_type: int = Field(alias="upload_type")
|
|
85
|
+
parent_version_id: Optional[int] = Field(None, alias="parent_version_id")
|
|
86
|
+
description: Optional[str] = None
|
|
87
|
+
status: int
|
|
88
|
+
message: Optional[str] = None
|
|
89
|
+
created_at: int = Field(alias="created_at")
|
|
90
|
+
user_id: int = Field(alias="user_id")
|
|
91
|
+
data_size: Optional[int] = Field(None, alias="data_size")
|
|
92
|
+
data_count: Optional[int] = Field(None, alias="data_count")
|
|
93
|
+
parquet_index_path: Optional[str] = Field(None, alias="parquet_index_path")
|
|
94
|
+
ext_info: Optional[ExtInfo] = Field(None, alias="ext_info")
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
class FileUploadData(BaseModel):
|
|
98
|
+
path: str
|
|
99
|
+
url: str
|
aihub/models/document_center.py
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
# !/usr/bin/env python
|
|
2
|
-
# -*-coding:utf-8 -*-
|
|
3
|
-
|
|
4
|
-
from __future__ import annotations
|
|
5
|
-
|
|
6
|
-
from typing import List, Optional, Any
|
|
7
|
-
|
|
8
|
-
from pydantic import BaseModel
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
class Document(BaseModel):
|
|
12
|
-
id: int
|
|
13
|
-
title: str
|
|
14
|
-
type: int
|
|
15
|
-
edit_time: int
|
|
16
|
-
need_update: bool
|
|
17
|
-
content: str
|
|
18
|
-
username: str
|
|
19
|
-
user_id: int
|
|
20
|
-
created_at: int
|
|
21
|
-
comments: Optional[Any] = None
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
class GetDocumentsResponse(BaseModel):
|
|
25
|
-
total: int
|
|
26
|
-
page_size: int
|
|
27
|
-
page_num: int
|
|
28
|
-
data: List[Document]
|
|
1
|
+
# !/usr/bin/env python
|
|
2
|
+
# -*-coding:utf-8 -*-
|
|
3
|
+
|
|
4
|
+
from __future__ import annotations
|
|
5
|
+
|
|
6
|
+
from typing import List, Optional, Any
|
|
7
|
+
|
|
8
|
+
from pydantic import BaseModel
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class Document(BaseModel):
|
|
12
|
+
id: int
|
|
13
|
+
title: str
|
|
14
|
+
type: int
|
|
15
|
+
edit_time: int
|
|
16
|
+
need_update: bool
|
|
17
|
+
content: str
|
|
18
|
+
username: str
|
|
19
|
+
user_id: int
|
|
20
|
+
created_at: int
|
|
21
|
+
comments: Optional[Any] = None
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class GetDocumentsResponse(BaseModel):
|
|
25
|
+
total: int
|
|
26
|
+
page_size: int
|
|
27
|
+
page_num: int
|
|
28
|
+
data: List[Document]
|
aihub/models/eval.py
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# !/usr/bin/env python
|
|
2
|
+
# -*-coding:utf-8 -*-
|
|
3
|
+
from pydantic import BaseModel
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class CreatEvalReq(BaseModel):
|
|
7
|
+
dataset_id: int
|
|
8
|
+
dataset_version_id: int
|
|
9
|
+
prediction_artifact_path: str
|
|
10
|
+
evaled_artifact_path: str
|
|
11
|
+
run_id: str
|
|
12
|
+
user_id: int = 0
|
|
13
|
+
report: dict = {}
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class CreatEvalResp(BaseModel):
|
|
17
|
+
id: int
|
aihub/models/labelfree.py
CHANGED
|
@@ -1,31 +1,53 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
from typing import Optional
|
|
4
|
-
|
|
5
|
-
from pydantic import BaseModel, Field
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class Stats(BaseModel):
|
|
9
|
-
"""标注统计信息"""
|
|
10
|
-
|
|
11
|
-
total_annotations: int = Field(alias="total_annotations")
|
|
12
|
-
labeled_annotations: int = Field(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
from pydantic import BaseModel, Field
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class Stats(BaseModel):
|
|
9
|
+
"""标注统计信息"""
|
|
10
|
+
|
|
11
|
+
total_annotations: int = Field(alias="total_annotations", description="总数据量")
|
|
12
|
+
labeled_annotations: int = Field(
|
|
13
|
+
alias="labeled_annotations", description="已标注数据量"
|
|
14
|
+
)
|
|
15
|
+
total_labels: int = Field(alias="total_labels", description="总标签量")
|
|
16
|
+
total_reviews: Optional[int] = Field(
|
|
17
|
+
None, alias="total_reviews", description="总质检量"
|
|
18
|
+
)
|
|
19
|
+
unlabeled_reviews: Optional[int] = Field(
|
|
20
|
+
None, alias="unlabeled_reviews", description="未质检量"
|
|
21
|
+
)
|
|
22
|
+
labeled_reviews: Optional[int] = Field(
|
|
23
|
+
None, alias="labeled_reviews", description="已质检量"
|
|
24
|
+
)
|
|
25
|
+
accepted_count: Optional[int] = Field(
|
|
26
|
+
None, alias="accepted_count", description="质检通过量"
|
|
27
|
+
)
|
|
28
|
+
rejected_count: Optional[int] = Field(
|
|
29
|
+
None, alias="rejected_count", description="质检打回量"
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class GetGlobalStatsResponse(BaseModel):
|
|
34
|
+
"""
|
|
35
|
+
标注统计概况
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
global_stats: Stats = Field(alias="global_stats")
|
|
39
|
+
valid_ten_percent: bool = Field(
|
|
40
|
+
alias="valid_ten_percent", description="是否完成验收10%"
|
|
41
|
+
)
|
|
42
|
+
valid_fifty_percent: bool = Field(
|
|
43
|
+
alias="valid_fifty_percent", description="是否完成验收50%"
|
|
44
|
+
)
|
|
45
|
+
valid_hundred_percent: bool = Field(
|
|
46
|
+
alias="valid_hundred_percent", description="是否完成验收100%"
|
|
47
|
+
)
|
|
48
|
+
data_exported_count: int = Field(
|
|
49
|
+
alias="data_exported_count", description="已导出数据次数"
|
|
50
|
+
)
|
|
51
|
+
exported_dataset_name: str = Field(
|
|
52
|
+
alias="exported_dataset_name", description="最新数据集名称"
|
|
53
|
+
)
|