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,533 @@
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.run_update_request_artifacts_type_0 import RunUpdateRequestArtifactsType0
13
+ from ..models.run_update_request_configs_type_0 import RunUpdateRequestConfigsType0
14
+ from ..models.run_update_request_stages_type_0_item import RunUpdateRequestStagesType0Item
15
+ from ..models.stage_artifact_append import StageArtifactAppend
16
+
17
+
18
+ T = TypeVar("T", bound="RunUpdateRequest")
19
+
20
+
21
+ @_attrs_define
22
+ class RunUpdateRequest:
23
+ """
24
+ Attributes:
25
+ description (None | str | Unset):
26
+ label (None | str | Unset):
27
+ train_arc (None | str | Unset):
28
+ robot_type (None | str | Unset):
29
+ configs (None | RunUpdateRequestConfigsType0 | Unset):
30
+ check_points_path (list[str] | None | Unset):
31
+ check_point_path (list[str] | None | str | Unset):
32
+ check_points_onnx_path (list[str] | None | str | Unset):
33
+ check_point_onnx_path (list[str] | None | str | Unset):
34
+ finish_time (int | None | Unset):
35
+ status (None | str | Unset):
36
+ fail_info (None | str | Unset):
37
+ reserved_checkpoints (list[str] | None | Unset):
38
+ current_stage (None | str | Unset):
39
+ stages (list[RunUpdateRequestStagesType0Item] | None | Unset):
40
+ artifacts (None | RunUpdateRequestArtifactsType0 | Unset):
41
+ stage_artifact (None | StageArtifactAppend | Unset):
42
+ extra_info (None | str | Unset):
43
+ """
44
+
45
+ description: None | str | Unset = UNSET
46
+ label: None | str | Unset = UNSET
47
+ train_arc: None | str | Unset = UNSET
48
+ robot_type: None | str | Unset = UNSET
49
+ configs: None | RunUpdateRequestConfigsType0 | Unset = UNSET
50
+ check_points_path: list[str] | None | Unset = UNSET
51
+ check_point_path: list[str] | None | str | Unset = UNSET
52
+ check_points_onnx_path: list[str] | None | str | Unset = UNSET
53
+ check_point_onnx_path: list[str] | None | str | Unset = UNSET
54
+ finish_time: int | None | Unset = UNSET
55
+ status: None | str | Unset = UNSET
56
+ fail_info: None | str | Unset = UNSET
57
+ reserved_checkpoints: list[str] | None | Unset = UNSET
58
+ current_stage: None | str | Unset = UNSET
59
+ stages: list[RunUpdateRequestStagesType0Item] | None | Unset = UNSET
60
+ artifacts: None | RunUpdateRequestArtifactsType0 | Unset = UNSET
61
+ stage_artifact: None | StageArtifactAppend | Unset = UNSET
62
+ extra_info: None | str | Unset = UNSET
63
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
64
+
65
+ def to_dict(self) -> dict[str, Any]:
66
+ from ..models.run_update_request_artifacts_type_0 import RunUpdateRequestArtifactsType0 # noqa: PLC0415
67
+ from ..models.run_update_request_configs_type_0 import RunUpdateRequestConfigsType0 # noqa: PLC0415
68
+ from ..models.stage_artifact_append import StageArtifactAppend # noqa: PLC0415
69
+
70
+ description: None | str | Unset
71
+ if isinstance(self.description, Unset):
72
+ description = UNSET
73
+ else:
74
+ description = self.description
75
+
76
+ label: None | str | Unset
77
+ if isinstance(self.label, Unset):
78
+ label = UNSET
79
+ else:
80
+ label = self.label
81
+
82
+ train_arc: None | str | Unset
83
+ if isinstance(self.train_arc, Unset):
84
+ train_arc = UNSET
85
+ else:
86
+ train_arc = self.train_arc
87
+
88
+ robot_type: None | str | Unset
89
+ if isinstance(self.robot_type, Unset):
90
+ robot_type = UNSET
91
+ else:
92
+ robot_type = self.robot_type
93
+
94
+ configs: dict[str, Any] | None | Unset
95
+ if isinstance(self.configs, Unset):
96
+ configs = UNSET
97
+ elif isinstance(self.configs, RunUpdateRequestConfigsType0):
98
+ configs = self.configs.to_dict()
99
+ else:
100
+ configs = self.configs
101
+
102
+ check_points_path: list[str] | None | Unset
103
+ if isinstance(self.check_points_path, Unset):
104
+ check_points_path = UNSET
105
+ elif isinstance(self.check_points_path, list):
106
+ check_points_path = self.check_points_path
107
+
108
+ else:
109
+ check_points_path = self.check_points_path
110
+
111
+ check_point_path: list[str] | None | str | Unset
112
+ if isinstance(self.check_point_path, Unset):
113
+ check_point_path = UNSET
114
+ elif isinstance(self.check_point_path, list):
115
+ check_point_path = self.check_point_path
116
+
117
+ else:
118
+ check_point_path = self.check_point_path
119
+
120
+ check_points_onnx_path: list[str] | None | str | Unset
121
+ if isinstance(self.check_points_onnx_path, Unset):
122
+ check_points_onnx_path = UNSET
123
+ elif isinstance(self.check_points_onnx_path, list):
124
+ check_points_onnx_path = self.check_points_onnx_path
125
+
126
+ else:
127
+ check_points_onnx_path = self.check_points_onnx_path
128
+
129
+ check_point_onnx_path: list[str] | None | str | Unset
130
+ if isinstance(self.check_point_onnx_path, Unset):
131
+ check_point_onnx_path = UNSET
132
+ elif isinstance(self.check_point_onnx_path, list):
133
+ check_point_onnx_path = self.check_point_onnx_path
134
+
135
+ else:
136
+ check_point_onnx_path = self.check_point_onnx_path
137
+
138
+ finish_time: int | None | Unset
139
+ if isinstance(self.finish_time, Unset):
140
+ finish_time = UNSET
141
+ else:
142
+ finish_time = self.finish_time
143
+
144
+ status: None | str | Unset
145
+ if isinstance(self.status, Unset):
146
+ status = UNSET
147
+ else:
148
+ status = self.status
149
+
150
+ fail_info: None | str | Unset
151
+ if isinstance(self.fail_info, Unset):
152
+ fail_info = UNSET
153
+ else:
154
+ fail_info = self.fail_info
155
+
156
+ reserved_checkpoints: list[str] | None | Unset
157
+ if isinstance(self.reserved_checkpoints, Unset):
158
+ reserved_checkpoints = UNSET
159
+ elif isinstance(self.reserved_checkpoints, list):
160
+ reserved_checkpoints = self.reserved_checkpoints
161
+
162
+ else:
163
+ reserved_checkpoints = self.reserved_checkpoints
164
+
165
+ current_stage: None | str | Unset
166
+ if isinstance(self.current_stage, Unset):
167
+ current_stage = UNSET
168
+ else:
169
+ current_stage = self.current_stage
170
+
171
+ stages: list[dict[str, Any]] | None | Unset
172
+ if isinstance(self.stages, Unset):
173
+ stages = UNSET
174
+ elif isinstance(self.stages, list):
175
+ stages = []
176
+ for stages_type_0_item_data in self.stages:
177
+ stages_type_0_item = stages_type_0_item_data.to_dict()
178
+ stages.append(stages_type_0_item)
179
+
180
+ else:
181
+ stages = self.stages
182
+
183
+ artifacts: dict[str, Any] | None | Unset
184
+ if isinstance(self.artifacts, Unset):
185
+ artifacts = UNSET
186
+ elif isinstance(self.artifacts, RunUpdateRequestArtifactsType0):
187
+ artifacts = self.artifacts.to_dict()
188
+ else:
189
+ artifacts = self.artifacts
190
+
191
+ stage_artifact: dict[str, Any] | None | Unset
192
+ if isinstance(self.stage_artifact, Unset):
193
+ stage_artifact = UNSET
194
+ elif isinstance(self.stage_artifact, StageArtifactAppend):
195
+ stage_artifact = self.stage_artifact.to_dict()
196
+ else:
197
+ stage_artifact = self.stage_artifact
198
+
199
+ extra_info: None | str | Unset
200
+ if isinstance(self.extra_info, Unset):
201
+ extra_info = UNSET
202
+ else:
203
+ extra_info = self.extra_info
204
+
205
+ field_dict: dict[str, Any] = {}
206
+ field_dict.update(self.additional_properties)
207
+ field_dict.update({})
208
+ if description is not UNSET:
209
+ field_dict["description"] = description
210
+ if label is not UNSET:
211
+ field_dict["label"] = label
212
+ if train_arc is not UNSET:
213
+ field_dict["train_arc"] = train_arc
214
+ if robot_type is not UNSET:
215
+ field_dict["robot_type"] = robot_type
216
+ if configs is not UNSET:
217
+ field_dict["configs"] = configs
218
+ if check_points_path is not UNSET:
219
+ field_dict["check_points_path"] = check_points_path
220
+ if check_point_path is not UNSET:
221
+ field_dict["check_point_path"] = check_point_path
222
+ if check_points_onnx_path is not UNSET:
223
+ field_dict["check_points_onnx_path"] = check_points_onnx_path
224
+ if check_point_onnx_path is not UNSET:
225
+ field_dict["check_point_onnx_path"] = check_point_onnx_path
226
+ if finish_time is not UNSET:
227
+ field_dict["finish_time"] = finish_time
228
+ if status is not UNSET:
229
+ field_dict["status"] = status
230
+ if fail_info is not UNSET:
231
+ field_dict["fail_info"] = fail_info
232
+ if reserved_checkpoints is not UNSET:
233
+ field_dict["reserved_checkpoints"] = reserved_checkpoints
234
+ if current_stage is not UNSET:
235
+ field_dict["current_stage"] = current_stage
236
+ if stages is not UNSET:
237
+ field_dict["stages"] = stages
238
+ if artifacts is not UNSET:
239
+ field_dict["artifacts"] = artifacts
240
+ if stage_artifact is not UNSET:
241
+ field_dict["stage_artifact"] = stage_artifact
242
+ if extra_info is not UNSET:
243
+ field_dict["extra_info"] = extra_info
244
+
245
+ return field_dict
246
+
247
+ @classmethod
248
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
249
+ from ..models.run_update_request_artifacts_type_0 import RunUpdateRequestArtifactsType0 # noqa: PLC0415
250
+ from ..models.run_update_request_configs_type_0 import RunUpdateRequestConfigsType0 # noqa: PLC0415
251
+ from ..models.run_update_request_stages_type_0_item import RunUpdateRequestStagesType0Item # noqa: PLC0415
252
+ from ..models.stage_artifact_append import StageArtifactAppend # noqa: PLC0415
253
+
254
+ d = dict(src_dict)
255
+
256
+ def _parse_description(data: object) -> None | str | Unset:
257
+ if data is None:
258
+ return data
259
+ if isinstance(data, Unset):
260
+ return data
261
+ return cast(None | str | Unset, data)
262
+
263
+ description = _parse_description(d.pop("description", UNSET))
264
+
265
+ def _parse_label(data: object) -> None | str | Unset:
266
+ if data is None:
267
+ return data
268
+ if isinstance(data, Unset):
269
+ return data
270
+ return cast(None | str | Unset, data)
271
+
272
+ label = _parse_label(d.pop("label", UNSET))
273
+
274
+ def _parse_train_arc(data: object) -> None | str | Unset:
275
+ if data is None:
276
+ return data
277
+ if isinstance(data, Unset):
278
+ return data
279
+ return cast(None | str | Unset, data)
280
+
281
+ train_arc = _parse_train_arc(d.pop("train_arc", UNSET))
282
+
283
+ def _parse_robot_type(data: object) -> None | str | Unset:
284
+ if data is None:
285
+ return data
286
+ if isinstance(data, Unset):
287
+ return data
288
+ return cast(None | str | Unset, data)
289
+
290
+ robot_type = _parse_robot_type(d.pop("robot_type", UNSET))
291
+
292
+ def _parse_configs(data: object) -> None | RunUpdateRequestConfigsType0 | Unset:
293
+ if data is None:
294
+ return data
295
+ if isinstance(data, Unset):
296
+ return data
297
+ try:
298
+ if not isinstance(data, dict):
299
+ raise TypeError()
300
+ configs_type_0 = RunUpdateRequestConfigsType0.from_dict(data)
301
+
302
+ return configs_type_0
303
+ except (TypeError, ValueError, AttributeError, KeyError):
304
+ pass
305
+ return cast(None | RunUpdateRequestConfigsType0 | Unset, data)
306
+
307
+ configs = _parse_configs(d.pop("configs", UNSET))
308
+
309
+ def _parse_check_points_path(data: object) -> list[str] | None | Unset:
310
+ if data is None:
311
+ return data
312
+ if isinstance(data, Unset):
313
+ return data
314
+ try:
315
+ if not isinstance(data, list):
316
+ raise TypeError()
317
+ check_points_path_type_0 = cast(list[str], data)
318
+
319
+ return check_points_path_type_0
320
+ except (TypeError, ValueError, AttributeError, KeyError):
321
+ pass
322
+ return cast(list[str] | None | Unset, data)
323
+
324
+ check_points_path = _parse_check_points_path(d.pop("check_points_path", UNSET))
325
+
326
+ def _parse_check_point_path(data: object) -> list[str] | None | str | Unset:
327
+ if data is None:
328
+ return data
329
+ if isinstance(data, Unset):
330
+ return data
331
+ try:
332
+ if not isinstance(data, list):
333
+ raise TypeError()
334
+ check_point_path_type_1 = cast(list[str], data)
335
+
336
+ return check_point_path_type_1
337
+ except (TypeError, ValueError, AttributeError, KeyError):
338
+ pass
339
+ return cast(list[str] | None | str | Unset, data)
340
+
341
+ check_point_path = _parse_check_point_path(d.pop("check_point_path", UNSET))
342
+
343
+ def _parse_check_points_onnx_path(data: object) -> list[str] | None | str | Unset:
344
+ if data is None:
345
+ return data
346
+ if isinstance(data, Unset):
347
+ return data
348
+ try:
349
+ if not isinstance(data, list):
350
+ raise TypeError()
351
+ check_points_onnx_path_type_1 = cast(list[str], data)
352
+
353
+ return check_points_onnx_path_type_1
354
+ except (TypeError, ValueError, AttributeError, KeyError):
355
+ pass
356
+ return cast(list[str] | None | str | Unset, data)
357
+
358
+ check_points_onnx_path = _parse_check_points_onnx_path(d.pop("check_points_onnx_path", UNSET))
359
+
360
+ def _parse_check_point_onnx_path(data: object) -> list[str] | None | str | Unset:
361
+ if data is None:
362
+ return data
363
+ if isinstance(data, Unset):
364
+ return data
365
+ try:
366
+ if not isinstance(data, list):
367
+ raise TypeError()
368
+ check_point_onnx_path_type_1 = cast(list[str], data)
369
+
370
+ return check_point_onnx_path_type_1
371
+ except (TypeError, ValueError, AttributeError, KeyError):
372
+ pass
373
+ return cast(list[str] | None | str | Unset, data)
374
+
375
+ check_point_onnx_path = _parse_check_point_onnx_path(d.pop("check_point_onnx_path", UNSET))
376
+
377
+ def _parse_finish_time(data: object) -> int | None | Unset:
378
+ if data is None:
379
+ return data
380
+ if isinstance(data, Unset):
381
+ return data
382
+ return cast(int | None | Unset, data)
383
+
384
+ finish_time = _parse_finish_time(d.pop("finish_time", UNSET))
385
+
386
+ def _parse_status(data: object) -> None | str | Unset:
387
+ if data is None:
388
+ return data
389
+ if isinstance(data, Unset):
390
+ return data
391
+ return cast(None | str | Unset, data)
392
+
393
+ status = _parse_status(d.pop("status", UNSET))
394
+
395
+ def _parse_fail_info(data: object) -> None | str | Unset:
396
+ if data is None:
397
+ return data
398
+ if isinstance(data, Unset):
399
+ return data
400
+ return cast(None | str | Unset, data)
401
+
402
+ fail_info = _parse_fail_info(d.pop("fail_info", UNSET))
403
+
404
+ def _parse_reserved_checkpoints(data: object) -> list[str] | None | Unset:
405
+ if data is None:
406
+ return data
407
+ if isinstance(data, Unset):
408
+ return data
409
+ try:
410
+ if not isinstance(data, list):
411
+ raise TypeError()
412
+ reserved_checkpoints_type_0 = cast(list[str], data)
413
+
414
+ return reserved_checkpoints_type_0
415
+ except (TypeError, ValueError, AttributeError, KeyError):
416
+ pass
417
+ return cast(list[str] | None | Unset, data)
418
+
419
+ reserved_checkpoints = _parse_reserved_checkpoints(d.pop("reserved_checkpoints", UNSET))
420
+
421
+ def _parse_current_stage(data: object) -> None | str | Unset:
422
+ if data is None:
423
+ return data
424
+ if isinstance(data, Unset):
425
+ return data
426
+ return cast(None | str | Unset, data)
427
+
428
+ current_stage = _parse_current_stage(d.pop("current_stage", UNSET))
429
+
430
+ def _parse_stages(data: object) -> list[RunUpdateRequestStagesType0Item] | None | Unset:
431
+ if data is None:
432
+ return data
433
+ if isinstance(data, Unset):
434
+ return data
435
+ try:
436
+ if not isinstance(data, list):
437
+ raise TypeError()
438
+ stages_type_0 = []
439
+ _stages_type_0 = data
440
+ for stages_type_0_item_data in _stages_type_0:
441
+ stages_type_0_item = RunUpdateRequestStagesType0Item.from_dict(stages_type_0_item_data)
442
+
443
+ stages_type_0.append(stages_type_0_item)
444
+
445
+ return stages_type_0
446
+ except (TypeError, ValueError, AttributeError, KeyError):
447
+ pass
448
+ return cast(list[RunUpdateRequestStagesType0Item] | None | Unset, data)
449
+
450
+ stages = _parse_stages(d.pop("stages", UNSET))
451
+
452
+ def _parse_artifacts(data: object) -> None | RunUpdateRequestArtifactsType0 | Unset:
453
+ if data is None:
454
+ return data
455
+ if isinstance(data, Unset):
456
+ return data
457
+ try:
458
+ if not isinstance(data, dict):
459
+ raise TypeError()
460
+ artifacts_type_0 = RunUpdateRequestArtifactsType0.from_dict(data)
461
+
462
+ return artifacts_type_0
463
+ except (TypeError, ValueError, AttributeError, KeyError):
464
+ pass
465
+ return cast(None | RunUpdateRequestArtifactsType0 | Unset, data)
466
+
467
+ artifacts = _parse_artifacts(d.pop("artifacts", UNSET))
468
+
469
+ def _parse_stage_artifact(data: object) -> None | StageArtifactAppend | Unset:
470
+ if data is None:
471
+ return data
472
+ if isinstance(data, Unset):
473
+ return data
474
+ try:
475
+ if not isinstance(data, dict):
476
+ raise TypeError()
477
+ stage_artifact_type_0 = StageArtifactAppend.from_dict(data)
478
+
479
+ return stage_artifact_type_0
480
+ except (TypeError, ValueError, AttributeError, KeyError):
481
+ pass
482
+ return cast(None | StageArtifactAppend | Unset, data)
483
+
484
+ stage_artifact = _parse_stage_artifact(d.pop("stage_artifact", UNSET))
485
+
486
+ def _parse_extra_info(data: object) -> None | str | Unset:
487
+ if data is None:
488
+ return data
489
+ if isinstance(data, Unset):
490
+ return data
491
+ return cast(None | str | Unset, data)
492
+
493
+ extra_info = _parse_extra_info(d.pop("extra_info", UNSET))
494
+
495
+ run_update_request = cls(
496
+ description=description,
497
+ label=label,
498
+ train_arc=train_arc,
499
+ robot_type=robot_type,
500
+ configs=configs,
501
+ check_points_path=check_points_path,
502
+ check_point_path=check_point_path,
503
+ check_points_onnx_path=check_points_onnx_path,
504
+ check_point_onnx_path=check_point_onnx_path,
505
+ finish_time=finish_time,
506
+ status=status,
507
+ fail_info=fail_info,
508
+ reserved_checkpoints=reserved_checkpoints,
509
+ current_stage=current_stage,
510
+ stages=stages,
511
+ artifacts=artifacts,
512
+ stage_artifact=stage_artifact,
513
+ extra_info=extra_info,
514
+ )
515
+
516
+ run_update_request.additional_properties = d
517
+ return run_update_request
518
+
519
+ @property
520
+ def additional_keys(self) -> list[str]:
521
+ return list(self.additional_properties.keys())
522
+
523
+ def __getitem__(self, key: str) -> Any:
524
+ return self.additional_properties[key]
525
+
526
+ def __setitem__(self, key: str, value: Any) -> None:
527
+ self.additional_properties[key] = value
528
+
529
+ def __delitem__(self, key: str) -> None:
530
+ del self.additional_properties[key]
531
+
532
+ def __contains__(self, key: str) -> bool:
533
+ return key in self.additional_properties
@@ -0,0 +1,45 @@
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="RunUpdateRequestArtifactsType0")
10
+
11
+
12
+ @_attrs_define
13
+ class RunUpdateRequestArtifactsType0:
14
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
15
+
16
+ def to_dict(self) -> dict[str, Any]:
17
+
18
+ field_dict: dict[str, Any] = {}
19
+ field_dict.update(self.additional_properties)
20
+
21
+ return field_dict
22
+
23
+ @classmethod
24
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
25
+ d = dict(src_dict)
26
+ run_update_request_artifacts_type_0 = cls()
27
+
28
+ run_update_request_artifacts_type_0.additional_properties = d
29
+ return run_update_request_artifacts_type_0
30
+
31
+ @property
32
+ def additional_keys(self) -> list[str]:
33
+ return list(self.additional_properties.keys())
34
+
35
+ def __getitem__(self, key: str) -> Any:
36
+ return self.additional_properties[key]
37
+
38
+ def __setitem__(self, key: str, value: Any) -> None:
39
+ self.additional_properties[key] = value
40
+
41
+ def __delitem__(self, key: str) -> None:
42
+ del self.additional_properties[key]
43
+
44
+ def __contains__(self, key: str) -> bool:
45
+ return key in self.additional_properties
@@ -0,0 +1,45 @@
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="RunUpdateRequestConfigsType0")
10
+
11
+
12
+ @_attrs_define
13
+ class RunUpdateRequestConfigsType0:
14
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
15
+
16
+ def to_dict(self) -> dict[str, Any]:
17
+
18
+ field_dict: dict[str, Any] = {}
19
+ field_dict.update(self.additional_properties)
20
+
21
+ return field_dict
22
+
23
+ @classmethod
24
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
25
+ d = dict(src_dict)
26
+ run_update_request_configs_type_0 = cls()
27
+
28
+ run_update_request_configs_type_0.additional_properties = d
29
+ return run_update_request_configs_type_0
30
+
31
+ @property
32
+ def additional_keys(self) -> list[str]:
33
+ return list(self.additional_properties.keys())
34
+
35
+ def __getitem__(self, key: str) -> Any:
36
+ return self.additional_properties[key]
37
+
38
+ def __setitem__(self, key: str, value: Any) -> None:
39
+ self.additional_properties[key] = value
40
+
41
+ def __delitem__(self, key: str) -> None:
42
+ del self.additional_properties[key]
43
+
44
+ def __contains__(self, key: str) -> bool:
45
+ return key in self.additional_properties
@@ -0,0 +1,45 @@
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="RunUpdateRequestStagesType0Item")
10
+
11
+
12
+ @_attrs_define
13
+ class RunUpdateRequestStagesType0Item:
14
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
15
+
16
+ def to_dict(self) -> dict[str, Any]:
17
+
18
+ field_dict: dict[str, Any] = {}
19
+ field_dict.update(self.additional_properties)
20
+
21
+ return field_dict
22
+
23
+ @classmethod
24
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
25
+ d = dict(src_dict)
26
+ run_update_request_stages_type_0_item = cls()
27
+
28
+ run_update_request_stages_type_0_item.additional_properties = d
29
+ return run_update_request_stages_type_0_item
30
+
31
+ @property
32
+ def additional_keys(self) -> list[str]:
33
+ return list(self.additional_properties.keys())
34
+
35
+ def __getitem__(self, key: str) -> Any:
36
+ return self.additional_properties[key]
37
+
38
+ def __setitem__(self, key: str, value: Any) -> None:
39
+ self.additional_properties[key] = value
40
+
41
+ def __delitem__(self, key: str) -> None:
42
+ del self.additional_properties[key]
43
+
44
+ def __contains__(self, key: str) -> bool:
45
+ return key in self.additional_properties