intellif-aihub 0.1.2__py3-none-any.whl → 0.1.4__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.

@@ -0,0 +1,36 @@
1
+ aihub/__init__.py,sha256=Wzf5T3NBDfhQoTnhnRNHSlAsE0XMqbclXG-M81Vas70,22
2
+ aihub/client.py,sha256=Eu0evMLB_aWyqL0VOFTfNh0XYQb9Ohob4dnaLzVrfNI,3779
3
+ aihub/exceptions.py,sha256=l2cMAvipTqQOio3o11fXsCCSCevbuK4PTsxofkobFjk,500
4
+ aihub/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
+ aihub/models/artifact.py,sha256=I07sXB3iIRlVnHm1HkYCXKIIPt5RGncxXuxANat8Vzs,3530
6
+ aihub/models/common.py,sha256=qmabc2LkAdQJXIcpT1P35zxd0Lc8yDYdD4ame1iF4Bs,241
7
+ aihub/models/dataset_management.py,sha256=lP92aOsZJihg4SEhf1jeITcXp-N8l_YzHYf1l9Zq7-g,3381
8
+ aihub/models/document_center.py,sha256=xmAk_JIY3GjuVDZurMUonmSz3Siy3TAxhj3ewIJ6dUQ,489
9
+ aihub/models/eval.py,sha256=5h25jR4-JeZ-Sbq0ifp6fd1IVrq0I3w-S8YV_BFUDao,326
10
+ aihub/models/labelfree.py,sha256=RgSCWPQ-_XHbCjalaTDQcgGAQXCKObVs38h2kTpRm88,1755
11
+ aihub/models/model_training_platform.py,sha256=IWgGZ60A9qjLxj1srC3dUc6a-i8gLe8D2yASJ3HeNRY,6521
12
+ aihub/models/quota_schedule_management.py,sha256=E_q6x5KaJOyrOPlYqBumwDgKB1uRpfOHSsYgMxqI6MA,6801
13
+ aihub/models/tag_resource_management.py,sha256=httqeAjCypqykkmhJXSjJfL4Qlfqz21y3w2qXEYtT6g,1104
14
+ aihub/models/task_center.py,sha256=0Sbxsi7mwKUsotO5_4EpQ1dE8goYcI9jnPWLJ5YzfpA,4030
15
+ aihub/models/user_system.py,sha256=4hhOw6DJVjqoJKLkhPbRZnzMOITH2s-t40id1d409zE,7433
16
+ aihub/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
+ aihub/services/artifact.py,sha256=Ye2T78KZFwDLFK7ngvqw712HxSfoNwoNdJ71-wjd4YI,11201
18
+ aihub/services/dataset_management.py,sha256=fqGJATO1kisPfjk7GxKlzh9fU2w42FeeWEAh-WRDJto,8669
19
+ aihub/services/document_center.py,sha256=DClItxWXMMFPnKMR7kyNGohhXP3wowImj-Lm8vzBgNo,1339
20
+ aihub/services/eval.py,sha256=X6NBV6PTsczoeulV2y1ySrr9GB9R5EBaXgjEmiiUiCE,1963
21
+ aihub/services/labelfree.py,sha256=UUuq519us1fma0ERXM-sXfLPWRHB1f6BqE2XvCq-3Pw,1215
22
+ aihub/services/model_training_platform.py,sha256=fsCO4BEuja_1ePl0hwt32kpnN99AArjzBv_e459p0X4,7560
23
+ aihub/services/quota_schedule_management.py,sha256=4MdtEP2Ziz6hh3tXmd6nbLXxtQ46Z_eT2VtjE3Kr-0I,6803
24
+ aihub/services/reporter.py,sha256=ot93SmhxgwDJOzlHSCwlxDOuSydTWUEUQ-Ctp97wJBQ,669
25
+ aihub/services/tag_resource_management.py,sha256=GcuVMlwGlfZkvUKvLUTKtteHNjurlLr2FUy2Eg8cfyE,1811
26
+ aihub/services/task_center.py,sha256=xhyMdmhFjeL9QZ5YZ0eGz6WIgclECitG8Yp_dXO7OEY,6211
27
+ aihub/services/user_system.py,sha256=vEcwvSX28lMp7YBUm1AWRDujEa73NqOtwMQi-t7xPSM,13654
28
+ aihub/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
29
+ aihub/utils/download.py,sha256=Rh1m3VpMlw8-Kl36sowJ7M0dpB68u-9V4Vo3GQChq1I,1758
30
+ aihub/utils/http.py,sha256=rSNh4uNP7E3YGm3H1indRHctxC5Wu5xNBPvDrb9UHt4,421
31
+ aihub/utils/s3.py,sha256=ISIBP-XdBPkURpXnN56ZnIWokOOg2SRUh_qvxJk-G1Q,2187
32
+ intellif_aihub-0.1.4.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
33
+ intellif_aihub-0.1.4.dist-info/METADATA,sha256=mlbDkkXv80KPI2iemhKP2NqnSZsERhvC_clQXzjB4IM,2922
34
+ intellif_aihub-0.1.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
35
+ intellif_aihub-0.1.4.dist-info/top_level.txt,sha256=vIvTtSIN73xv46BpYM-ctVGnyOiUQ9EWP_6ngvdIlvw,6
36
+ intellif_aihub-0.1.4.dist-info/RECORD,,
@@ -1,21 +0,0 @@
1
- # !/usr/bin/env python
2
- # -*-coding:utf-8 -*-
3
-
4
- from __future__ import annotations
5
-
6
- from typing import List
7
-
8
- from pydantic import BaseModel
9
-
10
-
11
- class Project(BaseModel):
12
- id: int
13
- name: str
14
-
15
-
16
- class ProjectListData(BaseModel):
17
- data: List[Project]
18
-
19
-
20
- class SelectProjectsResponse(BaseModel):
21
- data: List[Project]
aihub/models/user.py DELETED
@@ -1,46 +0,0 @@
1
- # !/usr/bin/env python
2
- # -*-coding:utf-8 -*-
3
-
4
-
5
- from __future__ import annotations
6
-
7
- from typing import List, Optional
8
-
9
- from pydantic import BaseModel
10
-
11
-
12
- class UserSearchReq(BaseModel):
13
- page_size: int = 1000000
14
- page_num: int = 1
15
- username: str = ""
16
- nickname: str = ""
17
- email: str = ""
18
- user_ids: List[int] = []
19
- role_ids: List[int] = []
20
- role_names: List[str] = []
21
- status: int = 1
22
-
23
-
24
- class Role(BaseModel):
25
- id: Optional[int] = None
26
- name: Optional[str] = None
27
- role_type: Optional[int] = None
28
- menu_ids: Optional[List[int]] = None
29
-
30
-
31
- class UserSearchDatum(BaseModel):
32
- id: Optional[int] = 0
33
- username: Optional[str] = None
34
- nickname: Optional[str] = None
35
- email: Optional[str] = None
36
- status: Optional[int] = None
37
- created_at: Optional[int] = None
38
- roles: Optional[List[Role]] = None
39
- tags: Optional[List[int]] = None
40
-
41
-
42
- class UserSearchListData(BaseModel):
43
- total: int
44
- page_size: int
45
- page_num: int
46
- data: List[UserSearchDatum]
@@ -1,35 +0,0 @@
1
- # !/usr/bin/env python
2
- # -*-coding:utf-8 -*-
3
- from __future__ import annotations
4
-
5
- import httpx
6
-
7
- from ..exceptions import APIError
8
- from ..models.common import APIWrapper
9
- from ..models.tag_management import *
10
-
11
- _BASE = "/tag-resource-management/api/v1"
12
-
13
-
14
- class TagManagementService:
15
- def __init__(self, http: httpx.Client):
16
- self._project = _Project(http)
17
-
18
- def select_projects(self) -> List[Project]:
19
- return self._project.select_projects()
20
-
21
- @property
22
- def project(self) -> _Project:
23
- return self._project
24
-
25
-
26
- class _Project:
27
- def __init__(self, http: httpx.Client):
28
- self._http = http
29
-
30
- def select_projects(self) -> List[Project]:
31
- resp = self._http.get(f"{_BASE}/select-projects")
32
- wrapper = APIWrapper[ProjectListData].model_validate(resp.json())
33
- if wrapper.code != 0:
34
- raise APIError(f"backend code {wrapper.code}: {wrapper.msg}")
35
- return wrapper.data.data
aihub/services/user.py DELETED
@@ -1,47 +0,0 @@
1
- # !/usr/bin/env python
2
- # -*-coding:utf-8 -*-
3
- from __future__ import annotations
4
-
5
- import httpx
6
-
7
- from ..exceptions import APIError
8
- from ..models.common import APIWrapper
9
- from ..models.user import *
10
-
11
- _BASE = "/api/v1/search-users"
12
-
13
-
14
- class UserService:
15
-
16
- def __init__(self, http: httpx.Client):
17
- self._user = _User(http)
18
-
19
- # 直接把常用方法抛到一级,调用体验简单
20
- def search_one(self, payload: UserSearchReq) -> int:
21
- return self.user.search(payload)
22
-
23
- # 如果想要访问子对象,也保留属性
24
- @property
25
- def user(self) -> _User:
26
- return self._user
27
-
28
-
29
- class _User:
30
- def __init__(self, http: httpx.Client):
31
- self._http = http
32
-
33
- def search(self, payload: UserSearchReq) -> int:
34
- resp = self._http.post(
35
- f"{_BASE}",
36
- json=payload.model_dump(by_alias=True, exclude_none=True),
37
- )
38
- wrapper = APIWrapper[UserSearchListData].model_validate(resp.json())
39
- if wrapper.code != 0:
40
- raise APIError(f"backend code {wrapper.code}: {wrapper.msg}")
41
- if wrapper.data.total == 0:
42
- raise APIError("no dataset found")
43
- for item in wrapper.data.data:
44
- if item.nickname == payload.nickname:
45
- return item.id
46
- else:
47
- raise APIError("no user found")
@@ -1,32 +0,0 @@
1
- aihub/__init__.py,sha256=YvuYzWnKtqBb-IqG8HAu-nhIYAsgj9Vmc_b9o7vO-js,22
2
- aihub/client.py,sha256=DJEG7fGAiWFuh-2-KucZdMxy2v3caDvCn-_1CuxZ90o,2953
3
- aihub/exceptions.py,sha256=l2cMAvipTqQOio3o11fXsCCSCevbuK4PTsxofkobFjk,500
4
- aihub/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
- aihub/models/artifact.py,sha256=I07sXB3iIRlVnHm1HkYCXKIIPt5RGncxXuxANat8Vzs,3530
6
- aihub/models/common.py,sha256=qmabc2LkAdQJXIcpT1P35zxd0Lc8yDYdD4ame1iF4Bs,241
7
- aihub/models/dataset_management.py,sha256=lP92aOsZJihg4SEhf1jeITcXp-N8l_YzHYf1l9Zq7-g,3381
8
- aihub/models/document_center.py,sha256=xmAk_JIY3GjuVDZurMUonmSz3Siy3TAxhj3ewIJ6dUQ,489
9
- aihub/models/labelfree.py,sha256=hH9jOJ6_I3fdn1jlAtEuMwP3Vv9EzYlda_GKb8IJN2I,1179
10
- aihub/models/quota_schedule_management.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
- aihub/models/tag_management.py,sha256=5_G9R6OZWYnm0ix_mLzMIujZhO_NNx6MeFA_Gl_zYBI,319
12
- aihub/models/task_center.py,sha256=N4Tdg_G3TgVc1Qse8sKbYihnbGkIVwHfGAEq-4v-zX4,3870
13
- aihub/models/user.py,sha256=Zv95o8ZAdAgmAsN5VsBhHRCCrw-RiAbHPg_Ljc-L3Mo,1004
14
- aihub/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
- aihub/services/artifact.py,sha256=FaimaoHdZBr5hg6_jwj9md8EmxdWNFxIAFz1ML_xKu8,10370
16
- aihub/services/dataset_management.py,sha256=vNIc_JocgotFCFyFeCade0PWZspRjIkGhzt0qj1xQ0s,8672
17
- aihub/services/document_center.py,sha256=DClItxWXMMFPnKMR7kyNGohhXP3wowImj-Lm8vzBgNo,1339
18
- aihub/services/labelfree.py,sha256=Pc0kW-x8VLawqQWdY9ZDpZMPRB2KgXNk9-JE8Dz15Bs,1194
19
- aihub/services/quota_schedule_management.py,sha256=THSAJEi7QzilV9uT9Fy14p2ToIfn8nXQNgtIeEispvg,395
20
- aihub/services/reporter.py,sha256=ot93SmhxgwDJOzlHSCwlxDOuSydTWUEUQ-Ctp97wJBQ,669
21
- aihub/services/tag_management.py,sha256=Hci74medV5-p5VAZOYDEGrjSO1ioqET5IAnx7nqOiBo,943
22
- aihub/services/task_center.py,sha256=EA9j13IjQJYQMTNKDR-SbY-GUCfWoJmHc37ckVuPbUE,6110
23
- aihub/services/user.py,sha256=5qpvIKQhD0UWPQalbieLjyQY1cKp8pMlx_LTUKyIAKU,1327
24
- aihub/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
- aihub/utils/download.py,sha256=Rh1m3VpMlw8-Kl36sowJ7M0dpB68u-9V4Vo3GQChq1I,1758
26
- aihub/utils/http.py,sha256=rSNh4uNP7E3YGm3H1indRHctxC5Wu5xNBPvDrb9UHt4,421
27
- aihub/utils/s3.py,sha256=ISIBP-XdBPkURpXnN56ZnIWokOOg2SRUh_qvxJk-G1Q,2187
28
- intellif_aihub-0.1.2.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
29
- intellif_aihub-0.1.2.dist-info/METADATA,sha256=hS0Y6s7g8IlicFlk7myET52gYJyFVRUGMo6FisCGqRY,2920
30
- intellif_aihub-0.1.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
31
- intellif_aihub-0.1.2.dist-info/top_level.txt,sha256=vIvTtSIN73xv46BpYM-ctVGnyOiUQ9EWP_6ngvdIlvw,6
32
- intellif_aihub-0.1.2.dist-info/RECORD,,