rapidata 1.10.1__py3-none-any.whl → 2.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of rapidata might be problematic. Click here for more details.
- rapidata/__init__.py +22 -17
- rapidata/api_client/__init__.py +16 -5
- rapidata/api_client/api/coco_api.py +14 -29
- rapidata/api_client/api/dataset_api.py +6 -6
- rapidata/api_client/api/identity_api.py +3 -3
- rapidata/api_client/api/pipeline_api.py +1008 -95
- rapidata/api_client/api/rapid_api.py +6 -6
- rapidata/api_client/api/validation_api.py +12 -42
- rapidata/api_client/models/__init__.py +16 -5
- rapidata/api_client/models/add_campaign_model.py +5 -5
- rapidata/api_client/models/add_validation_text_rapid_model.py +1 -1
- rapidata/api_client/models/age_group.py +5 -4
- rapidata/api_client/models/base_error.py +1 -4
- rapidata/api_client/models/compare_workflow_config.py +9 -24
- rapidata/api_client/models/compare_workflow_config_model.py +9 -29
- rapidata/api_client/models/compare_workflow_config_model_pair_maker_config.py +140 -0
- rapidata/api_client/models/compare_workflow_config_pair_maker_config.py +140 -0
- rapidata/api_client/models/compare_workflow_model.py +7 -3
- rapidata/api_client/models/compare_workflow_model1.py +7 -3
- rapidata/api_client/models/compare_workflow_model1_pair_maker_information.py +140 -0
- rapidata/api_client/models/compare_workflow_model_pair_maker_config.py +140 -0
- rapidata/api_client/models/create_order_model.py +4 -2
- rapidata/api_client/models/create_order_model_user_filters_inner.py +25 -11
- rapidata/api_client/models/custom_user_filter_model.py +98 -0
- rapidata/api_client/models/file_asset_model_metadata_inner.py +8 -22
- rapidata/api_client/models/get_classify_workflow_result_overview_result.py +144 -0
- rapidata/api_client/models/get_pipeline_by_id_result.py +13 -3
- rapidata/api_client/models/identity_read_bridge_token_get202_response.py +140 -0
- rapidata/api_client/models/not_available_yet_result.py +96 -0
- rapidata/api_client/models/online_pair_maker_config.py +98 -0
- rapidata/api_client/models/online_pair_maker_config_model.py +98 -0
- rapidata/api_client/models/online_pair_maker_information.py +100 -0
- rapidata/api_client/models/pipeline_id_workflow_put_request.py +140 -0
- rapidata/api_client/models/pre_arranged_pair_maker_config.py +100 -0
- rapidata/api_client/models/pre_arranged_pair_maker_config_model.py +96 -0
- rapidata/api_client/models/pre_arranged_pair_maker_information.py +102 -0
- rapidata/api_client/models/read_bridge_token_keys_result.py +11 -2
- rapidata/api_client/models/simple_workflow_config.py +7 -26
- rapidata/api_client/models/simple_workflow_config_model.py +4 -28
- rapidata/api_client/models/simple_workflow_get_result_overview_get200_response.py +16 -16
- rapidata/api_client/models/simple_workflow_model1.py +3 -3
- rapidata/api_client/models/update_campaign_model.py +99 -0
- rapidata/api_client/models/validation_import_post_request_blueprint.py +1 -1
- rapidata/api_client_README.md +21 -7
- rapidata/rapidata_client/__init__.py +20 -10
- rapidata/rapidata_client/assets/__init__.py +5 -4
- rapidata/rapidata_client/assets/{media_asset.py → _media_asset.py} +32 -11
- rapidata/rapidata_client/assets/{multi_asset.py → _multi_asset.py} +1 -1
- rapidata/rapidata_client/assets/{text_asset.py → _text_asset.py} +1 -1
- rapidata/rapidata_client/assets/data_type_enum.py +7 -0
- rapidata/rapidata_client/filter/__init__.py +2 -1
- rapidata/rapidata_client/filter/_base_filter.py +10 -0
- rapidata/rapidata_client/filter/age_filter.py +12 -5
- rapidata/rapidata_client/filter/campaign_filter.py +12 -3
- rapidata/rapidata_client/filter/country_filter.py +10 -3
- rapidata/rapidata_client/filter/custom_filter.py +29 -0
- rapidata/rapidata_client/filter/gender_filter.py +12 -5
- rapidata/rapidata_client/filter/language_filter.py +14 -3
- rapidata/rapidata_client/filter/models/age_group.py +26 -0
- rapidata/rapidata_client/filter/models/gender.py +19 -0
- rapidata/rapidata_client/filter/rapidata_filters.py +35 -0
- rapidata/rapidata_client/filter/user_score_filter.py +20 -4
- rapidata/rapidata_client/metadata/__init__.py +5 -5
- rapidata/rapidata_client/metadata/{base_metadata.py → _base_metadata.py} +2 -1
- rapidata/rapidata_client/metadata/{private_text_metadata.py → _private_text_metadata.py} +2 -2
- rapidata/rapidata_client/metadata/{prompt_metadata.py → _prompt_metadata.py} +3 -2
- rapidata/rapidata_client/metadata/{public_text_metadata.py → _public_text_metadata.py} +2 -2
- rapidata/rapidata_client/metadata/{select_words_metadata.py → _select_words_metadata.py} +3 -2
- rapidata/rapidata_client/{dataset/rapidata_dataset.py → order/_rapidata_dataset.py} +7 -8
- rapidata/rapidata_client/order/_rapidata_order_builder.py +365 -0
- rapidata/rapidata_client/order/rapidata_order.py +50 -32
- rapidata/rapidata_client/order/rapidata_order_manager.py +461 -0
- rapidata/rapidata_client/rapidata_client.py +12 -201
- rapidata/rapidata_client/referee/__init__.py +3 -3
- rapidata/rapidata_client/referee/{base_referee.py → _base_referee.py} +3 -3
- rapidata/rapidata_client/referee/{early_stopping_referee.py → _early_stopping_referee.py} +14 -11
- rapidata/rapidata_client/referee/{naive_referee.py → _naive_referee.py} +9 -9
- rapidata/rapidata_client/selection/__init__.py +1 -1
- rapidata/rapidata_client/{filter/base_filter.py → selection/_base_selection.py} +2 -2
- rapidata/rapidata_client/selection/capped_selection.py +15 -5
- rapidata/rapidata_client/selection/conditional_validation_selection.py +17 -4
- rapidata/rapidata_client/selection/demographic_selection.py +18 -7
- rapidata/rapidata_client/selection/labeling_selection.py +10 -3
- rapidata/rapidata_client/selection/rapidata_selections.py +21 -0
- rapidata/rapidata_client/selection/validation_selection.py +11 -4
- rapidata/rapidata_client/settings/__init__.py +9 -2
- rapidata/rapidata_client/settings/_rapidata_setting.py +11 -0
- rapidata/rapidata_client/settings/alert_on_fast_response.py +21 -0
- rapidata/rapidata_client/settings/custom_setting.py +16 -0
- rapidata/rapidata_client/settings/free_text_minimum_characters.py +16 -0
- rapidata/rapidata_client/settings/models/__init__.py +1 -0
- rapidata/rapidata_client/settings/models/translation_behaviour_options.py +14 -0
- rapidata/rapidata_client/settings/no_shuffle.py +16 -0
- rapidata/rapidata_client/settings/play_video_until_the_end.py +16 -0
- rapidata/rapidata_client/settings/rapidata_settings.py +31 -0
- rapidata/rapidata_client/settings/translation_behaviour.py +18 -0
- rapidata/rapidata_client/validation/__init__.py +1 -0
- rapidata/rapidata_client/{dataset/validation_rapid_parts.py → validation/_validation_rapid_parts.py} +7 -6
- rapidata/rapidata_client/validation/_validation_set_builder.py +371 -0
- rapidata/rapidata_client/{dataset → validation}/rapidata_validation_set.py +54 -50
- rapidata/rapidata_client/validation/rapids/__init__.py +1 -0
- rapidata/rapidata_client/validation/rapids/box.py +17 -0
- rapidata/rapidata_client/validation/rapids/rapids.py +94 -0
- rapidata/rapidata_client/validation/rapids/rapids_manager.py +163 -0
- rapidata/rapidata_client/validation/validation_set_manager.py +338 -0
- rapidata/rapidata_client/workflow/__init__.py +8 -6
- rapidata/rapidata_client/workflow/_base_workflow.py +25 -0
- rapidata/rapidata_client/workflow/{classify_workflow.py → _classify_workflow.py} +6 -6
- rapidata/rapidata_client/workflow/{compare_workflow.py → _compare_workflow.py} +10 -16
- rapidata/rapidata_client/workflow/_draw_workflow.py +22 -0
- rapidata/rapidata_client/workflow/_evaluation_workflow.py +26 -0
- rapidata/rapidata_client/workflow/{free_text_workflow.py → _free_text_workflow.py} +10 -16
- rapidata/rapidata_client/workflow/_locate_workflow.py +22 -0
- rapidata/rapidata_client/workflow/{select_words_workflow.py → _select_words_workflow.py} +2 -8
- rapidata/service/credential_manager.py +11 -1
- rapidata/service/openapi_service.py +23 -4
- {rapidata-1.10.1.dist-info → rapidata-2.1.0.dist-info}/METADATA +2 -1
- {rapidata-1.10.1.dist-info → rapidata-2.1.0.dist-info}/RECORD +122 -96
- rapidata/constants.py +0 -1
- rapidata/rapidata_client/dataset/rapid_builders/__init__.py +0 -4
- rapidata/rapidata_client/dataset/rapid_builders/base_rapid_builder.py +0 -33
- rapidata/rapidata_client/dataset/rapid_builders/classify_rapid_builders.py +0 -166
- rapidata/rapidata_client/dataset/rapid_builders/compare_rapid_builders.py +0 -145
- rapidata/rapidata_client/dataset/rapid_builders/rapids.py +0 -33
- rapidata/rapidata_client/dataset/rapid_builders/select_words_rapid_builders.py +0 -124
- rapidata/rapidata_client/dataset/validation_set_builder.py +0 -336
- rapidata/rapidata_client/order/order_builder.py +0 -25
- rapidata/rapidata_client/order/rapidata_order_builder.py +0 -463
- rapidata/rapidata_client/selection/base_selection.py +0 -9
- rapidata/rapidata_client/settings/feature_flags.py +0 -125
- rapidata/rapidata_client/settings/settings.py +0 -124
- rapidata/rapidata_client/simple_builders/__init__.py +0 -0
- rapidata/rapidata_client/simple_builders/simple_classification_builders.py +0 -271
- rapidata/rapidata_client/simple_builders/simple_compare_builders.py +0 -267
- rapidata/rapidata_client/simple_builders/simple_free_text_builders.py +0 -192
- rapidata/rapidata_client/simple_builders/simple_select_words_builders.py +0 -196
- rapidata/rapidata_client/workflow/base_workflow.py +0 -42
- rapidata/rapidata_client/workflow/evaluation_workflow.py +0 -15
- /rapidata/rapidata_client/assets/{base_asset.py → _base_asset.py} +0 -0
- /rapidata/rapidata_client/{dataset → filter/models}/__init__.py +0 -0
- {rapidata-1.10.1.dist-info → rapidata-2.1.0.dist-info}/LICENSE +0 -0
- {rapidata-1.10.1.dist-info → rapidata-2.1.0.dist-info}/WHEEL +0 -0
|
@@ -314,7 +314,7 @@ class RapidApi:
|
|
|
314
314
|
def rapid_create_demographic_rapid_post(
|
|
315
315
|
self,
|
|
316
316
|
model: Optional[CreateDemographicRapidModel] = None,
|
|
317
|
-
file:
|
|
317
|
+
file: Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]] = None,
|
|
318
318
|
_request_timeout: Union[
|
|
319
319
|
None,
|
|
320
320
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -333,7 +333,7 @@ class RapidApi:
|
|
|
333
333
|
|
|
334
334
|
:param model:
|
|
335
335
|
:type model: CreateDemographicRapidModel
|
|
336
|
-
:param file:
|
|
336
|
+
:param file:
|
|
337
337
|
:type file: List[bytearray]
|
|
338
338
|
:param _request_timeout: timeout setting for this request. If one
|
|
339
339
|
number provided, it will be total request
|
|
@@ -384,7 +384,7 @@ class RapidApi:
|
|
|
384
384
|
def rapid_create_demographic_rapid_post_with_http_info(
|
|
385
385
|
self,
|
|
386
386
|
model: Optional[CreateDemographicRapidModel] = None,
|
|
387
|
-
file:
|
|
387
|
+
file: Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]] = None,
|
|
388
388
|
_request_timeout: Union[
|
|
389
389
|
None,
|
|
390
390
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -403,7 +403,7 @@ class RapidApi:
|
|
|
403
403
|
|
|
404
404
|
:param model:
|
|
405
405
|
:type model: CreateDemographicRapidModel
|
|
406
|
-
:param file:
|
|
406
|
+
:param file:
|
|
407
407
|
:type file: List[bytearray]
|
|
408
408
|
:param _request_timeout: timeout setting for this request. If one
|
|
409
409
|
number provided, it will be total request
|
|
@@ -454,7 +454,7 @@ class RapidApi:
|
|
|
454
454
|
def rapid_create_demographic_rapid_post_without_preload_content(
|
|
455
455
|
self,
|
|
456
456
|
model: Optional[CreateDemographicRapidModel] = None,
|
|
457
|
-
file:
|
|
457
|
+
file: Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]] = None,
|
|
458
458
|
_request_timeout: Union[
|
|
459
459
|
None,
|
|
460
460
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -473,7 +473,7 @@ class RapidApi:
|
|
|
473
473
|
|
|
474
474
|
:param model:
|
|
475
475
|
:type model: CreateDemographicRapidModel
|
|
476
|
-
:param file:
|
|
476
|
+
:param file:
|
|
477
477
|
:type file: List[bytearray]
|
|
478
478
|
:param _request_timeout: timeout setting for this request. If one
|
|
479
479
|
number provided, it will be total request
|
|
@@ -52,7 +52,7 @@ class ValidationApi:
|
|
|
52
52
|
def validation_add_validation_rapid_post(
|
|
53
53
|
self,
|
|
54
54
|
model: Optional[AddValidationRapidModel] = None,
|
|
55
|
-
files:
|
|
55
|
+
files: Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]] = None,
|
|
56
56
|
_request_timeout: Union[
|
|
57
57
|
None,
|
|
58
58
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -71,7 +71,7 @@ class ValidationApi:
|
|
|
71
71
|
|
|
72
72
|
:param model:
|
|
73
73
|
:type model: AddValidationRapidModel
|
|
74
|
-
:param files:
|
|
74
|
+
:param files:
|
|
75
75
|
:type files: List[bytearray]
|
|
76
76
|
:param _request_timeout: timeout setting for this request. If one
|
|
77
77
|
number provided, it will be total request
|
|
@@ -122,7 +122,7 @@ class ValidationApi:
|
|
|
122
122
|
def validation_add_validation_rapid_post_with_http_info(
|
|
123
123
|
self,
|
|
124
124
|
model: Optional[AddValidationRapidModel] = None,
|
|
125
|
-
files:
|
|
125
|
+
files: Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]] = None,
|
|
126
126
|
_request_timeout: Union[
|
|
127
127
|
None,
|
|
128
128
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -141,7 +141,7 @@ class ValidationApi:
|
|
|
141
141
|
|
|
142
142
|
:param model:
|
|
143
143
|
:type model: AddValidationRapidModel
|
|
144
|
-
:param files:
|
|
144
|
+
:param files:
|
|
145
145
|
:type files: List[bytearray]
|
|
146
146
|
:param _request_timeout: timeout setting for this request. If one
|
|
147
147
|
number provided, it will be total request
|
|
@@ -192,7 +192,7 @@ class ValidationApi:
|
|
|
192
192
|
def validation_add_validation_rapid_post_without_preload_content(
|
|
193
193
|
self,
|
|
194
194
|
model: Optional[AddValidationRapidModel] = None,
|
|
195
|
-
files:
|
|
195
|
+
files: Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]] = None,
|
|
196
196
|
_request_timeout: Union[
|
|
197
197
|
None,
|
|
198
198
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -211,7 +211,7 @@ class ValidationApi:
|
|
|
211
211
|
|
|
212
212
|
:param model:
|
|
213
213
|
:type model: AddValidationRapidModel
|
|
214
|
-
:param files:
|
|
214
|
+
:param files:
|
|
215
215
|
:type files: List[bytearray]
|
|
216
216
|
:param _request_timeout: timeout setting for this request. If one
|
|
217
217
|
number provided, it will be total request
|
|
@@ -1389,8 +1389,7 @@ class ValidationApi:
|
|
|
1389
1389
|
@validate_call
|
|
1390
1390
|
def validation_import_compare_post(
|
|
1391
1391
|
self,
|
|
1392
|
-
criteria:
|
|
1393
|
-
file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The file to use as the asset for the rapid.")] = None,
|
|
1392
|
+
criteria: Optional[StrictStr] = None,
|
|
1394
1393
|
_request_timeout: Union[
|
|
1395
1394
|
None,
|
|
1396
1395
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1407,10 +1406,8 @@ class ValidationApi:
|
|
|
1407
1406
|
"""Imports a compare validation set from a zip file.
|
|
1408
1407
|
|
|
1409
1408
|
|
|
1410
|
-
:param criteria:
|
|
1409
|
+
:param criteria:
|
|
1411
1410
|
:type criteria: str
|
|
1412
|
-
:param file: The file to use as the asset for the rapid.
|
|
1413
|
-
:type file: bytearray
|
|
1414
1411
|
:param _request_timeout: timeout setting for this request. If one
|
|
1415
1412
|
number provided, it will be total request
|
|
1416
1413
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1435,7 +1432,6 @@ class ValidationApi:
|
|
|
1435
1432
|
|
|
1436
1433
|
_param = self._validation_import_compare_post_serialize(
|
|
1437
1434
|
criteria=criteria,
|
|
1438
|
-
file=file,
|
|
1439
1435
|
_request_auth=_request_auth,
|
|
1440
1436
|
_content_type=_content_type,
|
|
1441
1437
|
_headers=_headers,
|
|
@@ -1459,8 +1455,7 @@ class ValidationApi:
|
|
|
1459
1455
|
@validate_call
|
|
1460
1456
|
def validation_import_compare_post_with_http_info(
|
|
1461
1457
|
self,
|
|
1462
|
-
criteria:
|
|
1463
|
-
file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The file to use as the asset for the rapid.")] = None,
|
|
1458
|
+
criteria: Optional[StrictStr] = None,
|
|
1464
1459
|
_request_timeout: Union[
|
|
1465
1460
|
None,
|
|
1466
1461
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1477,10 +1472,8 @@ class ValidationApi:
|
|
|
1477
1472
|
"""Imports a compare validation set from a zip file.
|
|
1478
1473
|
|
|
1479
1474
|
|
|
1480
|
-
:param criteria:
|
|
1475
|
+
:param criteria:
|
|
1481
1476
|
:type criteria: str
|
|
1482
|
-
:param file: The file to use as the asset for the rapid.
|
|
1483
|
-
:type file: bytearray
|
|
1484
1477
|
:param _request_timeout: timeout setting for this request. If one
|
|
1485
1478
|
number provided, it will be total request
|
|
1486
1479
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1505,7 +1498,6 @@ class ValidationApi:
|
|
|
1505
1498
|
|
|
1506
1499
|
_param = self._validation_import_compare_post_serialize(
|
|
1507
1500
|
criteria=criteria,
|
|
1508
|
-
file=file,
|
|
1509
1501
|
_request_auth=_request_auth,
|
|
1510
1502
|
_content_type=_content_type,
|
|
1511
1503
|
_headers=_headers,
|
|
@@ -1529,8 +1521,7 @@ class ValidationApi:
|
|
|
1529
1521
|
@validate_call
|
|
1530
1522
|
def validation_import_compare_post_without_preload_content(
|
|
1531
1523
|
self,
|
|
1532
|
-
criteria:
|
|
1533
|
-
file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The file to use as the asset for the rapid.")] = None,
|
|
1524
|
+
criteria: Optional[StrictStr] = None,
|
|
1534
1525
|
_request_timeout: Union[
|
|
1535
1526
|
None,
|
|
1536
1527
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1547,10 +1538,8 @@ class ValidationApi:
|
|
|
1547
1538
|
"""Imports a compare validation set from a zip file.
|
|
1548
1539
|
|
|
1549
1540
|
|
|
1550
|
-
:param criteria:
|
|
1541
|
+
:param criteria:
|
|
1551
1542
|
:type criteria: str
|
|
1552
|
-
:param file: The file to use as the asset for the rapid.
|
|
1553
|
-
:type file: bytearray
|
|
1554
1543
|
:param _request_timeout: timeout setting for this request. If one
|
|
1555
1544
|
number provided, it will be total request
|
|
1556
1545
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1575,7 +1564,6 @@ class ValidationApi:
|
|
|
1575
1564
|
|
|
1576
1565
|
_param = self._validation_import_compare_post_serialize(
|
|
1577
1566
|
criteria=criteria,
|
|
1578
|
-
file=file,
|
|
1579
1567
|
_request_auth=_request_auth,
|
|
1580
1568
|
_content_type=_content_type,
|
|
1581
1569
|
_headers=_headers,
|
|
@@ -1595,7 +1583,6 @@ class ValidationApi:
|
|
|
1595
1583
|
def _validation_import_compare_post_serialize(
|
|
1596
1584
|
self,
|
|
1597
1585
|
criteria,
|
|
1598
|
-
file,
|
|
1599
1586
|
_request_auth,
|
|
1600
1587
|
_content_type,
|
|
1601
1588
|
_headers,
|
|
@@ -1622,8 +1609,6 @@ class ValidationApi:
|
|
|
1622
1609
|
# process the form parameters
|
|
1623
1610
|
if criteria is not None:
|
|
1624
1611
|
_form_params.append(('Criteria', criteria))
|
|
1625
|
-
if file is not None:
|
|
1626
|
-
_files['File'] = file
|
|
1627
1612
|
# process the body parameter
|
|
1628
1613
|
|
|
1629
1614
|
|
|
@@ -1679,7 +1664,6 @@ class ValidationApi:
|
|
|
1679
1664
|
def validation_import_post(
|
|
1680
1665
|
self,
|
|
1681
1666
|
blueprint: Optional[ValidationImportPostRequestBlueprint] = None,
|
|
1682
|
-
file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The file to use as the asset for the rapid.")] = None,
|
|
1683
1667
|
_request_timeout: Union[
|
|
1684
1668
|
None,
|
|
1685
1669
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1698,8 +1682,6 @@ class ValidationApi:
|
|
|
1698
1682
|
|
|
1699
1683
|
:param blueprint:
|
|
1700
1684
|
:type blueprint: ValidationImportPostRequestBlueprint
|
|
1701
|
-
:param file: The file to use as the asset for the rapid.
|
|
1702
|
-
:type file: bytearray
|
|
1703
1685
|
:param _request_timeout: timeout setting for this request. If one
|
|
1704
1686
|
number provided, it will be total request
|
|
1705
1687
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1724,7 +1706,6 @@ class ValidationApi:
|
|
|
1724
1706
|
|
|
1725
1707
|
_param = self._validation_import_post_serialize(
|
|
1726
1708
|
blueprint=blueprint,
|
|
1727
|
-
file=file,
|
|
1728
1709
|
_request_auth=_request_auth,
|
|
1729
1710
|
_content_type=_content_type,
|
|
1730
1711
|
_headers=_headers,
|
|
@@ -1749,7 +1730,6 @@ class ValidationApi:
|
|
|
1749
1730
|
def validation_import_post_with_http_info(
|
|
1750
1731
|
self,
|
|
1751
1732
|
blueprint: Optional[ValidationImportPostRequestBlueprint] = None,
|
|
1752
|
-
file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The file to use as the asset for the rapid.")] = None,
|
|
1753
1733
|
_request_timeout: Union[
|
|
1754
1734
|
None,
|
|
1755
1735
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1768,8 +1748,6 @@ class ValidationApi:
|
|
|
1768
1748
|
|
|
1769
1749
|
:param blueprint:
|
|
1770
1750
|
:type blueprint: ValidationImportPostRequestBlueprint
|
|
1771
|
-
:param file: The file to use as the asset for the rapid.
|
|
1772
|
-
:type file: bytearray
|
|
1773
1751
|
:param _request_timeout: timeout setting for this request. If one
|
|
1774
1752
|
number provided, it will be total request
|
|
1775
1753
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1794,7 +1772,6 @@ class ValidationApi:
|
|
|
1794
1772
|
|
|
1795
1773
|
_param = self._validation_import_post_serialize(
|
|
1796
1774
|
blueprint=blueprint,
|
|
1797
|
-
file=file,
|
|
1798
1775
|
_request_auth=_request_auth,
|
|
1799
1776
|
_content_type=_content_type,
|
|
1800
1777
|
_headers=_headers,
|
|
@@ -1819,7 +1796,6 @@ class ValidationApi:
|
|
|
1819
1796
|
def validation_import_post_without_preload_content(
|
|
1820
1797
|
self,
|
|
1821
1798
|
blueprint: Optional[ValidationImportPostRequestBlueprint] = None,
|
|
1822
|
-
file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The file to use as the asset for the rapid.")] = None,
|
|
1823
1799
|
_request_timeout: Union[
|
|
1824
1800
|
None,
|
|
1825
1801
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1838,8 +1814,6 @@ class ValidationApi:
|
|
|
1838
1814
|
|
|
1839
1815
|
:param blueprint:
|
|
1840
1816
|
:type blueprint: ValidationImportPostRequestBlueprint
|
|
1841
|
-
:param file: The file to use as the asset for the rapid.
|
|
1842
|
-
:type file: bytearray
|
|
1843
1817
|
:param _request_timeout: timeout setting for this request. If one
|
|
1844
1818
|
number provided, it will be total request
|
|
1845
1819
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1864,7 +1838,6 @@ class ValidationApi:
|
|
|
1864
1838
|
|
|
1865
1839
|
_param = self._validation_import_post_serialize(
|
|
1866
1840
|
blueprint=blueprint,
|
|
1867
|
-
file=file,
|
|
1868
1841
|
_request_auth=_request_auth,
|
|
1869
1842
|
_content_type=_content_type,
|
|
1870
1843
|
_headers=_headers,
|
|
@@ -1884,7 +1857,6 @@ class ValidationApi:
|
|
|
1884
1857
|
def _validation_import_post_serialize(
|
|
1885
1858
|
self,
|
|
1886
1859
|
blueprint,
|
|
1887
|
-
file,
|
|
1888
1860
|
_request_auth,
|
|
1889
1861
|
_content_type,
|
|
1890
1862
|
_headers,
|
|
@@ -1911,8 +1883,6 @@ class ValidationApi:
|
|
|
1911
1883
|
# process the form parameters
|
|
1912
1884
|
if blueprint is not None:
|
|
1913
1885
|
_form_params.append(('Blueprint', blueprint))
|
|
1914
|
-
if file is not None:
|
|
1915
|
-
_files['File'] = file
|
|
1916
1886
|
# process the body parameter
|
|
1917
1887
|
|
|
1918
1888
|
|
|
@@ -55,10 +55,14 @@ from rapidata.api_client.models.compare_result import CompareResult
|
|
|
55
55
|
from rapidata.api_client.models.compare_truth import CompareTruth
|
|
56
56
|
from rapidata.api_client.models.compare_workflow_config import CompareWorkflowConfig
|
|
57
57
|
from rapidata.api_client.models.compare_workflow_config_model import CompareWorkflowConfigModel
|
|
58
|
+
from rapidata.api_client.models.compare_workflow_config_model_pair_maker_config import CompareWorkflowConfigModelPairMakerConfig
|
|
59
|
+
from rapidata.api_client.models.compare_workflow_config_pair_maker_config import CompareWorkflowConfigPairMakerConfig
|
|
58
60
|
from rapidata.api_client.models.compare_workflow_get_result_overview_get200_response import CompareWorkflowGetResultOverviewGet200Response
|
|
59
61
|
from rapidata.api_client.models.compare_workflow_model import CompareWorkflowModel
|
|
60
62
|
from rapidata.api_client.models.compare_workflow_model1 import CompareWorkflowModel1
|
|
63
|
+
from rapidata.api_client.models.compare_workflow_model1_pair_maker_information import CompareWorkflowModel1PairMakerInformation
|
|
61
64
|
from rapidata.api_client.models.compare_workflow_model1_referee import CompareWorkflowModel1Referee
|
|
65
|
+
from rapidata.api_client.models.compare_workflow_model_pair_maker_config import CompareWorkflowModelPairMakerConfig
|
|
62
66
|
from rapidata.api_client.models.completed_rapid_model import CompletedRapidModel
|
|
63
67
|
from rapidata.api_client.models.completed_rapid_model_asset import CompletedRapidModelAsset
|
|
64
68
|
from rapidata.api_client.models.conditional_validation_selection import ConditionalValidationSelection
|
|
@@ -86,6 +90,7 @@ from rapidata.api_client.models.create_simple_pipeline_model import CreateSimple
|
|
|
86
90
|
from rapidata.api_client.models.create_simple_pipeline_model_artifacts_inner import CreateSimplePipelineModelArtifactsInner
|
|
87
91
|
from rapidata.api_client.models.create_simple_pipeline_model_pipeline_steps_inner import CreateSimplePipelineModelPipelineStepsInner
|
|
88
92
|
from rapidata.api_client.models.create_unsupported_order_model import CreateUnsupportedOrderModel
|
|
93
|
+
from rapidata.api_client.models.custom_user_filter_model import CustomUserFilterModel
|
|
89
94
|
from rapidata.api_client.models.datapoint import Datapoint
|
|
90
95
|
from rapidata.api_client.models.datapoint_asset import DatapointAsset
|
|
91
96
|
from rapidata.api_client.models.datapoint_get_by_id_get200_response import DatapointGetByIdGet200Response
|
|
@@ -99,7 +104,6 @@ from rapidata.api_client.models.demographic_metadata_model import DemographicMet
|
|
|
99
104
|
from rapidata.api_client.models.demographic_selection import DemographicSelection
|
|
100
105
|
from rapidata.api_client.models.early_stopping_referee_model import EarlyStoppingRefereeModel
|
|
101
106
|
from rapidata.api_client.models.empty_validation_truth import EmptyValidationTruth
|
|
102
|
-
from rapidata.api_client.models.error_type import ErrorType
|
|
103
107
|
from rapidata.api_client.models.evaluation_workflow_config import EvaluationWorkflowConfig
|
|
104
108
|
from rapidata.api_client.models.evaluation_workflow_model import EvaluationWorkflowModel
|
|
105
109
|
from rapidata.api_client.models.feature_flag import FeatureFlag
|
|
@@ -120,8 +124,8 @@ from rapidata.api_client.models.free_text_rapid_blueprint import FreeTextRapidBl
|
|
|
120
124
|
from rapidata.api_client.models.free_text_result import FreeTextResult
|
|
121
125
|
from rapidata.api_client.models.gender import Gender
|
|
122
126
|
from rapidata.api_client.models.gender_user_filter_model import GenderUserFilterModel
|
|
123
|
-
from rapidata.api_client.models.get_attach_category_workflow_result_overview_result import GetAttachCategoryWorkflowResultOverviewResult
|
|
124
127
|
from rapidata.api_client.models.get_available_validation_sets_result import GetAvailableValidationSetsResult
|
|
128
|
+
from rapidata.api_client.models.get_classify_workflow_result_overview_result import GetClassifyWorkflowResultOverviewResult
|
|
125
129
|
from rapidata.api_client.models.get_compare_workflow_result_overview_result import GetCompareWorkflowResultOverviewResult
|
|
126
130
|
from rapidata.api_client.models.get_compare_workflow_result_overview_small_result import GetCompareWorkflowResultOverviewSmallResult
|
|
127
131
|
from rapidata.api_client.models.get_datapoints_by_dataset_id_result import GetDatapointsByDatasetIdResult
|
|
@@ -138,6 +142,7 @@ from rapidata.api_client.models.get_workflow_by_id_result_workflow import GetWor
|
|
|
138
142
|
from rapidata.api_client.models.get_workflow_progress_result import GetWorkflowProgressResult
|
|
139
143
|
from rapidata.api_client.models.get_workflow_result_overview_result import GetWorkflowResultOverviewResult
|
|
140
144
|
from rapidata.api_client.models.i_workflow_model_paged_result import IWorkflowModelPagedResult
|
|
145
|
+
from rapidata.api_client.models.identity_read_bridge_token_get202_response import IdentityReadBridgeTokenGet202Response
|
|
141
146
|
from rapidata.api_client.models.image_dimension_metadata import ImageDimensionMetadata
|
|
142
147
|
from rapidata.api_client.models.image_dimension_metadata_model import ImageDimensionMetadataModel
|
|
143
148
|
from rapidata.api_client.models.import_from_file_result import ImportFromFileResult
|
|
@@ -175,21 +180,29 @@ from rapidata.api_client.models.named_entity_result import NamedEntityResult
|
|
|
175
180
|
from rapidata.api_client.models.named_entity_truth import NamedEntityTruth
|
|
176
181
|
from rapidata.api_client.models.never_ending_referee_config import NeverEndingRefereeConfig
|
|
177
182
|
from rapidata.api_client.models.newsletter_model import NewsletterModel
|
|
183
|
+
from rapidata.api_client.models.not_available_yet_result import NotAvailableYetResult
|
|
178
184
|
from rapidata.api_client.models.not_started_rapid_model import NotStartedRapidModel
|
|
179
185
|
from rapidata.api_client.models.null_asset import NullAsset
|
|
180
186
|
from rapidata.api_client.models.null_asset_model import NullAssetModel
|
|
181
187
|
from rapidata.api_client.models.null_asset_model1 import NullAssetModel1
|
|
182
188
|
from rapidata.api_client.models.null_asset_model2 import NullAssetModel2
|
|
189
|
+
from rapidata.api_client.models.online_pair_maker_config import OnlinePairMakerConfig
|
|
190
|
+
from rapidata.api_client.models.online_pair_maker_config_model import OnlinePairMakerConfigModel
|
|
191
|
+
from rapidata.api_client.models.online_pair_maker_information import OnlinePairMakerInformation
|
|
183
192
|
from rapidata.api_client.models.order_model import OrderModel
|
|
184
193
|
from rapidata.api_client.models.order_model_paged_result import OrderModelPagedResult
|
|
185
194
|
from rapidata.api_client.models.order_state import OrderState
|
|
186
195
|
from rapidata.api_client.models.original_filename_metadata import OriginalFilenameMetadata
|
|
187
196
|
from rapidata.api_client.models.original_filename_metadata_model import OriginalFilenameMetadataModel
|
|
188
197
|
from rapidata.api_client.models.page_info import PageInfo
|
|
198
|
+
from rapidata.api_client.models.pipeline_id_workflow_put_request import PipelineIdWorkflowPutRequest
|
|
189
199
|
from rapidata.api_client.models.polygon_payload import PolygonPayload
|
|
190
200
|
from rapidata.api_client.models.polygon_rapid_blueprint import PolygonRapidBlueprint
|
|
191
201
|
from rapidata.api_client.models.polygon_result import PolygonResult
|
|
192
202
|
from rapidata.api_client.models.polygon_truth import PolygonTruth
|
|
203
|
+
from rapidata.api_client.models.pre_arranged_pair_maker_config import PreArrangedPairMakerConfig
|
|
204
|
+
from rapidata.api_client.models.pre_arranged_pair_maker_config_model import PreArrangedPairMakerConfigModel
|
|
205
|
+
from rapidata.api_client.models.pre_arranged_pair_maker_information import PreArrangedPairMakerInformation
|
|
193
206
|
from rapidata.api_client.models.private_text_metadata_input import PrivateTextMetadataInput
|
|
194
207
|
from rapidata.api_client.models.probabilistic_attach_category_referee_config import ProbabilisticAttachCategoryRefereeConfig
|
|
195
208
|
from rapidata.api_client.models.problem_details import ProblemDetails
|
|
@@ -223,7 +236,6 @@ from rapidata.api_client.models.simple_workflow_config_model_blueprint import Si
|
|
|
223
236
|
from rapidata.api_client.models.simple_workflow_get_result_overview_get200_response import SimpleWorkflowGetResultOverviewGet200Response
|
|
224
237
|
from rapidata.api_client.models.simple_workflow_model import SimpleWorkflowModel
|
|
225
238
|
from rapidata.api_client.models.simple_workflow_model1 import SimpleWorkflowModel1
|
|
226
|
-
from rapidata.api_client.models.simple_workflow_model1_blueprint import SimpleWorkflowModel1Blueprint
|
|
227
239
|
from rapidata.api_client.models.simple_workflow_model_blueprint import SimpleWorkflowModelBlueprint
|
|
228
240
|
from rapidata.api_client.models.skip_result import SkipResult
|
|
229
241
|
from rapidata.api_client.models.sort_criterion import SortCriterion
|
|
@@ -249,9 +261,8 @@ from rapidata.api_client.models.translated_prompt_metadata_model import Translat
|
|
|
249
261
|
from rapidata.api_client.models.translated_string import TranslatedString
|
|
250
262
|
from rapidata.api_client.models.unlock_order_result import UnlockOrderResult
|
|
251
263
|
from rapidata.api_client.models.update_access_model import UpdateAccessModel
|
|
264
|
+
from rapidata.api_client.models.update_campaign_model import UpdateCampaignModel
|
|
252
265
|
from rapidata.api_client.models.update_order_model import UpdateOrderModel
|
|
253
|
-
from rapidata.api_client.models.update_workflow_config_request import UpdateWorkflowConfigRequest
|
|
254
|
-
from rapidata.api_client.models.update_workflow_config_request_config import UpdateWorkflowConfigRequestConfig
|
|
255
266
|
from rapidata.api_client.models.upload_coco_result import UploadCocoResult
|
|
256
267
|
from rapidata.api_client.models.upload_datapoints_result import UploadDatapointsResult
|
|
257
268
|
from rapidata.api_client.models.upload_files_from_s3_bucket_model import UploadFilesFromS3BucketModel
|
|
@@ -17,7 +17,7 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
22
|
from rapidata.api_client.models.capped_selection_selections_inner import CappedSelectionSelectionsInner
|
|
23
23
|
from rapidata.api_client.models.create_order_model_user_filters_inner import CreateOrderModelUserFiltersInner
|
|
@@ -30,7 +30,6 @@ class AddCampaignModel(BaseModel):
|
|
|
30
30
|
The model for adding a campaign to an existing pipeline.
|
|
31
31
|
""" # noqa: E501
|
|
32
32
|
t: StrictStr = Field(description="Discriminator value for AddCampaignModel", alias="_t")
|
|
33
|
-
pipeline_id: StrictStr = Field(description="The pipeline the campaign should belong to.", alias="pipelineId")
|
|
34
33
|
artifact_id: Optional[StrictStr] = Field(default=None, description="The id of the campaign artifact. If not provided a random value will be used.", alias="artifactId")
|
|
35
34
|
campaign_name: StrictStr = Field(description="The name of the campaign.", alias="campaignName")
|
|
36
35
|
user_filters: List[CreateOrderModelUserFiltersInner] = Field(description="The user filters to apply to the campaign.", alias="userFilters")
|
|
@@ -38,7 +37,8 @@ class AddCampaignModel(BaseModel):
|
|
|
38
37
|
selections: Optional[List[CappedSelectionSelectionsInner]] = Field(description="The selections that the campaign should have.")
|
|
39
38
|
feature_flags: List[FeatureFlag] = Field(description="The feature flags that should be applied to the campaign.", alias="featureFlags")
|
|
40
39
|
priority: StrictInt = Field(description="The priority of the campaign.")
|
|
41
|
-
|
|
40
|
+
is_sticky: Optional[StrictBool] = Field(default=None, description="Indicates if the campaign is sticky.", alias="isSticky")
|
|
41
|
+
__properties: ClassVar[List[str]] = ["_t", "artifactId", "campaignName", "userFilters", "validationSetId", "selections", "featureFlags", "priority", "isSticky"]
|
|
42
42
|
|
|
43
43
|
@field_validator('t')
|
|
44
44
|
def t_validate_enum(cls, value):
|
|
@@ -135,14 +135,14 @@ class AddCampaignModel(BaseModel):
|
|
|
135
135
|
|
|
136
136
|
_obj = cls.model_validate({
|
|
137
137
|
"_t": obj.get("_t") if obj.get("_t") is not None else 'AddCampaignModel',
|
|
138
|
-
"pipelineId": obj.get("pipelineId"),
|
|
139
138
|
"artifactId": obj.get("artifactId"),
|
|
140
139
|
"campaignName": obj.get("campaignName"),
|
|
141
140
|
"userFilters": [CreateOrderModelUserFiltersInner.from_dict(_item) for _item in obj["userFilters"]] if obj.get("userFilters") is not None else None,
|
|
142
141
|
"validationSetId": obj.get("validationSetId"),
|
|
143
142
|
"selections": [CappedSelectionSelectionsInner.from_dict(_item) for _item in obj["selections"]] if obj.get("selections") is not None else None,
|
|
144
143
|
"featureFlags": [FeatureFlag.from_dict(_item) for _item in obj["featureFlags"]] if obj.get("featureFlags") is not None else None,
|
|
145
|
-
"priority": obj.get("priority")
|
|
144
|
+
"priority": obj.get("priority"),
|
|
145
|
+
"isSticky": obj.get("isSticky")
|
|
146
146
|
})
|
|
147
147
|
return _obj
|
|
148
148
|
|
|
@@ -33,7 +33,7 @@ class AddValidationTextRapidModel(BaseModel):
|
|
|
33
33
|
payload: AddValidationRapidModelPayload
|
|
34
34
|
metadata: List[DatapointMetadataModelMetadataInner] = Field(description="Some metadata to attach to the rapid.")
|
|
35
35
|
truth: AddValidationRapidModelTruth
|
|
36
|
-
texts: List[StrictStr]
|
|
36
|
+
texts: List[StrictStr] = Field(description="The texts to use for the rapid.")
|
|
37
37
|
random_correct_probability: Optional[Union[StrictFloat, StrictInt]] = Field(description="The probability for an answer to be correct when randomly guessing.", alias="randomCorrectProbability")
|
|
38
38
|
__properties: ClassVar[List[str]] = ["validationSetId", "payload", "metadata", "truth", "texts", "randomCorrectProbability"]
|
|
39
39
|
|
|
@@ -26,10 +26,11 @@ class AgeGroup(str, Enum):
|
|
|
26
26
|
"""
|
|
27
27
|
allowed enum values
|
|
28
28
|
"""
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
ENUM_0_MINUS_17 = '0-17'
|
|
30
|
+
ENUM_18_MINUS_29 = '18-29'
|
|
31
|
+
ENUM_30_MINUS_39 = '30-39'
|
|
32
|
+
ENUM_40_MINUS_49 = '40-49'
|
|
33
|
+
ENUM_50_MINUS_64 = '50-64'
|
|
33
34
|
ENUM_65_PLUS = '65+'
|
|
34
35
|
|
|
35
36
|
@classmethod
|
|
@@ -19,7 +19,6 @@ import json
|
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
-
from rapidata.api_client.models.error_type import ErrorType
|
|
23
22
|
from typing import Optional, Set
|
|
24
23
|
from typing_extensions import Self
|
|
25
24
|
|
|
@@ -27,9 +26,8 @@ class BaseError(BaseModel):
|
|
|
27
26
|
"""
|
|
28
27
|
BaseError
|
|
29
28
|
""" # noqa: E501
|
|
30
|
-
error_type: Optional[ErrorType] = Field(default=None, alias="errorType")
|
|
31
29
|
error_message: Optional[StrictStr] = Field(default=None, alias="errorMessage")
|
|
32
|
-
__properties: ClassVar[List[str]] = ["
|
|
30
|
+
__properties: ClassVar[List[str]] = ["errorMessage"]
|
|
33
31
|
|
|
34
32
|
model_config = ConfigDict(
|
|
35
33
|
populate_by_name=True,
|
|
@@ -82,7 +80,6 @@ class BaseError(BaseModel):
|
|
|
82
80
|
return cls.model_validate(obj)
|
|
83
81
|
|
|
84
82
|
_obj = cls.model_validate({
|
|
85
|
-
"errorType": obj.get("errorType"),
|
|
86
83
|
"errorMessage": obj.get("errorMessage")
|
|
87
84
|
})
|
|
88
85
|
return _obj
|
|
@@ -17,10 +17,10 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
from pydantic import BaseModel, ConfigDict, Field,
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from rapidata.api_client.models.compare_workflow_config_pair_maker_config import CompareWorkflowConfigPairMakerConfig
|
|
22
23
|
from rapidata.api_client.models.compare_workflow_model1_referee import CompareWorkflowModel1Referee
|
|
23
|
-
from rapidata.api_client.models.feature_flag import FeatureFlag
|
|
24
24
|
from typing import Optional, Set
|
|
25
25
|
from typing_extensions import Self
|
|
26
26
|
|
|
@@ -32,15 +32,12 @@ class CompareWorkflowConfig(BaseModel):
|
|
|
32
32
|
criteria: StrictStr
|
|
33
33
|
starting_elo: Optional[StrictInt] = Field(default=None, alias="startingElo")
|
|
34
34
|
k_factor: Optional[StrictInt] = Field(default=None, alias="kFactor")
|
|
35
|
-
match_size: Optional[StrictInt] = Field(default=None, alias="matchSize")
|
|
36
35
|
scaling_factor: Optional[StrictInt] = Field(default=None, alias="scalingFactor")
|
|
36
|
+
pair_maker_config: Optional[CompareWorkflowConfigPairMakerConfig] = Field(default=None, alias="pairMakerConfig")
|
|
37
37
|
matches_until_completed: Optional[StrictInt] = Field(default=None, alias="matchesUntilCompleted")
|
|
38
38
|
referee: CompareWorkflowModel1Referee
|
|
39
39
|
target_country_codes: List[StrictStr] = Field(alias="targetCountryCodes")
|
|
40
|
-
|
|
41
|
-
priority: Optional[StrictStr] = None
|
|
42
|
-
is_fallback: Optional[StrictBool] = Field(default=None, alias="isFallback")
|
|
43
|
-
__properties: ClassVar[List[str]] = ["_t", "criteria", "startingElo", "kFactor", "matchSize", "scalingFactor", "matchesUntilCompleted", "referee", "targetCountryCodes", "featureFlags", "priority", "isFallback"]
|
|
40
|
+
__properties: ClassVar[List[str]] = ["_t", "criteria", "startingElo", "kFactor", "scalingFactor", "pairMakerConfig", "matchesUntilCompleted", "referee", "targetCountryCodes"]
|
|
44
41
|
|
|
45
42
|
@field_validator('t')
|
|
46
43
|
def t_validate_enum(cls, value):
|
|
@@ -88,21 +85,12 @@ class CompareWorkflowConfig(BaseModel):
|
|
|
88
85
|
exclude=excluded_fields,
|
|
89
86
|
exclude_none=True,
|
|
90
87
|
)
|
|
88
|
+
# override the default output from pydantic by calling `to_dict()` of pair_maker_config
|
|
89
|
+
if self.pair_maker_config:
|
|
90
|
+
_dict['pairMakerConfig'] = self.pair_maker_config.to_dict()
|
|
91
91
|
# override the default output from pydantic by calling `to_dict()` of referee
|
|
92
92
|
if self.referee:
|
|
93
93
|
_dict['referee'] = self.referee.to_dict()
|
|
94
|
-
# override the default output from pydantic by calling `to_dict()` of each item in feature_flags (list)
|
|
95
|
-
_items = []
|
|
96
|
-
if self.feature_flags:
|
|
97
|
-
for _item_feature_flags in self.feature_flags:
|
|
98
|
-
if _item_feature_flags:
|
|
99
|
-
_items.append(_item_feature_flags.to_dict())
|
|
100
|
-
_dict['featureFlags'] = _items
|
|
101
|
-
# set to None if priority (nullable) is None
|
|
102
|
-
# and model_fields_set contains the field
|
|
103
|
-
if self.priority is None and "priority" in self.model_fields_set:
|
|
104
|
-
_dict['priority'] = None
|
|
105
|
-
|
|
106
94
|
return _dict
|
|
107
95
|
|
|
108
96
|
@classmethod
|
|
@@ -119,14 +107,11 @@ class CompareWorkflowConfig(BaseModel):
|
|
|
119
107
|
"criteria": obj.get("criteria"),
|
|
120
108
|
"startingElo": obj.get("startingElo"),
|
|
121
109
|
"kFactor": obj.get("kFactor"),
|
|
122
|
-
"matchSize": obj.get("matchSize"),
|
|
123
110
|
"scalingFactor": obj.get("scalingFactor"),
|
|
111
|
+
"pairMakerConfig": CompareWorkflowConfigPairMakerConfig.from_dict(obj["pairMakerConfig"]) if obj.get("pairMakerConfig") is not None else None,
|
|
124
112
|
"matchesUntilCompleted": obj.get("matchesUntilCompleted"),
|
|
125
113
|
"referee": CompareWorkflowModel1Referee.from_dict(obj["referee"]) if obj.get("referee") is not None else None,
|
|
126
|
-
"targetCountryCodes": obj.get("targetCountryCodes")
|
|
127
|
-
"featureFlags": [FeatureFlag.from_dict(_item) for _item in obj["featureFlags"]] if obj.get("featureFlags") is not None else None,
|
|
128
|
-
"priority": obj.get("priority"),
|
|
129
|
-
"isFallback": obj.get("isFallback")
|
|
114
|
+
"targetCountryCodes": obj.get("targetCountryCodes")
|
|
130
115
|
})
|
|
131
116
|
return _obj
|
|
132
117
|
|
|
@@ -17,10 +17,10 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
from pydantic import BaseModel, ConfigDict, Field,
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from rapidata.api_client.models.compare_workflow_config_model_pair_maker_config import CompareWorkflowConfigModelPairMakerConfig
|
|
22
23
|
from rapidata.api_client.models.compare_workflow_model1_referee import CompareWorkflowModel1Referee
|
|
23
|
-
from rapidata.api_client.models.feature_flag import FeatureFlag
|
|
24
24
|
from typing import Optional, Set
|
|
25
25
|
from typing_extensions import Self
|
|
26
26
|
|
|
@@ -32,15 +32,12 @@ class CompareWorkflowConfigModel(BaseModel):
|
|
|
32
32
|
criteria: StrictStr = Field(description="The criteria to add to each compare rapid.")
|
|
33
33
|
starting_elo: Optional[StrictInt] = Field(default=None, description="The starting ELO score for each datapoint.", alias="startingElo")
|
|
34
34
|
k_factor: Optional[StrictInt] = Field(default=None, description="The K-factor to use in the ELO calculation. Determines the maximum possible change in a player's Elo rating after a single match. Higher K-Factor values result in larger rating changes.", alias="kFactor")
|
|
35
|
-
match_size: Optional[StrictInt] = Field(default=None, description="The number of datapoints to match against each other in each match.", alias="matchSize")
|
|
36
35
|
scaling_factor: Optional[StrictInt] = Field(default=None, description="Scaling factor to use in the ELO calculation. Adjusts the sensitivity of the Elo rating system to differences in player ratings. It affects how much the rating changes based on the expected outcome versus the actual outcome.", alias="scalingFactor")
|
|
36
|
+
pair_maker_config: CompareWorkflowConfigModelPairMakerConfig = Field(alias="pairMakerConfig")
|
|
37
37
|
matches_until_completed: Optional[StrictInt] = Field(default=None, description="The number of matches to run before each datapoint is considered \"completed\".", alias="matchesUntilCompleted")
|
|
38
38
|
referee: CompareWorkflowModel1Referee
|
|
39
39
|
target_country_codes: List[StrictStr] = Field(description="A list of country codes that this workflow is targeting.", alias="targetCountryCodes")
|
|
40
|
-
|
|
41
|
-
priority: Optional[StrictStr] = None
|
|
42
|
-
is_fallback: Optional[StrictBool] = Field(default=None, alias="isFallback")
|
|
43
|
-
__properties: ClassVar[List[str]] = ["_t", "criteria", "startingElo", "kFactor", "matchSize", "scalingFactor", "matchesUntilCompleted", "referee", "targetCountryCodes", "featureFlags", "priority", "isFallback"]
|
|
40
|
+
__properties: ClassVar[List[str]] = ["_t", "criteria", "startingElo", "kFactor", "scalingFactor", "pairMakerConfig", "matchesUntilCompleted", "referee", "targetCountryCodes"]
|
|
44
41
|
|
|
45
42
|
@field_validator('t')
|
|
46
43
|
def t_validate_enum(cls, value):
|
|
@@ -88,26 +85,12 @@ class CompareWorkflowConfigModel(BaseModel):
|
|
|
88
85
|
exclude=excluded_fields,
|
|
89
86
|
exclude_none=True,
|
|
90
87
|
)
|
|
88
|
+
# override the default output from pydantic by calling `to_dict()` of pair_maker_config
|
|
89
|
+
if self.pair_maker_config:
|
|
90
|
+
_dict['pairMakerConfig'] = self.pair_maker_config.to_dict()
|
|
91
91
|
# override the default output from pydantic by calling `to_dict()` of referee
|
|
92
92
|
if self.referee:
|
|
93
93
|
_dict['referee'] = self.referee.to_dict()
|
|
94
|
-
# override the default output from pydantic by calling `to_dict()` of each item in feature_flags (list)
|
|
95
|
-
_items = []
|
|
96
|
-
if self.feature_flags:
|
|
97
|
-
for _item_feature_flags in self.feature_flags:
|
|
98
|
-
if _item_feature_flags:
|
|
99
|
-
_items.append(_item_feature_flags.to_dict())
|
|
100
|
-
_dict['featureFlags'] = _items
|
|
101
|
-
# set to None if priority (nullable) is None
|
|
102
|
-
# and model_fields_set contains the field
|
|
103
|
-
if self.priority is None and "priority" in self.model_fields_set:
|
|
104
|
-
_dict['priority'] = None
|
|
105
|
-
|
|
106
|
-
# set to None if is_fallback (nullable) is None
|
|
107
|
-
# and model_fields_set contains the field
|
|
108
|
-
if self.is_fallback is None and "is_fallback" in self.model_fields_set:
|
|
109
|
-
_dict['isFallback'] = None
|
|
110
|
-
|
|
111
94
|
return _dict
|
|
112
95
|
|
|
113
96
|
@classmethod
|
|
@@ -124,14 +107,11 @@ class CompareWorkflowConfigModel(BaseModel):
|
|
|
124
107
|
"criteria": obj.get("criteria"),
|
|
125
108
|
"startingElo": obj.get("startingElo"),
|
|
126
109
|
"kFactor": obj.get("kFactor"),
|
|
127
|
-
"matchSize": obj.get("matchSize"),
|
|
128
110
|
"scalingFactor": obj.get("scalingFactor"),
|
|
111
|
+
"pairMakerConfig": CompareWorkflowConfigModelPairMakerConfig.from_dict(obj["pairMakerConfig"]) if obj.get("pairMakerConfig") is not None else None,
|
|
129
112
|
"matchesUntilCompleted": obj.get("matchesUntilCompleted"),
|
|
130
113
|
"referee": CompareWorkflowModel1Referee.from_dict(obj["referee"]) if obj.get("referee") is not None else None,
|
|
131
|
-
"targetCountryCodes": obj.get("targetCountryCodes")
|
|
132
|
-
"featureFlags": [FeatureFlag.from_dict(_item) for _item in obj["featureFlags"]] if obj.get("featureFlags") is not None else None,
|
|
133
|
-
"priority": obj.get("priority"),
|
|
134
|
-
"isFallback": obj.get("isFallback")
|
|
114
|
+
"targetCountryCodes": obj.get("targetCountryCodes")
|
|
135
115
|
})
|
|
136
116
|
return _obj
|
|
137
117
|
|