rapidata 2.29.1__py3-none-any.whl → 2.30.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 -1
- rapidata/api_client/__init__.py +5 -0
- rapidata/api_client/api/benchmark_api.py +283 -0
- rapidata/api_client/api/leaderboard_api.py +562 -0
- rapidata/api_client/models/__init__.py +5 -0
- rapidata/api_client/models/file_type.py +1 -0
- rapidata/api_client/models/file_type_metadata.py +2 -2
- rapidata/api_client/models/file_type_metadata_model.py +2 -2
- rapidata/api_client/models/prompt_by_benchmark_result.py +19 -3
- rapidata/api_client/models/run_status.py +39 -0
- rapidata/api_client/models/runs_by_leaderboard_result.py +110 -0
- rapidata/api_client/models/runs_by_leaderboard_result_paged_result.py +105 -0
- rapidata/api_client/models/update_benchmark_name_model.py +87 -0
- rapidata/api_client/models/update_leaderboard_name_model.py +87 -0
- rapidata/api_client_README.md +8 -0
- rapidata/rapidata_client/benchmark/leaderboard/rapidata_leaderboard.py +9 -0
- rapidata/rapidata_client/benchmark/rapidata_benchmark.py +66 -12
- rapidata/rapidata_client/benchmark/rapidata_benchmark_manager.py +24 -6
- rapidata/rapidata_client/order/_rapidata_order_builder.py +13 -9
- rapidata/rapidata_client/order/rapidata_order_manager.py +2 -13
- {rapidata-2.29.1.dist-info → rapidata-2.30.0.dist-info}/METADATA +1 -1
- {rapidata-2.29.1.dist-info → rapidata-2.30.0.dist-info}/RECORD +24 -19
- {rapidata-2.29.1.dist-info → rapidata-2.30.0.dist-info}/LICENSE +0 -0
- {rapidata-2.29.1.dist-info → rapidata-2.30.0.dist-info}/WHEEL +0 -0
|
@@ -29,8 +29,10 @@ from rapidata.api_client.models.get_standing_by_id_result import GetStandingById
|
|
|
29
29
|
from rapidata.api_client.models.leaderboard_query_result_paged_result import LeaderboardQueryResultPagedResult
|
|
30
30
|
from rapidata.api_client.models.prompt_by_benchmark_result_paged_result import PromptByBenchmarkResultPagedResult
|
|
31
31
|
from rapidata.api_client.models.query_model import QueryModel
|
|
32
|
+
from rapidata.api_client.models.runs_by_leaderboard_result_paged_result import RunsByLeaderboardResultPagedResult
|
|
32
33
|
from rapidata.api_client.models.standing_by_leaderboard_paged_result import StandingByLeaderboardPagedResult
|
|
33
34
|
from rapidata.api_client.models.submit_participant_result import SubmitParticipantResult
|
|
35
|
+
from rapidata.api_client.models.update_leaderboard_name_model import UpdateLeaderboardNameModel
|
|
34
36
|
|
|
35
37
|
from rapidata.api_client.api_client import ApiClient, RequestSerialized
|
|
36
38
|
from rapidata.api_client.api_response import ApiResponse
|
|
@@ -1130,6 +1132,288 @@ class LeaderboardApi:
|
|
|
1130
1132
|
|
|
1131
1133
|
|
|
1132
1134
|
|
|
1135
|
+
@validate_call
|
|
1136
|
+
def leaderboard_leaderboard_id_name_put(
|
|
1137
|
+
self,
|
|
1138
|
+
leaderboard_id: StrictStr,
|
|
1139
|
+
update_leaderboard_name_model: Optional[UpdateLeaderboardNameModel] = None,
|
|
1140
|
+
_request_timeout: Union[
|
|
1141
|
+
None,
|
|
1142
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1143
|
+
Tuple[
|
|
1144
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1145
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1146
|
+
]
|
|
1147
|
+
] = None,
|
|
1148
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1149
|
+
_content_type: Optional[StrictStr] = None,
|
|
1150
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1151
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1152
|
+
) -> None:
|
|
1153
|
+
"""Updates the name of a leaderboard.
|
|
1154
|
+
|
|
1155
|
+
|
|
1156
|
+
:param leaderboard_id: (required)
|
|
1157
|
+
:type leaderboard_id: str
|
|
1158
|
+
:param update_leaderboard_name_model:
|
|
1159
|
+
:type update_leaderboard_name_model: UpdateLeaderboardNameModel
|
|
1160
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1161
|
+
number provided, it will be total request
|
|
1162
|
+
timeout. It can also be a pair (tuple) of
|
|
1163
|
+
(connection, read) timeouts.
|
|
1164
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1165
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1166
|
+
request; this effectively ignores the
|
|
1167
|
+
authentication in the spec for a single request.
|
|
1168
|
+
:type _request_auth: dict, optional
|
|
1169
|
+
:param _content_type: force content-type for the request.
|
|
1170
|
+
:type _content_type: str, Optional
|
|
1171
|
+
:param _headers: set to override the headers for a single
|
|
1172
|
+
request; this effectively ignores the headers
|
|
1173
|
+
in the spec for a single request.
|
|
1174
|
+
:type _headers: dict, optional
|
|
1175
|
+
:param _host_index: set to override the host_index for a single
|
|
1176
|
+
request; this effectively ignores the host_index
|
|
1177
|
+
in the spec for a single request.
|
|
1178
|
+
:type _host_index: int, optional
|
|
1179
|
+
:return: Returns the result object.
|
|
1180
|
+
""" # noqa: E501
|
|
1181
|
+
|
|
1182
|
+
_param = self._leaderboard_leaderboard_id_name_put_serialize(
|
|
1183
|
+
leaderboard_id=leaderboard_id,
|
|
1184
|
+
update_leaderboard_name_model=update_leaderboard_name_model,
|
|
1185
|
+
_request_auth=_request_auth,
|
|
1186
|
+
_content_type=_content_type,
|
|
1187
|
+
_headers=_headers,
|
|
1188
|
+
_host_index=_host_index
|
|
1189
|
+
)
|
|
1190
|
+
|
|
1191
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1192
|
+
'204': None,
|
|
1193
|
+
}
|
|
1194
|
+
response_data = self.api_client.call_api(
|
|
1195
|
+
*_param,
|
|
1196
|
+
_request_timeout=_request_timeout
|
|
1197
|
+
)
|
|
1198
|
+
response_data.read()
|
|
1199
|
+
return self.api_client.response_deserialize(
|
|
1200
|
+
response_data=response_data,
|
|
1201
|
+
response_types_map=_response_types_map,
|
|
1202
|
+
).data
|
|
1203
|
+
|
|
1204
|
+
|
|
1205
|
+
@validate_call
|
|
1206
|
+
def leaderboard_leaderboard_id_name_put_with_http_info(
|
|
1207
|
+
self,
|
|
1208
|
+
leaderboard_id: StrictStr,
|
|
1209
|
+
update_leaderboard_name_model: Optional[UpdateLeaderboardNameModel] = None,
|
|
1210
|
+
_request_timeout: Union[
|
|
1211
|
+
None,
|
|
1212
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1213
|
+
Tuple[
|
|
1214
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1215
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1216
|
+
]
|
|
1217
|
+
] = None,
|
|
1218
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1219
|
+
_content_type: Optional[StrictStr] = None,
|
|
1220
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1221
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1222
|
+
) -> ApiResponse[None]:
|
|
1223
|
+
"""Updates the name of a leaderboard.
|
|
1224
|
+
|
|
1225
|
+
|
|
1226
|
+
:param leaderboard_id: (required)
|
|
1227
|
+
:type leaderboard_id: str
|
|
1228
|
+
:param update_leaderboard_name_model:
|
|
1229
|
+
:type update_leaderboard_name_model: UpdateLeaderboardNameModel
|
|
1230
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1231
|
+
number provided, it will be total request
|
|
1232
|
+
timeout. It can also be a pair (tuple) of
|
|
1233
|
+
(connection, read) timeouts.
|
|
1234
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1235
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1236
|
+
request; this effectively ignores the
|
|
1237
|
+
authentication in the spec for a single request.
|
|
1238
|
+
:type _request_auth: dict, optional
|
|
1239
|
+
:param _content_type: force content-type for the request.
|
|
1240
|
+
:type _content_type: str, Optional
|
|
1241
|
+
:param _headers: set to override the headers for a single
|
|
1242
|
+
request; this effectively ignores the headers
|
|
1243
|
+
in the spec for a single request.
|
|
1244
|
+
:type _headers: dict, optional
|
|
1245
|
+
:param _host_index: set to override the host_index for a single
|
|
1246
|
+
request; this effectively ignores the host_index
|
|
1247
|
+
in the spec for a single request.
|
|
1248
|
+
:type _host_index: int, optional
|
|
1249
|
+
:return: Returns the result object.
|
|
1250
|
+
""" # noqa: E501
|
|
1251
|
+
|
|
1252
|
+
_param = self._leaderboard_leaderboard_id_name_put_serialize(
|
|
1253
|
+
leaderboard_id=leaderboard_id,
|
|
1254
|
+
update_leaderboard_name_model=update_leaderboard_name_model,
|
|
1255
|
+
_request_auth=_request_auth,
|
|
1256
|
+
_content_type=_content_type,
|
|
1257
|
+
_headers=_headers,
|
|
1258
|
+
_host_index=_host_index
|
|
1259
|
+
)
|
|
1260
|
+
|
|
1261
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1262
|
+
'204': None,
|
|
1263
|
+
}
|
|
1264
|
+
response_data = self.api_client.call_api(
|
|
1265
|
+
*_param,
|
|
1266
|
+
_request_timeout=_request_timeout
|
|
1267
|
+
)
|
|
1268
|
+
response_data.read()
|
|
1269
|
+
return self.api_client.response_deserialize(
|
|
1270
|
+
response_data=response_data,
|
|
1271
|
+
response_types_map=_response_types_map,
|
|
1272
|
+
)
|
|
1273
|
+
|
|
1274
|
+
|
|
1275
|
+
@validate_call
|
|
1276
|
+
def leaderboard_leaderboard_id_name_put_without_preload_content(
|
|
1277
|
+
self,
|
|
1278
|
+
leaderboard_id: StrictStr,
|
|
1279
|
+
update_leaderboard_name_model: Optional[UpdateLeaderboardNameModel] = None,
|
|
1280
|
+
_request_timeout: Union[
|
|
1281
|
+
None,
|
|
1282
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1283
|
+
Tuple[
|
|
1284
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1285
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1286
|
+
]
|
|
1287
|
+
] = None,
|
|
1288
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1289
|
+
_content_type: Optional[StrictStr] = None,
|
|
1290
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1291
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1292
|
+
) -> RESTResponseType:
|
|
1293
|
+
"""Updates the name of a leaderboard.
|
|
1294
|
+
|
|
1295
|
+
|
|
1296
|
+
:param leaderboard_id: (required)
|
|
1297
|
+
:type leaderboard_id: str
|
|
1298
|
+
:param update_leaderboard_name_model:
|
|
1299
|
+
:type update_leaderboard_name_model: UpdateLeaderboardNameModel
|
|
1300
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1301
|
+
number provided, it will be total request
|
|
1302
|
+
timeout. It can also be a pair (tuple) of
|
|
1303
|
+
(connection, read) timeouts.
|
|
1304
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1305
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1306
|
+
request; this effectively ignores the
|
|
1307
|
+
authentication in the spec for a single request.
|
|
1308
|
+
:type _request_auth: dict, optional
|
|
1309
|
+
:param _content_type: force content-type for the request.
|
|
1310
|
+
:type _content_type: str, Optional
|
|
1311
|
+
:param _headers: set to override the headers for a single
|
|
1312
|
+
request; this effectively ignores the headers
|
|
1313
|
+
in the spec for a single request.
|
|
1314
|
+
:type _headers: dict, optional
|
|
1315
|
+
:param _host_index: set to override the host_index for a single
|
|
1316
|
+
request; this effectively ignores the host_index
|
|
1317
|
+
in the spec for a single request.
|
|
1318
|
+
:type _host_index: int, optional
|
|
1319
|
+
:return: Returns the result object.
|
|
1320
|
+
""" # noqa: E501
|
|
1321
|
+
|
|
1322
|
+
_param = self._leaderboard_leaderboard_id_name_put_serialize(
|
|
1323
|
+
leaderboard_id=leaderboard_id,
|
|
1324
|
+
update_leaderboard_name_model=update_leaderboard_name_model,
|
|
1325
|
+
_request_auth=_request_auth,
|
|
1326
|
+
_content_type=_content_type,
|
|
1327
|
+
_headers=_headers,
|
|
1328
|
+
_host_index=_host_index
|
|
1329
|
+
)
|
|
1330
|
+
|
|
1331
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1332
|
+
'204': None,
|
|
1333
|
+
}
|
|
1334
|
+
response_data = self.api_client.call_api(
|
|
1335
|
+
*_param,
|
|
1336
|
+
_request_timeout=_request_timeout
|
|
1337
|
+
)
|
|
1338
|
+
return response_data.response
|
|
1339
|
+
|
|
1340
|
+
|
|
1341
|
+
def _leaderboard_leaderboard_id_name_put_serialize(
|
|
1342
|
+
self,
|
|
1343
|
+
leaderboard_id,
|
|
1344
|
+
update_leaderboard_name_model,
|
|
1345
|
+
_request_auth,
|
|
1346
|
+
_content_type,
|
|
1347
|
+
_headers,
|
|
1348
|
+
_host_index,
|
|
1349
|
+
) -> RequestSerialized:
|
|
1350
|
+
|
|
1351
|
+
_host = None
|
|
1352
|
+
|
|
1353
|
+
_collection_formats: Dict[str, str] = {
|
|
1354
|
+
}
|
|
1355
|
+
|
|
1356
|
+
_path_params: Dict[str, str] = {}
|
|
1357
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1358
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1359
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1360
|
+
_files: Dict[
|
|
1361
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1362
|
+
] = {}
|
|
1363
|
+
_body_params: Optional[bytes] = None
|
|
1364
|
+
|
|
1365
|
+
# process the path parameters
|
|
1366
|
+
if leaderboard_id is not None:
|
|
1367
|
+
_path_params['leaderboardId'] = leaderboard_id
|
|
1368
|
+
# process the query parameters
|
|
1369
|
+
# process the header parameters
|
|
1370
|
+
# process the form parameters
|
|
1371
|
+
# process the body parameter
|
|
1372
|
+
if update_leaderboard_name_model is not None:
|
|
1373
|
+
_body_params = update_leaderboard_name_model
|
|
1374
|
+
|
|
1375
|
+
|
|
1376
|
+
|
|
1377
|
+
# set the HTTP header `Content-Type`
|
|
1378
|
+
if _content_type:
|
|
1379
|
+
_header_params['Content-Type'] = _content_type
|
|
1380
|
+
else:
|
|
1381
|
+
_default_content_type = (
|
|
1382
|
+
self.api_client.select_header_content_type(
|
|
1383
|
+
[
|
|
1384
|
+
'application/json',
|
|
1385
|
+
'text/json',
|
|
1386
|
+
'application/*+json'
|
|
1387
|
+
]
|
|
1388
|
+
)
|
|
1389
|
+
)
|
|
1390
|
+
if _default_content_type is not None:
|
|
1391
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1392
|
+
|
|
1393
|
+
# authentication setting
|
|
1394
|
+
_auth_settings: List[str] = [
|
|
1395
|
+
'bearer',
|
|
1396
|
+
'oauth2'
|
|
1397
|
+
]
|
|
1398
|
+
|
|
1399
|
+
return self.api_client.param_serialize(
|
|
1400
|
+
method='PUT',
|
|
1401
|
+
resource_path='/leaderboard/{leaderboardId}/name',
|
|
1402
|
+
path_params=_path_params,
|
|
1403
|
+
query_params=_query_params,
|
|
1404
|
+
header_params=_header_params,
|
|
1405
|
+
body=_body_params,
|
|
1406
|
+
post_params=_form_params,
|
|
1407
|
+
files=_files,
|
|
1408
|
+
auth_settings=_auth_settings,
|
|
1409
|
+
collection_formats=_collection_formats,
|
|
1410
|
+
_host=_host,
|
|
1411
|
+
_request_auth=_request_auth
|
|
1412
|
+
)
|
|
1413
|
+
|
|
1414
|
+
|
|
1415
|
+
|
|
1416
|
+
|
|
1133
1417
|
@validate_call
|
|
1134
1418
|
def leaderboard_leaderboard_id_participant_participant_id_get(
|
|
1135
1419
|
self,
|
|
@@ -3082,6 +3366,284 @@ class LeaderboardApi:
|
|
|
3082
3366
|
|
|
3083
3367
|
|
|
3084
3368
|
|
|
3369
|
+
@validate_call
|
|
3370
|
+
def leaderboard_leaderboard_id_runs_get(
|
|
3371
|
+
self,
|
|
3372
|
+
leaderboard_id: StrictStr,
|
|
3373
|
+
request: Optional[QueryModel] = None,
|
|
3374
|
+
_request_timeout: Union[
|
|
3375
|
+
None,
|
|
3376
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3377
|
+
Tuple[
|
|
3378
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3379
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3380
|
+
]
|
|
3381
|
+
] = None,
|
|
3382
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3383
|
+
_content_type: Optional[StrictStr] = None,
|
|
3384
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3385
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3386
|
+
) -> RunsByLeaderboardResultPagedResult:
|
|
3387
|
+
"""Gets the runs related to a leaderboard
|
|
3388
|
+
|
|
3389
|
+
|
|
3390
|
+
:param leaderboard_id: (required)
|
|
3391
|
+
:type leaderboard_id: str
|
|
3392
|
+
:param request:
|
|
3393
|
+
:type request: QueryModel
|
|
3394
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3395
|
+
number provided, it will be total request
|
|
3396
|
+
timeout. It can also be a pair (tuple) of
|
|
3397
|
+
(connection, read) timeouts.
|
|
3398
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3399
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3400
|
+
request; this effectively ignores the
|
|
3401
|
+
authentication in the spec for a single request.
|
|
3402
|
+
:type _request_auth: dict, optional
|
|
3403
|
+
:param _content_type: force content-type for the request.
|
|
3404
|
+
:type _content_type: str, Optional
|
|
3405
|
+
:param _headers: set to override the headers for a single
|
|
3406
|
+
request; this effectively ignores the headers
|
|
3407
|
+
in the spec for a single request.
|
|
3408
|
+
:type _headers: dict, optional
|
|
3409
|
+
:param _host_index: set to override the host_index for a single
|
|
3410
|
+
request; this effectively ignores the host_index
|
|
3411
|
+
in the spec for a single request.
|
|
3412
|
+
:type _host_index: int, optional
|
|
3413
|
+
:return: Returns the result object.
|
|
3414
|
+
""" # noqa: E501
|
|
3415
|
+
|
|
3416
|
+
_param = self._leaderboard_leaderboard_id_runs_get_serialize(
|
|
3417
|
+
leaderboard_id=leaderboard_id,
|
|
3418
|
+
request=request,
|
|
3419
|
+
_request_auth=_request_auth,
|
|
3420
|
+
_content_type=_content_type,
|
|
3421
|
+
_headers=_headers,
|
|
3422
|
+
_host_index=_host_index
|
|
3423
|
+
)
|
|
3424
|
+
|
|
3425
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3426
|
+
'200': "RunsByLeaderboardResultPagedResult",
|
|
3427
|
+
}
|
|
3428
|
+
response_data = self.api_client.call_api(
|
|
3429
|
+
*_param,
|
|
3430
|
+
_request_timeout=_request_timeout
|
|
3431
|
+
)
|
|
3432
|
+
response_data.read()
|
|
3433
|
+
return self.api_client.response_deserialize(
|
|
3434
|
+
response_data=response_data,
|
|
3435
|
+
response_types_map=_response_types_map,
|
|
3436
|
+
).data
|
|
3437
|
+
|
|
3438
|
+
|
|
3439
|
+
@validate_call
|
|
3440
|
+
def leaderboard_leaderboard_id_runs_get_with_http_info(
|
|
3441
|
+
self,
|
|
3442
|
+
leaderboard_id: StrictStr,
|
|
3443
|
+
request: Optional[QueryModel] = None,
|
|
3444
|
+
_request_timeout: Union[
|
|
3445
|
+
None,
|
|
3446
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3447
|
+
Tuple[
|
|
3448
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3449
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3450
|
+
]
|
|
3451
|
+
] = None,
|
|
3452
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3453
|
+
_content_type: Optional[StrictStr] = None,
|
|
3454
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3455
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3456
|
+
) -> ApiResponse[RunsByLeaderboardResultPagedResult]:
|
|
3457
|
+
"""Gets the runs related to a leaderboard
|
|
3458
|
+
|
|
3459
|
+
|
|
3460
|
+
:param leaderboard_id: (required)
|
|
3461
|
+
:type leaderboard_id: str
|
|
3462
|
+
:param request:
|
|
3463
|
+
:type request: QueryModel
|
|
3464
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3465
|
+
number provided, it will be total request
|
|
3466
|
+
timeout. It can also be a pair (tuple) of
|
|
3467
|
+
(connection, read) timeouts.
|
|
3468
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3469
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3470
|
+
request; this effectively ignores the
|
|
3471
|
+
authentication in the spec for a single request.
|
|
3472
|
+
:type _request_auth: dict, optional
|
|
3473
|
+
:param _content_type: force content-type for the request.
|
|
3474
|
+
:type _content_type: str, Optional
|
|
3475
|
+
:param _headers: set to override the headers for a single
|
|
3476
|
+
request; this effectively ignores the headers
|
|
3477
|
+
in the spec for a single request.
|
|
3478
|
+
:type _headers: dict, optional
|
|
3479
|
+
:param _host_index: set to override the host_index for a single
|
|
3480
|
+
request; this effectively ignores the host_index
|
|
3481
|
+
in the spec for a single request.
|
|
3482
|
+
:type _host_index: int, optional
|
|
3483
|
+
:return: Returns the result object.
|
|
3484
|
+
""" # noqa: E501
|
|
3485
|
+
|
|
3486
|
+
_param = self._leaderboard_leaderboard_id_runs_get_serialize(
|
|
3487
|
+
leaderboard_id=leaderboard_id,
|
|
3488
|
+
request=request,
|
|
3489
|
+
_request_auth=_request_auth,
|
|
3490
|
+
_content_type=_content_type,
|
|
3491
|
+
_headers=_headers,
|
|
3492
|
+
_host_index=_host_index
|
|
3493
|
+
)
|
|
3494
|
+
|
|
3495
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3496
|
+
'200': "RunsByLeaderboardResultPagedResult",
|
|
3497
|
+
}
|
|
3498
|
+
response_data = self.api_client.call_api(
|
|
3499
|
+
*_param,
|
|
3500
|
+
_request_timeout=_request_timeout
|
|
3501
|
+
)
|
|
3502
|
+
response_data.read()
|
|
3503
|
+
return self.api_client.response_deserialize(
|
|
3504
|
+
response_data=response_data,
|
|
3505
|
+
response_types_map=_response_types_map,
|
|
3506
|
+
)
|
|
3507
|
+
|
|
3508
|
+
|
|
3509
|
+
@validate_call
|
|
3510
|
+
def leaderboard_leaderboard_id_runs_get_without_preload_content(
|
|
3511
|
+
self,
|
|
3512
|
+
leaderboard_id: StrictStr,
|
|
3513
|
+
request: Optional[QueryModel] = None,
|
|
3514
|
+
_request_timeout: Union[
|
|
3515
|
+
None,
|
|
3516
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3517
|
+
Tuple[
|
|
3518
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3519
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3520
|
+
]
|
|
3521
|
+
] = None,
|
|
3522
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3523
|
+
_content_type: Optional[StrictStr] = None,
|
|
3524
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3525
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3526
|
+
) -> RESTResponseType:
|
|
3527
|
+
"""Gets the runs related to a leaderboard
|
|
3528
|
+
|
|
3529
|
+
|
|
3530
|
+
:param leaderboard_id: (required)
|
|
3531
|
+
:type leaderboard_id: str
|
|
3532
|
+
:param request:
|
|
3533
|
+
:type request: QueryModel
|
|
3534
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3535
|
+
number provided, it will be total request
|
|
3536
|
+
timeout. It can also be a pair (tuple) of
|
|
3537
|
+
(connection, read) timeouts.
|
|
3538
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3539
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3540
|
+
request; this effectively ignores the
|
|
3541
|
+
authentication in the spec for a single request.
|
|
3542
|
+
:type _request_auth: dict, optional
|
|
3543
|
+
:param _content_type: force content-type for the request.
|
|
3544
|
+
:type _content_type: str, Optional
|
|
3545
|
+
:param _headers: set to override the headers for a single
|
|
3546
|
+
request; this effectively ignores the headers
|
|
3547
|
+
in the spec for a single request.
|
|
3548
|
+
:type _headers: dict, optional
|
|
3549
|
+
:param _host_index: set to override the host_index for a single
|
|
3550
|
+
request; this effectively ignores the host_index
|
|
3551
|
+
in the spec for a single request.
|
|
3552
|
+
:type _host_index: int, optional
|
|
3553
|
+
:return: Returns the result object.
|
|
3554
|
+
""" # noqa: E501
|
|
3555
|
+
|
|
3556
|
+
_param = self._leaderboard_leaderboard_id_runs_get_serialize(
|
|
3557
|
+
leaderboard_id=leaderboard_id,
|
|
3558
|
+
request=request,
|
|
3559
|
+
_request_auth=_request_auth,
|
|
3560
|
+
_content_type=_content_type,
|
|
3561
|
+
_headers=_headers,
|
|
3562
|
+
_host_index=_host_index
|
|
3563
|
+
)
|
|
3564
|
+
|
|
3565
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3566
|
+
'200': "RunsByLeaderboardResultPagedResult",
|
|
3567
|
+
}
|
|
3568
|
+
response_data = self.api_client.call_api(
|
|
3569
|
+
*_param,
|
|
3570
|
+
_request_timeout=_request_timeout
|
|
3571
|
+
)
|
|
3572
|
+
return response_data.response
|
|
3573
|
+
|
|
3574
|
+
|
|
3575
|
+
def _leaderboard_leaderboard_id_runs_get_serialize(
|
|
3576
|
+
self,
|
|
3577
|
+
leaderboard_id,
|
|
3578
|
+
request,
|
|
3579
|
+
_request_auth,
|
|
3580
|
+
_content_type,
|
|
3581
|
+
_headers,
|
|
3582
|
+
_host_index,
|
|
3583
|
+
) -> RequestSerialized:
|
|
3584
|
+
|
|
3585
|
+
_host = None
|
|
3586
|
+
|
|
3587
|
+
_collection_formats: Dict[str, str] = {
|
|
3588
|
+
}
|
|
3589
|
+
|
|
3590
|
+
_path_params: Dict[str, str] = {}
|
|
3591
|
+
_query_params: List[Tuple[str, str]] = []
|
|
3592
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
3593
|
+
_form_params: List[Tuple[str, str]] = []
|
|
3594
|
+
_files: Dict[
|
|
3595
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
3596
|
+
] = {}
|
|
3597
|
+
_body_params: Optional[bytes] = None
|
|
3598
|
+
|
|
3599
|
+
# process the path parameters
|
|
3600
|
+
if leaderboard_id is not None:
|
|
3601
|
+
_path_params['leaderboardId'] = leaderboard_id
|
|
3602
|
+
# process the query parameters
|
|
3603
|
+
if request is not None:
|
|
3604
|
+
|
|
3605
|
+
_query_params.append(('request', request))
|
|
3606
|
+
|
|
3607
|
+
# process the header parameters
|
|
3608
|
+
# process the form parameters
|
|
3609
|
+
# process the body parameter
|
|
3610
|
+
|
|
3611
|
+
|
|
3612
|
+
# set the HTTP header `Accept`
|
|
3613
|
+
if 'Accept' not in _header_params:
|
|
3614
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
3615
|
+
[
|
|
3616
|
+
'text/plain',
|
|
3617
|
+
'application/json',
|
|
3618
|
+
'text/json'
|
|
3619
|
+
]
|
|
3620
|
+
)
|
|
3621
|
+
|
|
3622
|
+
|
|
3623
|
+
# authentication setting
|
|
3624
|
+
_auth_settings: List[str] = [
|
|
3625
|
+
'bearer',
|
|
3626
|
+
'oauth2'
|
|
3627
|
+
]
|
|
3628
|
+
|
|
3629
|
+
return self.api_client.param_serialize(
|
|
3630
|
+
method='GET',
|
|
3631
|
+
resource_path='/leaderboard/{leaderboardId}/runs',
|
|
3632
|
+
path_params=_path_params,
|
|
3633
|
+
query_params=_query_params,
|
|
3634
|
+
header_params=_header_params,
|
|
3635
|
+
body=_body_params,
|
|
3636
|
+
post_params=_form_params,
|
|
3637
|
+
files=_files,
|
|
3638
|
+
auth_settings=_auth_settings,
|
|
3639
|
+
collection_formats=_collection_formats,
|
|
3640
|
+
_host=_host,
|
|
3641
|
+
_request_auth=_request_auth
|
|
3642
|
+
)
|
|
3643
|
+
|
|
3644
|
+
|
|
3645
|
+
|
|
3646
|
+
|
|
3085
3647
|
@validate_call
|
|
3086
3648
|
def leaderboard_leaderboard_id_standings_get(
|
|
3087
3649
|
self,
|
|
@@ -301,6 +301,9 @@ from rapidata.api_client.models.report_model import ReportModel
|
|
|
301
301
|
from rapidata.api_client.models.response_count_user_filter_model import ResponseCountUserFilterModel
|
|
302
302
|
from rapidata.api_client.models.retrieval_mode import RetrievalMode
|
|
303
303
|
from rapidata.api_client.models.root_filter import RootFilter
|
|
304
|
+
from rapidata.api_client.models.run_status import RunStatus
|
|
305
|
+
from rapidata.api_client.models.runs_by_leaderboard_result import RunsByLeaderboardResult
|
|
306
|
+
from rapidata.api_client.models.runs_by_leaderboard_result_paged_result import RunsByLeaderboardResultPagedResult
|
|
304
307
|
from rapidata.api_client.models.scrub_payload import ScrubPayload
|
|
305
308
|
from rapidata.api_client.models.scrub_range import ScrubRange
|
|
306
309
|
from rapidata.api_client.models.scrub_rapid_blueprint import ScrubRapidBlueprint
|
|
@@ -350,9 +353,11 @@ from rapidata.api_client.models.transcription_word import TranscriptionWord
|
|
|
350
353
|
from rapidata.api_client.models.translated_prompt_metadata_model import TranslatedPromptMetadataModel
|
|
351
354
|
from rapidata.api_client.models.translated_string import TranslatedString
|
|
352
355
|
from rapidata.api_client.models.unlock_order_result import UnlockOrderResult
|
|
356
|
+
from rapidata.api_client.models.update_benchmark_name_model import UpdateBenchmarkNameModel
|
|
353
357
|
from rapidata.api_client.models.update_campaign_model import UpdateCampaignModel
|
|
354
358
|
from rapidata.api_client.models.update_dataset_name_model import UpdateDatasetNameModel
|
|
355
359
|
from rapidata.api_client.models.update_dimensions_model import UpdateDimensionsModel
|
|
360
|
+
from rapidata.api_client.models.update_leaderboard_name_model import UpdateLeaderboardNameModel
|
|
356
361
|
from rapidata.api_client.models.update_order_name_model import UpdateOrderNameModel
|
|
357
362
|
from rapidata.api_client.models.update_validation_rapid_model import UpdateValidationRapidModel
|
|
358
363
|
from rapidata.api_client.models.update_validation_rapid_model_truth import UpdateValidationRapidModelTruth
|
|
@@ -41,8 +41,8 @@ class FileTypeMetadata(BaseModel):
|
|
|
41
41
|
@field_validator('file_type')
|
|
42
42
|
def file_type_validate_enum(cls, value):
|
|
43
43
|
"""Validates the enum"""
|
|
44
|
-
if value not in set(['Image', 'Video', 'Audio']):
|
|
45
|
-
raise ValueError("must be one of enum values ('Image', 'Video', 'Audio')")
|
|
44
|
+
if value not in set(['Unknown', 'Image', 'Video', 'Audio']):
|
|
45
|
+
raise ValueError("must be one of enum values ('Unknown', 'Image', 'Video', 'Audio')")
|
|
46
46
|
return value
|
|
47
47
|
|
|
48
48
|
model_config = ConfigDict(
|
|
@@ -40,8 +40,8 @@ class FileTypeMetadataModel(BaseModel):
|
|
|
40
40
|
@field_validator('file_type')
|
|
41
41
|
def file_type_validate_enum(cls, value):
|
|
42
42
|
"""Validates the enum"""
|
|
43
|
-
if value not in set(['Image', 'Video', 'Audio']):
|
|
44
|
-
raise ValueError("must be one of enum values ('Image', 'Video', 'Audio')")
|
|
43
|
+
if value not in set(['Unknown', 'Image', 'Video', 'Audio']):
|
|
44
|
+
raise ValueError("must be one of enum values ('Unknown', 'Image', 'Video', 'Audio')")
|
|
45
45
|
return value
|
|
46
46
|
|
|
47
47
|
model_config = ConfigDict(
|
|
@@ -19,7 +19,8 @@ import json
|
|
|
19
19
|
|
|
20
20
|
from datetime import datetime
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
|
-
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from rapidata.api_client.models.get_validation_rapids_result_asset import GetValidationRapidsResultAsset
|
|
23
24
|
from typing import Optional, Set
|
|
24
25
|
from typing_extensions import Self
|
|
25
26
|
|
|
@@ -27,10 +28,11 @@ class PromptByBenchmarkResult(BaseModel):
|
|
|
27
28
|
"""
|
|
28
29
|
PromptByBenchmarkResult
|
|
29
30
|
""" # noqa: E501
|
|
30
|
-
prompt: StrictStr
|
|
31
|
+
prompt: Optional[StrictStr] = None
|
|
32
|
+
prompt_asset: Optional[GetValidationRapidsResultAsset] = Field(default=None, alias="promptAsset")
|
|
31
33
|
identifier: StrictStr
|
|
32
34
|
created_at: datetime = Field(alias="createdAt")
|
|
33
|
-
__properties: ClassVar[List[str]] = ["prompt", "identifier", "createdAt"]
|
|
35
|
+
__properties: ClassVar[List[str]] = ["prompt", "promptAsset", "identifier", "createdAt"]
|
|
34
36
|
|
|
35
37
|
model_config = ConfigDict(
|
|
36
38
|
populate_by_name=True,
|
|
@@ -71,6 +73,19 @@ class PromptByBenchmarkResult(BaseModel):
|
|
|
71
73
|
exclude=excluded_fields,
|
|
72
74
|
exclude_none=True,
|
|
73
75
|
)
|
|
76
|
+
# override the default output from pydantic by calling `to_dict()` of prompt_asset
|
|
77
|
+
if self.prompt_asset:
|
|
78
|
+
_dict['promptAsset'] = self.prompt_asset.to_dict()
|
|
79
|
+
# set to None if prompt (nullable) is None
|
|
80
|
+
# and model_fields_set contains the field
|
|
81
|
+
if self.prompt is None and "prompt" in self.model_fields_set:
|
|
82
|
+
_dict['prompt'] = None
|
|
83
|
+
|
|
84
|
+
# set to None if prompt_asset (nullable) is None
|
|
85
|
+
# and model_fields_set contains the field
|
|
86
|
+
if self.prompt_asset is None and "prompt_asset" in self.model_fields_set:
|
|
87
|
+
_dict['promptAsset'] = None
|
|
88
|
+
|
|
74
89
|
return _dict
|
|
75
90
|
|
|
76
91
|
@classmethod
|
|
@@ -84,6 +99,7 @@ class PromptByBenchmarkResult(BaseModel):
|
|
|
84
99
|
|
|
85
100
|
_obj = cls.model_validate({
|
|
86
101
|
"prompt": obj.get("prompt"),
|
|
102
|
+
"promptAsset": GetValidationRapidsResultAsset.from_dict(obj["promptAsset"]) if obj.get("promptAsset") is not None else None,
|
|
87
103
|
"identifier": obj.get("identifier"),
|
|
88
104
|
"createdAt": obj.get("createdAt")
|
|
89
105
|
})
|