rapidata 2.41.3__py3-none-any.whl → 2.42.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/__init__.py +1 -5
- rapidata/api_client/__init__.py +14 -14
- rapidata/api_client/api/__init__.py +1 -0
- rapidata/api_client/api/asset_api.py +851 -0
- rapidata/api_client/api/benchmark_api.py +298 -0
- rapidata/api_client/api/customer_rapid_api.py +29 -43
- rapidata/api_client/api/dataset_api.py +163 -1143
- rapidata/api_client/api/participant_api.py +28 -74
- rapidata/api_client/api/validation_set_api.py +283 -0
- rapidata/api_client/models/__init__.py +13 -14
- rapidata/api_client/models/add_validation_rapid_model.py +3 -3
- rapidata/api_client/models/add_validation_rapid_new_model.py +152 -0
- rapidata/api_client/models/add_validation_rapid_new_model_asset.py +182 -0
- rapidata/api_client/models/compare_workflow_model.py +3 -3
- rapidata/api_client/models/create_datapoint_from_files_model.py +3 -3
- rapidata/api_client/models/create_datapoint_from_text_sources_model.py +3 -3
- rapidata/api_client/models/create_datapoint_from_urls_model.py +3 -3
- rapidata/api_client/models/create_datapoint_model.py +108 -0
- rapidata/api_client/models/create_datapoint_model_asset.py +182 -0
- rapidata/api_client/models/create_demographic_rapid_model.py +13 -2
- rapidata/api_client/models/create_demographic_rapid_model_asset.py +188 -0
- rapidata/api_client/models/create_demographic_rapid_model_new.py +119 -0
- rapidata/api_client/models/create_sample_model.py +8 -2
- rapidata/api_client/models/create_sample_model_asset.py +182 -0
- rapidata/api_client/models/create_sample_model_obsolete.py +87 -0
- rapidata/api_client/models/file_asset_input_file.py +8 -22
- rapidata/api_client/models/fork_benchmark_result.py +87 -0
- rapidata/api_client/models/form_file_wrapper.py +17 -2
- rapidata/api_client/models/get_asset_metadata_result.py +100 -0
- rapidata/api_client/models/multi_asset_input_assets_inner.py +10 -24
- rapidata/api_client/models/prompt_asset_metadata_input.py +3 -3
- rapidata/api_client/models/proxy_file_wrapper.py +17 -2
- rapidata/api_client/models/stream_file_wrapper.py +25 -3
- rapidata/api_client/models/submit_prompt_model.py +3 -3
- rapidata/api_client/models/text_metadata.py +6 -1
- rapidata/api_client/models/text_metadata_model.py +7 -2
- rapidata/api_client/models/upload_file_from_url_result.py +87 -0
- rapidata/api_client/models/upload_file_result.py +87 -0
- rapidata/api_client/models/zip_entry_file_wrapper.py +33 -2
- rapidata/api_client_README.md +28 -25
- rapidata/rapidata_client/__init__.py +0 -1
- rapidata/rapidata_client/benchmark/participant/_participant.py +24 -22
- rapidata/rapidata_client/benchmark/rapidata_benchmark.py +89 -102
- rapidata/rapidata_client/datapoints/__init__.py +0 -1
- rapidata/rapidata_client/datapoints/_asset_uploader.py +71 -0
- rapidata/rapidata_client/datapoints/_datapoint.py +58 -171
- rapidata/rapidata_client/datapoints/_datapoint_uploader.py +95 -0
- rapidata/rapidata_client/datapoints/assets/__init__.py +0 -11
- rapidata/rapidata_client/datapoints/metadata/_media_asset_metadata.py +10 -7
- rapidata/rapidata_client/demographic/demographic_manager.py +21 -8
- rapidata/rapidata_client/exceptions/failed_upload_exception.py +0 -62
- rapidata/rapidata_client/order/_rapidata_order_builder.py +0 -10
- rapidata/rapidata_client/order/dataset/_rapidata_dataset.py +67 -187
- rapidata/rapidata_client/order/rapidata_order_manager.py +58 -124
- rapidata/rapidata_client/validation/rapidata_validation_set.py +9 -5
- rapidata/rapidata_client/validation/rapids/_validation_rapid_uploader.py +101 -0
- rapidata/rapidata_client/validation/rapids/box.py +35 -11
- rapidata/rapidata_client/validation/rapids/rapids.py +26 -128
- rapidata/rapidata_client/validation/rapids/rapids_manager.py +123 -104
- rapidata/rapidata_client/validation/validation_set_manager.py +25 -34
- rapidata/rapidata_client/workflow/_ranking_workflow.py +14 -17
- rapidata/rapidata_client/workflow/_select_words_workflow.py +3 -16
- rapidata/service/openapi_service.py +8 -3
- {rapidata-2.41.3.dist-info → rapidata-2.42.0.dist-info}/METADATA +1 -1
- {rapidata-2.41.3.dist-info → rapidata-2.42.0.dist-info}/RECORD +67 -58
- {rapidata-2.41.3.dist-info → rapidata-2.42.0.dist-info}/WHEEL +1 -1
- rapidata/rapidata_client/datapoints/assets/_base_asset.py +0 -13
- rapidata/rapidata_client/datapoints/assets/_media_asset.py +0 -318
- rapidata/rapidata_client/datapoints/assets/_multi_asset.py +0 -61
- rapidata/rapidata_client/datapoints/assets/_sessions.py +0 -40
- rapidata/rapidata_client/datapoints/assets/_text_asset.py +0 -34
- rapidata/rapidata_client/datapoints/assets/data_type_enum.py +0 -8
- rapidata/rapidata_client/order/dataset/_progress_tracker.py +0 -100
- {rapidata-2.41.3.dist-info → rapidata-2.42.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -16,8 +16,8 @@ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
|
16
16
|
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
17
|
from typing_extensions import Annotated
|
|
18
18
|
|
|
19
|
-
from pydantic import Field,
|
|
20
|
-
from typing import
|
|
19
|
+
from pydantic import Field, StrictStr
|
|
20
|
+
from typing import Optional
|
|
21
21
|
from typing_extensions import Annotated
|
|
22
22
|
from rapidata.api_client.models.create_sample_model import CreateSampleModel
|
|
23
23
|
from rapidata.api_client.models.get_participant_by_id_result import GetParticipantByIdResult
|
|
@@ -1092,13 +1092,10 @@ class ParticipantApi:
|
|
|
1092
1092
|
|
|
1093
1093
|
|
|
1094
1094
|
@validate_call
|
|
1095
|
-
def
|
|
1095
|
+
def participant_participant_id_sample_new_post(
|
|
1096
1096
|
self,
|
|
1097
1097
|
participant_id: Annotated[StrictStr, Field(description="The id of the participant to add the sample to")],
|
|
1098
|
-
|
|
1099
|
-
files: Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]] = None,
|
|
1100
|
-
texts: Annotated[Optional[List[StrictStr]], Field(description="If files aren't applicable texts can be used instead")] = None,
|
|
1101
|
-
urls: Annotated[Optional[List[StrictStr]], Field(description="Exposed assets can be added via urls.")] = None,
|
|
1098
|
+
create_sample_model: Annotated[Optional[CreateSampleModel], Field(description="The model for the sample creation")] = None,
|
|
1102
1099
|
_request_timeout: Union[
|
|
1103
1100
|
None,
|
|
1104
1101
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1117,14 +1114,8 @@ class ParticipantApi:
|
|
|
1117
1114
|
|
|
1118
1115
|
:param participant_id: The id of the participant to add the sample to (required)
|
|
1119
1116
|
:type participant_id: str
|
|
1120
|
-
:param model
|
|
1121
|
-
:type
|
|
1122
|
-
:param files:
|
|
1123
|
-
:type files: List[bytearray]
|
|
1124
|
-
:param texts: If files aren't applicable texts can be used instead
|
|
1125
|
-
:type texts: List[str]
|
|
1126
|
-
:param urls: Exposed assets can be added via urls.
|
|
1127
|
-
:type urls: List[str]
|
|
1117
|
+
:param create_sample_model: The model for the sample creation
|
|
1118
|
+
:type create_sample_model: CreateSampleModel
|
|
1128
1119
|
:param _request_timeout: timeout setting for this request. If one
|
|
1129
1120
|
number provided, it will be total request
|
|
1130
1121
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1147,12 +1138,9 @@ class ParticipantApi:
|
|
|
1147
1138
|
:return: Returns the result object.
|
|
1148
1139
|
""" # noqa: E501
|
|
1149
1140
|
|
|
1150
|
-
_param = self.
|
|
1141
|
+
_param = self._participant_participant_id_sample_new_post_serialize(
|
|
1151
1142
|
participant_id=participant_id,
|
|
1152
|
-
|
|
1153
|
-
files=files,
|
|
1154
|
-
texts=texts,
|
|
1155
|
-
urls=urls,
|
|
1143
|
+
create_sample_model=create_sample_model,
|
|
1156
1144
|
_request_auth=_request_auth,
|
|
1157
1145
|
_content_type=_content_type,
|
|
1158
1146
|
_headers=_headers,
|
|
@@ -1174,13 +1162,10 @@ class ParticipantApi:
|
|
|
1174
1162
|
|
|
1175
1163
|
|
|
1176
1164
|
@validate_call
|
|
1177
|
-
def
|
|
1165
|
+
def participant_participant_id_sample_new_post_with_http_info(
|
|
1178
1166
|
self,
|
|
1179
1167
|
participant_id: Annotated[StrictStr, Field(description="The id of the participant to add the sample to")],
|
|
1180
|
-
|
|
1181
|
-
files: Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]] = None,
|
|
1182
|
-
texts: Annotated[Optional[List[StrictStr]], Field(description="If files aren't applicable texts can be used instead")] = None,
|
|
1183
|
-
urls: Annotated[Optional[List[StrictStr]], Field(description="Exposed assets can be added via urls.")] = None,
|
|
1168
|
+
create_sample_model: Annotated[Optional[CreateSampleModel], Field(description="The model for the sample creation")] = None,
|
|
1184
1169
|
_request_timeout: Union[
|
|
1185
1170
|
None,
|
|
1186
1171
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1199,14 +1184,8 @@ class ParticipantApi:
|
|
|
1199
1184
|
|
|
1200
1185
|
:param participant_id: The id of the participant to add the sample to (required)
|
|
1201
1186
|
:type participant_id: str
|
|
1202
|
-
:param model
|
|
1203
|
-
:type
|
|
1204
|
-
:param files:
|
|
1205
|
-
:type files: List[bytearray]
|
|
1206
|
-
:param texts: If files aren't applicable texts can be used instead
|
|
1207
|
-
:type texts: List[str]
|
|
1208
|
-
:param urls: Exposed assets can be added via urls.
|
|
1209
|
-
:type urls: List[str]
|
|
1187
|
+
:param create_sample_model: The model for the sample creation
|
|
1188
|
+
:type create_sample_model: CreateSampleModel
|
|
1210
1189
|
:param _request_timeout: timeout setting for this request. If one
|
|
1211
1190
|
number provided, it will be total request
|
|
1212
1191
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1229,12 +1208,9 @@ class ParticipantApi:
|
|
|
1229
1208
|
:return: Returns the result object.
|
|
1230
1209
|
""" # noqa: E501
|
|
1231
1210
|
|
|
1232
|
-
_param = self.
|
|
1211
|
+
_param = self._participant_participant_id_sample_new_post_serialize(
|
|
1233
1212
|
participant_id=participant_id,
|
|
1234
|
-
|
|
1235
|
-
files=files,
|
|
1236
|
-
texts=texts,
|
|
1237
|
-
urls=urls,
|
|
1213
|
+
create_sample_model=create_sample_model,
|
|
1238
1214
|
_request_auth=_request_auth,
|
|
1239
1215
|
_content_type=_content_type,
|
|
1240
1216
|
_headers=_headers,
|
|
@@ -1256,13 +1232,10 @@ class ParticipantApi:
|
|
|
1256
1232
|
|
|
1257
1233
|
|
|
1258
1234
|
@validate_call
|
|
1259
|
-
def
|
|
1235
|
+
def participant_participant_id_sample_new_post_without_preload_content(
|
|
1260
1236
|
self,
|
|
1261
1237
|
participant_id: Annotated[StrictStr, Field(description="The id of the participant to add the sample to")],
|
|
1262
|
-
|
|
1263
|
-
files: Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]] = None,
|
|
1264
|
-
texts: Annotated[Optional[List[StrictStr]], Field(description="If files aren't applicable texts can be used instead")] = None,
|
|
1265
|
-
urls: Annotated[Optional[List[StrictStr]], Field(description="Exposed assets can be added via urls.")] = None,
|
|
1238
|
+
create_sample_model: Annotated[Optional[CreateSampleModel], Field(description="The model for the sample creation")] = None,
|
|
1266
1239
|
_request_timeout: Union[
|
|
1267
1240
|
None,
|
|
1268
1241
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1281,14 +1254,8 @@ class ParticipantApi:
|
|
|
1281
1254
|
|
|
1282
1255
|
:param participant_id: The id of the participant to add the sample to (required)
|
|
1283
1256
|
:type participant_id: str
|
|
1284
|
-
:param model
|
|
1285
|
-
:type
|
|
1286
|
-
:param files:
|
|
1287
|
-
:type files: List[bytearray]
|
|
1288
|
-
:param texts: If files aren't applicable texts can be used instead
|
|
1289
|
-
:type texts: List[str]
|
|
1290
|
-
:param urls: Exposed assets can be added via urls.
|
|
1291
|
-
:type urls: List[str]
|
|
1257
|
+
:param create_sample_model: The model for the sample creation
|
|
1258
|
+
:type create_sample_model: CreateSampleModel
|
|
1292
1259
|
:param _request_timeout: timeout setting for this request. If one
|
|
1293
1260
|
number provided, it will be total request
|
|
1294
1261
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1311,12 +1278,9 @@ class ParticipantApi:
|
|
|
1311
1278
|
:return: Returns the result object.
|
|
1312
1279
|
""" # noqa: E501
|
|
1313
1280
|
|
|
1314
|
-
_param = self.
|
|
1281
|
+
_param = self._participant_participant_id_sample_new_post_serialize(
|
|
1315
1282
|
participant_id=participant_id,
|
|
1316
|
-
|
|
1317
|
-
files=files,
|
|
1318
|
-
texts=texts,
|
|
1319
|
-
urls=urls,
|
|
1283
|
+
create_sample_model=create_sample_model,
|
|
1320
1284
|
_request_auth=_request_auth,
|
|
1321
1285
|
_content_type=_content_type,
|
|
1322
1286
|
_headers=_headers,
|
|
@@ -1333,13 +1297,10 @@ class ParticipantApi:
|
|
|
1333
1297
|
return response_data.response
|
|
1334
1298
|
|
|
1335
1299
|
|
|
1336
|
-
def
|
|
1300
|
+
def _participant_participant_id_sample_new_post_serialize(
|
|
1337
1301
|
self,
|
|
1338
1302
|
participant_id,
|
|
1339
|
-
|
|
1340
|
-
files,
|
|
1341
|
-
texts,
|
|
1342
|
-
urls,
|
|
1303
|
+
create_sample_model,
|
|
1343
1304
|
_request_auth,
|
|
1344
1305
|
_content_type,
|
|
1345
1306
|
_headers,
|
|
@@ -1349,9 +1310,6 @@ class ParticipantApi:
|
|
|
1349
1310
|
_host = None
|
|
1350
1311
|
|
|
1351
1312
|
_collection_formats: Dict[str, str] = {
|
|
1352
|
-
'files': 'multi',
|
|
1353
|
-
'texts': 'multi',
|
|
1354
|
-
'urls': 'multi',
|
|
1355
1313
|
}
|
|
1356
1314
|
|
|
1357
1315
|
_path_params: Dict[str, str] = {}
|
|
@@ -1369,15 +1327,9 @@ class ParticipantApi:
|
|
|
1369
1327
|
# process the query parameters
|
|
1370
1328
|
# process the header parameters
|
|
1371
1329
|
# process the form parameters
|
|
1372
|
-
if model is not None:
|
|
1373
|
-
_form_params.append(('model', model))
|
|
1374
|
-
if files is not None:
|
|
1375
|
-
_files['files'] = files
|
|
1376
|
-
if texts is not None:
|
|
1377
|
-
_form_params.append(('texts', texts))
|
|
1378
|
-
if urls is not None:
|
|
1379
|
-
_form_params.append(('urls', urls))
|
|
1380
1330
|
# process the body parameter
|
|
1331
|
+
if create_sample_model is not None:
|
|
1332
|
+
_body_params = create_sample_model
|
|
1381
1333
|
|
|
1382
1334
|
|
|
1383
1335
|
|
|
@@ -1388,7 +1340,9 @@ class ParticipantApi:
|
|
|
1388
1340
|
_default_content_type = (
|
|
1389
1341
|
self.api_client.select_header_content_type(
|
|
1390
1342
|
[
|
|
1391
|
-
'
|
|
1343
|
+
'application/json',
|
|
1344
|
+
'text/json',
|
|
1345
|
+
'application/*+json'
|
|
1392
1346
|
]
|
|
1393
1347
|
)
|
|
1394
1348
|
)
|
|
@@ -1403,7 +1357,7 @@ class ParticipantApi:
|
|
|
1403
1357
|
|
|
1404
1358
|
return self.api_client.param_serialize(
|
|
1405
1359
|
method='POST',
|
|
1406
|
-
resource_path='/participant/{participantId}/sample',
|
|
1360
|
+
resource_path='/participant/{participantId}/sample-new',
|
|
1407
1361
|
path_params=_path_params,
|
|
1408
1362
|
query_params=_query_params,
|
|
1409
1363
|
header_params=_header_params,
|
|
@@ -20,6 +20,7 @@ from pydantic import Field, StrictBool, StrictBytes, StrictStr, field_validator
|
|
|
20
20
|
from typing import List, Optional, Tuple, Union
|
|
21
21
|
from typing_extensions import Annotated
|
|
22
22
|
from rapidata.api_client.models.add_validation_rapid_model import AddValidationRapidModel
|
|
23
|
+
from rapidata.api_client.models.add_validation_rapid_new_model import AddValidationRapidNewModel
|
|
23
24
|
from rapidata.api_client.models.create_empty_validation_set_result import CreateEmptyValidationSetResult
|
|
24
25
|
from rapidata.api_client.models.create_validation_set_model import CreateValidationSetModel
|
|
25
26
|
from rapidata.api_client.models.get_available_validation_sets_result import GetAvailableValidationSetsResult
|
|
@@ -1705,6 +1706,288 @@ class ValidationSetApi:
|
|
|
1705
1706
|
|
|
1706
1707
|
|
|
1707
1708
|
|
|
1709
|
+
@validate_call
|
|
1710
|
+
def validation_set_validation_set_id_rapid_new_post(
|
|
1711
|
+
self,
|
|
1712
|
+
validation_set_id: Annotated[StrictStr, Field(description="The validation set to add a rapid to.")],
|
|
1713
|
+
add_validation_rapid_new_model: Annotated[Optional[AddValidationRapidNewModel], Field(description="The validation rapid data including asset, payload, and metadata.")] = None,
|
|
1714
|
+
_request_timeout: Union[
|
|
1715
|
+
None,
|
|
1716
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1717
|
+
Tuple[
|
|
1718
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1719
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1720
|
+
]
|
|
1721
|
+
] = None,
|
|
1722
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1723
|
+
_content_type: Optional[StrictStr] = None,
|
|
1724
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1725
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1726
|
+
) -> None:
|
|
1727
|
+
"""Adds a new validation rapid to the validation set using JSON body.
|
|
1728
|
+
|
|
1729
|
+
|
|
1730
|
+
:param validation_set_id: The validation set to add a rapid to. (required)
|
|
1731
|
+
:type validation_set_id: str
|
|
1732
|
+
:param add_validation_rapid_new_model: The validation rapid data including asset, payload, and metadata.
|
|
1733
|
+
:type add_validation_rapid_new_model: AddValidationRapidNewModel
|
|
1734
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1735
|
+
number provided, it will be total request
|
|
1736
|
+
timeout. It can also be a pair (tuple) of
|
|
1737
|
+
(connection, read) timeouts.
|
|
1738
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1739
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1740
|
+
request; this effectively ignores the
|
|
1741
|
+
authentication in the spec for a single request.
|
|
1742
|
+
:type _request_auth: dict, optional
|
|
1743
|
+
:param _content_type: force content-type for the request.
|
|
1744
|
+
:type _content_type: str, Optional
|
|
1745
|
+
:param _headers: set to override the headers for a single
|
|
1746
|
+
request; this effectively ignores the headers
|
|
1747
|
+
in the spec for a single request.
|
|
1748
|
+
:type _headers: dict, optional
|
|
1749
|
+
:param _host_index: set to override the host_index for a single
|
|
1750
|
+
request; this effectively ignores the host_index
|
|
1751
|
+
in the spec for a single request.
|
|
1752
|
+
:type _host_index: int, optional
|
|
1753
|
+
:return: Returns the result object.
|
|
1754
|
+
""" # noqa: E501
|
|
1755
|
+
|
|
1756
|
+
_param = self._validation_set_validation_set_id_rapid_new_post_serialize(
|
|
1757
|
+
validation_set_id=validation_set_id,
|
|
1758
|
+
add_validation_rapid_new_model=add_validation_rapid_new_model,
|
|
1759
|
+
_request_auth=_request_auth,
|
|
1760
|
+
_content_type=_content_type,
|
|
1761
|
+
_headers=_headers,
|
|
1762
|
+
_host_index=_host_index
|
|
1763
|
+
)
|
|
1764
|
+
|
|
1765
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1766
|
+
'204': None,
|
|
1767
|
+
}
|
|
1768
|
+
response_data = self.api_client.call_api(
|
|
1769
|
+
*_param,
|
|
1770
|
+
_request_timeout=_request_timeout
|
|
1771
|
+
)
|
|
1772
|
+
response_data.read()
|
|
1773
|
+
return self.api_client.response_deserialize(
|
|
1774
|
+
response_data=response_data,
|
|
1775
|
+
response_types_map=_response_types_map,
|
|
1776
|
+
).data
|
|
1777
|
+
|
|
1778
|
+
|
|
1779
|
+
@validate_call
|
|
1780
|
+
def validation_set_validation_set_id_rapid_new_post_with_http_info(
|
|
1781
|
+
self,
|
|
1782
|
+
validation_set_id: Annotated[StrictStr, Field(description="The validation set to add a rapid to.")],
|
|
1783
|
+
add_validation_rapid_new_model: Annotated[Optional[AddValidationRapidNewModel], Field(description="The validation rapid data including asset, payload, and metadata.")] = None,
|
|
1784
|
+
_request_timeout: Union[
|
|
1785
|
+
None,
|
|
1786
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1787
|
+
Tuple[
|
|
1788
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1789
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1790
|
+
]
|
|
1791
|
+
] = None,
|
|
1792
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1793
|
+
_content_type: Optional[StrictStr] = None,
|
|
1794
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1795
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1796
|
+
) -> ApiResponse[None]:
|
|
1797
|
+
"""Adds a new validation rapid to the validation set using JSON body.
|
|
1798
|
+
|
|
1799
|
+
|
|
1800
|
+
:param validation_set_id: The validation set to add a rapid to. (required)
|
|
1801
|
+
:type validation_set_id: str
|
|
1802
|
+
:param add_validation_rapid_new_model: The validation rapid data including asset, payload, and metadata.
|
|
1803
|
+
:type add_validation_rapid_new_model: AddValidationRapidNewModel
|
|
1804
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1805
|
+
number provided, it will be total request
|
|
1806
|
+
timeout. It can also be a pair (tuple) of
|
|
1807
|
+
(connection, read) timeouts.
|
|
1808
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1809
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1810
|
+
request; this effectively ignores the
|
|
1811
|
+
authentication in the spec for a single request.
|
|
1812
|
+
:type _request_auth: dict, optional
|
|
1813
|
+
:param _content_type: force content-type for the request.
|
|
1814
|
+
:type _content_type: str, Optional
|
|
1815
|
+
:param _headers: set to override the headers for a single
|
|
1816
|
+
request; this effectively ignores the headers
|
|
1817
|
+
in the spec for a single request.
|
|
1818
|
+
:type _headers: dict, optional
|
|
1819
|
+
:param _host_index: set to override the host_index for a single
|
|
1820
|
+
request; this effectively ignores the host_index
|
|
1821
|
+
in the spec for a single request.
|
|
1822
|
+
:type _host_index: int, optional
|
|
1823
|
+
:return: Returns the result object.
|
|
1824
|
+
""" # noqa: E501
|
|
1825
|
+
|
|
1826
|
+
_param = self._validation_set_validation_set_id_rapid_new_post_serialize(
|
|
1827
|
+
validation_set_id=validation_set_id,
|
|
1828
|
+
add_validation_rapid_new_model=add_validation_rapid_new_model,
|
|
1829
|
+
_request_auth=_request_auth,
|
|
1830
|
+
_content_type=_content_type,
|
|
1831
|
+
_headers=_headers,
|
|
1832
|
+
_host_index=_host_index
|
|
1833
|
+
)
|
|
1834
|
+
|
|
1835
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1836
|
+
'204': None,
|
|
1837
|
+
}
|
|
1838
|
+
response_data = self.api_client.call_api(
|
|
1839
|
+
*_param,
|
|
1840
|
+
_request_timeout=_request_timeout
|
|
1841
|
+
)
|
|
1842
|
+
response_data.read()
|
|
1843
|
+
return self.api_client.response_deserialize(
|
|
1844
|
+
response_data=response_data,
|
|
1845
|
+
response_types_map=_response_types_map,
|
|
1846
|
+
)
|
|
1847
|
+
|
|
1848
|
+
|
|
1849
|
+
@validate_call
|
|
1850
|
+
def validation_set_validation_set_id_rapid_new_post_without_preload_content(
|
|
1851
|
+
self,
|
|
1852
|
+
validation_set_id: Annotated[StrictStr, Field(description="The validation set to add a rapid to.")],
|
|
1853
|
+
add_validation_rapid_new_model: Annotated[Optional[AddValidationRapidNewModel], Field(description="The validation rapid data including asset, payload, and metadata.")] = None,
|
|
1854
|
+
_request_timeout: Union[
|
|
1855
|
+
None,
|
|
1856
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1857
|
+
Tuple[
|
|
1858
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1859
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1860
|
+
]
|
|
1861
|
+
] = None,
|
|
1862
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1863
|
+
_content_type: Optional[StrictStr] = None,
|
|
1864
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1865
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1866
|
+
) -> RESTResponseType:
|
|
1867
|
+
"""Adds a new validation rapid to the validation set using JSON body.
|
|
1868
|
+
|
|
1869
|
+
|
|
1870
|
+
:param validation_set_id: The validation set to add a rapid to. (required)
|
|
1871
|
+
:type validation_set_id: str
|
|
1872
|
+
:param add_validation_rapid_new_model: The validation rapid data including asset, payload, and metadata.
|
|
1873
|
+
:type add_validation_rapid_new_model: AddValidationRapidNewModel
|
|
1874
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1875
|
+
number provided, it will be total request
|
|
1876
|
+
timeout. It can also be a pair (tuple) of
|
|
1877
|
+
(connection, read) timeouts.
|
|
1878
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1879
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1880
|
+
request; this effectively ignores the
|
|
1881
|
+
authentication in the spec for a single request.
|
|
1882
|
+
:type _request_auth: dict, optional
|
|
1883
|
+
:param _content_type: force content-type for the request.
|
|
1884
|
+
:type _content_type: str, Optional
|
|
1885
|
+
:param _headers: set to override the headers for a single
|
|
1886
|
+
request; this effectively ignores the headers
|
|
1887
|
+
in the spec for a single request.
|
|
1888
|
+
:type _headers: dict, optional
|
|
1889
|
+
:param _host_index: set to override the host_index for a single
|
|
1890
|
+
request; this effectively ignores the host_index
|
|
1891
|
+
in the spec for a single request.
|
|
1892
|
+
:type _host_index: int, optional
|
|
1893
|
+
:return: Returns the result object.
|
|
1894
|
+
""" # noqa: E501
|
|
1895
|
+
|
|
1896
|
+
_param = self._validation_set_validation_set_id_rapid_new_post_serialize(
|
|
1897
|
+
validation_set_id=validation_set_id,
|
|
1898
|
+
add_validation_rapid_new_model=add_validation_rapid_new_model,
|
|
1899
|
+
_request_auth=_request_auth,
|
|
1900
|
+
_content_type=_content_type,
|
|
1901
|
+
_headers=_headers,
|
|
1902
|
+
_host_index=_host_index
|
|
1903
|
+
)
|
|
1904
|
+
|
|
1905
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1906
|
+
'204': None,
|
|
1907
|
+
}
|
|
1908
|
+
response_data = self.api_client.call_api(
|
|
1909
|
+
*_param,
|
|
1910
|
+
_request_timeout=_request_timeout
|
|
1911
|
+
)
|
|
1912
|
+
return response_data.response
|
|
1913
|
+
|
|
1914
|
+
|
|
1915
|
+
def _validation_set_validation_set_id_rapid_new_post_serialize(
|
|
1916
|
+
self,
|
|
1917
|
+
validation_set_id,
|
|
1918
|
+
add_validation_rapid_new_model,
|
|
1919
|
+
_request_auth,
|
|
1920
|
+
_content_type,
|
|
1921
|
+
_headers,
|
|
1922
|
+
_host_index,
|
|
1923
|
+
) -> RequestSerialized:
|
|
1924
|
+
|
|
1925
|
+
_host = None
|
|
1926
|
+
|
|
1927
|
+
_collection_formats: Dict[str, str] = {
|
|
1928
|
+
}
|
|
1929
|
+
|
|
1930
|
+
_path_params: Dict[str, str] = {}
|
|
1931
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1932
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1933
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1934
|
+
_files: Dict[
|
|
1935
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1936
|
+
] = {}
|
|
1937
|
+
_body_params: Optional[bytes] = None
|
|
1938
|
+
|
|
1939
|
+
# process the path parameters
|
|
1940
|
+
if validation_set_id is not None:
|
|
1941
|
+
_path_params['validationSetId'] = validation_set_id
|
|
1942
|
+
# process the query parameters
|
|
1943
|
+
# process the header parameters
|
|
1944
|
+
# process the form parameters
|
|
1945
|
+
# process the body parameter
|
|
1946
|
+
if add_validation_rapid_new_model is not None:
|
|
1947
|
+
_body_params = add_validation_rapid_new_model
|
|
1948
|
+
|
|
1949
|
+
|
|
1950
|
+
|
|
1951
|
+
# set the HTTP header `Content-Type`
|
|
1952
|
+
if _content_type:
|
|
1953
|
+
_header_params['Content-Type'] = _content_type
|
|
1954
|
+
else:
|
|
1955
|
+
_default_content_type = (
|
|
1956
|
+
self.api_client.select_header_content_type(
|
|
1957
|
+
[
|
|
1958
|
+
'application/json',
|
|
1959
|
+
'text/json',
|
|
1960
|
+
'application/*+json'
|
|
1961
|
+
]
|
|
1962
|
+
)
|
|
1963
|
+
)
|
|
1964
|
+
if _default_content_type is not None:
|
|
1965
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1966
|
+
|
|
1967
|
+
# authentication setting
|
|
1968
|
+
_auth_settings: List[str] = [
|
|
1969
|
+
'bearer',
|
|
1970
|
+
'oauth2'
|
|
1971
|
+
]
|
|
1972
|
+
|
|
1973
|
+
return self.api_client.param_serialize(
|
|
1974
|
+
method='POST',
|
|
1975
|
+
resource_path='/validation-set/{validationSetId}/rapid-new',
|
|
1976
|
+
path_params=_path_params,
|
|
1977
|
+
query_params=_query_params,
|
|
1978
|
+
header_params=_header_params,
|
|
1979
|
+
body=_body_params,
|
|
1980
|
+
post_params=_form_params,
|
|
1981
|
+
files=_files,
|
|
1982
|
+
auth_settings=_auth_settings,
|
|
1983
|
+
collection_formats=_collection_formats,
|
|
1984
|
+
_host=_host,
|
|
1985
|
+
_request_auth=_request_auth
|
|
1986
|
+
)
|
|
1987
|
+
|
|
1988
|
+
|
|
1989
|
+
|
|
1990
|
+
|
|
1708
1991
|
@validate_call
|
|
1709
1992
|
def validation_set_validation_set_id_rapid_post(
|
|
1710
1993
|
self,
|
|
@@ -20,6 +20,8 @@ from rapidata.api_client.models.add_user_response_result import AddUserResponseR
|
|
|
20
20
|
from rapidata.api_client.models.add_validation_rapid_model import AddValidationRapidModel
|
|
21
21
|
from rapidata.api_client.models.add_validation_rapid_model_payload import AddValidationRapidModelPayload
|
|
22
22
|
from rapidata.api_client.models.add_validation_rapid_model_truth import AddValidationRapidModelTruth
|
|
23
|
+
from rapidata.api_client.models.add_validation_rapid_new_model import AddValidationRapidNewModel
|
|
24
|
+
from rapidata.api_client.models.add_validation_rapid_new_model_asset import AddValidationRapidNewModelAsset
|
|
23
25
|
from rapidata.api_client.models.age_group import AgeGroup
|
|
24
26
|
from rapidata.api_client.models.age_user_filter_model import AgeUserFilterModel
|
|
25
27
|
from rapidata.api_client.models.aggregator_type import AggregatorType
|
|
@@ -95,13 +97,18 @@ from rapidata.api_client.models.create_complex_order_model_pipeline import Creat
|
|
|
95
97
|
from rapidata.api_client.models.create_complex_order_result import CreateComplexOrderResult
|
|
96
98
|
from rapidata.api_client.models.create_customer_client_result import CreateCustomerClientResult
|
|
97
99
|
from rapidata.api_client.models.create_datapoint_from_files_model import CreateDatapointFromFilesModel
|
|
100
|
+
from rapidata.api_client.models.create_datapoint_from_files_model_metadata_inner import CreateDatapointFromFilesModelMetadataInner
|
|
98
101
|
from rapidata.api_client.models.create_datapoint_from_text_sources_model import CreateDatapointFromTextSourcesModel
|
|
99
102
|
from rapidata.api_client.models.create_datapoint_from_urls_model import CreateDatapointFromUrlsModel
|
|
103
|
+
from rapidata.api_client.models.create_datapoint_model import CreateDatapointModel
|
|
104
|
+
from rapidata.api_client.models.create_datapoint_model_asset import CreateDatapointModelAsset
|
|
100
105
|
from rapidata.api_client.models.create_datapoint_result import CreateDatapointResult
|
|
101
106
|
from rapidata.api_client.models.create_datapoints_from_s3_bucket_model import CreateDatapointsFromS3BucketModel
|
|
102
107
|
from rapidata.api_client.models.create_dataset_artifact_model import CreateDatasetArtifactModel
|
|
103
108
|
from rapidata.api_client.models.create_dataset_artifact_model_dataset import CreateDatasetArtifactModelDataset
|
|
104
109
|
from rapidata.api_client.models.create_demographic_rapid_model import CreateDemographicRapidModel
|
|
110
|
+
from rapidata.api_client.models.create_demographic_rapid_model_asset import CreateDemographicRapidModelAsset
|
|
111
|
+
from rapidata.api_client.models.create_demographic_rapid_model_new import CreateDemographicRapidModelNew
|
|
105
112
|
from rapidata.api_client.models.create_empty_validation_set_result import CreateEmptyValidationSetResult
|
|
106
113
|
from rapidata.api_client.models.create_leaderboard_model import CreateLeaderboardModel
|
|
107
114
|
from rapidata.api_client.models.create_leaderboard_result import CreateLeaderboardResult
|
|
@@ -111,6 +118,8 @@ from rapidata.api_client.models.create_order_model_workflow import CreateOrderMo
|
|
|
111
118
|
from rapidata.api_client.models.create_order_result import CreateOrderResult
|
|
112
119
|
from rapidata.api_client.models.create_rapid_result import CreateRapidResult
|
|
113
120
|
from rapidata.api_client.models.create_sample_model import CreateSampleModel
|
|
121
|
+
from rapidata.api_client.models.create_sample_model_asset import CreateSampleModelAsset
|
|
122
|
+
from rapidata.api_client.models.create_sample_model_obsolete import CreateSampleModelObsolete
|
|
114
123
|
from rapidata.api_client.models.create_simple_pipeline_model import CreateSimplePipelineModel
|
|
115
124
|
from rapidata.api_client.models.create_simple_pipeline_model_artifacts_inner import CreateSimplePipelineModelArtifactsInner
|
|
116
125
|
from rapidata.api_client.models.create_simple_pipeline_model_pipeline_steps_inner import CreateSimplePipelineModelPipelineStepsInner
|
|
@@ -123,7 +132,6 @@ from rapidata.api_client.models.datapoint_model import DatapointModel
|
|
|
123
132
|
from rapidata.api_client.models.datapoint_model_paged_result import DatapointModelPagedResult
|
|
124
133
|
from rapidata.api_client.models.datapoint_state import DatapointState
|
|
125
134
|
from rapidata.api_client.models.dataset_artifact_model import DatasetArtifactModel
|
|
126
|
-
from rapidata.api_client.models.dataset_dataset_id_datapoints_post_request_metadata_inner import DatasetDatasetIdDatapointsPostRequestMetadataInner
|
|
127
135
|
from rapidata.api_client.models.dataset_evaluation_step_model import DatasetEvaluationStepModel
|
|
128
136
|
from rapidata.api_client.models.demographic import Demographic
|
|
129
137
|
from rapidata.api_client.models.demographic_filter import DemographicFilter
|
|
@@ -145,10 +153,6 @@ from rapidata.api_client.models.feedback_model import FeedbackModel
|
|
|
145
153
|
from rapidata.api_client.models.file_artifact_model import FileArtifactModel
|
|
146
154
|
from rapidata.api_client.models.file_asset import FileAsset
|
|
147
155
|
from rapidata.api_client.models.file_asset_input import FileAssetInput
|
|
148
|
-
from rapidata.api_client.models.file_asset_input1 import FileAssetInput1
|
|
149
|
-
from rapidata.api_client.models.file_asset_input1_file import FileAssetInput1File
|
|
150
|
-
from rapidata.api_client.models.file_asset_input2 import FileAssetInput2
|
|
151
|
-
from rapidata.api_client.models.file_asset_input3 import FileAssetInput3
|
|
152
156
|
from rapidata.api_client.models.file_asset_input_file import FileAssetInputFile
|
|
153
157
|
from rapidata.api_client.models.file_asset_metadata_value import FileAssetMetadataValue
|
|
154
158
|
from rapidata.api_client.models.file_asset_model import FileAssetModel
|
|
@@ -158,12 +162,14 @@ from rapidata.api_client.models.file_type_metadata import FileTypeMetadata
|
|
|
158
162
|
from rapidata.api_client.models.file_type_metadata_model import FileTypeMetadataModel
|
|
159
163
|
from rapidata.api_client.models.filter import Filter
|
|
160
164
|
from rapidata.api_client.models.filter_operator import FilterOperator
|
|
165
|
+
from rapidata.api_client.models.fork_benchmark_result import ForkBenchmarkResult
|
|
161
166
|
from rapidata.api_client.models.form_file_wrapper import FormFileWrapper
|
|
162
167
|
from rapidata.api_client.models.free_text_payload import FreeTextPayload
|
|
163
168
|
from rapidata.api_client.models.free_text_rapid_blueprint import FreeTextRapidBlueprint
|
|
164
169
|
from rapidata.api_client.models.free_text_result import FreeTextResult
|
|
165
170
|
from rapidata.api_client.models.gender import Gender
|
|
166
171
|
from rapidata.api_client.models.gender_user_filter_model import GenderUserFilterModel
|
|
172
|
+
from rapidata.api_client.models.get_asset_metadata_result import GetAssetMetadataResult
|
|
167
173
|
from rapidata.api_client.models.get_available_validation_sets_result import GetAvailableValidationSetsResult
|
|
168
174
|
from rapidata.api_client.models.get_benchmark_by_id_result import GetBenchmarkByIdResult
|
|
169
175
|
from rapidata.api_client.models.get_compare_ab_summary_result import GetCompareAbSummaryResult
|
|
@@ -219,7 +225,6 @@ from rapidata.api_client.models.line_point import LinePoint
|
|
|
219
225
|
from rapidata.api_client.models.line_rapid_blueprint import LineRapidBlueprint
|
|
220
226
|
from rapidata.api_client.models.line_result import LineResult
|
|
221
227
|
from rapidata.api_client.models.line_truth import LineTruth
|
|
222
|
-
from rapidata.api_client.models.local_file_wrapper import LocalFileWrapper
|
|
223
228
|
from rapidata.api_client.models.locate_box_truth import LocateBoxTruth
|
|
224
229
|
from rapidata.api_client.models.locate_coordinate import LocateCoordinate
|
|
225
230
|
from rapidata.api_client.models.locate_payload import LocatePayload
|
|
@@ -230,11 +235,6 @@ from rapidata.api_client.models.location_metadata_model import LocationMetadataM
|
|
|
230
235
|
from rapidata.api_client.models.logic_operator import LogicOperator
|
|
231
236
|
from rapidata.api_client.models.multi_asset import MultiAsset
|
|
232
237
|
from rapidata.api_client.models.multi_asset_input import MultiAssetInput
|
|
233
|
-
from rapidata.api_client.models.multi_asset_input1 import MultiAssetInput1
|
|
234
|
-
from rapidata.api_client.models.multi_asset_input1_assets_inner import MultiAssetInput1AssetsInner
|
|
235
|
-
from rapidata.api_client.models.multi_asset_input2 import MultiAssetInput2
|
|
236
|
-
from rapidata.api_client.models.multi_asset_input3 import MultiAssetInput3
|
|
237
|
-
from rapidata.api_client.models.multi_asset_input3_assets_inner import MultiAssetInput3AssetsInner
|
|
238
238
|
from rapidata.api_client.models.multi_asset_input_assets_inner import MultiAssetInputAssetsInner
|
|
239
239
|
from rapidata.api_client.models.multi_asset_model import MultiAssetModel
|
|
240
240
|
from rapidata.api_client.models.multi_compare_truth import MultiCompareTruth
|
|
@@ -286,7 +286,6 @@ from rapidata.api_client.models.probabilistic_attach_category_referee_config imp
|
|
|
286
286
|
from rapidata.api_client.models.probabilistic_attach_category_referee_info import ProbabilisticAttachCategoryRefereeInfo
|
|
287
287
|
from rapidata.api_client.models.problem_details import ProblemDetails
|
|
288
288
|
from rapidata.api_client.models.prompt_asset_metadata_input import PromptAssetMetadataInput
|
|
289
|
-
from rapidata.api_client.models.prompt_asset_metadata_input_asset import PromptAssetMetadataInputAsset
|
|
290
289
|
from rapidata.api_client.models.prompt_by_benchmark_result import PromptByBenchmarkResult
|
|
291
290
|
from rapidata.api_client.models.prompt_by_benchmark_result_paged_result import PromptByBenchmarkResultPagedResult
|
|
292
291
|
from rapidata.api_client.models.prompt_metadata import PromptMetadata
|
|
@@ -309,7 +308,6 @@ from rapidata.api_client.models.rapid_result_model_result import RapidResultMode
|
|
|
309
308
|
from rapidata.api_client.models.rapid_skipped_model import RapidSkippedModel
|
|
310
309
|
from rapidata.api_client.models.rapid_state import RapidState
|
|
311
310
|
from rapidata.api_client.models.read_bridge_token_keys_result import ReadBridgeTokenKeysResult
|
|
312
|
-
from rapidata.api_client.models.reference_asset_input import ReferenceAssetInput
|
|
313
311
|
from rapidata.api_client.models.report_model import ReportModel
|
|
314
312
|
from rapidata.api_client.models.response_count_filter import ResponseCountFilter
|
|
315
313
|
from rapidata.api_client.models.response_count_user_filter_model import ResponseCountUserFilterModel
|
|
@@ -357,7 +355,6 @@ from rapidata.api_client.models.submit_coco_result import SubmitCocoResult
|
|
|
357
355
|
from rapidata.api_client.models.submit_order_model import SubmitOrderModel
|
|
358
356
|
from rapidata.api_client.models.submit_participant_result import SubmitParticipantResult
|
|
359
357
|
from rapidata.api_client.models.submit_prompt_model import SubmitPromptModel
|
|
360
|
-
from rapidata.api_client.models.submit_prompt_model_prompt_asset import SubmitPromptModelPromptAsset
|
|
361
358
|
from rapidata.api_client.models.tags_by_benchmark_result import TagsByBenchmarkResult
|
|
362
359
|
from rapidata.api_client.models.text_asset import TextAsset
|
|
363
360
|
from rapidata.api_client.models.text_asset_input import TextAssetInput
|
|
@@ -393,6 +390,8 @@ from rapidata.api_client.models.update_validation_rapid_model_truth import Updat
|
|
|
393
390
|
from rapidata.api_client.models.update_validation_set_model import UpdateValidationSetModel
|
|
394
391
|
from rapidata.api_client.models.upload_asset_result import UploadAssetResult
|
|
395
392
|
from rapidata.api_client.models.upload_coco_result import UploadCocoResult
|
|
393
|
+
from rapidata.api_client.models.upload_file_from_url_result import UploadFileFromUrlResult
|
|
394
|
+
from rapidata.api_client.models.upload_file_result import UploadFileResult
|
|
396
395
|
from rapidata.api_client.models.upload_from_s3_result import UploadFromS3Result
|
|
397
396
|
from rapidata.api_client.models.url_asset_input import UrlAssetInput
|
|
398
397
|
from rapidata.api_client.models.user_score_filter import UserScoreFilter
|
|
@@ -21,7 +21,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, Stric
|
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
22
22
|
from rapidata.api_client.models.add_validation_rapid_model_payload import AddValidationRapidModelPayload
|
|
23
23
|
from rapidata.api_client.models.add_validation_rapid_model_truth import AddValidationRapidModelTruth
|
|
24
|
-
from rapidata.api_client.models.
|
|
24
|
+
from rapidata.api_client.models.create_datapoint_from_files_model_metadata_inner import CreateDatapointFromFilesModelMetadataInner
|
|
25
25
|
from rapidata.api_client.models.feature_flag_model import FeatureFlagModel
|
|
26
26
|
from typing import Optional, Set
|
|
27
27
|
from typing_extensions import Self
|
|
@@ -31,7 +31,7 @@ class AddValidationRapidModel(BaseModel):
|
|
|
31
31
|
The model for adding a validation rapid.
|
|
32
32
|
""" # noqa: E501
|
|
33
33
|
payload: AddValidationRapidModelPayload
|
|
34
|
-
metadata: Optional[List[
|
|
34
|
+
metadata: Optional[List[CreateDatapointFromFilesModelMetadataInner]] = Field(default=None, description="Some metadata to attach to the rapid.")
|
|
35
35
|
truth: Optional[AddValidationRapidModelTruth] = None
|
|
36
36
|
random_correct_probability: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The probability for an answer to be correct when randomly guessing.", alias="randomCorrectProbability")
|
|
37
37
|
explanation: Optional[StrictStr] = Field(default=None, description="An explanation for the users if they answer the rapid incorrectly.")
|
|
@@ -135,7 +135,7 @@ class AddValidationRapidModel(BaseModel):
|
|
|
135
135
|
|
|
136
136
|
_obj = cls.model_validate({
|
|
137
137
|
"payload": AddValidationRapidModelPayload.from_dict(obj["payload"]) if obj.get("payload") is not None else None,
|
|
138
|
-
"metadata": [
|
|
138
|
+
"metadata": [CreateDatapointFromFilesModelMetadataInner.from_dict(_item) for _item in obj["metadata"]] if obj.get("metadata") is not None else None,
|
|
139
139
|
"truth": AddValidationRapidModelTruth.from_dict(obj["truth"]) if obj.get("truth") is not None else None,
|
|
140
140
|
"randomCorrectProbability": obj.get("randomCorrectProbability"),
|
|
141
141
|
"explanation": obj.get("explanation"),
|