baiducloud-python-sdk-aihc 0.0.1__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.
Files changed (44) hide show
  1. baiducloud_python_sdk_aihc/__init__.py +5 -0
  2. baiducloud_python_sdk_aihc/api/__init__.py +0 -0
  3. baiducloud_python_sdk_aihc/api/aihc_client.py +643 -0
  4. baiducloud_python_sdk_aihc/models/__init__.py +39 -0
  5. baiducloud_python_sdk_aihc/models/create_a_dataset_v2_request.py +147 -0
  6. baiducloud_python_sdk_aihc/models/create_a_dataset_v2_response.py +61 -0
  7. baiducloud_python_sdk_aihc/models/create_a_model_v2_request.py +101 -0
  8. baiducloud_python_sdk_aihc/models/create_a_model_v2_response.py +61 -0
  9. baiducloud_python_sdk_aihc/models/create_dataset_version_v2_request.py +82 -0
  10. baiducloud_python_sdk_aihc/models/create_dataset_version_v2_response.py +61 -0
  11. baiducloud_python_sdk_aihc/models/dataset.py +200 -0
  12. baiducloud_python_sdk_aihc/models/dataset_version_entry.py +98 -0
  13. baiducloud_python_sdk_aihc/models/delete_dataset_v2_request.py +58 -0
  14. baiducloud_python_sdk_aihc/models/delete_dataset_version_v2_request.py +64 -0
  15. baiducloud_python_sdk_aihc/models/delete_model_v2_request.py +58 -0
  16. baiducloud_python_sdk_aihc/models/delete_model_version_v2_request.py +64 -0
  17. baiducloud_python_sdk_aihc/models/get_a_list_of_model_versions_v2_request.py +70 -0
  18. baiducloud_python_sdk_aihc/models/get_a_list_of_model_versions_v2_response.py +70 -0
  19. baiducloud_python_sdk_aihc/models/get_dataset_details_v2_request.py +58 -0
  20. baiducloud_python_sdk_aihc/models/get_dataset_details_v2_response.py +211 -0
  21. baiducloud_python_sdk_aihc/models/get_dataset_version_details_v2_request.py +64 -0
  22. baiducloud_python_sdk_aihc/models/get_dataset_version_details_v2_response.py +193 -0
  23. baiducloud_python_sdk_aihc/models/get_model_details_v2_request.py +58 -0
  24. baiducloud_python_sdk_aihc/models/get_model_details_v2_response.py +155 -0
  25. baiducloud_python_sdk_aihc/models/get_model_list_v2_request.py +64 -0
  26. baiducloud_python_sdk_aihc/models/get_model_list_v2_response.py +70 -0
  27. baiducloud_python_sdk_aihc/models/get_model_version_details_v2_request.py +64 -0
  28. baiducloud_python_sdk_aihc/models/get_model_version_details_v2_response.py +155 -0
  29. baiducloud_python_sdk_aihc/models/model.py +160 -0
  30. baiducloud_python_sdk_aihc/models/model_version_entry.py +115 -0
  31. baiducloud_python_sdk_aihc/models/modify_dataset_v2_request.py +108 -0
  32. baiducloud_python_sdk_aihc/models/modify_the_model_v2_request.py +74 -0
  33. baiducloud_python_sdk_aihc/models/new_model_version_v2_request.py +98 -0
  34. baiducloud_python_sdk_aihc/models/new_model_version_v2_response.py +61 -0
  35. baiducloud_python_sdk_aihc/models/permission_entry.py +74 -0
  36. baiducloud_python_sdk_aihc/models/retrieve_the_dataset_list_v2_request.py +84 -0
  37. baiducloud_python_sdk_aihc/models/retrieve_the_dataset_list_v2_response.py +70 -0
  38. baiducloud_python_sdk_aihc/models/retrieve_the_dataset_version_list_v2_request.py +70 -0
  39. baiducloud_python_sdk_aihc/models/retrieve_the_dataset_version_list_v2_response.py +70 -0
  40. baiducloud_python_sdk_aihc-0.0.1.dist-info/LICENSE +177 -0
  41. baiducloud_python_sdk_aihc-0.0.1.dist-info/METADATA +76 -0
  42. baiducloud_python_sdk_aihc-0.0.1.dist-info/RECORD +44 -0
  43. baiducloud_python_sdk_aihc-0.0.1.dist-info/WHEEL +5 -0
  44. baiducloud_python_sdk_aihc-0.0.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,147 @@
1
+ """
2
+ Request entity for CreateADatasetV2Request information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+ from baiducloud_python_sdk_aihc.models.permission_entry import PermissionEntry
7
+ from baiducloud_python_sdk_aihc.models.permission_entry import PermissionEntry
8
+ from baiducloud_python_sdk_aihc.models.dataset_version_entry import DatasetVersionEntry
9
+
10
+
11
+ class CreateADatasetV2Request(AbstractModel):
12
+ """
13
+ Request entity for CreateADatasetV2Request operation.
14
+
15
+ This class encapsulates all parameters for the API request.
16
+ """
17
+
18
+ def __init__(
19
+ self,
20
+ name,
21
+ storage_type,
22
+ storage_instance,
23
+ import_format,
24
+ visibility_scope,
25
+ init_version_entry,
26
+ description=None,
27
+ owner=None,
28
+ visibility_user=None,
29
+ visibility_group=None,
30
+ ):
31
+ """
32
+ Initialize CreateADatasetV2Request request entity.
33
+
34
+ :param name: 数据集名称支持小写字母、数字和-,必须以小写字母开头,必须以小写字母或数字结尾,长度限制1-50。
35
+ :type name: str (required)
36
+
37
+ :param storage_type: 存储类型,可选项:PFS、BOS
38
+ :type storage_type: str (required)
39
+
40
+ :param storage_instance: 存储实例ID,对应PFS、BOS的ID
41
+ :type storage_instance: str (required)
42
+
43
+ :param import_format: 导入格式<br>FILE:文件<br>FOLDER:文件夹
44
+ :type import_format: str (required)
45
+
46
+ :param description: 数据集的描述
47
+ :type description: str (optional)
48
+
49
+ :param owner: 所有者,不传递时默认为创建者
50
+ :type owner: str (optional)
51
+
52
+ :param visibility_scope: visibility_scope parameter
53
+ :type visibility_scope: str (required)
54
+
55
+ :param visibility_user: visibility_user parameter
56
+ :type visibility_user: List[PermissionEntry] (optional)
57
+
58
+ :param visibility_group: visibility_group parameter
59
+ :type visibility_group: List[PermissionEntry] (optional)
60
+
61
+ :param init_version_entry: init_version_entry parameter
62
+ :type init_version_entry: DatasetVersionEntry (required)
63
+ """
64
+ super().__init__()
65
+ self.name = name
66
+ self.storage_type = storage_type
67
+ self.storage_instance = storage_instance
68
+ self.import_format = import_format
69
+ self.description = description
70
+ self.owner = owner
71
+ self.visibility_scope = visibility_scope
72
+ self.visibility_user = visibility_user
73
+ self.visibility_group = visibility_group
74
+ self.init_version_entry = init_version_entry
75
+
76
+ def to_dict(self):
77
+ """
78
+ Convert the request entity to a dictionary representation.
79
+
80
+ Nested model objects are recursively converted to dictionaries.
81
+
82
+ :return: Dictionary representation of the request
83
+ :rtype: dict
84
+ """
85
+ _map = super().to_dict()
86
+ if _map is not None:
87
+ return _map
88
+ result = dict()
89
+ if self.name is not None:
90
+ result['name'] = self.name
91
+ if self.storage_type is not None:
92
+ result['storageType'] = self.storage_type
93
+ if self.storage_instance is not None:
94
+ result['storageInstance'] = self.storage_instance
95
+ if self.import_format is not None:
96
+ result['importFormat'] = self.import_format
97
+ if self.description is not None:
98
+ result['description'] = self.description
99
+ if self.owner is not None:
100
+ result['owner'] = self.owner
101
+ if self.visibility_scope is not None:
102
+ result['visibilityScope'] = self.visibility_scope
103
+ if self.visibility_user is not None:
104
+ result['visibilityUser'] = [i.to_dict() for i in self.visibility_user]
105
+ if self.visibility_group is not None:
106
+ result['visibilityGroup'] = [i.to_dict() for i in self.visibility_group]
107
+ if self.init_version_entry is not None:
108
+ result['initVersionEntry'] = self.init_version_entry.to_dict()
109
+ return result
110
+
111
+ def from_dict(self, m):
112
+ """
113
+ Populate the request entity from a dictionary.
114
+
115
+ Nested dictionaries are recursively converted to model objects.
116
+
117
+ :param m: Dictionary containing request data
118
+ :type m: dict
119
+
120
+ :return: Self reference for method chaining
121
+ :rtype: CreateADatasetV2Request
122
+
123
+ :raises TypeError: If input is not a dictionary or field type mismatch
124
+ :raises ValueError: If nested model conversion fails
125
+ """
126
+ m = m or dict()
127
+ if m.get('name') is not None:
128
+ self.name = m.get('name')
129
+ if m.get('storageType') is not None:
130
+ self.storage_type = m.get('storageType')
131
+ if m.get('storageInstance') is not None:
132
+ self.storage_instance = m.get('storageInstance')
133
+ if m.get('importFormat') is not None:
134
+ self.import_format = m.get('importFormat')
135
+ if m.get('description') is not None:
136
+ self.description = m.get('description')
137
+ if m.get('owner') is not None:
138
+ self.owner = m.get('owner')
139
+ if m.get('visibilityScope') is not None:
140
+ self.visibility_scope = m.get('visibilityScope')
141
+ if m.get('visibilityUser') is not None:
142
+ self.visibility_user = [PermissionEntry().from_dict(i) for i in m.get('visibilityUser')]
143
+ if m.get('visibilityGroup') is not None:
144
+ self.visibility_group = [PermissionEntry().from_dict(i) for i in m.get('visibilityGroup')]
145
+ if m.get('initVersionEntry') is not None:
146
+ self.init_version_entry = DatasetVersionEntry().from_dict(m.get('initVersionEntry'))
147
+ return self
@@ -0,0 +1,61 @@
1
+ """
2
+ Request entity for CreateADatasetV2Response information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.bce_response import BceResponse
6
+
7
+
8
+ class CreateADatasetV2Response(BceResponse):
9
+ """
10
+ CreateADatasetV2Response
11
+ """
12
+
13
+ def __init__(self, id=None):
14
+ """
15
+ Initialize CreateADatasetV2Response response.
16
+
17
+ :param id: 数据集ID
18
+ :type id: str (optional)
19
+ """
20
+ super().__init__()
21
+ self.id = id
22
+
23
+ def to_dict(self):
24
+ """
25
+ Convert the response instance to a dictionary representation.
26
+
27
+ Includes metadata from the parent BceResponse class.
28
+ Nested model objects are recursively converted to dictionaries.
29
+
30
+ :return: Dictionary representation of the response
31
+ :rtype: dict
32
+ """
33
+ _map = super().to_dict()
34
+ if _map is not None:
35
+ return _map
36
+ result = dict()
37
+ if self.metadata is not None:
38
+ result['metadata'] = dict(self.metadata)
39
+ if self.id is not None:
40
+ result['id'] = self.id
41
+ return result
42
+
43
+ def from_dict(self, m):
44
+ """
45
+ Populate the response instance from a dictionary.
46
+
47
+ Nested dictionaries are recursively converted to model objects.
48
+
49
+ :param m: Dictionary containing response data
50
+ :type m: dict
51
+
52
+ :return: Self reference for method chaining
53
+ :rtype: CreateADatasetV2Response
54
+
55
+ :raises TypeError: If input is not a dictionary or field type mismatch
56
+ :raises ValueError: If nested model conversion fails
57
+ """
58
+ m = m or dict()
59
+ if m.get('id') is not None:
60
+ self.id = m.get('id')
61
+ return self
@@ -0,0 +1,101 @@
1
+ """
2
+ Request entity for CreateAModelV2Request information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+ from baiducloud_python_sdk_aihc.models.model_version_entry import ModelVersionEntry
7
+
8
+
9
+ class CreateAModelV2Request(AbstractModel):
10
+ """
11
+ Request entity for CreateAModelV2Request operation.
12
+
13
+ This class encapsulates all parameters for the API request.
14
+ """
15
+
16
+ def __init__(self, name, model_format, init_version_entry, description=None, owner=None, visibility_scope=None):
17
+ """
18
+ Initialize CreateAModelV2Request request entity.
19
+
20
+ :param name: 模型名称支持小写字母、数字和-,必须以小写字母开头,必须以小写字母或数字结尾,长度限制1-50。
21
+ :type name: str (required)
22
+
23
+ :param description: 描述
24
+ :type description: str (optional)
25
+
26
+ :param model_format: 模型格式,HuggingFace、MegatronCore等
27
+ :type model_format: str (required)
28
+
29
+ :param owner: 所有者,不传递时默认为创建者
30
+ :type owner: str (optional)
31
+
32
+ :param visibility_scope: 可见范围ONLY_OWNER:仅所有者可读写
33
+ :type visibility_scope: str (optional)
34
+
35
+ :param init_version_entry: init_version_entry parameter
36
+ :type init_version_entry: ModelVersionEntry (required)
37
+ """
38
+ super().__init__()
39
+ self.name = name
40
+ self.description = description
41
+ self.model_format = model_format
42
+ self.owner = owner
43
+ self.visibility_scope = visibility_scope
44
+ self.init_version_entry = init_version_entry
45
+
46
+ def to_dict(self):
47
+ """
48
+ Convert the request entity to a dictionary representation.
49
+
50
+ Nested model objects are recursively converted to dictionaries.
51
+
52
+ :return: Dictionary representation of the request
53
+ :rtype: dict
54
+ """
55
+ _map = super().to_dict()
56
+ if _map is not None:
57
+ return _map
58
+ result = dict()
59
+ if self.name is not None:
60
+ result['name'] = self.name
61
+ if self.description is not None:
62
+ result['description'] = self.description
63
+ if self.model_format is not None:
64
+ result['modelFormat'] = self.model_format
65
+ if self.owner is not None:
66
+ result['owner'] = self.owner
67
+ if self.visibility_scope is not None:
68
+ result['visibilityScope'] = self.visibility_scope
69
+ if self.init_version_entry is not None:
70
+ result['initVersionEntry'] = self.init_version_entry.to_dict()
71
+ return result
72
+
73
+ def from_dict(self, m):
74
+ """
75
+ Populate the request entity from a dictionary.
76
+
77
+ Nested dictionaries are recursively converted to model objects.
78
+
79
+ :param m: Dictionary containing request data
80
+ :type m: dict
81
+
82
+ :return: Self reference for method chaining
83
+ :rtype: CreateAModelV2Request
84
+
85
+ :raises TypeError: If input is not a dictionary or field type mismatch
86
+ :raises ValueError: If nested model conversion fails
87
+ """
88
+ m = m or dict()
89
+ if m.get('name') is not None:
90
+ self.name = m.get('name')
91
+ if m.get('description') is not None:
92
+ self.description = m.get('description')
93
+ if m.get('modelFormat') is not None:
94
+ self.model_format = m.get('modelFormat')
95
+ if m.get('owner') is not None:
96
+ self.owner = m.get('owner')
97
+ if m.get('visibilityScope') is not None:
98
+ self.visibility_scope = m.get('visibilityScope')
99
+ if m.get('initVersionEntry') is not None:
100
+ self.init_version_entry = ModelVersionEntry().from_dict(m.get('initVersionEntry'))
101
+ return self
@@ -0,0 +1,61 @@
1
+ """
2
+ Request entity for CreateAModelV2Response information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.bce_response import BceResponse
6
+
7
+
8
+ class CreateAModelV2Response(BceResponse):
9
+ """
10
+ CreateAModelV2Response
11
+ """
12
+
13
+ def __init__(self, id=None):
14
+ """
15
+ Initialize CreateAModelV2Response response.
16
+
17
+ :param id: 模型ID
18
+ :type id: str (optional)
19
+ """
20
+ super().__init__()
21
+ self.id = id
22
+
23
+ def to_dict(self):
24
+ """
25
+ Convert the response instance to a dictionary representation.
26
+
27
+ Includes metadata from the parent BceResponse class.
28
+ Nested model objects are recursively converted to dictionaries.
29
+
30
+ :return: Dictionary representation of the response
31
+ :rtype: dict
32
+ """
33
+ _map = super().to_dict()
34
+ if _map is not None:
35
+ return _map
36
+ result = dict()
37
+ if self.metadata is not None:
38
+ result['metadata'] = dict(self.metadata)
39
+ if self.id is not None:
40
+ result['id'] = self.id
41
+ return result
42
+
43
+ def from_dict(self, m):
44
+ """
45
+ Populate the response instance from a dictionary.
46
+
47
+ Nested dictionaries are recursively converted to model objects.
48
+
49
+ :param m: Dictionary containing response data
50
+ :type m: dict
51
+
52
+ :return: Self reference for method chaining
53
+ :rtype: CreateAModelV2Response
54
+
55
+ :raises TypeError: If input is not a dictionary or field type mismatch
56
+ :raises ValueError: If nested model conversion fails
57
+ """
58
+ m = m or dict()
59
+ if m.get('id') is not None:
60
+ self.id = m.get('id')
61
+ return self
@@ -0,0 +1,82 @@
1
+ """
2
+ Request entity for CreateDatasetVersionV2Request information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class CreateDatasetVersionV2Request(AbstractModel):
9
+ """
10
+ Request entity for CreateDatasetVersionV2Request operation.
11
+
12
+ This class encapsulates all parameters for the API request.
13
+ """
14
+
15
+ def __init__(self, dataset_id, storage_path, mount_path, description=None):
16
+ """
17
+ Initialize CreateDatasetVersionV2Request request entity.
18
+
19
+ :param dataset_id: dataset_id parameter
20
+ :type dataset_id: str (required)
21
+
22
+ :param description: 版本描述
23
+ :type description: str (optional)
24
+
25
+ :param storage_path: 存储路径
26
+ :type storage_path: str (required)
27
+
28
+ :param mount_path: 默认挂载路径
29
+ :type mount_path: str (required)
30
+ """
31
+ super().__init__()
32
+ self.dataset_id = dataset_id
33
+ self.description = description
34
+ self.storage_path = storage_path
35
+ self.mount_path = mount_path
36
+
37
+ def to_dict(self):
38
+ """
39
+ Convert the request entity to a dictionary representation.
40
+
41
+ Nested model objects are recursively converted to dictionaries.
42
+
43
+ :return: Dictionary representation of the request
44
+ :rtype: dict
45
+ """
46
+ _map = super().to_dict()
47
+ if _map is not None:
48
+ return _map
49
+ result = dict()
50
+ if self.description is not None:
51
+ result['description'] = self.description
52
+ if self.storage_path is not None:
53
+ result['storagePath'] = self.storage_path
54
+ if self.mount_path is not None:
55
+ result['mountPath'] = self.mount_path
56
+ return result
57
+
58
+ def from_dict(self, m):
59
+ """
60
+ Populate the request entity from a dictionary.
61
+
62
+ Nested dictionaries are recursively converted to model objects.
63
+
64
+ :param m: Dictionary containing request data
65
+ :type m: dict
66
+
67
+ :return: Self reference for method chaining
68
+ :rtype: CreateDatasetVersionV2Request
69
+
70
+ :raises TypeError: If input is not a dictionary or field type mismatch
71
+ :raises ValueError: If nested model conversion fails
72
+ """
73
+ m = m or dict()
74
+ if m.get('datasetId') is not None:
75
+ self.dataset_id = m.get('datasetId')
76
+ if m.get('description') is not None:
77
+ self.description = m.get('description')
78
+ if m.get('storagePath') is not None:
79
+ self.storage_path = m.get('storagePath')
80
+ if m.get('mountPath') is not None:
81
+ self.mount_path = m.get('mountPath')
82
+ return self
@@ -0,0 +1,61 @@
1
+ """
2
+ Request entity for CreateDatasetVersionV2Response information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.bce_response import BceResponse
6
+
7
+
8
+ class CreateDatasetVersionV2Response(BceResponse):
9
+ """
10
+ CreateDatasetVersionV2Response
11
+ """
12
+
13
+ def __init__(self, id=None):
14
+ """
15
+ Initialize CreateDatasetVersionV2Response response.
16
+
17
+ :param id: 数据集版本ID
18
+ :type id: str (optional)
19
+ """
20
+ super().__init__()
21
+ self.id = id
22
+
23
+ def to_dict(self):
24
+ """
25
+ Convert the response instance to a dictionary representation.
26
+
27
+ Includes metadata from the parent BceResponse class.
28
+ Nested model objects are recursively converted to dictionaries.
29
+
30
+ :return: Dictionary representation of the response
31
+ :rtype: dict
32
+ """
33
+ _map = super().to_dict()
34
+ if _map is not None:
35
+ return _map
36
+ result = dict()
37
+ if self.metadata is not None:
38
+ result['metadata'] = dict(self.metadata)
39
+ if self.id is not None:
40
+ result['id'] = self.id
41
+ return result
42
+
43
+ def from_dict(self, m):
44
+ """
45
+ Populate the response instance from a dictionary.
46
+
47
+ Nested dictionaries are recursively converted to model objects.
48
+
49
+ :param m: Dictionary containing response data
50
+ :type m: dict
51
+
52
+ :return: Self reference for method chaining
53
+ :rtype: CreateDatasetVersionV2Response
54
+
55
+ :raises TypeError: If input is not a dictionary or field type mismatch
56
+ :raises ValueError: If nested model conversion fails
57
+ """
58
+ m = m or dict()
59
+ if m.get('id') is not None:
60
+ self.id = m.get('id')
61
+ return self