robodock-cli 0.1.0__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 (167) hide show
  1. app/__init__.py +1 -0
  2. app/app.py +14 -0
  3. app/auth.py +58 -0
  4. app/task_management.py +97 -0
  5. config.py +9 -0
  6. fast_api_client/__init__.py +8 -0
  7. fast_api_client/api/__init__.py +1 -0
  8. fast_api_client/api/auth/__init__.py +1 -0
  9. fast_api_client/api/auth/change_password_api_p_v1_auth_change_password_post.py +172 -0
  10. fast_api_client/api/auth/forgot_password_api_p_v1_auth_forgot_password_post.py +172 -0
  11. fast_api_client/api/auth/login_api_p_v1_auth_login_post.py +172 -0
  12. fast_api_client/api/auth/logout_api_p_v1_auth_logout_post.py +172 -0
  13. fast_api_client/api/auth/me_api_p_v1_auth_me_get.py +85 -0
  14. fast_api_client/api/auth/refresh_token_api_p_v1_auth_refresh_post.py +172 -0
  15. fast_api_client/api/auth/reset_password_api_p_v1_auth_reset_password_post.py +172 -0
  16. fast_api_client/api/auth/switch_group_api_p_v1_auth_switch_group_post.py +176 -0
  17. fast_api_client/api/config/__init__.py +1 -0
  18. fast_api_client/api/config/get_config_api_p_v1_config_get.py +85 -0
  19. fast_api_client/api/default/__init__.py +1 -0
  20. fast_api_client/api/default/root_get.py +81 -0
  21. fast_api_client/api/groups/__init__.py +1 -0
  22. fast_api_client/api/groups/add_member_api_p_v1_groups_group_id_members_post.py +188 -0
  23. fast_api_client/api/groups/create_group_api_p_v1_groups_post.py +172 -0
  24. fast_api_client/api/groups/create_platform_role_binding_api_p_v1_admin_platform_roles_bindings_post.py +172 -0
  25. fast_api_client/api/groups/delete_group_api_p_v1_groups_group_id_delete.py +167 -0
  26. fast_api_client/api/groups/delete_platform_role_binding_api_p_v1_admin_platform_roles_bindings_user_id_delete.py +167 -0
  27. fast_api_client/api/groups/get_group_api_p_v1_groups_group_id_get.py +167 -0
  28. fast_api_client/api/groups/list_groups_api_p_v1_groups_get.py +85 -0
  29. fast_api_client/api/groups/list_members_api_p_v1_groups_group_id_members_get.py +167 -0
  30. fast_api_client/api/groups/list_platform_role_bindings_api_p_v1_admin_platform_roles_bindings_get.py +85 -0
  31. fast_api_client/api/groups/remove_member_api_p_v1_groups_group_id_members_user_id_delete.py +181 -0
  32. fast_api_client/api/groups/reset_member_password_api_p_v1_groups_group_id_members_user_id_reset_password_post.py +181 -0
  33. fast_api_client/api/groups/update_group_api_p_v1_groups_group_id_patch.py +188 -0
  34. fast_api_client/api/groups/update_member_role_api_p_v1_groups_group_id_members_user_id_patch.py +202 -0
  35. fast_api_client/api/post_train/__init__.py +1 -0
  36. fast_api_client/api/post_train/check_patch_duplicate_api_p_v1_singledata_patch_check_post.py +164 -0
  37. fast_api_client/api/post_train/check_patch_duplicate_batch_api_p_v1_singledata_patch_check_batch_post.py +164 -0
  38. fast_api_client/api/post_train/create_dataset_api_p_v1_dataset_post.py +172 -0
  39. fast_api_client/api/post_train/create_patch_upload_api_p_v1_singledata_patch_upload_post.py +164 -0
  40. fast_api_client/api/post_train/data_ops_overview_api_p_v1_data_ops_overview_get.py +624 -0
  41. fast_api_client/api/post_train/data_ops_patches_api_p_v1_data_ops_patches_get.py +474 -0
  42. fast_api_client/api/post_train/delete_dataset_api_p_v1_dataset_dataset_uuid_delete.py +167 -0
  43. fast_api_client/api/post_train/delete_singledata_api_p_v1_singledata_uuid_delete.py +167 -0
  44. fast_api_client/api/post_train/delete_singledata_by_patch_api_p_v1_singledata_patch_patch_id_delete.py +167 -0
  45. fast_api_client/api/post_train/delete_singledata_list_api_p_v1_singledata_delete.py +172 -0
  46. fast_api_client/api/post_train/download_singledata_api_p_v1_singledata_download_uuid_get.py +167 -0
  47. fast_api_client/api/post_train/download_singledata_list_api_p_v1_singledata_download_get.py +178 -0
  48. fast_api_client/api/post_train/get_singledata_api_p_v1_singledata_uuid_get.py +167 -0
  49. fast_api_client/api/post_train/link_singledata_api_p_v1_singledata_link_post.py +172 -0
  50. fast_api_client/api/post_train/list_dataset_api_p_v1_dataset_get.py +307 -0
  51. fast_api_client/api/post_train/list_singledata_api_p_v1_singledata_get.py +737 -0
  52. fast_api_client/api/post_train/trigger_process_api_p_v1_singledata_trigger_post.py +172 -0
  53. fast_api_client/api/post_train/unlink_singledata_api_p_v1_singledata_unlink_post.py +172 -0
  54. fast_api_client/api/post_train/update_dataset_add_api_p_v1_dataset_update_dataset_uuid_post.py +188 -0
  55. fast_api_client/api/post_train/update_dataset_all_fields_api_p_v1_dataset_uuid_patch.py +188 -0
  56. fast_api_client/api/post_train/update_dataset_info_api_p_v1_dataset_update_post.py +172 -0
  57. fast_api_client/api/post_train/update_dataset_reduce_api_p_v1_dataset_reduce_dataset_uuid_post.py +188 -0
  58. fast_api_client/api/post_train/update_singledata_api_p_v1_singledata_uuid_patch.py +188 -0
  59. fast_api_client/api/post_train/update_singledata_tag_api_p_v1_singledata_tag_post.py +176 -0
  60. fast_api_client/api/post_train/update_upload_status_api_p_v1_singledata_upload_status_patch.py +176 -0
  61. fast_api_client/api/post_train/upload_singledata_api_p_v1_singledata_post.py +172 -0
  62. fast_api_client/api/post_train/upload_singledata_list_api_p_v1_singledata_list_post.py +172 -0
  63. fast_api_client/api/task_management/__init__.py +1 -0
  64. fast_api_client/api/task_management/create_project_api_p_v1_project_project_name_post.py +204 -0
  65. fast_api_client/api/task_management/create_rl_stage_api_p_v1_run_run_uuid_stage_rl_post.py +180 -0
  66. fast_api_client/api/task_management/create_run_api_p_v1_run_post.py +172 -0
  67. fast_api_client/api/task_management/delete_project_api_p_v1_project_uuid_delete.py +159 -0
  68. fast_api_client/api/task_management/delete_run_api_p_v1_run_uuid_delete.py +159 -0
  69. fast_api_client/api/task_management/delete_run_stage_api_p_v1_run_run_uuid_stage_stage_name_delete.py +181 -0
  70. fast_api_client/api/task_management/get_checkpoint_download_url_api_p_v1_run_checkpoint_download_post.py +172 -0
  71. fast_api_client/api/task_management/get_project_api_p_v1_project_uuid_get.py +159 -0
  72. fast_api_client/api/task_management/get_run_api_p_v1_run_unique_id_get.py +180 -0
  73. fast_api_client/api/task_management/get_run_log_info_api_p_v1_run_log_get.py +206 -0
  74. fast_api_client/api/task_management/get_run_stage_api_p_v1_run_run_uuid_stage_stage_name_get.py +173 -0
  75. fast_api_client/api/task_management/get_run_status_api_p_v1_run_status_uuid_get.py +159 -0
  76. fast_api_client/api/task_management/list_projects_api_p_v1_project_get.py +359 -0
  77. fast_api_client/api/task_management/list_runs_api_p_v1_run_get.py +399 -0
  78. fast_api_client/api/task_management/open_artifact_api_p_v1_run_artifact_open_post.py +164 -0
  79. fast_api_client/api/task_management/proxy_argo_log_api_p_v1_run_log_proxy_get.py +85 -0
  80. fast_api_client/api/task_management/resubmit_run_api_p_v1_run_resubmit_unique_id_post.py +180 -0
  81. fast_api_client/api/task_management/retry_run_api_p_v1_run_retry_unique_id_post.py +180 -0
  82. fast_api_client/api/task_management/stop_run_api_p_v1_run_stop_uuid_post.py +159 -0
  83. fast_api_client/api/task_management/trigger_model_convert_api_p_v1_run_model_convert_trigger_post.py +172 -0
  84. fast_api_client/api/task_management/update_project_api_p_v1_project_uuid_patch.py +180 -0
  85. fast_api_client/api/task_management/update_run_api_p_v1_run_unique_id_patch.py +200 -0
  86. fast_api_client/api/task_mapping/__init__.py +1 -0
  87. fast_api_client/api/task_mapping/create_task_mapping_api_p_v1_task_mapping_post.py +164 -0
  88. fast_api_client/api/task_mapping/delete_task_mapping_api_p_v1_task_mapping_task_id_delete.py +159 -0
  89. fast_api_client/api/task_mapping/get_task_mapping_api_p_v1_task_mapping_task_id_get.py +159 -0
  90. fast_api_client/api/task_mapping/list_task_mapping_patches_api_p_v1_task_mapping_task_id_patches_get.py +195 -0
  91. fast_api_client/api/task_mapping/list_task_mappings_api_p_v1_task_mapping_get.py +279 -0
  92. fast_api_client/api/task_mapping/update_task_mapping_api_p_v1_task_mapping_task_id_patch.py +180 -0
  93. fast_api_client/client.py +268 -0
  94. fast_api_client/errors.py +16 -0
  95. fast_api_client/models/__init__.py +121 -0
  96. fast_api_client/models/add_member_request.py +89 -0
  97. fast_api_client/models/artifact_item.py +251 -0
  98. fast_api_client/models/artifact_item_extra_info_type_0.py +45 -0
  99. fast_api_client/models/artifact_open_request.py +93 -0
  100. fast_api_client/models/body_download_singledata_list_api_pv1_singledata_download_get.py +61 -0
  101. fast_api_client/models/change_password_request.py +69 -0
  102. fast_api_client/models/checkpoint_download_request.py +69 -0
  103. fast_api_client/models/create_group_request.py +72 -0
  104. fast_api_client/models/create_platform_role_binding_request.py +69 -0
  105. fast_api_client/models/dataset_add_request.py +165 -0
  106. fast_api_client/models/dataset_create_request.py +253 -0
  107. fast_api_client/models/dataset_full_update_request.py +133 -0
  108. fast_api_client/models/dataset_reduce_request.py +84 -0
  109. fast_api_client/models/dataset_update_request.py +123 -0
  110. fast_api_client/models/forgot_password_request.py +61 -0
  111. fast_api_client/models/http_validation_error.py +79 -0
  112. fast_api_client/models/login_request.py +69 -0
  113. fast_api_client/models/logout_request.py +61 -0
  114. fast_api_client/models/model_convert_trigger_request.py +69 -0
  115. fast_api_client/models/patch_duplicate_batch_item_request.py +69 -0
  116. fast_api_client/models/patch_duplicate_batch_request.py +75 -0
  117. fast_api_client/models/patch_duplicate_check_request.py +69 -0
  118. fast_api_client/models/patch_episode_create_request.py +547 -0
  119. fast_api_client/models/patch_episode_create_request_lable_info.py +47 -0
  120. fast_api_client/models/patch_upload_create_request.py +94 -0
  121. fast_api_client/models/project_create_request.py +174 -0
  122. fast_api_client/models/project_create_request_default_configs.py +47 -0
  123. fast_api_client/models/project_update_request.py +175 -0
  124. fast_api_client/models/project_update_request_default_configs_type_0.py +45 -0
  125. fast_api_client/models/refresh_request.py +61 -0
  126. fast_api_client/models/reset_password_request.py +69 -0
  127. fast_api_client/models/rl_stage_create_request.py +75 -0
  128. fast_api_client/models/rl_stage_create_request_configs.py +47 -0
  129. fast_api_client/models/run_create_request.py +243 -0
  130. fast_api_client/models/run_create_request_configs.py +47 -0
  131. fast_api_client/models/run_update_request.py +533 -0
  132. fast_api_client/models/run_update_request_artifacts_type_0.py +45 -0
  133. fast_api_client/models/run_update_request_configs_type_0.py +45 -0
  134. fast_api_client/models/run_update_request_stages_type_0_item.py +45 -0
  135. fast_api_client/models/single_data_create_request.py +189 -0
  136. fast_api_client/models/single_data_link_request.py +69 -0
  137. fast_api_client/models/single_data_list_request.py +169 -0
  138. fast_api_client/models/single_data_tag_request.py +69 -0
  139. fast_api_client/models/single_data_trigger_request.py +61 -0
  140. fast_api_client/models/single_data_unlink_request.py +69 -0
  141. fast_api_client/models/single_data_update_request.py +775 -0
  142. fast_api_client/models/single_data_update_request_lable_info_type_0.py +45 -0
  143. fast_api_client/models/stage_artifact_append.py +85 -0
  144. fast_api_client/models/stage_artifact_append_category.py +10 -0
  145. fast_api_client/models/switch_group_request.py +61 -0
  146. fast_api_client/models/task_mapping_create_request.py +111 -0
  147. fast_api_client/models/task_mapping_update_request.py +93 -0
  148. fast_api_client/models/update_group_request.py +93 -0
  149. fast_api_client/models/update_member_request.py +61 -0
  150. fast_api_client/models/upload_status_request.py +69 -0
  151. fast_api_client/models/validation_error.py +123 -0
  152. fast_api_client/models/validation_error_context.py +45 -0
  153. fast_api_client/py.typed +1 -0
  154. fast_api_client/types.py +54 -0
  155. robodock_cli-0.1.0.dist-info/METADATA +97 -0
  156. robodock_cli-0.1.0.dist-info/RECORD +167 -0
  157. robodock_cli-0.1.0.dist-info/WHEEL +5 -0
  158. robodock_cli-0.1.0.dist-info/entry_points.txt +2 -0
  159. robodock_cli-0.1.0.dist-info/top_level.txt +4 -0
  160. sdk/__init__.py +1 -0
  161. sdk/client/__init__.py +1 -0
  162. sdk/client/auth.py +171 -0
  163. sdk/client/client.py +9 -0
  164. sdk/client/task_management.py +29 -0
  165. sdk/exception.py +95 -0
  166. sdk/utils/__init__.py +1 -0
  167. sdk/utils/downloader.py +267 -0
@@ -0,0 +1,547 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import TYPE_CHECKING, Any, TypeVar, cast
5
+
6
+ from attrs import define as _attrs_define
7
+ from attrs import field as _attrs_field
8
+
9
+ from ..types import UNSET, Unset
10
+
11
+ if TYPE_CHECKING:
12
+ from ..models.patch_episode_create_request_lable_info import PatchEpisodeCreateRequestLableInfo
13
+
14
+
15
+ T = TypeVar("T", bound="PatchEpisodeCreateRequest")
16
+
17
+
18
+ @_attrs_define
19
+ class PatchEpisodeCreateRequest:
20
+ """
21
+ Attributes:
22
+ patch_name (str): patch 目录名
23
+ episode_id (str): episode 目录名
24
+ source_file_name (str): 上传打包文件名
25
+ region (None | str | Unset): 上传区域,cn/us
26
+ data_size (float | Unset): 打包文件大小,单位 MB Default: 0.0.
27
+ alias (None | str | Unset): 别名
28
+ description (None | str | Unset): 描述
29
+ label (None | str | Unset): 标签
30
+ uploaded (bool | Unset): 是否已上传 Default: False.
31
+ operator (None | str | Unset): 实际操作员
32
+ reviewer (None | str | Unset): 审核员
33
+ review_status (str | Unset): 审核状态 Default: 'unreviewed'.
34
+ review_time (int | None | Unset): 审核时间
35
+ review_info (None | str | Unset): 审核备注
36
+ collection_method (str | Unset): 采集方式 Default: 'imported'.
37
+ collector_type (str | Unset): 采集设备类型 Default: 'unknown'.
38
+ collector_id (str | Unset): 采集设备 ID Default: 'unknown'.
39
+ task_id (str | Unset): 任务 ID Default: ''.
40
+ task_actions (None | str | Unset): 任务步骤
41
+ task_description (None | str | Unset): 任务描述
42
+ task_success (int | Unset): 任务结果 Default: 1.
43
+ finetune (int | Unset): 是否用于微调 Default: 0.
44
+ isreal (int | Unset): 是否真实数据 Default: 0.
45
+ lable_info (PatchEpisodeCreateRequestLableInfo | Unset): 标签信息
46
+ scene_type (str | Unset): 场景类型 Default: 'unknown'.
47
+ scene_id (None | str | Unset): 场景 ID
48
+ total_frames (int | Unset): 总帧数 Default: 0.
49
+ duration_seconds (float | Unset): 时长 Default: 0.0.
50
+ collection_time (int | None | Unset): 采集时间
51
+ checker_result (str | Unset): 质检状态 Default: 'nocheck'.
52
+ checker_info (None | str | Unset): 质检信息
53
+ model (None | str | Unset): 模型来源
54
+ raw_data_uuid (None | str | Unset): 原始数据 UUID
55
+ extra_info (None | str | Unset): 扩展信息
56
+ """
57
+
58
+ patch_name: str
59
+ episode_id: str
60
+ source_file_name: str
61
+ region: None | str | Unset = UNSET
62
+ data_size: float | Unset = 0.0
63
+ alias: None | str | Unset = UNSET
64
+ description: None | str | Unset = UNSET
65
+ label: None | str | Unset = UNSET
66
+ uploaded: bool | Unset = False
67
+ operator: None | str | Unset = UNSET
68
+ reviewer: None | str | Unset = UNSET
69
+ review_status: str | Unset = "unreviewed"
70
+ review_time: int | None | Unset = UNSET
71
+ review_info: None | str | Unset = UNSET
72
+ collection_method: str | Unset = "imported"
73
+ collector_type: str | Unset = "unknown"
74
+ collector_id: str | Unset = "unknown"
75
+ task_id: str | Unset = ""
76
+ task_actions: None | str | Unset = UNSET
77
+ task_description: None | str | Unset = UNSET
78
+ task_success: int | Unset = 1
79
+ finetune: int | Unset = 0
80
+ isreal: int | Unset = 0
81
+ lable_info: PatchEpisodeCreateRequestLableInfo | Unset = UNSET
82
+ scene_type: str | Unset = "unknown"
83
+ scene_id: None | str | Unset = UNSET
84
+ total_frames: int | Unset = 0
85
+ duration_seconds: float | Unset = 0.0
86
+ collection_time: int | None | Unset = UNSET
87
+ checker_result: str | Unset = "nocheck"
88
+ checker_info: None | str | Unset = UNSET
89
+ model: None | str | Unset = UNSET
90
+ raw_data_uuid: None | str | Unset = UNSET
91
+ extra_info: None | str | Unset = UNSET
92
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
93
+
94
+ def to_dict(self) -> dict[str, Any]:
95
+ patch_name = self.patch_name
96
+
97
+ episode_id = self.episode_id
98
+
99
+ source_file_name = self.source_file_name
100
+
101
+ region: None | str | Unset
102
+ if isinstance(self.region, Unset):
103
+ region = UNSET
104
+ else:
105
+ region = self.region
106
+
107
+ data_size = self.data_size
108
+
109
+ alias: None | str | Unset
110
+ if isinstance(self.alias, Unset):
111
+ alias = UNSET
112
+ else:
113
+ alias = self.alias
114
+
115
+ description: None | str | Unset
116
+ if isinstance(self.description, Unset):
117
+ description = UNSET
118
+ else:
119
+ description = self.description
120
+
121
+ label: None | str | Unset
122
+ if isinstance(self.label, Unset):
123
+ label = UNSET
124
+ else:
125
+ label = self.label
126
+
127
+ uploaded = self.uploaded
128
+
129
+ operator: None | str | Unset
130
+ if isinstance(self.operator, Unset):
131
+ operator = UNSET
132
+ else:
133
+ operator = self.operator
134
+
135
+ reviewer: None | str | Unset
136
+ if isinstance(self.reviewer, Unset):
137
+ reviewer = UNSET
138
+ else:
139
+ reviewer = self.reviewer
140
+
141
+ review_status = self.review_status
142
+
143
+ review_time: int | None | Unset
144
+ if isinstance(self.review_time, Unset):
145
+ review_time = UNSET
146
+ else:
147
+ review_time = self.review_time
148
+
149
+ review_info: None | str | Unset
150
+ if isinstance(self.review_info, Unset):
151
+ review_info = UNSET
152
+ else:
153
+ review_info = self.review_info
154
+
155
+ collection_method = self.collection_method
156
+
157
+ collector_type = self.collector_type
158
+
159
+ collector_id = self.collector_id
160
+
161
+ task_id = self.task_id
162
+
163
+ task_actions: None | str | Unset
164
+ if isinstance(self.task_actions, Unset):
165
+ task_actions = UNSET
166
+ else:
167
+ task_actions = self.task_actions
168
+
169
+ task_description: None | str | Unset
170
+ if isinstance(self.task_description, Unset):
171
+ task_description = UNSET
172
+ else:
173
+ task_description = self.task_description
174
+
175
+ task_success = self.task_success
176
+
177
+ finetune = self.finetune
178
+
179
+ isreal = self.isreal
180
+
181
+ lable_info: dict[str, Any] | Unset = UNSET
182
+ if not isinstance(self.lable_info, Unset):
183
+ lable_info = self.lable_info.to_dict()
184
+
185
+ scene_type = self.scene_type
186
+
187
+ scene_id: None | str | Unset
188
+ if isinstance(self.scene_id, Unset):
189
+ scene_id = UNSET
190
+ else:
191
+ scene_id = self.scene_id
192
+
193
+ total_frames = self.total_frames
194
+
195
+ duration_seconds = self.duration_seconds
196
+
197
+ collection_time: int | None | Unset
198
+ if isinstance(self.collection_time, Unset):
199
+ collection_time = UNSET
200
+ else:
201
+ collection_time = self.collection_time
202
+
203
+ checker_result = self.checker_result
204
+
205
+ checker_info: None | str | Unset
206
+ if isinstance(self.checker_info, Unset):
207
+ checker_info = UNSET
208
+ else:
209
+ checker_info = self.checker_info
210
+
211
+ model: None | str | Unset
212
+ if isinstance(self.model, Unset):
213
+ model = UNSET
214
+ else:
215
+ model = self.model
216
+
217
+ raw_data_uuid: None | str | Unset
218
+ if isinstance(self.raw_data_uuid, Unset):
219
+ raw_data_uuid = UNSET
220
+ else:
221
+ raw_data_uuid = self.raw_data_uuid
222
+
223
+ extra_info: None | str | Unset
224
+ if isinstance(self.extra_info, Unset):
225
+ extra_info = UNSET
226
+ else:
227
+ extra_info = self.extra_info
228
+
229
+ field_dict: dict[str, Any] = {}
230
+ field_dict.update(self.additional_properties)
231
+ field_dict.update(
232
+ {
233
+ "patch_name": patch_name,
234
+ "episode_id": episode_id,
235
+ "source_file_name": source_file_name,
236
+ }
237
+ )
238
+ if region is not UNSET:
239
+ field_dict["region"] = region
240
+ if data_size is not UNSET:
241
+ field_dict["data_size"] = data_size
242
+ if alias is not UNSET:
243
+ field_dict["alias"] = alias
244
+ if description is not UNSET:
245
+ field_dict["description"] = description
246
+ if label is not UNSET:
247
+ field_dict["label"] = label
248
+ if uploaded is not UNSET:
249
+ field_dict["uploaded"] = uploaded
250
+ if operator is not UNSET:
251
+ field_dict["operator"] = operator
252
+ if reviewer is not UNSET:
253
+ field_dict["reviewer"] = reviewer
254
+ if review_status is not UNSET:
255
+ field_dict["review_status"] = review_status
256
+ if review_time is not UNSET:
257
+ field_dict["review_time"] = review_time
258
+ if review_info is not UNSET:
259
+ field_dict["review_info"] = review_info
260
+ if collection_method is not UNSET:
261
+ field_dict["collection_method"] = collection_method
262
+ if collector_type is not UNSET:
263
+ field_dict["collector_type"] = collector_type
264
+ if collector_id is not UNSET:
265
+ field_dict["collector_id"] = collector_id
266
+ if task_id is not UNSET:
267
+ field_dict["task_id"] = task_id
268
+ if task_actions is not UNSET:
269
+ field_dict["task_actions"] = task_actions
270
+ if task_description is not UNSET:
271
+ field_dict["task_description"] = task_description
272
+ if task_success is not UNSET:
273
+ field_dict["task_success"] = task_success
274
+ if finetune is not UNSET:
275
+ field_dict["finetune"] = finetune
276
+ if isreal is not UNSET:
277
+ field_dict["isreal"] = isreal
278
+ if lable_info is not UNSET:
279
+ field_dict["lable_info"] = lable_info
280
+ if scene_type is not UNSET:
281
+ field_dict["scene_type"] = scene_type
282
+ if scene_id is not UNSET:
283
+ field_dict["scene_id"] = scene_id
284
+ if total_frames is not UNSET:
285
+ field_dict["total_frames"] = total_frames
286
+ if duration_seconds is not UNSET:
287
+ field_dict["duration_seconds"] = duration_seconds
288
+ if collection_time is not UNSET:
289
+ field_dict["collection_time"] = collection_time
290
+ if checker_result is not UNSET:
291
+ field_dict["checker_result"] = checker_result
292
+ if checker_info is not UNSET:
293
+ field_dict["checker_info"] = checker_info
294
+ if model is not UNSET:
295
+ field_dict["model"] = model
296
+ if raw_data_uuid is not UNSET:
297
+ field_dict["raw_data_uuid"] = raw_data_uuid
298
+ if extra_info is not UNSET:
299
+ field_dict["extra_info"] = extra_info
300
+
301
+ return field_dict
302
+
303
+ @classmethod
304
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
305
+ from ..models.patch_episode_create_request_lable_info import PatchEpisodeCreateRequestLableInfo # noqa: PLC0415
306
+
307
+ d = dict(src_dict)
308
+ patch_name = d.pop("patch_name")
309
+
310
+ episode_id = d.pop("episode_id")
311
+
312
+ source_file_name = d.pop("source_file_name")
313
+
314
+ def _parse_region(data: object) -> None | str | Unset:
315
+ if data is None:
316
+ return data
317
+ if isinstance(data, Unset):
318
+ return data
319
+ return cast(None | str | Unset, data)
320
+
321
+ region = _parse_region(d.pop("region", UNSET))
322
+
323
+ data_size = d.pop("data_size", UNSET)
324
+
325
+ def _parse_alias(data: object) -> None | str | Unset:
326
+ if data is None:
327
+ return data
328
+ if isinstance(data, Unset):
329
+ return data
330
+ return cast(None | str | Unset, data)
331
+
332
+ alias = _parse_alias(d.pop("alias", UNSET))
333
+
334
+ def _parse_description(data: object) -> None | str | Unset:
335
+ if data is None:
336
+ return data
337
+ if isinstance(data, Unset):
338
+ return data
339
+ return cast(None | str | Unset, data)
340
+
341
+ description = _parse_description(d.pop("description", UNSET))
342
+
343
+ def _parse_label(data: object) -> None | str | Unset:
344
+ if data is None:
345
+ return data
346
+ if isinstance(data, Unset):
347
+ return data
348
+ return cast(None | str | Unset, data)
349
+
350
+ label = _parse_label(d.pop("label", UNSET))
351
+
352
+ uploaded = d.pop("uploaded", UNSET)
353
+
354
+ def _parse_operator(data: object) -> None | str | Unset:
355
+ if data is None:
356
+ return data
357
+ if isinstance(data, Unset):
358
+ return data
359
+ return cast(None | str | Unset, data)
360
+
361
+ operator = _parse_operator(d.pop("operator", UNSET))
362
+
363
+ def _parse_reviewer(data: object) -> None | str | Unset:
364
+ if data is None:
365
+ return data
366
+ if isinstance(data, Unset):
367
+ return data
368
+ return cast(None | str | Unset, data)
369
+
370
+ reviewer = _parse_reviewer(d.pop("reviewer", UNSET))
371
+
372
+ review_status = d.pop("review_status", UNSET)
373
+
374
+ def _parse_review_time(data: object) -> int | None | Unset:
375
+ if data is None:
376
+ return data
377
+ if isinstance(data, Unset):
378
+ return data
379
+ return cast(int | None | Unset, data)
380
+
381
+ review_time = _parse_review_time(d.pop("review_time", UNSET))
382
+
383
+ def _parse_review_info(data: object) -> None | str | Unset:
384
+ if data is None:
385
+ return data
386
+ if isinstance(data, Unset):
387
+ return data
388
+ return cast(None | str | Unset, data)
389
+
390
+ review_info = _parse_review_info(d.pop("review_info", UNSET))
391
+
392
+ collection_method = d.pop("collection_method", UNSET)
393
+
394
+ collector_type = d.pop("collector_type", UNSET)
395
+
396
+ collector_id = d.pop("collector_id", UNSET)
397
+
398
+ task_id = d.pop("task_id", UNSET)
399
+
400
+ def _parse_task_actions(data: object) -> None | str | Unset:
401
+ if data is None:
402
+ return data
403
+ if isinstance(data, Unset):
404
+ return data
405
+ return cast(None | str | Unset, data)
406
+
407
+ task_actions = _parse_task_actions(d.pop("task_actions", UNSET))
408
+
409
+ def _parse_task_description(data: object) -> None | str | Unset:
410
+ if data is None:
411
+ return data
412
+ if isinstance(data, Unset):
413
+ return data
414
+ return cast(None | str | Unset, data)
415
+
416
+ task_description = _parse_task_description(d.pop("task_description", UNSET))
417
+
418
+ task_success = d.pop("task_success", UNSET)
419
+
420
+ finetune = d.pop("finetune", UNSET)
421
+
422
+ isreal = d.pop("isreal", UNSET)
423
+
424
+ _lable_info = d.pop("lable_info", UNSET)
425
+ lable_info: PatchEpisodeCreateRequestLableInfo | Unset
426
+ if isinstance(_lable_info, Unset):
427
+ lable_info = UNSET
428
+ else:
429
+ lable_info = PatchEpisodeCreateRequestLableInfo.from_dict(_lable_info)
430
+
431
+ scene_type = d.pop("scene_type", UNSET)
432
+
433
+ def _parse_scene_id(data: object) -> None | str | Unset:
434
+ if data is None:
435
+ return data
436
+ if isinstance(data, Unset):
437
+ return data
438
+ return cast(None | str | Unset, data)
439
+
440
+ scene_id = _parse_scene_id(d.pop("scene_id", UNSET))
441
+
442
+ total_frames = d.pop("total_frames", UNSET)
443
+
444
+ duration_seconds = d.pop("duration_seconds", UNSET)
445
+
446
+ def _parse_collection_time(data: object) -> int | None | Unset:
447
+ if data is None:
448
+ return data
449
+ if isinstance(data, Unset):
450
+ return data
451
+ return cast(int | None | Unset, data)
452
+
453
+ collection_time = _parse_collection_time(d.pop("collection_time", UNSET))
454
+
455
+ checker_result = d.pop("checker_result", UNSET)
456
+
457
+ def _parse_checker_info(data: object) -> None | str | Unset:
458
+ if data is None:
459
+ return data
460
+ if isinstance(data, Unset):
461
+ return data
462
+ return cast(None | str | Unset, data)
463
+
464
+ checker_info = _parse_checker_info(d.pop("checker_info", UNSET))
465
+
466
+ def _parse_model(data: object) -> None | str | Unset:
467
+ if data is None:
468
+ return data
469
+ if isinstance(data, Unset):
470
+ return data
471
+ return cast(None | str | Unset, data)
472
+
473
+ model = _parse_model(d.pop("model", UNSET))
474
+
475
+ def _parse_raw_data_uuid(data: object) -> None | str | Unset:
476
+ if data is None:
477
+ return data
478
+ if isinstance(data, Unset):
479
+ return data
480
+ return cast(None | str | Unset, data)
481
+
482
+ raw_data_uuid = _parse_raw_data_uuid(d.pop("raw_data_uuid", UNSET))
483
+
484
+ def _parse_extra_info(data: object) -> None | str | Unset:
485
+ if data is None:
486
+ return data
487
+ if isinstance(data, Unset):
488
+ return data
489
+ return cast(None | str | Unset, data)
490
+
491
+ extra_info = _parse_extra_info(d.pop("extra_info", UNSET))
492
+
493
+ patch_episode_create_request = cls(
494
+ patch_name=patch_name,
495
+ episode_id=episode_id,
496
+ source_file_name=source_file_name,
497
+ region=region,
498
+ data_size=data_size,
499
+ alias=alias,
500
+ description=description,
501
+ label=label,
502
+ uploaded=uploaded,
503
+ operator=operator,
504
+ reviewer=reviewer,
505
+ review_status=review_status,
506
+ review_time=review_time,
507
+ review_info=review_info,
508
+ collection_method=collection_method,
509
+ collector_type=collector_type,
510
+ collector_id=collector_id,
511
+ task_id=task_id,
512
+ task_actions=task_actions,
513
+ task_description=task_description,
514
+ task_success=task_success,
515
+ finetune=finetune,
516
+ isreal=isreal,
517
+ lable_info=lable_info,
518
+ scene_type=scene_type,
519
+ scene_id=scene_id,
520
+ total_frames=total_frames,
521
+ duration_seconds=duration_seconds,
522
+ collection_time=collection_time,
523
+ checker_result=checker_result,
524
+ checker_info=checker_info,
525
+ model=model,
526
+ raw_data_uuid=raw_data_uuid,
527
+ extra_info=extra_info,
528
+ )
529
+
530
+ patch_episode_create_request.additional_properties = d
531
+ return patch_episode_create_request
532
+
533
+ @property
534
+ def additional_keys(self) -> list[str]:
535
+ return list(self.additional_properties.keys())
536
+
537
+ def __getitem__(self, key: str) -> Any:
538
+ return self.additional_properties[key]
539
+
540
+ def __setitem__(self, key: str, value: Any) -> None:
541
+ self.additional_properties[key] = value
542
+
543
+ def __delitem__(self, key: str) -> None:
544
+ del self.additional_properties[key]
545
+
546
+ def __contains__(self, key: str) -> bool:
547
+ return key in self.additional_properties
@@ -0,0 +1,47 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import Any, TypeVar
5
+
6
+ from attrs import define as _attrs_define
7
+ from attrs import field as _attrs_field
8
+
9
+ T = TypeVar("T", bound="PatchEpisodeCreateRequestLableInfo")
10
+
11
+
12
+ @_attrs_define
13
+ class PatchEpisodeCreateRequestLableInfo:
14
+ """标签信息"""
15
+
16
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
17
+
18
+ def to_dict(self) -> dict[str, Any]:
19
+
20
+ field_dict: dict[str, Any] = {}
21
+ field_dict.update(self.additional_properties)
22
+
23
+ return field_dict
24
+
25
+ @classmethod
26
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
27
+ d = dict(src_dict)
28
+ patch_episode_create_request_lable_info = cls()
29
+
30
+ patch_episode_create_request_lable_info.additional_properties = d
31
+ return patch_episode_create_request_lable_info
32
+
33
+ @property
34
+ def additional_keys(self) -> list[str]:
35
+ return list(self.additional_properties.keys())
36
+
37
+ def __getitem__(self, key: str) -> Any:
38
+ return self.additional_properties[key]
39
+
40
+ def __setitem__(self, key: str, value: Any) -> None:
41
+ self.additional_properties[key] = value
42
+
43
+ def __delitem__(self, key: str) -> None:
44
+ del self.additional_properties[key]
45
+
46
+ def __contains__(self, key: str) -> bool:
47
+ return key in self.additional_properties
@@ -0,0 +1,94 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import TYPE_CHECKING, Any, TypeVar
5
+
6
+ from attrs import define as _attrs_define
7
+ from attrs import field as _attrs_field
8
+
9
+ from ..types import UNSET, Unset
10
+
11
+ if TYPE_CHECKING:
12
+ from ..models.patch_episode_create_request import PatchEpisodeCreateRequest
13
+
14
+
15
+ T = TypeVar("T", bound="PatchUploadCreateRequest")
16
+
17
+
18
+ @_attrs_define
19
+ class PatchUploadCreateRequest:
20
+ """
21
+ Attributes:
22
+ uploader (str): 上传人
23
+ episodes (list[PatchEpisodeCreateRequest]): 待上传 episode 列表
24
+ overwrite_existing (bool | Unset): 是否允许覆盖重复 episode Default: False.
25
+ """
26
+
27
+ uploader: str
28
+ episodes: list[PatchEpisodeCreateRequest]
29
+ overwrite_existing: bool | Unset = False
30
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
31
+
32
+ def to_dict(self) -> dict[str, Any]:
33
+ uploader = self.uploader
34
+
35
+ episodes = []
36
+ for episodes_item_data in self.episodes:
37
+ episodes_item = episodes_item_data.to_dict()
38
+ episodes.append(episodes_item)
39
+
40
+ overwrite_existing = self.overwrite_existing
41
+
42
+ field_dict: dict[str, Any] = {}
43
+ field_dict.update(self.additional_properties)
44
+ field_dict.update(
45
+ {
46
+ "uploader": uploader,
47
+ "episodes": episodes,
48
+ }
49
+ )
50
+ if overwrite_existing is not UNSET:
51
+ field_dict["overwrite_existing"] = overwrite_existing
52
+
53
+ return field_dict
54
+
55
+ @classmethod
56
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
57
+ from ..models.patch_episode_create_request import PatchEpisodeCreateRequest # noqa: PLC0415
58
+
59
+ d = dict(src_dict)
60
+ uploader = d.pop("uploader")
61
+
62
+ episodes = []
63
+ _episodes = d.pop("episodes")
64
+ for episodes_item_data in _episodes:
65
+ episodes_item = PatchEpisodeCreateRequest.from_dict(episodes_item_data)
66
+
67
+ episodes.append(episodes_item)
68
+
69
+ overwrite_existing = d.pop("overwrite_existing", UNSET)
70
+
71
+ patch_upload_create_request = cls(
72
+ uploader=uploader,
73
+ episodes=episodes,
74
+ overwrite_existing=overwrite_existing,
75
+ )
76
+
77
+ patch_upload_create_request.additional_properties = d
78
+ return patch_upload_create_request
79
+
80
+ @property
81
+ def additional_keys(self) -> list[str]:
82
+ return list(self.additional_properties.keys())
83
+
84
+ def __getitem__(self, key: str) -> Any:
85
+ return self.additional_properties[key]
86
+
87
+ def __setitem__(self, key: str, value: Any) -> None:
88
+ self.additional_properties[key] = value
89
+
90
+ def __delitem__(self, key: str) -> None:
91
+ del self.additional_properties[key]
92
+
93
+ def __contains__(self, key: str) -> bool:
94
+ return key in self.additional_properties