rapidata 2.15.0__py3-none-any.whl → 2.16.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.
Potentially problematic release.
This version of rapidata might be problematic. Click here for more details.
- rapidata/api_client/__init__.py +17 -7
- rapidata/api_client/api/__init__.py +2 -1
- rapidata/api_client/api/campaign_api.py +554 -30
- rapidata/api_client/api/client_api.py +292 -20
- rapidata/api_client/api/coco_api.py +594 -8
- rapidata/api_client/api/compare_workflow_api.py +23 -23
- rapidata/api_client/api/datapoint_api.py +548 -26
- rapidata/api_client/api/dataset_api.py +2198 -186
- rapidata/api_client/api/feedback_api.py +306 -0
- rapidata/api_client/api/identity_api.py +1143 -78
- rapidata/api_client/api/newsletter_api.py +299 -11
- rapidata/api_client/api/order_api.py +5358 -556
- rapidata/api_client/api/pipeline_api.py +263 -524
- rapidata/api_client/api/rapid_api.py +1930 -254
- rapidata/api_client/api/simple_workflow_api.py +23 -23
- rapidata/api_client/api/validation_set_api.py +5259 -0
- rapidata/api_client/api/workflow_api.py +929 -134
- rapidata/api_client/models/__init__.py +15 -6
- rapidata/api_client/models/ab_test_selection_a_inner.py +24 -10
- rapidata/api_client/models/add_user_response_result.py +106 -0
- rapidata/api_client/models/add_user_response_result_validation_truth.py +258 -0
- rapidata/api_client/models/add_validation_rapid_model.py +3 -3
- rapidata/api_client/models/add_validation_text_rapid_model.py +3 -3
- rapidata/api_client/models/are_rapids_active_result.py +87 -0
- rapidata/api_client/models/compare_workflow_model.py +3 -3
- rapidata/api_client/models/create_datapoint_from_files_model.py +102 -0
- rapidata/api_client/models/create_datapoint_from_files_model_metadata_inner.py +168 -0
- rapidata/api_client/models/create_datapoint_from_text_sources_model.py +109 -0
- rapidata/api_client/models/create_datapoint_from_urls_model.py +4 -4
- rapidata/api_client/models/create_datapoints_from_s3_bucket_model.py +124 -0
- rapidata/api_client/models/create_rapid_result.py +87 -0
- rapidata/api_client/models/create_validation_set_model.py +87 -0
- rapidata/api_client/models/datapoint_metadata_model.py +3 -3
- rapidata/api_client/models/get_validation_rapids_query.py +123 -0
- rapidata/api_client/models/get_validation_rapids_query_paged_result.py +105 -0
- rapidata/api_client/models/pipeline_id_workflow_artifact_id_put_request.py +140 -0
- rapidata/api_client/models/query_validation_rapids_result.py +3 -3
- rapidata/api_client/models/rapid_issue.py +4 -0
- rapidata/api_client/models/report_model.py +4 -4
- rapidata/api_client/models/shuffling_selection.py +106 -0
- rapidata/api_client/models/update_dataset_name_model.py +87 -0
- rapidata/api_client/models/update_order_name_model.py +87 -0
- rapidata/api_client/models/upload_text_sources_to_dataset_model.py +3 -3
- rapidata/api_client/models/user_score_user_filter_model.py +9 -2
- rapidata/api_client_README.md +153 -88
- rapidata/rapidata_client/demographic/demographic_manager.py +1 -1
- rapidata/rapidata_client/filter/user_score_filter.py +4 -1
- rapidata/rapidata_client/order/_rapidata_dataset.py +10 -11
- rapidata/rapidata_client/order/_rapidata_order_builder.py +1 -1
- rapidata/rapidata_client/order/rapidata_order.py +5 -5
- rapidata/rapidata_client/order/rapidata_order_manager.py +1 -1
- rapidata/rapidata_client/order/rapidata_results.py +1 -1
- rapidata/rapidata_client/validation/rapidata_validation_set.py +11 -0
- rapidata/rapidata_client/validation/rapids/rapids.py +3 -5
- rapidata/rapidata_client/validation/validation_set_manager.py +36 -21
- rapidata/rapidata_client/workflow/_ranking_workflow.py +2 -2
- {rapidata-2.15.0.dist-info → rapidata-2.16.0.dist-info}/METADATA +1 -1
- {rapidata-2.15.0.dist-info → rapidata-2.16.0.dist-info}/RECORD +60 -43
- {rapidata-2.15.0.dist-info → rapidata-2.16.0.dist-info}/LICENSE +0 -0
- {rapidata-2.15.0.dist-info → rapidata-2.16.0.dist-info}/WHEEL +0 -0
|
@@ -41,6 +41,586 @@ class CocoApi:
|
|
|
41
41
|
self.api_client = api_client
|
|
42
42
|
|
|
43
43
|
|
|
44
|
+
@validate_call
|
|
45
|
+
def coco_coco_set_id_submit_post(
|
|
46
|
+
self,
|
|
47
|
+
coco_set_id: Annotated[StrictStr, Field(description="The ID of the CoCo set to use for validation.")],
|
|
48
|
+
submit_coco_model: Annotated[Optional[SubmitCocoModel], Field(description="The model containing the information needed to create the validation set.")] = None,
|
|
49
|
+
_request_timeout: Union[
|
|
50
|
+
None,
|
|
51
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
52
|
+
Tuple[
|
|
53
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
54
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
55
|
+
]
|
|
56
|
+
] = None,
|
|
57
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
58
|
+
_content_type: Optional[StrictStr] = None,
|
|
59
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
60
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
61
|
+
) -> SubmitCocoResult:
|
|
62
|
+
"""Creates a new validation set based on a previously uploaded CoCo set.
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
:param coco_set_id: The ID of the CoCo set to use for validation. (required)
|
|
66
|
+
:type coco_set_id: str
|
|
67
|
+
:param submit_coco_model: The model containing the information needed to create the validation set.
|
|
68
|
+
:type submit_coco_model: SubmitCocoModel
|
|
69
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
70
|
+
number provided, it will be total request
|
|
71
|
+
timeout. It can also be a pair (tuple) of
|
|
72
|
+
(connection, read) timeouts.
|
|
73
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
74
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
75
|
+
request; this effectively ignores the
|
|
76
|
+
authentication in the spec for a single request.
|
|
77
|
+
:type _request_auth: dict, optional
|
|
78
|
+
:param _content_type: force content-type for the request.
|
|
79
|
+
:type _content_type: str, Optional
|
|
80
|
+
:param _headers: set to override the headers for a single
|
|
81
|
+
request; this effectively ignores the headers
|
|
82
|
+
in the spec for a single request.
|
|
83
|
+
:type _headers: dict, optional
|
|
84
|
+
:param _host_index: set to override the host_index for a single
|
|
85
|
+
request; this effectively ignores the host_index
|
|
86
|
+
in the spec for a single request.
|
|
87
|
+
:type _host_index: int, optional
|
|
88
|
+
:return: Returns the result object.
|
|
89
|
+
""" # noqa: E501
|
|
90
|
+
|
|
91
|
+
_param = self._coco_coco_set_id_submit_post_serialize(
|
|
92
|
+
coco_set_id=coco_set_id,
|
|
93
|
+
submit_coco_model=submit_coco_model,
|
|
94
|
+
_request_auth=_request_auth,
|
|
95
|
+
_content_type=_content_type,
|
|
96
|
+
_headers=_headers,
|
|
97
|
+
_host_index=_host_index
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
101
|
+
'200': "SubmitCocoResult",
|
|
102
|
+
}
|
|
103
|
+
response_data = self.api_client.call_api(
|
|
104
|
+
*_param,
|
|
105
|
+
_request_timeout=_request_timeout
|
|
106
|
+
)
|
|
107
|
+
response_data.read()
|
|
108
|
+
return self.api_client.response_deserialize(
|
|
109
|
+
response_data=response_data,
|
|
110
|
+
response_types_map=_response_types_map,
|
|
111
|
+
).data
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
@validate_call
|
|
115
|
+
def coco_coco_set_id_submit_post_with_http_info(
|
|
116
|
+
self,
|
|
117
|
+
coco_set_id: Annotated[StrictStr, Field(description="The ID of the CoCo set to use for validation.")],
|
|
118
|
+
submit_coco_model: Annotated[Optional[SubmitCocoModel], Field(description="The model containing the information needed to create the validation set.")] = None,
|
|
119
|
+
_request_timeout: Union[
|
|
120
|
+
None,
|
|
121
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
122
|
+
Tuple[
|
|
123
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
124
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
125
|
+
]
|
|
126
|
+
] = None,
|
|
127
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
128
|
+
_content_type: Optional[StrictStr] = None,
|
|
129
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
130
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
131
|
+
) -> ApiResponse[SubmitCocoResult]:
|
|
132
|
+
"""Creates a new validation set based on a previously uploaded CoCo set.
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
:param coco_set_id: The ID of the CoCo set to use for validation. (required)
|
|
136
|
+
:type coco_set_id: str
|
|
137
|
+
:param submit_coco_model: The model containing the information needed to create the validation set.
|
|
138
|
+
:type submit_coco_model: SubmitCocoModel
|
|
139
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
140
|
+
number provided, it will be total request
|
|
141
|
+
timeout. It can also be a pair (tuple) of
|
|
142
|
+
(connection, read) timeouts.
|
|
143
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
144
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
145
|
+
request; this effectively ignores the
|
|
146
|
+
authentication in the spec for a single request.
|
|
147
|
+
:type _request_auth: dict, optional
|
|
148
|
+
:param _content_type: force content-type for the request.
|
|
149
|
+
:type _content_type: str, Optional
|
|
150
|
+
:param _headers: set to override the headers for a single
|
|
151
|
+
request; this effectively ignores the headers
|
|
152
|
+
in the spec for a single request.
|
|
153
|
+
:type _headers: dict, optional
|
|
154
|
+
:param _host_index: set to override the host_index for a single
|
|
155
|
+
request; this effectively ignores the host_index
|
|
156
|
+
in the spec for a single request.
|
|
157
|
+
:type _host_index: int, optional
|
|
158
|
+
:return: Returns the result object.
|
|
159
|
+
""" # noqa: E501
|
|
160
|
+
|
|
161
|
+
_param = self._coco_coco_set_id_submit_post_serialize(
|
|
162
|
+
coco_set_id=coco_set_id,
|
|
163
|
+
submit_coco_model=submit_coco_model,
|
|
164
|
+
_request_auth=_request_auth,
|
|
165
|
+
_content_type=_content_type,
|
|
166
|
+
_headers=_headers,
|
|
167
|
+
_host_index=_host_index
|
|
168
|
+
)
|
|
169
|
+
|
|
170
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
171
|
+
'200': "SubmitCocoResult",
|
|
172
|
+
}
|
|
173
|
+
response_data = self.api_client.call_api(
|
|
174
|
+
*_param,
|
|
175
|
+
_request_timeout=_request_timeout
|
|
176
|
+
)
|
|
177
|
+
response_data.read()
|
|
178
|
+
return self.api_client.response_deserialize(
|
|
179
|
+
response_data=response_data,
|
|
180
|
+
response_types_map=_response_types_map,
|
|
181
|
+
)
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
@validate_call
|
|
185
|
+
def coco_coco_set_id_submit_post_without_preload_content(
|
|
186
|
+
self,
|
|
187
|
+
coco_set_id: Annotated[StrictStr, Field(description="The ID of the CoCo set to use for validation.")],
|
|
188
|
+
submit_coco_model: Annotated[Optional[SubmitCocoModel], Field(description="The model containing the information needed to create the validation set.")] = None,
|
|
189
|
+
_request_timeout: Union[
|
|
190
|
+
None,
|
|
191
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
192
|
+
Tuple[
|
|
193
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
194
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
195
|
+
]
|
|
196
|
+
] = None,
|
|
197
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
198
|
+
_content_type: Optional[StrictStr] = None,
|
|
199
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
200
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
201
|
+
) -> RESTResponseType:
|
|
202
|
+
"""Creates a new validation set based on a previously uploaded CoCo set.
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
:param coco_set_id: The ID of the CoCo set to use for validation. (required)
|
|
206
|
+
:type coco_set_id: str
|
|
207
|
+
:param submit_coco_model: The model containing the information needed to create the validation set.
|
|
208
|
+
:type submit_coco_model: SubmitCocoModel
|
|
209
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
210
|
+
number provided, it will be total request
|
|
211
|
+
timeout. It can also be a pair (tuple) of
|
|
212
|
+
(connection, read) timeouts.
|
|
213
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
214
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
215
|
+
request; this effectively ignores the
|
|
216
|
+
authentication in the spec for a single request.
|
|
217
|
+
:type _request_auth: dict, optional
|
|
218
|
+
:param _content_type: force content-type for the request.
|
|
219
|
+
:type _content_type: str, Optional
|
|
220
|
+
:param _headers: set to override the headers for a single
|
|
221
|
+
request; this effectively ignores the headers
|
|
222
|
+
in the spec for a single request.
|
|
223
|
+
:type _headers: dict, optional
|
|
224
|
+
:param _host_index: set to override the host_index for a single
|
|
225
|
+
request; this effectively ignores the host_index
|
|
226
|
+
in the spec for a single request.
|
|
227
|
+
:type _host_index: int, optional
|
|
228
|
+
:return: Returns the result object.
|
|
229
|
+
""" # noqa: E501
|
|
230
|
+
|
|
231
|
+
_param = self._coco_coco_set_id_submit_post_serialize(
|
|
232
|
+
coco_set_id=coco_set_id,
|
|
233
|
+
submit_coco_model=submit_coco_model,
|
|
234
|
+
_request_auth=_request_auth,
|
|
235
|
+
_content_type=_content_type,
|
|
236
|
+
_headers=_headers,
|
|
237
|
+
_host_index=_host_index
|
|
238
|
+
)
|
|
239
|
+
|
|
240
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
241
|
+
'200': "SubmitCocoResult",
|
|
242
|
+
}
|
|
243
|
+
response_data = self.api_client.call_api(
|
|
244
|
+
*_param,
|
|
245
|
+
_request_timeout=_request_timeout
|
|
246
|
+
)
|
|
247
|
+
return response_data.response
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
def _coco_coco_set_id_submit_post_serialize(
|
|
251
|
+
self,
|
|
252
|
+
coco_set_id,
|
|
253
|
+
submit_coco_model,
|
|
254
|
+
_request_auth,
|
|
255
|
+
_content_type,
|
|
256
|
+
_headers,
|
|
257
|
+
_host_index,
|
|
258
|
+
) -> RequestSerialized:
|
|
259
|
+
|
|
260
|
+
_host = None
|
|
261
|
+
|
|
262
|
+
_collection_formats: Dict[str, str] = {
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
_path_params: Dict[str, str] = {}
|
|
266
|
+
_query_params: List[Tuple[str, str]] = []
|
|
267
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
268
|
+
_form_params: List[Tuple[str, str]] = []
|
|
269
|
+
_files: Dict[
|
|
270
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
271
|
+
] = {}
|
|
272
|
+
_body_params: Optional[bytes] = None
|
|
273
|
+
|
|
274
|
+
# process the path parameters
|
|
275
|
+
if coco_set_id is not None:
|
|
276
|
+
_path_params['cocoSetId'] = coco_set_id
|
|
277
|
+
# process the query parameters
|
|
278
|
+
# process the header parameters
|
|
279
|
+
# process the form parameters
|
|
280
|
+
# process the body parameter
|
|
281
|
+
if submit_coco_model is not None:
|
|
282
|
+
_body_params = submit_coco_model
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
# set the HTTP header `Accept`
|
|
286
|
+
if 'Accept' not in _header_params:
|
|
287
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
288
|
+
[
|
|
289
|
+
'text/plain',
|
|
290
|
+
'application/json',
|
|
291
|
+
'text/json'
|
|
292
|
+
]
|
|
293
|
+
)
|
|
294
|
+
|
|
295
|
+
# set the HTTP header `Content-Type`
|
|
296
|
+
if _content_type:
|
|
297
|
+
_header_params['Content-Type'] = _content_type
|
|
298
|
+
else:
|
|
299
|
+
_default_content_type = (
|
|
300
|
+
self.api_client.select_header_content_type(
|
|
301
|
+
[
|
|
302
|
+
'application/json',
|
|
303
|
+
'text/json',
|
|
304
|
+
'application/*+json'
|
|
305
|
+
]
|
|
306
|
+
)
|
|
307
|
+
)
|
|
308
|
+
if _default_content_type is not None:
|
|
309
|
+
_header_params['Content-Type'] = _default_content_type
|
|
310
|
+
|
|
311
|
+
# authentication setting
|
|
312
|
+
_auth_settings: List[str] = [
|
|
313
|
+
'bearer',
|
|
314
|
+
'oauth2'
|
|
315
|
+
]
|
|
316
|
+
|
|
317
|
+
return self.api_client.param_serialize(
|
|
318
|
+
method='POST',
|
|
319
|
+
resource_path='/coco/{cocoSetId}/submit',
|
|
320
|
+
path_params=_path_params,
|
|
321
|
+
query_params=_query_params,
|
|
322
|
+
header_params=_header_params,
|
|
323
|
+
body=_body_params,
|
|
324
|
+
post_params=_form_params,
|
|
325
|
+
files=_files,
|
|
326
|
+
auth_settings=_auth_settings,
|
|
327
|
+
collection_formats=_collection_formats,
|
|
328
|
+
_host=_host,
|
|
329
|
+
_request_auth=_request_auth
|
|
330
|
+
)
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
@validate_call
|
|
336
|
+
def coco_post(
|
|
337
|
+
self,
|
|
338
|
+
name: Optional[StrictStr] = None,
|
|
339
|
+
title: Optional[StrictStr] = None,
|
|
340
|
+
_request_timeout: Union[
|
|
341
|
+
None,
|
|
342
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
343
|
+
Tuple[
|
|
344
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
345
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
346
|
+
]
|
|
347
|
+
] = None,
|
|
348
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
349
|
+
_content_type: Optional[StrictStr] = None,
|
|
350
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
351
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
352
|
+
) -> UploadCocoResult:
|
|
353
|
+
"""Uploads a CoCo set to the system.
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
:param name:
|
|
357
|
+
:type name: str
|
|
358
|
+
:param title:
|
|
359
|
+
:type title: str
|
|
360
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
361
|
+
number provided, it will be total request
|
|
362
|
+
timeout. It can also be a pair (tuple) of
|
|
363
|
+
(connection, read) timeouts.
|
|
364
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
365
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
366
|
+
request; this effectively ignores the
|
|
367
|
+
authentication in the spec for a single request.
|
|
368
|
+
:type _request_auth: dict, optional
|
|
369
|
+
:param _content_type: force content-type for the request.
|
|
370
|
+
:type _content_type: str, Optional
|
|
371
|
+
:param _headers: set to override the headers for a single
|
|
372
|
+
request; this effectively ignores the headers
|
|
373
|
+
in the spec for a single request.
|
|
374
|
+
:type _headers: dict, optional
|
|
375
|
+
:param _host_index: set to override the host_index for a single
|
|
376
|
+
request; this effectively ignores the host_index
|
|
377
|
+
in the spec for a single request.
|
|
378
|
+
:type _host_index: int, optional
|
|
379
|
+
:return: Returns the result object.
|
|
380
|
+
""" # noqa: E501
|
|
381
|
+
|
|
382
|
+
_param = self._coco_post_serialize(
|
|
383
|
+
name=name,
|
|
384
|
+
title=title,
|
|
385
|
+
_request_auth=_request_auth,
|
|
386
|
+
_content_type=_content_type,
|
|
387
|
+
_headers=_headers,
|
|
388
|
+
_host_index=_host_index
|
|
389
|
+
)
|
|
390
|
+
|
|
391
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
392
|
+
'200': "UploadCocoResult",
|
|
393
|
+
}
|
|
394
|
+
response_data = self.api_client.call_api(
|
|
395
|
+
*_param,
|
|
396
|
+
_request_timeout=_request_timeout
|
|
397
|
+
)
|
|
398
|
+
response_data.read()
|
|
399
|
+
return self.api_client.response_deserialize(
|
|
400
|
+
response_data=response_data,
|
|
401
|
+
response_types_map=_response_types_map,
|
|
402
|
+
).data
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
@validate_call
|
|
406
|
+
def coco_post_with_http_info(
|
|
407
|
+
self,
|
|
408
|
+
name: Optional[StrictStr] = None,
|
|
409
|
+
title: Optional[StrictStr] = None,
|
|
410
|
+
_request_timeout: Union[
|
|
411
|
+
None,
|
|
412
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
413
|
+
Tuple[
|
|
414
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
415
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
416
|
+
]
|
|
417
|
+
] = None,
|
|
418
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
419
|
+
_content_type: Optional[StrictStr] = None,
|
|
420
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
421
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
422
|
+
) -> ApiResponse[UploadCocoResult]:
|
|
423
|
+
"""Uploads a CoCo set to the system.
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
:param name:
|
|
427
|
+
:type name: str
|
|
428
|
+
:param title:
|
|
429
|
+
:type title: str
|
|
430
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
431
|
+
number provided, it will be total request
|
|
432
|
+
timeout. It can also be a pair (tuple) of
|
|
433
|
+
(connection, read) timeouts.
|
|
434
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
435
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
436
|
+
request; this effectively ignores the
|
|
437
|
+
authentication in the spec for a single request.
|
|
438
|
+
:type _request_auth: dict, optional
|
|
439
|
+
:param _content_type: force content-type for the request.
|
|
440
|
+
:type _content_type: str, Optional
|
|
441
|
+
:param _headers: set to override the headers for a single
|
|
442
|
+
request; this effectively ignores the headers
|
|
443
|
+
in the spec for a single request.
|
|
444
|
+
:type _headers: dict, optional
|
|
445
|
+
:param _host_index: set to override the host_index for a single
|
|
446
|
+
request; this effectively ignores the host_index
|
|
447
|
+
in the spec for a single request.
|
|
448
|
+
:type _host_index: int, optional
|
|
449
|
+
:return: Returns the result object.
|
|
450
|
+
""" # noqa: E501
|
|
451
|
+
|
|
452
|
+
_param = self._coco_post_serialize(
|
|
453
|
+
name=name,
|
|
454
|
+
title=title,
|
|
455
|
+
_request_auth=_request_auth,
|
|
456
|
+
_content_type=_content_type,
|
|
457
|
+
_headers=_headers,
|
|
458
|
+
_host_index=_host_index
|
|
459
|
+
)
|
|
460
|
+
|
|
461
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
462
|
+
'200': "UploadCocoResult",
|
|
463
|
+
}
|
|
464
|
+
response_data = self.api_client.call_api(
|
|
465
|
+
*_param,
|
|
466
|
+
_request_timeout=_request_timeout
|
|
467
|
+
)
|
|
468
|
+
response_data.read()
|
|
469
|
+
return self.api_client.response_deserialize(
|
|
470
|
+
response_data=response_data,
|
|
471
|
+
response_types_map=_response_types_map,
|
|
472
|
+
)
|
|
473
|
+
|
|
474
|
+
|
|
475
|
+
@validate_call
|
|
476
|
+
def coco_post_without_preload_content(
|
|
477
|
+
self,
|
|
478
|
+
name: Optional[StrictStr] = None,
|
|
479
|
+
title: Optional[StrictStr] = None,
|
|
480
|
+
_request_timeout: Union[
|
|
481
|
+
None,
|
|
482
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
483
|
+
Tuple[
|
|
484
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
485
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
486
|
+
]
|
|
487
|
+
] = None,
|
|
488
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
489
|
+
_content_type: Optional[StrictStr] = None,
|
|
490
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
491
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
492
|
+
) -> RESTResponseType:
|
|
493
|
+
"""Uploads a CoCo set to the system.
|
|
494
|
+
|
|
495
|
+
|
|
496
|
+
:param name:
|
|
497
|
+
:type name: str
|
|
498
|
+
:param title:
|
|
499
|
+
:type title: str
|
|
500
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
501
|
+
number provided, it will be total request
|
|
502
|
+
timeout. It can also be a pair (tuple) of
|
|
503
|
+
(connection, read) timeouts.
|
|
504
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
505
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
506
|
+
request; this effectively ignores the
|
|
507
|
+
authentication in the spec for a single request.
|
|
508
|
+
:type _request_auth: dict, optional
|
|
509
|
+
:param _content_type: force content-type for the request.
|
|
510
|
+
:type _content_type: str, Optional
|
|
511
|
+
:param _headers: set to override the headers for a single
|
|
512
|
+
request; this effectively ignores the headers
|
|
513
|
+
in the spec for a single request.
|
|
514
|
+
:type _headers: dict, optional
|
|
515
|
+
:param _host_index: set to override the host_index for a single
|
|
516
|
+
request; this effectively ignores the host_index
|
|
517
|
+
in the spec for a single request.
|
|
518
|
+
:type _host_index: int, optional
|
|
519
|
+
:return: Returns the result object.
|
|
520
|
+
""" # noqa: E501
|
|
521
|
+
|
|
522
|
+
_param = self._coco_post_serialize(
|
|
523
|
+
name=name,
|
|
524
|
+
title=title,
|
|
525
|
+
_request_auth=_request_auth,
|
|
526
|
+
_content_type=_content_type,
|
|
527
|
+
_headers=_headers,
|
|
528
|
+
_host_index=_host_index
|
|
529
|
+
)
|
|
530
|
+
|
|
531
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
532
|
+
'200': "UploadCocoResult",
|
|
533
|
+
}
|
|
534
|
+
response_data = self.api_client.call_api(
|
|
535
|
+
*_param,
|
|
536
|
+
_request_timeout=_request_timeout
|
|
537
|
+
)
|
|
538
|
+
return response_data.response
|
|
539
|
+
|
|
540
|
+
|
|
541
|
+
def _coco_post_serialize(
|
|
542
|
+
self,
|
|
543
|
+
name,
|
|
544
|
+
title,
|
|
545
|
+
_request_auth,
|
|
546
|
+
_content_type,
|
|
547
|
+
_headers,
|
|
548
|
+
_host_index,
|
|
549
|
+
) -> RequestSerialized:
|
|
550
|
+
|
|
551
|
+
_host = None
|
|
552
|
+
|
|
553
|
+
_collection_formats: Dict[str, str] = {
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
_path_params: Dict[str, str] = {}
|
|
557
|
+
_query_params: List[Tuple[str, str]] = []
|
|
558
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
559
|
+
_form_params: List[Tuple[str, str]] = []
|
|
560
|
+
_files: Dict[
|
|
561
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
562
|
+
] = {}
|
|
563
|
+
_body_params: Optional[bytes] = None
|
|
564
|
+
|
|
565
|
+
# process the path parameters
|
|
566
|
+
# process the query parameters
|
|
567
|
+
# process the header parameters
|
|
568
|
+
# process the form parameters
|
|
569
|
+
if name is not None:
|
|
570
|
+
_form_params.append(('Name', name))
|
|
571
|
+
if title is not None:
|
|
572
|
+
_form_params.append(('Title', title))
|
|
573
|
+
# process the body parameter
|
|
574
|
+
|
|
575
|
+
|
|
576
|
+
# set the HTTP header `Accept`
|
|
577
|
+
if 'Accept' not in _header_params:
|
|
578
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
579
|
+
[
|
|
580
|
+
'text/plain',
|
|
581
|
+
'application/json',
|
|
582
|
+
'text/json'
|
|
583
|
+
]
|
|
584
|
+
)
|
|
585
|
+
|
|
586
|
+
# set the HTTP header `Content-Type`
|
|
587
|
+
if _content_type:
|
|
588
|
+
_header_params['Content-Type'] = _content_type
|
|
589
|
+
else:
|
|
590
|
+
_default_content_type = (
|
|
591
|
+
self.api_client.select_header_content_type(
|
|
592
|
+
[
|
|
593
|
+
'multipart/form-data'
|
|
594
|
+
]
|
|
595
|
+
)
|
|
596
|
+
)
|
|
597
|
+
if _default_content_type is not None:
|
|
598
|
+
_header_params['Content-Type'] = _default_content_type
|
|
599
|
+
|
|
600
|
+
# authentication setting
|
|
601
|
+
_auth_settings: List[str] = [
|
|
602
|
+
'bearer',
|
|
603
|
+
'oauth2'
|
|
604
|
+
]
|
|
605
|
+
|
|
606
|
+
return self.api_client.param_serialize(
|
|
607
|
+
method='POST',
|
|
608
|
+
resource_path='/coco',
|
|
609
|
+
path_params=_path_params,
|
|
610
|
+
query_params=_query_params,
|
|
611
|
+
header_params=_header_params,
|
|
612
|
+
body=_body_params,
|
|
613
|
+
post_params=_form_params,
|
|
614
|
+
files=_files,
|
|
615
|
+
auth_settings=_auth_settings,
|
|
616
|
+
collection_formats=_collection_formats,
|
|
617
|
+
_host=_host,
|
|
618
|
+
_request_auth=_request_auth
|
|
619
|
+
)
|
|
620
|
+
|
|
621
|
+
|
|
622
|
+
|
|
623
|
+
|
|
44
624
|
@validate_call
|
|
45
625
|
def coco_submit_post(
|
|
46
626
|
self,
|
|
@@ -58,7 +638,7 @@ class CocoApi:
|
|
|
58
638
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
59
639
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
60
640
|
) -> SubmitCocoResult:
|
|
61
|
-
"""Creates a new validation set based on a previously uploaded CoCo set.
|
|
641
|
+
"""(Deprecated) Creates a new validation set based on a previously uploaded CoCo set.
|
|
62
642
|
|
|
63
643
|
|
|
64
644
|
:param submit_coco_model: The model containing the information needed to create the validation set.
|
|
@@ -84,6 +664,7 @@ class CocoApi:
|
|
|
84
664
|
:type _host_index: int, optional
|
|
85
665
|
:return: Returns the result object.
|
|
86
666
|
""" # noqa: E501
|
|
667
|
+
warnings.warn("POST /coco/submit is deprecated.", DeprecationWarning)
|
|
87
668
|
|
|
88
669
|
_param = self._coco_submit_post_serialize(
|
|
89
670
|
submit_coco_model=submit_coco_model,
|
|
@@ -124,7 +705,7 @@ class CocoApi:
|
|
|
124
705
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
125
706
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
126
707
|
) -> ApiResponse[SubmitCocoResult]:
|
|
127
|
-
"""Creates a new validation set based on a previously uploaded CoCo set.
|
|
708
|
+
"""(Deprecated) Creates a new validation set based on a previously uploaded CoCo set.
|
|
128
709
|
|
|
129
710
|
|
|
130
711
|
:param submit_coco_model: The model containing the information needed to create the validation set.
|
|
@@ -150,6 +731,7 @@ class CocoApi:
|
|
|
150
731
|
:type _host_index: int, optional
|
|
151
732
|
:return: Returns the result object.
|
|
152
733
|
""" # noqa: E501
|
|
734
|
+
warnings.warn("POST /coco/submit is deprecated.", DeprecationWarning)
|
|
153
735
|
|
|
154
736
|
_param = self._coco_submit_post_serialize(
|
|
155
737
|
submit_coco_model=submit_coco_model,
|
|
@@ -190,7 +772,7 @@ class CocoApi:
|
|
|
190
772
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
191
773
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
192
774
|
) -> RESTResponseType:
|
|
193
|
-
"""Creates a new validation set based on a previously uploaded CoCo set.
|
|
775
|
+
"""(Deprecated) Creates a new validation set based on a previously uploaded CoCo set.
|
|
194
776
|
|
|
195
777
|
|
|
196
778
|
:param submit_coco_model: The model containing the information needed to create the validation set.
|
|
@@ -216,6 +798,7 @@ class CocoApi:
|
|
|
216
798
|
:type _host_index: int, optional
|
|
217
799
|
:return: Returns the result object.
|
|
218
800
|
""" # noqa: E501
|
|
801
|
+
warnings.warn("POST /coco/submit is deprecated.", DeprecationWarning)
|
|
219
802
|
|
|
220
803
|
_param = self._coco_submit_post_serialize(
|
|
221
804
|
submit_coco_model=submit_coco_model,
|
|
@@ -301,7 +884,7 @@ class CocoApi:
|
|
|
301
884
|
|
|
302
885
|
return self.api_client.param_serialize(
|
|
303
886
|
method='POST',
|
|
304
|
-
resource_path='/
|
|
887
|
+
resource_path='/coco/submit',
|
|
305
888
|
path_params=_path_params,
|
|
306
889
|
query_params=_query_params,
|
|
307
890
|
header_params=_header_params,
|
|
@@ -335,7 +918,7 @@ class CocoApi:
|
|
|
335
918
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
336
919
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
337
920
|
) -> UploadCocoResult:
|
|
338
|
-
"""Uploads a CoCo set to the system.
|
|
921
|
+
"""(Deprecated) Uploads a CoCo set to the system.
|
|
339
922
|
|
|
340
923
|
|
|
341
924
|
:param name:
|
|
@@ -363,6 +946,7 @@ class CocoApi:
|
|
|
363
946
|
:type _host_index: int, optional
|
|
364
947
|
:return: Returns the result object.
|
|
365
948
|
""" # noqa: E501
|
|
949
|
+
warnings.warn("POST /coco/upload is deprecated.", DeprecationWarning)
|
|
366
950
|
|
|
367
951
|
_param = self._coco_upload_post_serialize(
|
|
368
952
|
name=name,
|
|
@@ -405,7 +989,7 @@ class CocoApi:
|
|
|
405
989
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
406
990
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
407
991
|
) -> ApiResponse[UploadCocoResult]:
|
|
408
|
-
"""Uploads a CoCo set to the system.
|
|
992
|
+
"""(Deprecated) Uploads a CoCo set to the system.
|
|
409
993
|
|
|
410
994
|
|
|
411
995
|
:param name:
|
|
@@ -433,6 +1017,7 @@ class CocoApi:
|
|
|
433
1017
|
:type _host_index: int, optional
|
|
434
1018
|
:return: Returns the result object.
|
|
435
1019
|
""" # noqa: E501
|
|
1020
|
+
warnings.warn("POST /coco/upload is deprecated.", DeprecationWarning)
|
|
436
1021
|
|
|
437
1022
|
_param = self._coco_upload_post_serialize(
|
|
438
1023
|
name=name,
|
|
@@ -475,7 +1060,7 @@ class CocoApi:
|
|
|
475
1060
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
476
1061
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
477
1062
|
) -> RESTResponseType:
|
|
478
|
-
"""Uploads a CoCo set to the system.
|
|
1063
|
+
"""(Deprecated) Uploads a CoCo set to the system.
|
|
479
1064
|
|
|
480
1065
|
|
|
481
1066
|
:param name:
|
|
@@ -503,6 +1088,7 @@ class CocoApi:
|
|
|
503
1088
|
:type _host_index: int, optional
|
|
504
1089
|
:return: Returns the result object.
|
|
505
1090
|
""" # noqa: E501
|
|
1091
|
+
warnings.warn("POST /coco/upload is deprecated.", DeprecationWarning)
|
|
506
1092
|
|
|
507
1093
|
_param = self._coco_upload_post_serialize(
|
|
508
1094
|
name=name,
|
|
@@ -590,7 +1176,7 @@ class CocoApi:
|
|
|
590
1176
|
|
|
591
1177
|
return self.api_client.param_serialize(
|
|
592
1178
|
method='POST',
|
|
593
|
-
resource_path='/
|
|
1179
|
+
resource_path='/coco/upload',
|
|
594
1180
|
path_params=_path_params,
|
|
595
1181
|
query_params=_query_params,
|
|
596
1182
|
header_params=_header_params,
|