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.
- app/__init__.py +1 -0
- app/app.py +14 -0
- app/auth.py +58 -0
- app/task_management.py +97 -0
- config.py +9 -0
- fast_api_client/__init__.py +8 -0
- fast_api_client/api/__init__.py +1 -0
- fast_api_client/api/auth/__init__.py +1 -0
- fast_api_client/api/auth/change_password_api_p_v1_auth_change_password_post.py +172 -0
- fast_api_client/api/auth/forgot_password_api_p_v1_auth_forgot_password_post.py +172 -0
- fast_api_client/api/auth/login_api_p_v1_auth_login_post.py +172 -0
- fast_api_client/api/auth/logout_api_p_v1_auth_logout_post.py +172 -0
- fast_api_client/api/auth/me_api_p_v1_auth_me_get.py +85 -0
- fast_api_client/api/auth/refresh_token_api_p_v1_auth_refresh_post.py +172 -0
- fast_api_client/api/auth/reset_password_api_p_v1_auth_reset_password_post.py +172 -0
- fast_api_client/api/auth/switch_group_api_p_v1_auth_switch_group_post.py +176 -0
- fast_api_client/api/config/__init__.py +1 -0
- fast_api_client/api/config/get_config_api_p_v1_config_get.py +85 -0
- fast_api_client/api/default/__init__.py +1 -0
- fast_api_client/api/default/root_get.py +81 -0
- fast_api_client/api/groups/__init__.py +1 -0
- fast_api_client/api/groups/add_member_api_p_v1_groups_group_id_members_post.py +188 -0
- fast_api_client/api/groups/create_group_api_p_v1_groups_post.py +172 -0
- fast_api_client/api/groups/create_platform_role_binding_api_p_v1_admin_platform_roles_bindings_post.py +172 -0
- fast_api_client/api/groups/delete_group_api_p_v1_groups_group_id_delete.py +167 -0
- fast_api_client/api/groups/delete_platform_role_binding_api_p_v1_admin_platform_roles_bindings_user_id_delete.py +167 -0
- fast_api_client/api/groups/get_group_api_p_v1_groups_group_id_get.py +167 -0
- fast_api_client/api/groups/list_groups_api_p_v1_groups_get.py +85 -0
- fast_api_client/api/groups/list_members_api_p_v1_groups_group_id_members_get.py +167 -0
- fast_api_client/api/groups/list_platform_role_bindings_api_p_v1_admin_platform_roles_bindings_get.py +85 -0
- fast_api_client/api/groups/remove_member_api_p_v1_groups_group_id_members_user_id_delete.py +181 -0
- fast_api_client/api/groups/reset_member_password_api_p_v1_groups_group_id_members_user_id_reset_password_post.py +181 -0
- fast_api_client/api/groups/update_group_api_p_v1_groups_group_id_patch.py +188 -0
- fast_api_client/api/groups/update_member_role_api_p_v1_groups_group_id_members_user_id_patch.py +202 -0
- fast_api_client/api/post_train/__init__.py +1 -0
- fast_api_client/api/post_train/check_patch_duplicate_api_p_v1_singledata_patch_check_post.py +164 -0
- fast_api_client/api/post_train/check_patch_duplicate_batch_api_p_v1_singledata_patch_check_batch_post.py +164 -0
- fast_api_client/api/post_train/create_dataset_api_p_v1_dataset_post.py +172 -0
- fast_api_client/api/post_train/create_patch_upload_api_p_v1_singledata_patch_upload_post.py +164 -0
- fast_api_client/api/post_train/data_ops_overview_api_p_v1_data_ops_overview_get.py +624 -0
- fast_api_client/api/post_train/data_ops_patches_api_p_v1_data_ops_patches_get.py +474 -0
- fast_api_client/api/post_train/delete_dataset_api_p_v1_dataset_dataset_uuid_delete.py +167 -0
- fast_api_client/api/post_train/delete_singledata_api_p_v1_singledata_uuid_delete.py +167 -0
- fast_api_client/api/post_train/delete_singledata_by_patch_api_p_v1_singledata_patch_patch_id_delete.py +167 -0
- fast_api_client/api/post_train/delete_singledata_list_api_p_v1_singledata_delete.py +172 -0
- fast_api_client/api/post_train/download_singledata_api_p_v1_singledata_download_uuid_get.py +167 -0
- fast_api_client/api/post_train/download_singledata_list_api_p_v1_singledata_download_get.py +178 -0
- fast_api_client/api/post_train/get_singledata_api_p_v1_singledata_uuid_get.py +167 -0
- fast_api_client/api/post_train/link_singledata_api_p_v1_singledata_link_post.py +172 -0
- fast_api_client/api/post_train/list_dataset_api_p_v1_dataset_get.py +307 -0
- fast_api_client/api/post_train/list_singledata_api_p_v1_singledata_get.py +737 -0
- fast_api_client/api/post_train/trigger_process_api_p_v1_singledata_trigger_post.py +172 -0
- fast_api_client/api/post_train/unlink_singledata_api_p_v1_singledata_unlink_post.py +172 -0
- fast_api_client/api/post_train/update_dataset_add_api_p_v1_dataset_update_dataset_uuid_post.py +188 -0
- fast_api_client/api/post_train/update_dataset_all_fields_api_p_v1_dataset_uuid_patch.py +188 -0
- fast_api_client/api/post_train/update_dataset_info_api_p_v1_dataset_update_post.py +172 -0
- fast_api_client/api/post_train/update_dataset_reduce_api_p_v1_dataset_reduce_dataset_uuid_post.py +188 -0
- fast_api_client/api/post_train/update_singledata_api_p_v1_singledata_uuid_patch.py +188 -0
- fast_api_client/api/post_train/update_singledata_tag_api_p_v1_singledata_tag_post.py +176 -0
- fast_api_client/api/post_train/update_upload_status_api_p_v1_singledata_upload_status_patch.py +176 -0
- fast_api_client/api/post_train/upload_singledata_api_p_v1_singledata_post.py +172 -0
- fast_api_client/api/post_train/upload_singledata_list_api_p_v1_singledata_list_post.py +172 -0
- fast_api_client/api/task_management/__init__.py +1 -0
- fast_api_client/api/task_management/create_project_api_p_v1_project_project_name_post.py +204 -0
- fast_api_client/api/task_management/create_rl_stage_api_p_v1_run_run_uuid_stage_rl_post.py +180 -0
- fast_api_client/api/task_management/create_run_api_p_v1_run_post.py +172 -0
- fast_api_client/api/task_management/delete_project_api_p_v1_project_uuid_delete.py +159 -0
- fast_api_client/api/task_management/delete_run_api_p_v1_run_uuid_delete.py +159 -0
- fast_api_client/api/task_management/delete_run_stage_api_p_v1_run_run_uuid_stage_stage_name_delete.py +181 -0
- fast_api_client/api/task_management/get_checkpoint_download_url_api_p_v1_run_checkpoint_download_post.py +172 -0
- fast_api_client/api/task_management/get_project_api_p_v1_project_uuid_get.py +159 -0
- fast_api_client/api/task_management/get_run_api_p_v1_run_unique_id_get.py +180 -0
- fast_api_client/api/task_management/get_run_log_info_api_p_v1_run_log_get.py +206 -0
- fast_api_client/api/task_management/get_run_stage_api_p_v1_run_run_uuid_stage_stage_name_get.py +173 -0
- fast_api_client/api/task_management/get_run_status_api_p_v1_run_status_uuid_get.py +159 -0
- fast_api_client/api/task_management/list_projects_api_p_v1_project_get.py +359 -0
- fast_api_client/api/task_management/list_runs_api_p_v1_run_get.py +399 -0
- fast_api_client/api/task_management/open_artifact_api_p_v1_run_artifact_open_post.py +164 -0
- fast_api_client/api/task_management/proxy_argo_log_api_p_v1_run_log_proxy_get.py +85 -0
- fast_api_client/api/task_management/resubmit_run_api_p_v1_run_resubmit_unique_id_post.py +180 -0
- fast_api_client/api/task_management/retry_run_api_p_v1_run_retry_unique_id_post.py +180 -0
- fast_api_client/api/task_management/stop_run_api_p_v1_run_stop_uuid_post.py +159 -0
- fast_api_client/api/task_management/trigger_model_convert_api_p_v1_run_model_convert_trigger_post.py +172 -0
- fast_api_client/api/task_management/update_project_api_p_v1_project_uuid_patch.py +180 -0
- fast_api_client/api/task_management/update_run_api_p_v1_run_unique_id_patch.py +200 -0
- fast_api_client/api/task_mapping/__init__.py +1 -0
- fast_api_client/api/task_mapping/create_task_mapping_api_p_v1_task_mapping_post.py +164 -0
- fast_api_client/api/task_mapping/delete_task_mapping_api_p_v1_task_mapping_task_id_delete.py +159 -0
- fast_api_client/api/task_mapping/get_task_mapping_api_p_v1_task_mapping_task_id_get.py +159 -0
- fast_api_client/api/task_mapping/list_task_mapping_patches_api_p_v1_task_mapping_task_id_patches_get.py +195 -0
- fast_api_client/api/task_mapping/list_task_mappings_api_p_v1_task_mapping_get.py +279 -0
- fast_api_client/api/task_mapping/update_task_mapping_api_p_v1_task_mapping_task_id_patch.py +180 -0
- fast_api_client/client.py +268 -0
- fast_api_client/errors.py +16 -0
- fast_api_client/models/__init__.py +121 -0
- fast_api_client/models/add_member_request.py +89 -0
- fast_api_client/models/artifact_item.py +251 -0
- fast_api_client/models/artifact_item_extra_info_type_0.py +45 -0
- fast_api_client/models/artifact_open_request.py +93 -0
- fast_api_client/models/body_download_singledata_list_api_pv1_singledata_download_get.py +61 -0
- fast_api_client/models/change_password_request.py +69 -0
- fast_api_client/models/checkpoint_download_request.py +69 -0
- fast_api_client/models/create_group_request.py +72 -0
- fast_api_client/models/create_platform_role_binding_request.py +69 -0
- fast_api_client/models/dataset_add_request.py +165 -0
- fast_api_client/models/dataset_create_request.py +253 -0
- fast_api_client/models/dataset_full_update_request.py +133 -0
- fast_api_client/models/dataset_reduce_request.py +84 -0
- fast_api_client/models/dataset_update_request.py +123 -0
- fast_api_client/models/forgot_password_request.py +61 -0
- fast_api_client/models/http_validation_error.py +79 -0
- fast_api_client/models/login_request.py +69 -0
- fast_api_client/models/logout_request.py +61 -0
- fast_api_client/models/model_convert_trigger_request.py +69 -0
- fast_api_client/models/patch_duplicate_batch_item_request.py +69 -0
- fast_api_client/models/patch_duplicate_batch_request.py +75 -0
- fast_api_client/models/patch_duplicate_check_request.py +69 -0
- fast_api_client/models/patch_episode_create_request.py +547 -0
- fast_api_client/models/patch_episode_create_request_lable_info.py +47 -0
- fast_api_client/models/patch_upload_create_request.py +94 -0
- fast_api_client/models/project_create_request.py +174 -0
- fast_api_client/models/project_create_request_default_configs.py +47 -0
- fast_api_client/models/project_update_request.py +175 -0
- fast_api_client/models/project_update_request_default_configs_type_0.py +45 -0
- fast_api_client/models/refresh_request.py +61 -0
- fast_api_client/models/reset_password_request.py +69 -0
- fast_api_client/models/rl_stage_create_request.py +75 -0
- fast_api_client/models/rl_stage_create_request_configs.py +47 -0
- fast_api_client/models/run_create_request.py +243 -0
- fast_api_client/models/run_create_request_configs.py +47 -0
- fast_api_client/models/run_update_request.py +533 -0
- fast_api_client/models/run_update_request_artifacts_type_0.py +45 -0
- fast_api_client/models/run_update_request_configs_type_0.py +45 -0
- fast_api_client/models/run_update_request_stages_type_0_item.py +45 -0
- fast_api_client/models/single_data_create_request.py +189 -0
- fast_api_client/models/single_data_link_request.py +69 -0
- fast_api_client/models/single_data_list_request.py +169 -0
- fast_api_client/models/single_data_tag_request.py +69 -0
- fast_api_client/models/single_data_trigger_request.py +61 -0
- fast_api_client/models/single_data_unlink_request.py +69 -0
- fast_api_client/models/single_data_update_request.py +775 -0
- fast_api_client/models/single_data_update_request_lable_info_type_0.py +45 -0
- fast_api_client/models/stage_artifact_append.py +85 -0
- fast_api_client/models/stage_artifact_append_category.py +10 -0
- fast_api_client/models/switch_group_request.py +61 -0
- fast_api_client/models/task_mapping_create_request.py +111 -0
- fast_api_client/models/task_mapping_update_request.py +93 -0
- fast_api_client/models/update_group_request.py +93 -0
- fast_api_client/models/update_member_request.py +61 -0
- fast_api_client/models/upload_status_request.py +69 -0
- fast_api_client/models/validation_error.py +123 -0
- fast_api_client/models/validation_error_context.py +45 -0
- fast_api_client/py.typed +1 -0
- fast_api_client/types.py +54 -0
- robodock_cli-0.1.0.dist-info/METADATA +97 -0
- robodock_cli-0.1.0.dist-info/RECORD +167 -0
- robodock_cli-0.1.0.dist-info/WHEEL +5 -0
- robodock_cli-0.1.0.dist-info/entry_points.txt +2 -0
- robodock_cli-0.1.0.dist-info/top_level.txt +4 -0
- sdk/__init__.py +1 -0
- sdk/client/__init__.py +1 -0
- sdk/client/auth.py +171 -0
- sdk/client/client.py +9 -0
- sdk/client/task_management.py +29 -0
- sdk/exception.py +95 -0
- sdk/utils/__init__.py +1 -0
- sdk/utils/downloader.py +267 -0
|
@@ -0,0 +1,174 @@
|
|
|
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.project_create_request_default_configs import ProjectCreateRequestDefaultConfigs
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
T = TypeVar("T", bound="ProjectCreateRequest")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
@_attrs_define
|
|
19
|
+
class ProjectCreateRequest:
|
|
20
|
+
"""
|
|
21
|
+
Attributes:
|
|
22
|
+
owner (str): 创建人
|
|
23
|
+
train_arc (str): 模型架构: Gr00t N1.6/Fii_FALCON_0/FII_FALCON_SMT
|
|
24
|
+
default_configs (ProjectCreateRequestDefaultConfigs): Default configurations including dataset
|
|
25
|
+
description (None | str | Unset): 项目描述
|
|
26
|
+
label (None | str | Unset): 标签
|
|
27
|
+
robot_type (None | str | Unset): 机器人类型: fii_w2/actibot/umi
|
|
28
|
+
first_run_name (str | Unset): Initial run name Default: 'first_run'.
|
|
29
|
+
extra_info (None | str | Unset): 额外信息
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
owner: str
|
|
33
|
+
train_arc: str
|
|
34
|
+
default_configs: ProjectCreateRequestDefaultConfigs
|
|
35
|
+
description: None | str | Unset = UNSET
|
|
36
|
+
label: None | str | Unset = UNSET
|
|
37
|
+
robot_type: None | str | Unset = UNSET
|
|
38
|
+
first_run_name: str | Unset = "first_run"
|
|
39
|
+
extra_info: None | str | Unset = UNSET
|
|
40
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
41
|
+
|
|
42
|
+
def to_dict(self) -> dict[str, Any]:
|
|
43
|
+
owner = self.owner
|
|
44
|
+
|
|
45
|
+
train_arc = self.train_arc
|
|
46
|
+
|
|
47
|
+
default_configs = self.default_configs.to_dict()
|
|
48
|
+
|
|
49
|
+
description: None | str | Unset
|
|
50
|
+
if isinstance(self.description, Unset):
|
|
51
|
+
description = UNSET
|
|
52
|
+
else:
|
|
53
|
+
description = self.description
|
|
54
|
+
|
|
55
|
+
label: None | str | Unset
|
|
56
|
+
if isinstance(self.label, Unset):
|
|
57
|
+
label = UNSET
|
|
58
|
+
else:
|
|
59
|
+
label = self.label
|
|
60
|
+
|
|
61
|
+
robot_type: None | str | Unset
|
|
62
|
+
if isinstance(self.robot_type, Unset):
|
|
63
|
+
robot_type = UNSET
|
|
64
|
+
else:
|
|
65
|
+
robot_type = self.robot_type
|
|
66
|
+
|
|
67
|
+
first_run_name = self.first_run_name
|
|
68
|
+
|
|
69
|
+
extra_info: None | str | Unset
|
|
70
|
+
if isinstance(self.extra_info, Unset):
|
|
71
|
+
extra_info = UNSET
|
|
72
|
+
else:
|
|
73
|
+
extra_info = self.extra_info
|
|
74
|
+
|
|
75
|
+
field_dict: dict[str, Any] = {}
|
|
76
|
+
field_dict.update(self.additional_properties)
|
|
77
|
+
field_dict.update(
|
|
78
|
+
{
|
|
79
|
+
"owner": owner,
|
|
80
|
+
"train_arc": train_arc,
|
|
81
|
+
"default_configs": default_configs,
|
|
82
|
+
}
|
|
83
|
+
)
|
|
84
|
+
if description is not UNSET:
|
|
85
|
+
field_dict["description"] = description
|
|
86
|
+
if label is not UNSET:
|
|
87
|
+
field_dict["label"] = label
|
|
88
|
+
if robot_type is not UNSET:
|
|
89
|
+
field_dict["robot_type"] = robot_type
|
|
90
|
+
if first_run_name is not UNSET:
|
|
91
|
+
field_dict["first_run_name"] = first_run_name
|
|
92
|
+
if extra_info is not UNSET:
|
|
93
|
+
field_dict["extra_info"] = extra_info
|
|
94
|
+
|
|
95
|
+
return field_dict
|
|
96
|
+
|
|
97
|
+
@classmethod
|
|
98
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
99
|
+
from ..models.project_create_request_default_configs import ProjectCreateRequestDefaultConfigs # noqa: PLC0415
|
|
100
|
+
|
|
101
|
+
d = dict(src_dict)
|
|
102
|
+
owner = d.pop("owner")
|
|
103
|
+
|
|
104
|
+
train_arc = d.pop("train_arc")
|
|
105
|
+
|
|
106
|
+
default_configs = ProjectCreateRequestDefaultConfigs.from_dict(d.pop("default_configs"))
|
|
107
|
+
|
|
108
|
+
def _parse_description(data: object) -> None | str | Unset:
|
|
109
|
+
if data is None:
|
|
110
|
+
return data
|
|
111
|
+
if isinstance(data, Unset):
|
|
112
|
+
return data
|
|
113
|
+
return cast(None | str | Unset, data)
|
|
114
|
+
|
|
115
|
+
description = _parse_description(d.pop("description", UNSET))
|
|
116
|
+
|
|
117
|
+
def _parse_label(data: object) -> None | str | Unset:
|
|
118
|
+
if data is None:
|
|
119
|
+
return data
|
|
120
|
+
if isinstance(data, Unset):
|
|
121
|
+
return data
|
|
122
|
+
return cast(None | str | Unset, data)
|
|
123
|
+
|
|
124
|
+
label = _parse_label(d.pop("label", UNSET))
|
|
125
|
+
|
|
126
|
+
def _parse_robot_type(data: object) -> None | str | Unset:
|
|
127
|
+
if data is None:
|
|
128
|
+
return data
|
|
129
|
+
if isinstance(data, Unset):
|
|
130
|
+
return data
|
|
131
|
+
return cast(None | str | Unset, data)
|
|
132
|
+
|
|
133
|
+
robot_type = _parse_robot_type(d.pop("robot_type", UNSET))
|
|
134
|
+
|
|
135
|
+
first_run_name = d.pop("first_run_name", UNSET)
|
|
136
|
+
|
|
137
|
+
def _parse_extra_info(data: object) -> None | str | Unset:
|
|
138
|
+
if data is None:
|
|
139
|
+
return data
|
|
140
|
+
if isinstance(data, Unset):
|
|
141
|
+
return data
|
|
142
|
+
return cast(None | str | Unset, data)
|
|
143
|
+
|
|
144
|
+
extra_info = _parse_extra_info(d.pop("extra_info", UNSET))
|
|
145
|
+
|
|
146
|
+
project_create_request = cls(
|
|
147
|
+
owner=owner,
|
|
148
|
+
train_arc=train_arc,
|
|
149
|
+
default_configs=default_configs,
|
|
150
|
+
description=description,
|
|
151
|
+
label=label,
|
|
152
|
+
robot_type=robot_type,
|
|
153
|
+
first_run_name=first_run_name,
|
|
154
|
+
extra_info=extra_info,
|
|
155
|
+
)
|
|
156
|
+
|
|
157
|
+
project_create_request.additional_properties = d
|
|
158
|
+
return project_create_request
|
|
159
|
+
|
|
160
|
+
@property
|
|
161
|
+
def additional_keys(self) -> list[str]:
|
|
162
|
+
return list(self.additional_properties.keys())
|
|
163
|
+
|
|
164
|
+
def __getitem__(self, key: str) -> Any:
|
|
165
|
+
return self.additional_properties[key]
|
|
166
|
+
|
|
167
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
168
|
+
self.additional_properties[key] = value
|
|
169
|
+
|
|
170
|
+
def __delitem__(self, key: str) -> None:
|
|
171
|
+
del self.additional_properties[key]
|
|
172
|
+
|
|
173
|
+
def __contains__(self, key: str) -> bool:
|
|
174
|
+
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="ProjectCreateRequestDefaultConfigs")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class ProjectCreateRequestDefaultConfigs:
|
|
14
|
+
"""Default configurations including dataset"""
|
|
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
|
+
project_create_request_default_configs = cls()
|
|
29
|
+
|
|
30
|
+
project_create_request_default_configs.additional_properties = d
|
|
31
|
+
return project_create_request_default_configs
|
|
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,175 @@
|
|
|
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.project_update_request_default_configs_type_0 import ProjectUpdateRequestDefaultConfigsType0
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
T = TypeVar("T", bound="ProjectUpdateRequest")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
@_attrs_define
|
|
19
|
+
class ProjectUpdateRequest:
|
|
20
|
+
"""
|
|
21
|
+
Attributes:
|
|
22
|
+
description (None | str | Unset):
|
|
23
|
+
label (None | str | Unset):
|
|
24
|
+
train_arc (None | str | Unset):
|
|
25
|
+
robot_type (None | str | Unset):
|
|
26
|
+
default_configs (None | ProjectUpdateRequestDefaultConfigsType0 | Unset):
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
description: None | str | Unset = UNSET
|
|
30
|
+
label: None | str | Unset = UNSET
|
|
31
|
+
train_arc: None | str | Unset = UNSET
|
|
32
|
+
robot_type: None | str | Unset = UNSET
|
|
33
|
+
default_configs: None | ProjectUpdateRequestDefaultConfigsType0 | Unset = UNSET
|
|
34
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
35
|
+
|
|
36
|
+
def to_dict(self) -> dict[str, Any]:
|
|
37
|
+
from ..models.project_update_request_default_configs_type_0 import (
|
|
38
|
+
ProjectUpdateRequestDefaultConfigsType0, # noqa: PLC0415
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
description: None | str | Unset
|
|
42
|
+
if isinstance(self.description, Unset):
|
|
43
|
+
description = UNSET
|
|
44
|
+
else:
|
|
45
|
+
description = self.description
|
|
46
|
+
|
|
47
|
+
label: None | str | Unset
|
|
48
|
+
if isinstance(self.label, Unset):
|
|
49
|
+
label = UNSET
|
|
50
|
+
else:
|
|
51
|
+
label = self.label
|
|
52
|
+
|
|
53
|
+
train_arc: None | str | Unset
|
|
54
|
+
if isinstance(self.train_arc, Unset):
|
|
55
|
+
train_arc = UNSET
|
|
56
|
+
else:
|
|
57
|
+
train_arc = self.train_arc
|
|
58
|
+
|
|
59
|
+
robot_type: None | str | Unset
|
|
60
|
+
if isinstance(self.robot_type, Unset):
|
|
61
|
+
robot_type = UNSET
|
|
62
|
+
else:
|
|
63
|
+
robot_type = self.robot_type
|
|
64
|
+
|
|
65
|
+
default_configs: dict[str, Any] | None | Unset
|
|
66
|
+
if isinstance(self.default_configs, Unset):
|
|
67
|
+
default_configs = UNSET
|
|
68
|
+
elif isinstance(self.default_configs, ProjectUpdateRequestDefaultConfigsType0):
|
|
69
|
+
default_configs = self.default_configs.to_dict()
|
|
70
|
+
else:
|
|
71
|
+
default_configs = self.default_configs
|
|
72
|
+
|
|
73
|
+
field_dict: dict[str, Any] = {}
|
|
74
|
+
field_dict.update(self.additional_properties)
|
|
75
|
+
field_dict.update({})
|
|
76
|
+
if description is not UNSET:
|
|
77
|
+
field_dict["description"] = description
|
|
78
|
+
if label is not UNSET:
|
|
79
|
+
field_dict["label"] = label
|
|
80
|
+
if train_arc is not UNSET:
|
|
81
|
+
field_dict["train_arc"] = train_arc
|
|
82
|
+
if robot_type is not UNSET:
|
|
83
|
+
field_dict["robot_type"] = robot_type
|
|
84
|
+
if default_configs is not UNSET:
|
|
85
|
+
field_dict["default_configs"] = default_configs
|
|
86
|
+
|
|
87
|
+
return field_dict
|
|
88
|
+
|
|
89
|
+
@classmethod
|
|
90
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
91
|
+
from ..models.project_update_request_default_configs_type_0 import (
|
|
92
|
+
ProjectUpdateRequestDefaultConfigsType0, # noqa: PLC0415
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
d = dict(src_dict)
|
|
96
|
+
|
|
97
|
+
def _parse_description(data: object) -> None | str | Unset:
|
|
98
|
+
if data is None:
|
|
99
|
+
return data
|
|
100
|
+
if isinstance(data, Unset):
|
|
101
|
+
return data
|
|
102
|
+
return cast(None | str | Unset, data)
|
|
103
|
+
|
|
104
|
+
description = _parse_description(d.pop("description", UNSET))
|
|
105
|
+
|
|
106
|
+
def _parse_label(data: object) -> None | str | Unset:
|
|
107
|
+
if data is None:
|
|
108
|
+
return data
|
|
109
|
+
if isinstance(data, Unset):
|
|
110
|
+
return data
|
|
111
|
+
return cast(None | str | Unset, data)
|
|
112
|
+
|
|
113
|
+
label = _parse_label(d.pop("label", UNSET))
|
|
114
|
+
|
|
115
|
+
def _parse_train_arc(data: object) -> None | str | Unset:
|
|
116
|
+
if data is None:
|
|
117
|
+
return data
|
|
118
|
+
if isinstance(data, Unset):
|
|
119
|
+
return data
|
|
120
|
+
return cast(None | str | Unset, data)
|
|
121
|
+
|
|
122
|
+
train_arc = _parse_train_arc(d.pop("train_arc", UNSET))
|
|
123
|
+
|
|
124
|
+
def _parse_robot_type(data: object) -> None | str | Unset:
|
|
125
|
+
if data is None:
|
|
126
|
+
return data
|
|
127
|
+
if isinstance(data, Unset):
|
|
128
|
+
return data
|
|
129
|
+
return cast(None | str | Unset, data)
|
|
130
|
+
|
|
131
|
+
robot_type = _parse_robot_type(d.pop("robot_type", UNSET))
|
|
132
|
+
|
|
133
|
+
def _parse_default_configs(data: object) -> None | ProjectUpdateRequestDefaultConfigsType0 | Unset:
|
|
134
|
+
if data is None:
|
|
135
|
+
return data
|
|
136
|
+
if isinstance(data, Unset):
|
|
137
|
+
return data
|
|
138
|
+
try:
|
|
139
|
+
if not isinstance(data, dict):
|
|
140
|
+
raise TypeError()
|
|
141
|
+
default_configs_type_0 = ProjectUpdateRequestDefaultConfigsType0.from_dict(data)
|
|
142
|
+
|
|
143
|
+
return default_configs_type_0
|
|
144
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
145
|
+
pass
|
|
146
|
+
return cast(None | ProjectUpdateRequestDefaultConfigsType0 | Unset, data)
|
|
147
|
+
|
|
148
|
+
default_configs = _parse_default_configs(d.pop("default_configs", UNSET))
|
|
149
|
+
|
|
150
|
+
project_update_request = cls(
|
|
151
|
+
description=description,
|
|
152
|
+
label=label,
|
|
153
|
+
train_arc=train_arc,
|
|
154
|
+
robot_type=robot_type,
|
|
155
|
+
default_configs=default_configs,
|
|
156
|
+
)
|
|
157
|
+
|
|
158
|
+
project_update_request.additional_properties = d
|
|
159
|
+
return project_update_request
|
|
160
|
+
|
|
161
|
+
@property
|
|
162
|
+
def additional_keys(self) -> list[str]:
|
|
163
|
+
return list(self.additional_properties.keys())
|
|
164
|
+
|
|
165
|
+
def __getitem__(self, key: str) -> Any:
|
|
166
|
+
return self.additional_properties[key]
|
|
167
|
+
|
|
168
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
169
|
+
self.additional_properties[key] = value
|
|
170
|
+
|
|
171
|
+
def __delitem__(self, key: str) -> None:
|
|
172
|
+
del self.additional_properties[key]
|
|
173
|
+
|
|
174
|
+
def __contains__(self, key: str) -> bool:
|
|
175
|
+
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="ProjectUpdateRequestDefaultConfigsType0")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class ProjectUpdateRequestDefaultConfigsType0:
|
|
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
|
+
project_update_request_default_configs_type_0 = cls()
|
|
27
|
+
|
|
28
|
+
project_update_request_default_configs_type_0.additional_properties = d
|
|
29
|
+
return project_update_request_default_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,61 @@
|
|
|
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="RefreshRequest")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class RefreshRequest:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
refresh_token (str):
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
refresh_token: str
|
|
20
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
21
|
+
|
|
22
|
+
def to_dict(self) -> dict[str, Any]:
|
|
23
|
+
refresh_token = self.refresh_token
|
|
24
|
+
|
|
25
|
+
field_dict: dict[str, Any] = {}
|
|
26
|
+
field_dict.update(self.additional_properties)
|
|
27
|
+
field_dict.update(
|
|
28
|
+
{
|
|
29
|
+
"refresh_token": refresh_token,
|
|
30
|
+
}
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
return field_dict
|
|
34
|
+
|
|
35
|
+
@classmethod
|
|
36
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
37
|
+
d = dict(src_dict)
|
|
38
|
+
refresh_token = d.pop("refresh_token")
|
|
39
|
+
|
|
40
|
+
refresh_request = cls(
|
|
41
|
+
refresh_token=refresh_token,
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
refresh_request.additional_properties = d
|
|
45
|
+
return refresh_request
|
|
46
|
+
|
|
47
|
+
@property
|
|
48
|
+
def additional_keys(self) -> list[str]:
|
|
49
|
+
return list(self.additional_properties.keys())
|
|
50
|
+
|
|
51
|
+
def __getitem__(self, key: str) -> Any:
|
|
52
|
+
return self.additional_properties[key]
|
|
53
|
+
|
|
54
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
55
|
+
self.additional_properties[key] = value
|
|
56
|
+
|
|
57
|
+
def __delitem__(self, key: str) -> None:
|
|
58
|
+
del self.additional_properties[key]
|
|
59
|
+
|
|
60
|
+
def __contains__(self, key: str) -> bool:
|
|
61
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,69 @@
|
|
|
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="ResetPasswordRequest")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class ResetPasswordRequest:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
token (str):
|
|
17
|
+
new_password (str):
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
token: str
|
|
21
|
+
new_password: str
|
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
23
|
+
|
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
|
25
|
+
token = self.token
|
|
26
|
+
|
|
27
|
+
new_password = self.new_password
|
|
28
|
+
|
|
29
|
+
field_dict: dict[str, Any] = {}
|
|
30
|
+
field_dict.update(self.additional_properties)
|
|
31
|
+
field_dict.update(
|
|
32
|
+
{
|
|
33
|
+
"token": token,
|
|
34
|
+
"new_password": new_password,
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
return field_dict
|
|
39
|
+
|
|
40
|
+
@classmethod
|
|
41
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
42
|
+
d = dict(src_dict)
|
|
43
|
+
token = d.pop("token")
|
|
44
|
+
|
|
45
|
+
new_password = d.pop("new_password")
|
|
46
|
+
|
|
47
|
+
reset_password_request = cls(
|
|
48
|
+
token=token,
|
|
49
|
+
new_password=new_password,
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
reset_password_request.additional_properties = d
|
|
53
|
+
return reset_password_request
|
|
54
|
+
|
|
55
|
+
@property
|
|
56
|
+
def additional_keys(self) -> list[str]:
|
|
57
|
+
return list(self.additional_properties.keys())
|
|
58
|
+
|
|
59
|
+
def __getitem__(self, key: str) -> Any:
|
|
60
|
+
return self.additional_properties[key]
|
|
61
|
+
|
|
62
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
63
|
+
self.additional_properties[key] = value
|
|
64
|
+
|
|
65
|
+
def __delitem__(self, key: str) -> None:
|
|
66
|
+
del self.additional_properties[key]
|
|
67
|
+
|
|
68
|
+
def __contains__(self, key: str) -> bool:
|
|
69
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,75 @@
|
|
|
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
|
+
if TYPE_CHECKING:
|
|
10
|
+
from ..models.rl_stage_create_request_configs import RLStageCreateRequestConfigs
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
T = TypeVar("T", bound="RLStageCreateRequest")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@_attrs_define
|
|
17
|
+
class RLStageCreateRequest:
|
|
18
|
+
"""
|
|
19
|
+
Attributes:
|
|
20
|
+
checkpoint_path (str): 用于发起 RL 的 SFT checkpoint path
|
|
21
|
+
configs (RLStageCreateRequestConfigs): RL stage configurations
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
checkpoint_path: str
|
|
25
|
+
configs: RLStageCreateRequestConfigs
|
|
26
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
27
|
+
|
|
28
|
+
def to_dict(self) -> dict[str, Any]:
|
|
29
|
+
checkpoint_path = self.checkpoint_path
|
|
30
|
+
|
|
31
|
+
configs = self.configs.to_dict()
|
|
32
|
+
|
|
33
|
+
field_dict: dict[str, Any] = {}
|
|
34
|
+
field_dict.update(self.additional_properties)
|
|
35
|
+
field_dict.update(
|
|
36
|
+
{
|
|
37
|
+
"checkpoint_path": checkpoint_path,
|
|
38
|
+
"configs": configs,
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
return field_dict
|
|
43
|
+
|
|
44
|
+
@classmethod
|
|
45
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
46
|
+
from ..models.rl_stage_create_request_configs import RLStageCreateRequestConfigs # noqa: PLC0415
|
|
47
|
+
|
|
48
|
+
d = dict(src_dict)
|
|
49
|
+
checkpoint_path = d.pop("checkpoint_path")
|
|
50
|
+
|
|
51
|
+
configs = RLStageCreateRequestConfigs.from_dict(d.pop("configs"))
|
|
52
|
+
|
|
53
|
+
rl_stage_create_request = cls(
|
|
54
|
+
checkpoint_path=checkpoint_path,
|
|
55
|
+
configs=configs,
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
rl_stage_create_request.additional_properties = d
|
|
59
|
+
return rl_stage_create_request
|
|
60
|
+
|
|
61
|
+
@property
|
|
62
|
+
def additional_keys(self) -> list[str]:
|
|
63
|
+
return list(self.additional_properties.keys())
|
|
64
|
+
|
|
65
|
+
def __getitem__(self, key: str) -> Any:
|
|
66
|
+
return self.additional_properties[key]
|
|
67
|
+
|
|
68
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
69
|
+
self.additional_properties[key] = value
|
|
70
|
+
|
|
71
|
+
def __delitem__(self, key: str) -> None:
|
|
72
|
+
del self.additional_properties[key]
|
|
73
|
+
|
|
74
|
+
def __contains__(self, key: str) -> bool:
|
|
75
|
+
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="RLStageCreateRequestConfigs")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class RLStageCreateRequestConfigs:
|
|
14
|
+
"""RL stage configurations"""
|
|
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
|
+
rl_stage_create_request_configs = cls()
|
|
29
|
+
|
|
30
|
+
rl_stage_create_request_configs.additional_properties = d
|
|
31
|
+
return rl_stage_create_request_configs
|
|
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
|