rapidata 2.37.0__py3-none-any.whl → 2.39.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.

Files changed (117) hide show
  1. rapidata/__init__.py +3 -4
  2. rapidata/api_client/__init__.py +4 -5
  3. rapidata/api_client/api/benchmark_api.py +289 -3
  4. rapidata/api_client/api/leaderboard_api.py +35 -1
  5. rapidata/api_client/api/participant_api.py +289 -3
  6. rapidata/api_client/api/validation_set_api.py +119 -400
  7. rapidata/api_client/models/__init__.py +4 -5
  8. rapidata/api_client/models/ab_test_selection_a_inner.py +1 -1
  9. rapidata/api_client/models/compare_workflow_model1.py +1 -8
  10. rapidata/api_client/models/conditional_validation_selection.py +4 -9
  11. rapidata/api_client/models/confidence_interval.py +98 -0
  12. rapidata/api_client/models/create_simple_pipeline_model_pipeline_steps_inner.py +8 -22
  13. rapidata/api_client/models/get_standing_by_id_result.py +7 -2
  14. rapidata/api_client/models/get_validation_set_by_id_result.py +4 -2
  15. rapidata/api_client/models/simple_workflow_model1.py +1 -8
  16. rapidata/api_client/models/standing_by_leaderboard.py +10 -4
  17. rapidata/api_client/models/update_benchmark_model.py +87 -0
  18. rapidata/api_client/models/update_participant_model.py +87 -0
  19. rapidata/api_client/models/update_validation_set_model.py +93 -0
  20. rapidata/api_client/models/validation_chance.py +20 -3
  21. rapidata/api_client/models/validation_set_model.py +5 -42
  22. rapidata/api_client_README.md +7 -7
  23. rapidata/rapidata_client/__init__.py +1 -4
  24. rapidata/rapidata_client/api/{rapidata_exception.py → rapidata_api_client.py} +119 -2
  25. rapidata/rapidata_client/benchmark/leaderboard/rapidata_leaderboard.py +88 -46
  26. rapidata/rapidata_client/benchmark/participant/_participant.py +26 -9
  27. rapidata/rapidata_client/benchmark/rapidata_benchmark.py +310 -210
  28. rapidata/rapidata_client/benchmark/rapidata_benchmark_manager.py +134 -75
  29. rapidata/rapidata_client/config/__init__.py +3 -0
  30. rapidata/rapidata_client/config/logger.py +135 -0
  31. rapidata/rapidata_client/config/logging_config.py +58 -0
  32. rapidata/rapidata_client/config/managed_print.py +6 -0
  33. rapidata/rapidata_client/config/order_config.py +14 -0
  34. rapidata/rapidata_client/config/rapidata_config.py +15 -10
  35. rapidata/rapidata_client/config/tracer.py +130 -0
  36. rapidata/rapidata_client/config/upload_config.py +14 -0
  37. rapidata/rapidata_client/datapoints/_datapoint.py +1 -1
  38. rapidata/rapidata_client/datapoints/assets/__init__.py +1 -0
  39. rapidata/rapidata_client/datapoints/assets/_base_asset.py +2 -0
  40. rapidata/rapidata_client/datapoints/assets/_media_asset.py +1 -1
  41. rapidata/rapidata_client/datapoints/assets/_sessions.py +2 -2
  42. rapidata/rapidata_client/datapoints/assets/_text_asset.py +2 -2
  43. rapidata/rapidata_client/datapoints/assets/data_type_enum.py +1 -1
  44. rapidata/rapidata_client/datapoints/metadata/_media_asset_metadata.py +9 -8
  45. rapidata/rapidata_client/datapoints/metadata/_prompt_metadata.py +1 -2
  46. rapidata/rapidata_client/demographic/demographic_manager.py +16 -14
  47. rapidata/rapidata_client/filter/_base_filter.py +11 -5
  48. rapidata/rapidata_client/filter/age_filter.py +9 -3
  49. rapidata/rapidata_client/filter/and_filter.py +20 -5
  50. rapidata/rapidata_client/filter/campaign_filter.py +7 -1
  51. rapidata/rapidata_client/filter/country_filter.py +8 -2
  52. rapidata/rapidata_client/filter/custom_filter.py +9 -3
  53. rapidata/rapidata_client/filter/gender_filter.py +9 -3
  54. rapidata/rapidata_client/filter/language_filter.py +12 -5
  55. rapidata/rapidata_client/filter/models/age_group.py +4 -4
  56. rapidata/rapidata_client/filter/models/gender.py +4 -2
  57. rapidata/rapidata_client/filter/new_user_filter.py +3 -4
  58. rapidata/rapidata_client/filter/not_filter.py +17 -5
  59. rapidata/rapidata_client/filter/or_filter.py +20 -5
  60. rapidata/rapidata_client/filter/rapidata_filters.py +12 -9
  61. rapidata/rapidata_client/filter/response_count_filter.py +6 -0
  62. rapidata/rapidata_client/filter/user_score_filter.py +17 -5
  63. rapidata/rapidata_client/order/_rapidata_dataset.py +45 -17
  64. rapidata/rapidata_client/order/_rapidata_order_builder.py +19 -13
  65. rapidata/rapidata_client/order/rapidata_order.py +60 -48
  66. rapidata/rapidata_client/order/rapidata_order_manager.py +231 -197
  67. rapidata/rapidata_client/order/rapidata_results.py +71 -57
  68. rapidata/rapidata_client/rapidata_client.py +36 -23
  69. rapidata/rapidata_client/referee/__init__.py +1 -1
  70. rapidata/rapidata_client/referee/_base_referee.py +3 -1
  71. rapidata/rapidata_client/referee/_early_stopping_referee.py +2 -2
  72. rapidata/rapidata_client/selection/_base_selection.py +6 -0
  73. rapidata/rapidata_client/selection/ab_test_selection.py +7 -3
  74. rapidata/rapidata_client/selection/capped_selection.py +2 -2
  75. rapidata/rapidata_client/selection/conditional_validation_selection.py +12 -6
  76. rapidata/rapidata_client/selection/demographic_selection.py +9 -6
  77. rapidata/rapidata_client/selection/rapidata_selections.py +11 -8
  78. rapidata/rapidata_client/selection/shuffling_selection.py +5 -5
  79. rapidata/rapidata_client/selection/static_selection.py +5 -10
  80. rapidata/rapidata_client/selection/validation_selection.py +9 -5
  81. rapidata/rapidata_client/settings/_rapidata_setting.py +8 -0
  82. rapidata/rapidata_client/settings/alert_on_fast_response.py +8 -5
  83. rapidata/rapidata_client/settings/allow_neither_both.py +1 -0
  84. rapidata/rapidata_client/settings/custom_setting.py +3 -2
  85. rapidata/rapidata_client/settings/free_text_minimum_characters.py +9 -4
  86. rapidata/rapidata_client/settings/models/translation_behaviour_options.py +3 -2
  87. rapidata/rapidata_client/settings/no_shuffle.py +4 -2
  88. rapidata/rapidata_client/settings/play_video_until_the_end.py +7 -4
  89. rapidata/rapidata_client/settings/rapidata_settings.py +4 -3
  90. rapidata/rapidata_client/settings/translation_behaviour.py +7 -5
  91. rapidata/rapidata_client/validation/rapidata_validation_set.py +23 -17
  92. rapidata/rapidata_client/validation/rapids/box.py +3 -1
  93. rapidata/rapidata_client/validation/rapids/rapids.py +7 -1
  94. rapidata/rapidata_client/validation/rapids/rapids_manager.py +174 -141
  95. rapidata/rapidata_client/validation/validation_set_manager.py +285 -268
  96. rapidata/rapidata_client/workflow/__init__.py +1 -1
  97. rapidata/rapidata_client/workflow/_base_workflow.py +6 -1
  98. rapidata/rapidata_client/workflow/_classify_workflow.py +6 -0
  99. rapidata/rapidata_client/workflow/_compare_workflow.py +6 -0
  100. rapidata/rapidata_client/workflow/_draw_workflow.py +6 -0
  101. rapidata/rapidata_client/workflow/_evaluation_workflow.py +6 -0
  102. rapidata/rapidata_client/workflow/_free_text_workflow.py +6 -0
  103. rapidata/rapidata_client/workflow/_locate_workflow.py +6 -0
  104. rapidata/rapidata_client/workflow/_ranking_workflow.py +12 -0
  105. rapidata/rapidata_client/workflow/_select_words_workflow.py +6 -0
  106. rapidata/rapidata_client/workflow/_timestamp_workflow.py +6 -0
  107. rapidata/service/__init__.py +1 -1
  108. rapidata/service/credential_manager.py +1 -1
  109. rapidata/service/local_file_service.py +9 -8
  110. rapidata/service/openapi_service.py +2 -2
  111. {rapidata-2.37.0.dist-info → rapidata-2.39.0.dist-info}/METADATA +4 -1
  112. {rapidata-2.37.0.dist-info → rapidata-2.39.0.dist-info}/RECORD +114 -107
  113. rapidata/rapidata_client/logging/__init__.py +0 -2
  114. rapidata/rapidata_client/logging/logger.py +0 -122
  115. rapidata/rapidata_client/logging/output_manager.py +0 -20
  116. {rapidata-2.37.0.dist-info → rapidata-2.39.0.dist-info}/LICENSE +0 -0
  117. {rapidata-2.37.0.dist-info → rapidata-2.39.0.dist-info}/WHEEL +0 -0
@@ -24,6 +24,7 @@ from rapidata.api_client.models.get_participant_by_id_result import GetParticipa
24
24
  from rapidata.api_client.models.query_model import QueryModel
25
25
  from rapidata.api_client.models.sample_by_participant_paged_result import SampleByParticipantPagedResult
26
26
  from rapidata.api_client.models.submit_participant_result import SubmitParticipantResult
27
+ from rapidata.api_client.models.update_participant_model import UpdateParticipantModel
27
28
  from rapidata.api_client.models.update_participant_name_model import UpdateParticipantNameModel
28
29
 
29
30
  from rapidata.api_client.api_client import ApiClient, RequestSerialized
@@ -827,7 +828,7 @@ class ParticipantApi:
827
828
  _headers: Optional[Dict[StrictStr, Any]] = None,
828
829
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
829
830
  ) -> None:
830
- """Updates the name of a participant
831
+ """(Deprecated) Updates the name of a participant
831
832
 
832
833
 
833
834
  :param participant_id: (required)
@@ -855,6 +856,7 @@ class ParticipantApi:
855
856
  :type _host_index: int, optional
856
857
  :return: Returns the result object.
857
858
  """ # noqa: E501
859
+ warnings.warn("PUT /participant/{participantId}/name is deprecated.", DeprecationWarning)
858
860
 
859
861
  _param = self._participant_participant_id_name_put_serialize(
860
862
  participant_id=participant_id,
@@ -897,7 +899,7 @@ class ParticipantApi:
897
899
  _headers: Optional[Dict[StrictStr, Any]] = None,
898
900
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
899
901
  ) -> ApiResponse[None]:
900
- """Updates the name of a participant
902
+ """(Deprecated) Updates the name of a participant
901
903
 
902
904
 
903
905
  :param participant_id: (required)
@@ -925,6 +927,7 @@ class ParticipantApi:
925
927
  :type _host_index: int, optional
926
928
  :return: Returns the result object.
927
929
  """ # noqa: E501
930
+ warnings.warn("PUT /participant/{participantId}/name is deprecated.", DeprecationWarning)
928
931
 
929
932
  _param = self._participant_participant_id_name_put_serialize(
930
933
  participant_id=participant_id,
@@ -967,7 +970,7 @@ class ParticipantApi:
967
970
  _headers: Optional[Dict[StrictStr, Any]] = None,
968
971
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
969
972
  ) -> RESTResponseType:
970
- """Updates the name of a participant
973
+ """(Deprecated) Updates the name of a participant
971
974
 
972
975
 
973
976
  :param participant_id: (required)
@@ -995,6 +998,7 @@ class ParticipantApi:
995
998
  :type _host_index: int, optional
996
999
  :return: Returns the result object.
997
1000
  """ # noqa: E501
1001
+ warnings.warn("PUT /participant/{participantId}/name is deprecated.", DeprecationWarning)
998
1002
 
999
1003
  _param = self._participant_participant_id_name_put_serialize(
1000
1004
  participant_id=participant_id,
@@ -1091,6 +1095,288 @@ class ParticipantApi:
1091
1095
 
1092
1096
 
1093
1097
 
1098
+ @validate_call
1099
+ def participant_participant_id_patch(
1100
+ self,
1101
+ participant_id: StrictStr,
1102
+ update_participant_model: Optional[UpdateParticipantModel] = None,
1103
+ _request_timeout: Union[
1104
+ None,
1105
+ Annotated[StrictFloat, Field(gt=0)],
1106
+ Tuple[
1107
+ Annotated[StrictFloat, Field(gt=0)],
1108
+ Annotated[StrictFloat, Field(gt=0)]
1109
+ ]
1110
+ ] = None,
1111
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1112
+ _content_type: Optional[StrictStr] = None,
1113
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1114
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1115
+ ) -> None:
1116
+ """Updates a participant using patch semantics.
1117
+
1118
+
1119
+ :param participant_id: (required)
1120
+ :type participant_id: str
1121
+ :param update_participant_model:
1122
+ :type update_participant_model: UpdateParticipantModel
1123
+ :param _request_timeout: timeout setting for this request. If one
1124
+ number provided, it will be total request
1125
+ timeout. It can also be a pair (tuple) of
1126
+ (connection, read) timeouts.
1127
+ :type _request_timeout: int, tuple(int, int), optional
1128
+ :param _request_auth: set to override the auth_settings for an a single
1129
+ request; this effectively ignores the
1130
+ authentication in the spec for a single request.
1131
+ :type _request_auth: dict, optional
1132
+ :param _content_type: force content-type for the request.
1133
+ :type _content_type: str, Optional
1134
+ :param _headers: set to override the headers for a single
1135
+ request; this effectively ignores the headers
1136
+ in the spec for a single request.
1137
+ :type _headers: dict, optional
1138
+ :param _host_index: set to override the host_index for a single
1139
+ request; this effectively ignores the host_index
1140
+ in the spec for a single request.
1141
+ :type _host_index: int, optional
1142
+ :return: Returns the result object.
1143
+ """ # noqa: E501
1144
+
1145
+ _param = self._participant_participant_id_patch_serialize(
1146
+ participant_id=participant_id,
1147
+ update_participant_model=update_participant_model,
1148
+ _request_auth=_request_auth,
1149
+ _content_type=_content_type,
1150
+ _headers=_headers,
1151
+ _host_index=_host_index
1152
+ )
1153
+
1154
+ _response_types_map: Dict[str, Optional[str]] = {
1155
+ '204': None,
1156
+ }
1157
+ response_data = self.api_client.call_api(
1158
+ *_param,
1159
+ _request_timeout=_request_timeout
1160
+ )
1161
+ response_data.read()
1162
+ return self.api_client.response_deserialize(
1163
+ response_data=response_data,
1164
+ response_types_map=_response_types_map,
1165
+ ).data
1166
+
1167
+
1168
+ @validate_call
1169
+ def participant_participant_id_patch_with_http_info(
1170
+ self,
1171
+ participant_id: StrictStr,
1172
+ update_participant_model: Optional[UpdateParticipantModel] = None,
1173
+ _request_timeout: Union[
1174
+ None,
1175
+ Annotated[StrictFloat, Field(gt=0)],
1176
+ Tuple[
1177
+ Annotated[StrictFloat, Field(gt=0)],
1178
+ Annotated[StrictFloat, Field(gt=0)]
1179
+ ]
1180
+ ] = None,
1181
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1182
+ _content_type: Optional[StrictStr] = None,
1183
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1184
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1185
+ ) -> ApiResponse[None]:
1186
+ """Updates a participant using patch semantics.
1187
+
1188
+
1189
+ :param participant_id: (required)
1190
+ :type participant_id: str
1191
+ :param update_participant_model:
1192
+ :type update_participant_model: UpdateParticipantModel
1193
+ :param _request_timeout: timeout setting for this request. If one
1194
+ number provided, it will be total request
1195
+ timeout. It can also be a pair (tuple) of
1196
+ (connection, read) timeouts.
1197
+ :type _request_timeout: int, tuple(int, int), optional
1198
+ :param _request_auth: set to override the auth_settings for an a single
1199
+ request; this effectively ignores the
1200
+ authentication in the spec for a single request.
1201
+ :type _request_auth: dict, optional
1202
+ :param _content_type: force content-type for the request.
1203
+ :type _content_type: str, Optional
1204
+ :param _headers: set to override the headers for a single
1205
+ request; this effectively ignores the headers
1206
+ in the spec for a single request.
1207
+ :type _headers: dict, optional
1208
+ :param _host_index: set to override the host_index for a single
1209
+ request; this effectively ignores the host_index
1210
+ in the spec for a single request.
1211
+ :type _host_index: int, optional
1212
+ :return: Returns the result object.
1213
+ """ # noqa: E501
1214
+
1215
+ _param = self._participant_participant_id_patch_serialize(
1216
+ participant_id=participant_id,
1217
+ update_participant_model=update_participant_model,
1218
+ _request_auth=_request_auth,
1219
+ _content_type=_content_type,
1220
+ _headers=_headers,
1221
+ _host_index=_host_index
1222
+ )
1223
+
1224
+ _response_types_map: Dict[str, Optional[str]] = {
1225
+ '204': None,
1226
+ }
1227
+ response_data = self.api_client.call_api(
1228
+ *_param,
1229
+ _request_timeout=_request_timeout
1230
+ )
1231
+ response_data.read()
1232
+ return self.api_client.response_deserialize(
1233
+ response_data=response_data,
1234
+ response_types_map=_response_types_map,
1235
+ )
1236
+
1237
+
1238
+ @validate_call
1239
+ def participant_participant_id_patch_without_preload_content(
1240
+ self,
1241
+ participant_id: StrictStr,
1242
+ update_participant_model: Optional[UpdateParticipantModel] = None,
1243
+ _request_timeout: Union[
1244
+ None,
1245
+ Annotated[StrictFloat, Field(gt=0)],
1246
+ Tuple[
1247
+ Annotated[StrictFloat, Field(gt=0)],
1248
+ Annotated[StrictFloat, Field(gt=0)]
1249
+ ]
1250
+ ] = None,
1251
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1252
+ _content_type: Optional[StrictStr] = None,
1253
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1254
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1255
+ ) -> RESTResponseType:
1256
+ """Updates a participant using patch semantics.
1257
+
1258
+
1259
+ :param participant_id: (required)
1260
+ :type participant_id: str
1261
+ :param update_participant_model:
1262
+ :type update_participant_model: UpdateParticipantModel
1263
+ :param _request_timeout: timeout setting for this request. If one
1264
+ number provided, it will be total request
1265
+ timeout. It can also be a pair (tuple) of
1266
+ (connection, read) timeouts.
1267
+ :type _request_timeout: int, tuple(int, int), optional
1268
+ :param _request_auth: set to override the auth_settings for an a single
1269
+ request; this effectively ignores the
1270
+ authentication in the spec for a single request.
1271
+ :type _request_auth: dict, optional
1272
+ :param _content_type: force content-type for the request.
1273
+ :type _content_type: str, Optional
1274
+ :param _headers: set to override the headers for a single
1275
+ request; this effectively ignores the headers
1276
+ in the spec for a single request.
1277
+ :type _headers: dict, optional
1278
+ :param _host_index: set to override the host_index for a single
1279
+ request; this effectively ignores the host_index
1280
+ in the spec for a single request.
1281
+ :type _host_index: int, optional
1282
+ :return: Returns the result object.
1283
+ """ # noqa: E501
1284
+
1285
+ _param = self._participant_participant_id_patch_serialize(
1286
+ participant_id=participant_id,
1287
+ update_participant_model=update_participant_model,
1288
+ _request_auth=_request_auth,
1289
+ _content_type=_content_type,
1290
+ _headers=_headers,
1291
+ _host_index=_host_index
1292
+ )
1293
+
1294
+ _response_types_map: Dict[str, Optional[str]] = {
1295
+ '204': None,
1296
+ }
1297
+ response_data = self.api_client.call_api(
1298
+ *_param,
1299
+ _request_timeout=_request_timeout
1300
+ )
1301
+ return response_data.response
1302
+
1303
+
1304
+ def _participant_participant_id_patch_serialize(
1305
+ self,
1306
+ participant_id,
1307
+ update_participant_model,
1308
+ _request_auth,
1309
+ _content_type,
1310
+ _headers,
1311
+ _host_index,
1312
+ ) -> RequestSerialized:
1313
+
1314
+ _host = None
1315
+
1316
+ _collection_formats: Dict[str, str] = {
1317
+ }
1318
+
1319
+ _path_params: Dict[str, str] = {}
1320
+ _query_params: List[Tuple[str, str]] = []
1321
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1322
+ _form_params: List[Tuple[str, str]] = []
1323
+ _files: Dict[
1324
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1325
+ ] = {}
1326
+ _body_params: Optional[bytes] = None
1327
+
1328
+ # process the path parameters
1329
+ if participant_id is not None:
1330
+ _path_params['participantId'] = participant_id
1331
+ # process the query parameters
1332
+ # process the header parameters
1333
+ # process the form parameters
1334
+ # process the body parameter
1335
+ if update_participant_model is not None:
1336
+ _body_params = update_participant_model
1337
+
1338
+
1339
+
1340
+ # set the HTTP header `Content-Type`
1341
+ if _content_type:
1342
+ _header_params['Content-Type'] = _content_type
1343
+ else:
1344
+ _default_content_type = (
1345
+ self.api_client.select_header_content_type(
1346
+ [
1347
+ 'application/json',
1348
+ 'text/json',
1349
+ 'application/*+json'
1350
+ ]
1351
+ )
1352
+ )
1353
+ if _default_content_type is not None:
1354
+ _header_params['Content-Type'] = _default_content_type
1355
+
1356
+ # authentication setting
1357
+ _auth_settings: List[str] = [
1358
+ 'bearer',
1359
+ 'oauth2'
1360
+ ]
1361
+
1362
+ return self.api_client.param_serialize(
1363
+ method='PATCH',
1364
+ resource_path='/participant/{participantId}',
1365
+ path_params=_path_params,
1366
+ query_params=_query_params,
1367
+ header_params=_header_params,
1368
+ body=_body_params,
1369
+ post_params=_form_params,
1370
+ files=_files,
1371
+ auth_settings=_auth_settings,
1372
+ collection_formats=_collection_formats,
1373
+ _host=_host,
1374
+ _request_auth=_request_auth
1375
+ )
1376
+
1377
+
1378
+
1379
+
1094
1380
  @validate_call
1095
1381
  def participant_participant_id_sample_post(
1096
1382
  self,