rapidata 1.8.3__py3-none-any.whl → 2.44.4__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 +32 -16
- rapidata/api_client/__init__.py +83 -279
- rapidata/api_client/api/__init__.py +14 -4
- rapidata/api_client/api/asset_api.py +853 -0
- rapidata/api_client/api/audience_api.py +1133 -0
- rapidata/api_client/api/benchmark_api.py +3966 -0
- rapidata/api_client/api/campaign_api.py +926 -125
- rapidata/api_client/api/client_api.py +589 -42
- rapidata/api_client/api/coco_api.py +45 -45
- rapidata/api_client/api/compare_workflow_api.py +47 -45
- rapidata/api_client/api/{validation_api.py → customer_rapid_api.py} +367 -378
- rapidata/api_client/api/datapoint_api.py +69 -336
- rapidata/api_client/api/dataset_api.py +263 -872
- rapidata/api_client/api/evaluation_workflow_api.py +319 -0
- rapidata/api_client/api/feedback_api.py +306 -0
- rapidata/api_client/api/grouped_ranking_workflow_api.py +319 -0
- rapidata/api_client/api/identity_api.py +365 -120
- rapidata/api_client/api/leaderboard_api.py +2550 -0
- rapidata/api_client/api/newsletter_api.py +35 -34
- rapidata/api_client/api/order_api.py +1111 -787
- rapidata/api_client/api/participant_api.py +2181 -0
- rapidata/api_client/api/pipeline_api.py +156 -139
- rapidata/api_client/api/prompt_api.py +320 -0
- rapidata/api_client/api/rapid_api.py +1288 -189
- rapidata/api_client/api/rapidata_identity_api_api.py +5 -4
- rapidata/api_client/api/sample_api.py +300 -0
- rapidata/api_client/api/simple_workflow_api.py +47 -79
- rapidata/api_client/api/survey_api.py +304 -0
- rapidata/api_client/api/user_rapid_api.py +1389 -0
- rapidata/api_client/api/validation_set_api.py +3052 -0
- rapidata/api_client/api/workflow_api.py +410 -96
- rapidata/api_client/api_client.py +2 -2
- rapidata/api_client/configuration.py +16 -29
- rapidata/api_client/exceptions.py +2 -2
- rapidata/api_client/models/__init__.py +65 -260
- rapidata/api_client/models/ab_test_selection.py +122 -0
- rapidata/api_client/models/ab_test_selection_a_inner.py +240 -0
- rapidata/api_client/models/add_campaign_model.py +52 -11
- rapidata/api_client/models/add_campaign_model_user_filters_inner.py +224 -0
- rapidata/api_client/models/add_user_response_result.py +111 -0
- rapidata/api_client/models/add_user_response_result_validation_truth.py +258 -0
- rapidata/api_client/models/add_validation_rapid_model.py +61 -23
- rapidata/api_client/models/add_validation_rapid_model_asset.py +154 -0
- rapidata/api_client/models/add_validation_rapid_model_context_asset.py +160 -0
- rapidata/api_client/models/add_validation_rapid_model_metadata_inner.py +140 -0
- rapidata/api_client/models/add_validation_rapid_model_payload.py +30 -16
- rapidata/api_client/models/add_validation_rapid_model_truth.py +65 -17
- rapidata/api_client/models/add_validation_rapid_new_model.py +137 -0
- rapidata/api_client/models/add_validation_rapid_new_model_asset.py +182 -0
- rapidata/api_client/models/add_validation_rapid_new_model_truth.py +286 -0
- rapidata/api_client/models/add_validation_text_rapid_model.py +14 -9
- rapidata/api_client/models/age_group.py +5 -4
- rapidata/api_client/models/age_user_filter_model.py +2 -2
- rapidata/api_client/models/age_user_filter_model_age_group.py +41 -0
- rapidata/api_client/models/aggregated_orders_model.py +98 -0
- rapidata/api_client/models/aggregator_type.py +5 -2
- rapidata/api_client/models/and_filter.py +121 -0
- rapidata/api_client/models/and_filter_filters_inner.py +282 -0
- rapidata/api_client/models/and_user_filter_model.py +106 -0
- rapidata/api_client/models/and_user_filter_model_filters_inner.py +282 -0
- rapidata/api_client/models/are_rapids_active_result.py +87 -0
- rapidata/api_client/models/asset_metadata.py +106 -0
- rapidata/api_client/models/asset_metadata_asset.py +170 -0
- rapidata/api_client/models/asset_metadata_model.py +96 -0
- rapidata/api_client/models/asset_metadata_model_asset.py +170 -0
- rapidata/api_client/models/asset_type.py +40 -0
- rapidata/api_client/models/attach_category_rapid_blueprint.py +13 -3
- rapidata/api_client/models/attach_category_rapid_blueprint_category.py +89 -0
- rapidata/api_client/models/audience_status.py +38 -0
- rapidata/api_client/models/base_error.py +1 -4
- rapidata/api_client/models/benchmark_query_result.py +98 -0
- rapidata/api_client/models/benchmark_query_result_paged_result.py +105 -0
- rapidata/api_client/models/boost_leaderboard_model.py +89 -0
- rapidata/api_client/models/boost_mode.py +37 -0
- rapidata/api_client/models/boost_query_result.py +97 -0
- rapidata/api_client/models/boost_query_result_boost_mode.py +37 -0
- rapidata/api_client/models/boost_query_result_boost_status.py +39 -0
- rapidata/api_client/models/boost_status.py +39 -0
- rapidata/api_client/models/boosting_profile.py +89 -0
- rapidata/api_client/models/box_shape.py +4 -33
- rapidata/api_client/models/campaign_filter.py +98 -0
- rapidata/api_client/models/campaign_query_result.py +107 -0
- rapidata/api_client/models/campaign_query_result_paged_result.py +105 -0
- rapidata/api_client/models/campaign_status.py +4 -2
- rapidata/api_client/models/capped_selection.py +3 -3
- rapidata/api_client/models/change_boost_model.py +89 -0
- rapidata/api_client/models/classification_metadata.py +14 -5
- rapidata/api_client/models/classification_metadata_model.py +2 -4
- rapidata/api_client/models/classify_payload.py +14 -15
- rapidata/api_client/models/classify_payload_category.py +89 -0
- rapidata/api_client/models/client_model.py +181 -0
- rapidata/api_client/models/clients_query_result.py +2 -2
- rapidata/api_client/models/clone_order_model.py +6 -8
- rapidata/api_client/models/clone_order_result.py +9 -4
- rapidata/api_client/models/compare_match_status.py +39 -0
- rapidata/api_client/models/compare_rapid_blueprint.py +5 -3
- rapidata/api_client/models/compare_rapid_blueprint1.py +96 -0
- rapidata/api_client/models/compare_result.py +4 -4
- rapidata/api_client/models/compare_workflow_config.py +31 -22
- rapidata/api_client/models/compare_workflow_config_context_asset.py +174 -0
- rapidata/api_client/models/compare_workflow_config_metadata_value.py +296 -0
- rapidata/api_client/models/compare_workflow_config_model.py +32 -29
- rapidata/api_client/models/compare_workflow_config_model_pair_maker_config.py +126 -0
- rapidata/api_client/models/compare_workflow_config_pair_maker_config.py +126 -0
- rapidata/api_client/models/compare_workflow_model.py +59 -14
- rapidata/api_client/models/compare_workflow_model1.py +32 -19
- rapidata/api_client/models/compare_workflow_model1_pair_maker_information.py +126 -0
- rapidata/api_client/models/compare_workflow_model_context_asset.py +160 -0
- rapidata/api_client/models/compare_workflow_model_metadata_inner.py +154 -0
- rapidata/api_client/models/compare_workflow_model_pair_maker_config.py +126 -0
- rapidata/api_client/models/comparison_operator.py +41 -0
- rapidata/api_client/models/conditional_validation_selection.py +9 -5
- rapidata/api_client/models/conditional_validation_selection_validation_chance.py +103 -0
- rapidata/api_client/models/confidence_interval.py +89 -0
- rapidata/api_client/models/coordinate.py +2 -2
- rapidata/api_client/models/count_metadata.py +13 -4
- rapidata/api_client/models/count_metadata_model.py +2 -4
- rapidata/api_client/models/country_filter.py +98 -0
- rapidata/api_client/models/create_audience_request.py +99 -0
- rapidata/api_client/models/create_audience_result.py +87 -0
- rapidata/api_client/models/create_benchmark_model.py +87 -0
- rapidata/api_client/models/create_benchmark_participant_model.py +87 -0
- rapidata/api_client/models/create_benchmark_participant_result.py +89 -0
- rapidata/api_client/models/create_benchmark_prompt_result.py +87 -0
- rapidata/api_client/models/create_benchmark_result.py +87 -0
- rapidata/api_client/models/create_bridge_token_result.py +2 -2
- rapidata/api_client/models/create_client_model.py +6 -13
- rapidata/api_client/models/create_complex_order_model.py +9 -9
- rapidata/api_client/models/create_complex_order_result.py +6 -4
- rapidata/api_client/models/create_customer_client_result.py +89 -0
- rapidata/api_client/models/create_datapoint_from_files_model.py +102 -0
- rapidata/api_client/models/create_datapoint_from_files_model_metadata_inner.py +182 -0
- rapidata/api_client/models/create_datapoint_from_text_sources_model.py +109 -0
- rapidata/api_client/models/create_datapoint_from_urls_model.py +109 -0
- rapidata/api_client/models/create_datapoint_from_urls_model_metadata_inner.py +168 -0
- rapidata/api_client/models/create_datapoint_model.py +134 -0
- rapidata/api_client/models/create_datapoint_model_asset.py +154 -0
- rapidata/api_client/models/create_datapoint_model_context_asset.py +160 -0
- rapidata/api_client/models/create_datapoint_model_metadata_inner.py +154 -0
- rapidata/api_client/models/create_datapoint_result.py +87 -0
- rapidata/api_client/models/create_datapoints_from_s3_bucket_model.py +124 -0
- rapidata/api_client/models/create_demographic_rapid_model.py +45 -7
- rapidata/api_client/models/create_demographic_rapid_model_asset.py +160 -0
- rapidata/api_client/models/create_demographic_rapid_model_context_asset.py +160 -0
- rapidata/api_client/models/create_demographic_rapid_model_new.py +119 -0
- rapidata/api_client/models/create_empty_validation_set_result.py +2 -2
- rapidata/api_client/models/create_leaderboard_model.py +140 -0
- rapidata/api_client/models/create_leaderboard_participant_model.py +87 -0
- rapidata/api_client/models/create_leaderboard_participant_result.py +89 -0
- rapidata/api_client/models/create_leaderboard_result.py +99 -0
- rapidata/api_client/models/create_order_model.py +41 -52
- rapidata/api_client/models/create_order_model_referee.py +12 -12
- rapidata/api_client/models/create_order_model_user_filters_inner.py +83 -11
- rapidata/api_client/models/create_order_model_workflow.py +35 -21
- rapidata/api_client/models/create_order_result.py +6 -4
- rapidata/api_client/models/create_rapid_result.py +87 -0
- rapidata/api_client/models/create_sample_model.py +93 -0
- rapidata/api_client/models/create_sample_model_asset.py +154 -0
- rapidata/api_client/models/create_sample_model_obsolete.py +87 -0
- rapidata/api_client/models/create_simple_pipeline_model_pipeline_steps_inner.py +8 -22
- rapidata/api_client/models/create_unsupported_order_model.py +6 -6
- rapidata/api_client/models/create_validation_set_model.py +87 -0
- rapidata/api_client/models/custom_user_filter_model.py +98 -0
- rapidata/api_client/models/datapoint.py +12 -28
- rapidata/api_client/models/datapoint_asset.py +40 -40
- rapidata/api_client/models/datapoint_metadata_model.py +13 -6
- rapidata/api_client/models/datapoint_model_paged_result.py +105 -0
- rapidata/api_client/models/datapoint_state.py +38 -0
- rapidata/api_client/models/dataset_dataset_id_datapoints_post_request_metadata_inner.py +182 -0
- rapidata/api_client/models/demographic.py +89 -0
- rapidata/api_client/models/demographic_filter.py +100 -0
- rapidata/api_client/models/demographic_metadata_model.py +18 -9
- rapidata/api_client/models/dynamic_client_registration_request.py +160 -0
- rapidata/api_client/models/early_stopping_referee_model.py +3 -3
- rapidata/api_client/models/effort_capped_selection.py +106 -0
- rapidata/api_client/models/elo_config.py +91 -0
- rapidata/api_client/models/elo_config_model.py +91 -0
- rapidata/api_client/models/entity_tag_header_value.py +93 -0
- rapidata/api_client/models/evaluation_workflow_config.py +13 -3
- rapidata/api_client/models/evaluation_workflow_model.py +16 -6
- rapidata/api_client/models/evaluation_workflow_model1.py +115 -0
- rapidata/api_client/models/existing_asset_input.py +120 -0
- rapidata/api_client/models/existing_asset_input_metadata_value.py +126 -0
- rapidata/api_client/models/feature_flag.py +2 -2
- rapidata/api_client/models/feature_flag_model.py +6 -6
- rapidata/api_client/models/feedback_model.py +7 -7
- rapidata/api_client/models/file_asset.py +15 -12
- rapidata/api_client/models/file_asset_input.py +104 -0
- rapidata/api_client/models/file_asset_input1.py +104 -0
- rapidata/api_client/models/file_asset_input1_file.py +168 -0
- rapidata/api_client/models/file_asset_input2.py +104 -0
- rapidata/api_client/models/file_asset_input3.py +104 -0
- rapidata/api_client/models/file_asset_input_file.py +168 -0
- rapidata/api_client/models/file_asset_metadata_value.py +252 -0
- rapidata/api_client/models/file_asset_model.py +18 -13
- rapidata/api_client/models/file_asset_model_metadata_inner.py +8 -22
- rapidata/api_client/models/file_asset_model_metadata_value.py +252 -0
- rapidata/api_client/models/file_stream_result.py +122 -0
- rapidata/api_client/models/file_type.py +39 -0
- rapidata/api_client/models/file_type_metadata.py +110 -0
- rapidata/api_client/models/file_type_metadata_model.py +97 -0
- rapidata/api_client/models/filter.py +7 -25
- rapidata/api_client/models/filter_operator.py +3 -2
- rapidata/api_client/models/fork_benchmark_result.py +87 -0
- rapidata/api_client/models/form_file_wrapper.py +135 -0
- rapidata/api_client/models/free_text_payload.py +10 -3
- rapidata/api_client/models/free_text_rapid_blueprint.py +10 -3
- rapidata/api_client/models/gender_user_filter_model.py +2 -2
- rapidata/api_client/models/gender_user_filter_model_gender.py +38 -0
- rapidata/api_client/models/get_asset_metadata_result.py +100 -0
- rapidata/api_client/models/get_audience_by_id_result.py +111 -0
- rapidata/api_client/models/get_available_validation_sets_result.py +2 -2
- rapidata/api_client/models/get_benchmark_by_id_query.py +96 -0
- rapidata/api_client/models/get_benchmark_by_id_query_result.py +94 -0
- rapidata/api_client/models/get_benchmark_by_id_query_result_paged_result.py +105 -0
- rapidata/api_client/models/get_benchmark_by_id_result.py +96 -0
- rapidata/api_client/models/get_boost_result.py +97 -0
- rapidata/api_client/models/get_boost_result_boost_mode.py +37 -0
- rapidata/api_client/models/get_boost_result_boost_status.py +39 -0
- rapidata/api_client/models/get_classify_workflow_result_overview_result.py +144 -0
- rapidata/api_client/models/get_compare_ab_summary_result.py +87 -0
- rapidata/api_client/models/get_compare_workflow_results_model.py +106 -0
- rapidata/api_client/models/get_compare_workflow_results_result.py +95 -0
- rapidata/api_client/models/get_compare_workflow_results_result_asset.py +170 -0
- rapidata/api_client/models/get_compare_workflow_results_result_paged_result.py +105 -0
- rapidata/api_client/models/get_datapoint_by_id_result.py +103 -0
- rapidata/api_client/models/get_datapoint_by_id_result_asset.py +170 -0
- rapidata/api_client/models/get_dataset_by_id_result.py +2 -2
- rapidata/api_client/models/get_dataset_progress_result.py +93 -0
- rapidata/api_client/models/get_evaluation_workflow_results_model.py +119 -0
- rapidata/api_client/models/get_failed_datapoints_result.py +95 -0
- rapidata/api_client/models/get_failed_datapoints_result_datapoint.py +100 -0
- rapidata/api_client/models/get_file_metadata_result.py +100 -0
- rapidata/api_client/models/get_grouped_ranking_workflow_results_model.py +106 -0
- rapidata/api_client/models/get_grouped_ranking_workflow_results_result.py +97 -0
- rapidata/api_client/models/get_grouped_ranking_workflow_results_result_paged_result.py +105 -0
- rapidata/api_client/models/get_leaderboard_by_id_result.py +135 -0
- rapidata/api_client/models/get_order_by_id_result.py +12 -5
- rapidata/api_client/models/get_participant_by_id_result.py +91 -0
- rapidata/api_client/models/get_pipeline_by_id_result.py +18 -8
- rapidata/api_client/models/get_public_orders_result.py +2 -2
- rapidata/api_client/models/get_public_responses_result.py +95 -0
- rapidata/api_client/models/get_public_responses_result_response.py +112 -0
- rapidata/api_client/models/get_rapid_responses_result.py +106 -0
- rapidata/api_client/models/get_recommended_validation_set_result.py +95 -0
- rapidata/api_client/models/get_responses_for_rapid_result.py +106 -0
- rapidata/api_client/models/get_responses_for_rapid_result_response.py +103 -0
- rapidata/api_client/models/get_responses_for_rapid_result_response_result.py +266 -0
- rapidata/api_client/models/get_responses_result.py +95 -0
- rapidata/api_client/models/get_responses_result_response.py +103 -0
- rapidata/api_client/models/get_sample_by_id_result.py +125 -0
- rapidata/api_client/models/get_simple_workflow_results_model.py +119 -0
- rapidata/api_client/models/get_simple_workflow_results_result.py +118 -0
- rapidata/api_client/models/get_simple_workflow_results_result_paged_result.py +105 -0
- rapidata/api_client/models/get_standing_by_id_result.py +96 -0
- rapidata/api_client/models/get_validation_rapids_query.py +123 -0
- rapidata/api_client/models/get_validation_rapids_query_paged_result.py +105 -0
- rapidata/api_client/models/get_validation_rapids_result.py +150 -0
- rapidata/api_client/models/get_validation_rapids_result_asset.py +174 -0
- rapidata/api_client/models/get_validation_rapids_result_paged_result.py +105 -0
- rapidata/api_client/models/get_validation_rapids_result_payload.py +252 -0
- rapidata/api_client/models/get_validation_rapids_result_truth.py +286 -0
- rapidata/api_client/models/get_validation_set_by_id_result.py +10 -4
- rapidata/api_client/models/get_workflow_by_id_result.py +5 -5
- rapidata/api_client/models/get_workflow_by_id_result_workflow.py +37 -9
- rapidata/api_client/models/get_workflow_progress_result.py +5 -11
- rapidata/api_client/models/get_workflow_results_result.py +129 -0
- rapidata/api_client/models/get_workflow_results_result_paged_result.py +105 -0
- rapidata/api_client/models/get_workflow_results_result_response.py +103 -0
- rapidata/api_client/models/google_one_tap_login_model.py +87 -0
- rapidata/api_client/models/grouped_ranking_workflow_config.py +155 -0
- rapidata/api_client/models/grouped_ranking_workflow_config_context_assets_value.py +170 -0
- rapidata/api_client/models/grouped_ranking_workflow_model.py +147 -0
- rapidata/api_client/models/grouped_ranking_workflow_model1.py +121 -0
- rapidata/api_client/models/i_artifact_model.py +182 -0
- rapidata/api_client/models/i_artifact_model_campaign_artifact_model.py +98 -0
- rapidata/api_client/models/i_artifact_model_dataset_artifact_model.py +98 -0
- rapidata/api_client/models/i_artifact_model_file_artifact_model.py +98 -0
- rapidata/api_client/models/i_artifact_model_workflow_artifact_model.py +98 -0
- rapidata/api_client/models/i_artifact_model_workflow_config_artifact_model.py +102 -0
- rapidata/api_client/models/i_asset.py +170 -0
- rapidata/api_client/models/i_asset_file_asset.py +111 -0
- rapidata/api_client/models/i_asset_input.py +156 -0
- rapidata/api_client/models/i_asset_input_existing_asset_input.py +118 -0
- rapidata/api_client/models/i_asset_input_multi_asset_input.py +128 -0
- rapidata/api_client/models/i_asset_input_text_asset_input.py +118 -0
- rapidata/api_client/models/i_asset_model.py +170 -0
- rapidata/api_client/models/i_asset_model_file_asset_model.py +113 -0
- rapidata/api_client/models/i_asset_model_multi_asset_model.py +123 -0
- rapidata/api_client/models/i_asset_model_null_asset_model.py +111 -0
- rapidata/api_client/models/i_asset_model_text_asset_model.py +113 -0
- rapidata/api_client/models/i_asset_multi_asset.py +121 -0
- rapidata/api_client/models/i_asset_null_asset.py +109 -0
- rapidata/api_client/models/i_asset_text_asset.py +111 -0
- rapidata/api_client/models/i_campaign_filter.py +282 -0
- rapidata/api_client/models/i_campaign_filter_and_filter.py +117 -0
- rapidata/api_client/models/i_campaign_filter_campaign_filter.py +98 -0
- rapidata/api_client/models/i_campaign_filter_country_filter.py +98 -0
- rapidata/api_client/models/i_campaign_filter_demographic_filter.py +100 -0
- rapidata/api_client/models/i_campaign_filter_language_filter.py +98 -0
- rapidata/api_client/models/i_campaign_filter_new_user_filter.py +96 -0
- rapidata/api_client/models/i_campaign_filter_not_filter.py +113 -0
- rapidata/api_client/models/i_campaign_filter_or_filter.py +117 -0
- rapidata/api_client/models/i_campaign_filter_response_count_filter.py +103 -0
- rapidata/api_client/models/i_campaign_filter_user_action_restriction_filter.py +106 -0
- rapidata/api_client/models/i_campaign_filter_user_score_filter.py +102 -0
- rapidata/api_client/models/i_campaign_filter_user_state_filter.py +106 -0
- rapidata/api_client/models/i_dataset_metadata_input.py +154 -0
- rapidata/api_client/models/i_dataset_metadata_input_prompt_asset_metadata_input.py +100 -0
- rapidata/api_client/models/i_dataset_metadata_input_prompt_metadata_input.py +96 -0
- rapidata/api_client/models/i_dataset_metadata_input_transcription_metadata_input.py +96 -0
- rapidata/api_client/models/i_dataset_model.py +126 -0
- rapidata/api_client/models/i_dataset_model_clone_dataset_model.py +98 -0
- rapidata/api_client/models/i_metadata.py +252 -0
- rapidata/api_client/models/i_metadata_classification_metadata.py +109 -0
- rapidata/api_client/models/i_metadata_count_metadata.py +109 -0
- rapidata/api_client/models/i_metadata_file_type_metadata.py +110 -0
- rapidata/api_client/models/i_metadata_image_dimension_metadata.py +111 -0
- rapidata/api_client/models/i_metadata_input.py +126 -0
- rapidata/api_client/models/i_metadata_input_text_metadata_input.py +111 -0
- rapidata/api_client/models/i_metadata_location_metadata.py +111 -0
- rapidata/api_client/models/i_metadata_model.py +252 -0
- rapidata/api_client/models/i_metadata_model_classification_metadata_model.py +96 -0
- rapidata/api_client/models/i_metadata_model_count_metadata_model.py +96 -0
- rapidata/api_client/models/i_metadata_model_file_type_metadata_model.py +97 -0
- rapidata/api_client/models/i_metadata_model_image_dimension_metadata_model.py +98 -0
- rapidata/api_client/models/i_metadata_model_location_metadata_model.py +98 -0
- rapidata/api_client/models/i_metadata_model_original_filename_metadata_model.py +96 -0
- rapidata/api_client/models/i_metadata_model_source_url_metadata_model.py +96 -0
- rapidata/api_client/models/i_metadata_model_streams_metadata_model.py +100 -0
- rapidata/api_client/models/i_metadata_model_text_metadata_model.py +101 -0
- rapidata/api_client/models/i_metadata_model_video_duration_metadata_model.py +97 -0
- rapidata/api_client/models/i_metadata_original_filename_metadata.py +109 -0
- rapidata/api_client/models/i_metadata_source_url_metadata.py +109 -0
- rapidata/api_client/models/i_metadata_streams_metadata.py +113 -0
- rapidata/api_client/models/i_metadata_text_metadata.py +114 -0
- rapidata/api_client/models/i_metadata_video_duration_metadata.py +110 -0
- rapidata/api_client/models/i_order_workflow_model.py +168 -0
- rapidata/api_client/models/i_order_workflow_model_compare_workflow_model.py +146 -0
- rapidata/api_client/models/i_order_workflow_model_evaluation_workflow_model.py +108 -0
- rapidata/api_client/models/i_order_workflow_model_grouped_ranking_workflow_model.py +147 -0
- rapidata/api_client/models/i_order_workflow_model_simple_workflow_model.py +110 -0
- rapidata/api_client/models/i_pair_maker_config.py +126 -0
- rapidata/api_client/models/i_pair_maker_config_model.py +126 -0
- rapidata/api_client/models/i_pair_maker_config_model_online_pair_maker_config_model.py +98 -0
- rapidata/api_client/models/i_pair_maker_config_online_pair_maker_config.py +98 -0
- rapidata/api_client/models/i_pair_maker_information.py +126 -0
- rapidata/api_client/models/i_pair_maker_information_online_pair_maker_information.py +100 -0
- rapidata/api_client/models/i_pipeline_artifact_model.py +126 -0
- rapidata/api_client/models/i_pipeline_artifact_model_create_dataset_artifact_model.py +102 -0
- rapidata/api_client/models/i_pipeline_model.py +126 -0
- rapidata/api_client/models/i_pipeline_model_create_simple_pipeline_model.py +116 -0
- rapidata/api_client/models/i_pipeline_step_model.py +168 -0
- rapidata/api_client/models/i_pipeline_step_model_dataset_evaluation_step_model.py +102 -0
- rapidata/api_client/models/i_pipeline_step_model_send_completion_mail_step_model.py +98 -0
- rapidata/api_client/models/i_pipeline_step_model_workflow_aggregation_step_model.py +103 -0
- rapidata/api_client/models/i_pipeline_step_model_workflow_labeling_step_model.py +96 -0
- rapidata/api_client/models/i_rapid_blueprint.py +252 -0
- rapidata/api_client/models/i_rapid_blueprint_attach_category_rapid_blueprint.py +108 -0
- rapidata/api_client/models/i_rapid_blueprint_bounding_box_rapid_blueprint.py +96 -0
- rapidata/api_client/models/i_rapid_blueprint_compare_rapid_blueprint.py +98 -0
- rapidata/api_client/models/i_rapid_blueprint_free_text_rapid_blueprint.py +103 -0
- rapidata/api_client/models/i_rapid_blueprint_line_rapid_blueprint.py +96 -0
- rapidata/api_client/models/i_rapid_blueprint_locate_rapid_blueprint.py +96 -0
- rapidata/api_client/models/i_rapid_blueprint_named_entity_rapid_blueprint.py +98 -0
- rapidata/api_client/models/i_rapid_blueprint_polygon_rapid_blueprint.py +96 -0
- rapidata/api_client/models/i_rapid_blueprint_scrub_rapid_blueprint.py +96 -0
- rapidata/api_client/models/i_rapid_blueprint_transcription_rapid_blueprint.py +96 -0
- rapidata/api_client/models/i_rapid_payload.py +252 -0
- rapidata/api_client/models/i_rapid_payload_bounding_box_payload.py +96 -0
- rapidata/api_client/models/i_rapid_payload_classify_payload.py +106 -0
- rapidata/api_client/models/i_rapid_payload_compare_payload.py +96 -0
- rapidata/api_client/models/i_rapid_payload_free_text_payload.py +103 -0
- rapidata/api_client/models/i_rapid_payload_line_payload.py +96 -0
- rapidata/api_client/models/i_rapid_payload_locate_payload.py +96 -0
- rapidata/api_client/models/i_rapid_payload_named_entity_payload.py +98 -0
- rapidata/api_client/models/i_rapid_payload_polygon_payload.py +96 -0
- rapidata/api_client/models/i_rapid_payload_scrub_payload.py +96 -0
- rapidata/api_client/models/i_rapid_payload_transcription_payload.py +106 -0
- rapidata/api_client/models/i_rapid_result.py +266 -0
- rapidata/api_client/models/i_rapid_result_attach_category_result.py +98 -0
- rapidata/api_client/models/i_rapid_result_bounding_box_result.py +106 -0
- rapidata/api_client/models/i_rapid_result_compare_result.py +98 -0
- rapidata/api_client/models/i_rapid_result_free_text_result.py +98 -0
- rapidata/api_client/models/i_rapid_result_line_result.py +106 -0
- rapidata/api_client/models/i_rapid_result_locate_result.py +106 -0
- rapidata/api_client/models/i_rapid_result_named_entity_result.py +106 -0
- rapidata/api_client/models/i_rapid_result_polygon_result.py +106 -0
- rapidata/api_client/models/i_rapid_result_scrub_result.py +98 -0
- rapidata/api_client/models/i_rapid_result_skip_result.py +96 -0
- rapidata/api_client/models/i_rapid_result_transcription_result.py +106 -0
- rapidata/api_client/models/i_referee_config.py +154 -0
- rapidata/api_client/models/i_referee_config_naive_referee_config.py +96 -0
- rapidata/api_client/models/i_referee_config_never_ending_referee_config.py +94 -0
- rapidata/api_client/models/i_referee_config_probabilistic_attach_category_referee_config.py +98 -0
- rapidata/api_client/models/i_referee_info.py +154 -0
- rapidata/api_client/models/i_referee_info_naive_referee_info.py +96 -0
- rapidata/api_client/models/i_referee_info_never_ending_referee_info.py +94 -0
- rapidata/api_client/models/i_referee_info_probabilistic_attach_category_referee_info.py +98 -0
- rapidata/api_client/models/i_referee_model.py +140 -0
- rapidata/api_client/models/i_referee_model_early_stopping_referee_model.py +98 -0
- rapidata/api_client/models/i_referee_model_naive_referee_model.py +96 -0
- rapidata/api_client/models/i_selection.py +240 -0
- rapidata/api_client/models/i_selection_ab_test_selection.py +122 -0
- rapidata/api_client/models/i_selection_capped_selection.py +108 -0
- rapidata/api_client/models/i_selection_conditional_validation_selection.py +110 -0
- rapidata/api_client/models/i_selection_demographic_selection.py +98 -0
- rapidata/api_client/models/i_selection_effort_capped_selection.py +101 -0
- rapidata/api_client/models/i_selection_labeling_selection.py +103 -0
- rapidata/api_client/models/i_selection_shuffling_selection.py +106 -0
- rapidata/api_client/models/i_selection_static_selection.py +96 -0
- rapidata/api_client/models/i_selection_validation_selection.py +98 -0
- rapidata/api_client/models/i_user_filter_model.py +282 -0
- rapidata/api_client/models/i_user_filter_model_age_user_filter_model.py +104 -0
- rapidata/api_client/models/i_user_filter_model_and_user_filter_model.py +106 -0
- rapidata/api_client/models/i_user_filter_model_campaign_user_filter_model.py +96 -0
- rapidata/api_client/models/i_user_filter_model_country_user_filter_model.py +96 -0
- rapidata/api_client/models/i_user_filter_model_custom_user_filter_model.py +98 -0
- rapidata/api_client/models/i_user_filter_model_gender_user_filter_model.py +104 -0
- rapidata/api_client/models/i_user_filter_model_language_user_filter_model.py +96 -0
- rapidata/api_client/models/i_user_filter_model_new_user_filter_model.py +94 -0
- rapidata/api_client/models/i_user_filter_model_not_user_filter_model.py +102 -0
- rapidata/api_client/models/i_user_filter_model_or_user_filter_model.py +106 -0
- rapidata/api_client/models/i_user_filter_model_response_count_user_filter_model.py +101 -0
- rapidata/api_client/models/i_user_filter_model_user_score_user_filter_model.py +105 -0
- rapidata/api_client/models/i_validation_metadata_input.py +140 -0
- rapidata/api_client/models/i_validation_metadata_input_prompt_asset_metadata_input.py +100 -0
- rapidata/api_client/models/i_validation_metadata_input_prompt_metadata_input.py +96 -0
- rapidata/api_client/models/i_validation_truth.py +280 -0
- rapidata/api_client/models/i_validation_truth_attach_category_truth.py +96 -0
- rapidata/api_client/models/i_validation_truth_bounding_box_truth.py +102 -0
- rapidata/api_client/models/i_validation_truth_compare_truth.py +96 -0
- rapidata/api_client/models/i_validation_truth_empty_validation_truth.py +94 -0
- rapidata/api_client/models/i_validation_truth_line_truth.py +94 -0
- rapidata/api_client/models/i_validation_truth_locate_box_truth.py +104 -0
- rapidata/api_client/models/i_validation_truth_multi_compare_truth.py +96 -0
- rapidata/api_client/models/i_validation_truth_named_entity_truth.py +104 -0
- rapidata/api_client/models/i_validation_truth_polygon_truth.py +94 -0
- rapidata/api_client/models/i_validation_truth_scrub_truth.py +104 -0
- rapidata/api_client/models/i_validation_truth_skip_truth.py +94 -0
- rapidata/api_client/models/i_validation_truth_transcription_truth.py +115 -0
- rapidata/api_client/models/i_workflow_config.py +168 -0
- rapidata/api_client/models/i_workflow_config_compare_workflow_config.py +142 -0
- rapidata/api_client/models/i_workflow_config_evaluation_workflow_config.py +114 -0
- rapidata/api_client/models/i_workflow_config_grouped_ranking_workflow_config.py +155 -0
- rapidata/api_client/models/i_workflow_config_simple_workflow_config.py +116 -0
- rapidata/api_client/models/i_workflow_model.py +168 -0
- rapidata/api_client/models/i_workflow_model_compare_workflow_model.py +145 -0
- rapidata/api_client/models/i_workflow_model_evaluation_workflow_model.py +115 -0
- rapidata/api_client/models/i_workflow_model_grouped_ranking_workflow_model.py +121 -0
- rapidata/api_client/models/i_workflow_model_simple_workflow_model.py +119 -0
- rapidata/api_client/models/identity_read_bridge_token_get202_response.py +140 -0
- rapidata/api_client/models/image_dimension_metadata.py +13 -4
- rapidata/api_client/models/image_dimension_metadata_model.py +2 -4
- rapidata/api_client/models/inquire_file_metadata_result.py +100 -0
- rapidata/api_client/models/inspect_report_result.py +92 -0
- rapidata/api_client/models/json_web_key.py +224 -0
- rapidata/api_client/models/json_web_key_set.py +95 -0
- rapidata/api_client/models/labeling_selection.py +21 -4
- rapidata/api_client/models/language_filter.py +98 -0
- rapidata/api_client/models/leaderboard_query_result.py +135 -0
- rapidata/api_client/models/leaderboard_query_result_paged_result.py +105 -0
- rapidata/api_client/models/leaderboards_query_result.py +135 -0
- rapidata/api_client/models/line_result.py +3 -3
- rapidata/api_client/models/line_result_line.py +97 -0
- rapidata/api_client/models/line_result_line_point.py +89 -0
- rapidata/api_client/models/local_file_wrapper.py +120 -0
- rapidata/api_client/models/locate_coordinate.py +4 -13
- rapidata/api_client/models/location_metadata.py +14 -5
- rapidata/api_client/models/location_metadata_model.py +2 -4
- rapidata/api_client/models/logic_operator.py +3 -2
- rapidata/api_client/models/metadata_i_order_metadata_input.py +154 -0
- rapidata/api_client/models/metadata_i_order_metadata_input_metadata_prompt_asset_metadata_input.py +100 -0
- rapidata/api_client/models/metadata_i_order_metadata_input_metadata_prompt_metadata_input.py +96 -0
- rapidata/api_client/models/metadata_i_order_metadata_input_metadata_transcription_metadata_input.py +96 -0
- rapidata/api_client/models/metadata_prompt_asset_metadata_input.py +100 -0
- rapidata/api_client/models/metadata_prompt_metadata_input.py +96 -0
- rapidata/api_client/models/metadata_transcription_metadata_input.py +96 -0
- rapidata/api_client/models/metadata_visibilities.py +1 -0
- rapidata/api_client/models/multi_asset.py +17 -12
- rapidata/api_client/models/multi_asset_assets_inner.py +170 -0
- rapidata/api_client/models/multi_asset_input.py +130 -0
- rapidata/api_client/models/multi_asset_input1.py +110 -0
- rapidata/api_client/models/multi_asset_input1_assets_inner.py +198 -0
- rapidata/api_client/models/multi_asset_input2.py +110 -0
- rapidata/api_client/models/multi_asset_input3.py +110 -0
- rapidata/api_client/models/multi_asset_input3_assets_inner.py +198 -0
- rapidata/api_client/models/multi_asset_input_assets_inner.py +156 -0
- rapidata/api_client/models/multi_asset_model.py +21 -16
- rapidata/api_client/models/multi_asset_model2.py +3 -3
- rapidata/api_client/models/multi_compare_truth.py +96 -0
- rapidata/api_client/models/naive_referee_info.py +96 -0
- rapidata/api_client/models/naive_referee_model.py +2 -2
- rapidata/api_client/models/named_classification.py +4 -13
- rapidata/api_client/models/never_ending_referee_info.py +94 -0
- rapidata/api_client/models/new_user_filter.py +96 -0
- rapidata/api_client/models/new_user_filter_model.py +94 -0
- rapidata/api_client/models/new_user_filter_model1.py +94 -0
- rapidata/api_client/models/newsletter_model.py +6 -6
- rapidata/api_client/models/not_available_yet_result.py +87 -0
- rapidata/api_client/models/not_filter.py +117 -0
- rapidata/api_client/models/not_user_filter_model.py +102 -0
- rapidata/api_client/models/null_asset.py +14 -9
- rapidata/api_client/models/null_asset_model.py +18 -13
- 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/or_filter.py +121 -0
- rapidata/api_client/models/or_user_filter_model.py +106 -0
- rapidata/api_client/models/order_model.py +16 -13
- rapidata/api_client/models/order_state.py +3 -2
- rapidata/api_client/models/original_filename_metadata.py +14 -5
- rapidata/api_client/models/original_filename_metadata_model.py +2 -4
- rapidata/api_client/models/page_info.py +2 -7
- rapidata/api_client/models/paged_result_aggregated_orders_model.py +105 -0
- rapidata/api_client/models/paged_result_benchmark_query_result.py +105 -0
- rapidata/api_client/models/paged_result_campaign_query_result.py +105 -0
- rapidata/api_client/models/paged_result_clients_query_result.py +105 -0
- rapidata/api_client/models/paged_result_datapoint_model.py +105 -0
- rapidata/api_client/models/paged_result_get_compare_workflow_results_result.py +105 -0
- rapidata/api_client/models/paged_result_get_grouped_ranking_workflow_results_result.py +105 -0
- rapidata/api_client/models/paged_result_get_validation_rapids_result.py +105 -0
- rapidata/api_client/models/paged_result_get_workflow_results_result.py +105 -0
- rapidata/api_client/models/paged_result_i_workflow_model.py +105 -0
- rapidata/api_client/models/paged_result_leaderboard_query_result.py +105 -0
- rapidata/api_client/models/paged_result_leaderboards_query_result.py +105 -0
- rapidata/api_client/models/paged_result_of_aggregated_orders_model.py +103 -0
- rapidata/api_client/models/paged_result_of_benchmark_query_result.py +103 -0
- rapidata/api_client/models/paged_result_of_campaign_query_result.py +103 -0
- rapidata/api_client/models/paged_result_of_clients_query_result.py +103 -0
- rapidata/api_client/models/paged_result_of_get_compare_workflow_results_result.py +103 -0
- rapidata/api_client/models/paged_result_of_get_grouped_ranking_workflow_results_result.py +103 -0
- rapidata/api_client/models/paged_result_of_get_validation_rapids_result.py +103 -0
- rapidata/api_client/models/paged_result_of_get_workflow_results_result.py +103 -0
- rapidata/api_client/models/paged_result_of_i_workflow_model.py +103 -0
- rapidata/api_client/models/paged_result_of_leaderboards_query_result.py +103 -0
- rapidata/api_client/models/paged_result_of_order_model.py +103 -0
- rapidata/api_client/models/paged_result_of_participant_by_benchmark.py +103 -0
- rapidata/api_client/models/paged_result_of_prompt_by_benchmark_result.py +103 -0
- rapidata/api_client/models/paged_result_of_query_audiences_result.py +103 -0
- rapidata/api_client/models/paged_result_of_query_datapoints_by_dataset_id_result.py +103 -0
- rapidata/api_client/models/paged_result_of_query_validation_rapid_eligibility_result.py +103 -0
- rapidata/api_client/models/paged_result_of_rapid_model.py +103 -0
- rapidata/api_client/models/paged_result_of_runs_by_leaderboard_result.py +103 -0
- rapidata/api_client/models/paged_result_of_sample_by_identifier.py +103 -0
- rapidata/api_client/models/paged_result_of_sample_by_participant.py +103 -0
- rapidata/api_client/models/paged_result_of_standing_by_leaderboard.py +103 -0
- rapidata/api_client/models/paged_result_of_validation_set_model.py +103 -0
- rapidata/api_client/models/paged_result_order_model.py +105 -0
- rapidata/api_client/models/paged_result_participant_by_benchmark.py +105 -0
- rapidata/api_client/models/paged_result_potential_validation_rapid.py +105 -0
- rapidata/api_client/models/paged_result_prompt_by_benchmark_result.py +105 -0
- rapidata/api_client/models/paged_result_query_audiences_result.py +105 -0
- rapidata/api_client/models/paged_result_query_datapoints_by_dataset_id_result.py +105 -0
- rapidata/api_client/models/paged_result_query_validation_rapid_eligibility_result.py +105 -0
- rapidata/api_client/models/paged_result_rapid_model.py +105 -0
- rapidata/api_client/models/paged_result_runs_by_leaderboard_result.py +105 -0
- rapidata/api_client/models/paged_result_sample_by_identifier.py +105 -0
- rapidata/api_client/models/paged_result_sample_by_participant.py +105 -0
- rapidata/api_client/models/paged_result_standing_by_leaderboard.py +105 -0
- rapidata/api_client/models/paged_result_validation_set_model.py +105 -0
- rapidata/api_client/models/participant_by_benchmark.py +94 -0
- rapidata/api_client/models/participant_by_benchmark_paged_result.py +105 -0
- rapidata/api_client/models/participant_by_leaderboard.py +113 -0
- rapidata/api_client/models/participant_by_leaderboard_paged_result.py +105 -0
- rapidata/api_client/models/participant_status.py +38 -0
- rapidata/api_client/models/pipeline_id_workflow_artifact_id_put_request.py +140 -0
- rapidata/api_client/models/pipeline_id_workflow_config_put_request.py +140 -0
- rapidata/api_client/models/pipeline_id_workflow_put_request.py +140 -0
- rapidata/api_client/models/polygon_result.py +3 -3
- rapidata/api_client/models/polygon_result_coordinate.py +89 -0
- rapidata/api_client/models/polygon_result_shape.py +95 -0
- rapidata/api_client/models/potential_validation_rapid.py +103 -0
- rapidata/api_client/models/potential_validation_rapid_paged_result.py +105 -0
- rapidata/api_client/models/potential_validation_rapid_truth.py +280 -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/preliminary_download_model.py +87 -0
- rapidata/api_client/models/preliminary_download_result.py +87 -0
- rapidata/api_client/models/preview_order_model.py +87 -0
- rapidata/api_client/models/probabilistic_attach_category_referee_info.py +98 -0
- rapidata/api_client/models/problem_details.py +2 -20
- rapidata/api_client/models/prompt_asset_metadata_input.py +100 -0
- rapidata/api_client/models/prompt_asset_metadata_input_asset.py +154 -0
- rapidata/api_client/models/prompt_by_benchmark_result.py +112 -0
- rapidata/api_client/models/prompt_by_benchmark_result_paged_result.py +105 -0
- rapidata/api_client/models/prompt_by_leaderboard_result.py +90 -0
- rapidata/api_client/models/prompt_by_leaderboard_result_paged_result.py +105 -0
- rapidata/api_client/models/prompt_metadata.py +13 -4
- rapidata/api_client/models/prompt_metadata_input.py +4 -6
- rapidata/api_client/models/prompt_metadata_model.py +2 -4
- rapidata/api_client/models/prompt_type.py +38 -0
- rapidata/api_client/models/proxy_file_wrapper.py +129 -0
- rapidata/api_client/models/public_order_model.py +2 -2
- rapidata/api_client/models/public_rapid_response.py +112 -0
- rapidata/api_client/models/query_audiences_result.py +111 -0
- rapidata/api_client/models/query_datapoints_by_dataset_id_result.py +95 -0
- rapidata/api_client/models/query_model.py +10 -5
- rapidata/api_client/models/query_validation_model.py +97 -0
- rapidata/api_client/models/query_validation_rapid_eligibility_model_query_validation_model.py +107 -0
- rapidata/api_client/models/query_validation_rapid_eligibility_result.py +103 -0
- rapidata/api_client/models/query_validation_rapid_eligibility_result_truth.py +280 -0
- rapidata/api_client/models/query_validation_rapids_result.py +50 -5
- rapidata/api_client/models/query_validation_rapids_result_asset.py +40 -40
- rapidata/api_client/models/query_validation_rapids_result_payload.py +252 -0
- rapidata/api_client/models/query_validation_rapids_result_truth.py +258 -0
- rapidata/api_client/models/rapid_answer.py +3 -1
- rapidata/api_client/models/rapid_answer_result.py +31 -17
- rapidata/api_client/models/rapid_issue.py +45 -0
- rapidata/api_client/models/rapid_modality.py +46 -0
- rapidata/api_client/models/rapid_model.py +157 -0
- rapidata/api_client/models/rapid_model_paged_result.py +105 -0
- rapidata/api_client/models/rapid_model_referee.py +154 -0
- rapidata/api_client/models/rapid_response.py +103 -0
- rapidata/api_client/models/rapid_response_result.py +266 -0
- rapidata/api_client/models/rapid_result_model.py +7 -7
- rapidata/api_client/models/rapid_result_model_result.py +31 -17
- rapidata/api_client/models/rapid_skipped_model.py +5 -5
- rapidata/api_client/models/rapid_state.py +41 -0
- rapidata/api_client/models/read_bridge_token_keys_result.py +3 -8
- rapidata/api_client/models/reference_asset_input.py +100 -0
- rapidata/api_client/models/report_model.py +109 -0
- rapidata/api_client/models/response_count_filter.py +103 -0
- rapidata/api_client/models/response_count_user_filter_model.py +101 -0
- rapidata/api_client/models/retrieval_mode.py +38 -0
- rapidata/api_client/models/root_filter.py +5 -14
- rapidata/api_client/models/run_status.py +39 -0
- rapidata/api_client/models/runs_by_leaderboard_result.py +104 -0
- rapidata/api_client/models/runs_by_leaderboard_result_paged_result.py +105 -0
- rapidata/api_client/models/sample_by_identifier.py +125 -0
- rapidata/api_client/models/sample_by_identifier_paged_result.py +105 -0
- rapidata/api_client/models/sample_by_participant.py +121 -0
- rapidata/api_client/models/sample_by_participant_paged_result.py +105 -0
- rapidata/api_client/models/scrub_payload.py +96 -0
- rapidata/api_client/models/scrub_range.py +89 -0
- rapidata/api_client/models/scrub_rapid_blueprint.py +96 -0
- rapidata/api_client/models/scrub_result.py +98 -0
- rapidata/api_client/models/scrub_truth.py +104 -0
- rapidata/api_client/models/send_survey_model.py +87 -0
- rapidata/api_client/models/shuffling_selection.py +106 -0
- rapidata/api_client/models/simple_workflow_config.py +6 -17
- rapidata/api_client/models/simple_workflow_config_blueprint.py +37 -23
- rapidata/api_client/models/simple_workflow_config_model.py +6 -22
- rapidata/api_client/models/simple_workflow_config_model_blueprint.py +31 -17
- rapidata/api_client/models/simple_workflow_get_result_overview_get200_response.py +16 -16
- rapidata/api_client/models/simple_workflow_model.py +14 -4
- rapidata/api_client/models/simple_workflow_model1.py +5 -12
- rapidata/api_client/models/simple_workflow_model_blueprint.py +31 -17
- rapidata/api_client/models/skip_truth.py +94 -0
- rapidata/api_client/models/sort_criterion.py +5 -11
- rapidata/api_client/models/sort_direction.py +2 -2
- rapidata/api_client/models/source_url_metadata.py +109 -0
- rapidata/api_client/models/source_url_metadata_model.py +96 -0
- rapidata/api_client/models/standing_by_benchmark.py +113 -0
- rapidata/api_client/models/standing_by_leaderboard.py +113 -0
- rapidata/api_client/models/standing_by_leaderboard_paged_result.py +105 -0
- rapidata/api_client/models/standing_status.py +38 -0
- rapidata/api_client/models/standings_by_benchmark_result.py +95 -0
- rapidata/api_client/models/standings_by_leaderboard_result.py +95 -0
- rapidata/api_client/models/start_preliminary_download_result.py +87 -0
- rapidata/api_client/models/sticky_state.py +39 -0
- rapidata/api_client/models/stream_file_wrapper.py +138 -0
- rapidata/api_client/models/streams_metadata.py +113 -0
- rapidata/api_client/models/streams_metadata_model.py +100 -0
- rapidata/api_client/models/string_segment.py +105 -0
- rapidata/api_client/models/submit_coco_model.py +1 -3
- rapidata/api_client/models/submit_order_model.py +87 -0
- rapidata/api_client/models/submit_participant_result.py +89 -0
- rapidata/api_client/models/submit_prompt_model.py +107 -0
- rapidata/api_client/models/submit_prompt_model_prompt_asset.py +202 -0
- rapidata/api_client/models/tags_by_benchmark_result.py +87 -0
- rapidata/api_client/models/text_asset.py +15 -10
- rapidata/api_client/models/text_asset_input.py +120 -0
- rapidata/api_client/models/text_asset_model.py +18 -13
- rapidata/api_client/models/text_metadata.py +20 -6
- rapidata/api_client/models/text_metadata_input.py +111 -0
- rapidata/api_client/models/text_metadata_model.py +9 -6
- rapidata/api_client/models/transcription_metadata.py +10 -4
- rapidata/api_client/models/transcription_metadata_input.py +4 -6
- rapidata/api_client/models/transcription_metadata_model.py +1 -3
- rapidata/api_client/models/transcription_truth.py +23 -4
- rapidata/api_client/models/transcription_word.py +2 -2
- rapidata/api_client/models/translated_prompt_metadata_model.py +2 -4
- rapidata/api_client/models/translated_string.py +2 -2
- rapidata/api_client/models/unlock_order_result.py +2 -2
- rapidata/api_client/models/update_access_model.py +1 -1
- rapidata/api_client/models/update_audience_request.py +102 -0
- rapidata/api_client/models/update_benchmark_model.py +99 -0
- rapidata/api_client/models/update_benchmark_name_model.py +87 -0
- rapidata/api_client/models/update_campaign_model.py +99 -0
- rapidata/api_client/models/update_dataset_name_model.py +87 -0
- rapidata/api_client/models/update_dimensions_model.py +87 -0
- rapidata/api_client/models/update_leaderboard_model.py +106 -0
- rapidata/api_client/models/update_leaderboard_name_model.py +87 -0
- rapidata/api_client/models/update_leaderboard_response_config_model.py +89 -0
- rapidata/api_client/models/update_order_name_model.py +87 -0
- rapidata/api_client/models/update_participant_model.py +92 -0
- rapidata/api_client/models/update_participant_name_model.py +87 -0
- rapidata/api_client/models/update_priority_model.py +87 -0
- rapidata/api_client/models/update_prompt_tags_model.py +87 -0
- rapidata/api_client/models/update_should_alert_model.py +87 -0
- rapidata/api_client/models/update_validation_rapid_model.py +125 -0
- rapidata/api_client/models/update_validation_rapid_model_context_asset.py +160 -0
- rapidata/api_client/models/update_validation_rapid_model_truth.py +280 -0
- rapidata/api_client/models/update_validation_set_model.py +120 -0
- rapidata/api_client/models/upload_asset_result.py +102 -0
- rapidata/api_client/models/upload_file_from_url_result.py +87 -0
- rapidata/api_client/models/upload_file_result.py +87 -0
- rapidata/api_client/models/upload_files_from_s3_bucket_model.py +15 -5
- rapidata/api_client/models/upload_from_s3_result.py +87 -0
- rapidata/api_client/models/upload_text_sources_to_dataset_model.py +26 -4
- rapidata/api_client/models/url_asset_input.py +100 -0
- rapidata/api_client/models/user_action_restriction.py +37 -0
- rapidata/api_client/models/user_action_restriction_filter.py +101 -0
- rapidata/api_client/models/user_score_filter.py +102 -0
- rapidata/api_client/models/user_score_user_filter_model.py +9 -2
- rapidata/api_client/models/user_state.py +38 -0
- rapidata/api_client/models/user_state_filter.py +101 -0
- rapidata/api_client/models/validation_chance.py +20 -3
- rapidata/api_client/models/validation_import_post_request_blueprint.py +31 -17
- rapidata/api_client/models/validation_set_model.py +39 -5
- rapidata/api_client/models/validation_set_overview_model.py +2 -2
- rapidata/api_client/models/validation_set_validation_set_id_rapid_post_payload_parameter.py +252 -0
- rapidata/api_client/models/validation_set_validation_set_id_rapid_post_truth_parameter.py +280 -0
- rapidata/api_client/models/validation_set_zip_post_request_blueprint.py +252 -0
- rapidata/api_client/models/video_duration_metadata.py +109 -0
- rapidata/api_client/models/video_duration_metadata_model.py +96 -0
- rapidata/api_client/models/workflow_aggregation_step_model.py +3 -12
- rapidata/api_client/models/workflow_config_artifact_model_workflow_config.py +23 -9
- rapidata/api_client/models/workflow_state.py +2 -2
- rapidata/api_client/models/zip_entry_file_wrapper.py +151 -0
- rapidata/api_client/rest.py +193 -154
- rapidata/api_client_README.md +488 -293
- rapidata/rapidata_client/__init__.py +27 -13
- rapidata/rapidata_client/api/rapidata_api_client.py +253 -0
- rapidata/rapidata_client/benchmark/_detail_mapper.py +32 -0
- rapidata/rapidata_client/benchmark/leaderboard/__init__.py +0 -0
- rapidata/rapidata_client/benchmark/leaderboard/rapidata_leaderboard.py +221 -0
- rapidata/rapidata_client/benchmark/participant/__init__.py +0 -0
- rapidata/rapidata_client/benchmark/participant/_participant.py +145 -0
- rapidata/rapidata_client/benchmark/rapidata_benchmark.py +546 -0
- rapidata/rapidata_client/benchmark/rapidata_benchmark_manager.py +219 -0
- rapidata/rapidata_client/config/__init__.py +4 -0
- rapidata/rapidata_client/config/logger.py +135 -0
- rapidata/rapidata_client/config/logging_config.py +55 -0
- rapidata/rapidata_client/config/managed_print.py +6 -0
- rapidata/rapidata_client/config/order_config.py +14 -0
- rapidata/rapidata_client/config/rapidata_config.py +36 -0
- rapidata/rapidata_client/config/tracer.py +184 -0
- rapidata/rapidata_client/config/upload_config.py +64 -0
- rapidata/rapidata_client/datapoints/__init__.py +10 -0
- rapidata/rapidata_client/datapoints/_asset_uploader.py +169 -0
- rapidata/rapidata_client/datapoints/_datapoint.py +92 -0
- rapidata/rapidata_client/datapoints/_datapoint_uploader.py +47 -0
- rapidata/rapidata_client/datapoints/_datapoints_validator.py +70 -0
- rapidata/rapidata_client/datapoints/assets/__init__.py +0 -0
- rapidata/rapidata_client/datapoints/assets/constants.py +7 -0
- rapidata/rapidata_client/datapoints/metadata/__init__.py +7 -0
- rapidata/rapidata_client/{selection/base_selection.py → datapoints/metadata/_base_metadata.py} +2 -1
- rapidata/rapidata_client/datapoints/metadata/_media_asset_metadata.py +26 -0
- rapidata/rapidata_client/datapoints/metadata/_private_text_metadata.py +16 -0
- rapidata/rapidata_client/datapoints/metadata/_prompt_identifier_metadata.py +14 -0
- rapidata/rapidata_client/datapoints/metadata/_prompt_metadata.py +12 -0
- rapidata/rapidata_client/datapoints/metadata/_public_text_metadata.py +16 -0
- rapidata/rapidata_client/datapoints/metadata/_select_words_metadata.py +17 -0
- rapidata/rapidata_client/demographic/__init__.py +0 -0
- rapidata/rapidata_client/demographic/demographic_manager.py +54 -0
- rapidata/rapidata_client/exceptions/__init__.py +1 -0
- rapidata/rapidata_client/exceptions/failed_upload_exception.py +20 -0
- rapidata/rapidata_client/filter/__init__.py +7 -1
- rapidata/rapidata_client/filter/_base_filter.py +62 -0
- rapidata/rapidata_client/filter/age_filter.py +28 -10
- rapidata/rapidata_client/filter/and_filter.py +42 -0
- rapidata/rapidata_client/filter/campaign_filter.py +28 -11
- rapidata/rapidata_client/filter/country_filter.py +42 -13
- rapidata/rapidata_client/filter/custom_filter.py +39 -0
- rapidata/rapidata_client/filter/gender_filter.py +29 -10
- rapidata/rapidata_client/filter/language_filter.py +49 -15
- rapidata/rapidata_client/filter/models/__init__.py +0 -0
- rapidata/rapidata_client/filter/models/age_group.py +28 -0
- rapidata/rapidata_client/filter/models/gender.py +23 -0
- rapidata/rapidata_client/filter/new_user_filter.py +20 -0
- rapidata/rapidata_client/filter/not_filter.py +42 -0
- rapidata/rapidata_client/filter/or_filter.py +42 -0
- rapidata/rapidata_client/filter/rapidata_filters.py +60 -0
- rapidata/rapidata_client/filter/response_count_filter.py +62 -0
- rapidata/rapidata_client/filter/user_score_filter.py +60 -14
- rapidata/rapidata_client/order/_rapidata_order_builder.py +481 -0
- rapidata/rapidata_client/order/dataset/_rapidata_dataset.py +153 -0
- rapidata/rapidata_client/order/rapidata_order.py +393 -90
- rapidata/rapidata_client/order/rapidata_order_manager.py +922 -0
- rapidata/rapidata_client/order/rapidata_results.py +251 -0
- rapidata/rapidata_client/rapidata_client.py +125 -180
- rapidata/rapidata_client/referee/__init__.py +3 -3
- rapidata/rapidata_client/referee/{base_referee.py → _base_referee.py} +9 -5
- rapidata/rapidata_client/referee/_early_stopping_referee.py +62 -0
- rapidata/rapidata_client/referee/_naive_referee.py +48 -0
- rapidata/rapidata_client/selection/__init__.py +6 -1
- rapidata/rapidata_client/selection/_base_selection.py +16 -0
- rapidata/rapidata_client/selection/ab_test_selection.py +46 -0
- rapidata/rapidata_client/selection/capped_selection.py +34 -17
- rapidata/rapidata_client/selection/conditional_validation_selection.py +71 -21
- rapidata/rapidata_client/selection/demographic_selection.py +43 -8
- rapidata/rapidata_client/selection/effort_selection.py +49 -0
- rapidata/rapidata_client/selection/labeling_selection.py +45 -8
- rapidata/rapidata_client/selection/rapidata_retrieval_modes.py +21 -0
- rapidata/rapidata_client/selection/rapidata_selections.py +47 -0
- rapidata/rapidata_client/selection/shuffling_selection.py +44 -0
- rapidata/rapidata_client/selection/static_selection.py +33 -0
- rapidata/rapidata_client/selection/validation_selection.py +29 -6
- rapidata/rapidata_client/settings/__init__.py +12 -2
- rapidata/rapidata_client/settings/_rapidata_setting.py +24 -0
- rapidata/rapidata_client/settings/alert_on_fast_response.py +25 -0
- rapidata/rapidata_client/settings/allow_neither_both.py +17 -0
- rapidata/rapidata_client/settings/custom_setting.py +17 -0
- rapidata/rapidata_client/settings/free_text_minimum_characters.py +22 -0
- rapidata/rapidata_client/settings/models/__init__.py +1 -0
- rapidata/rapidata_client/settings/models/translation_behaviour_options.py +15 -0
- rapidata/rapidata_client/settings/mute_video.py +15 -0
- rapidata/rapidata_client/settings/no_shuffle.py +18 -0
- rapidata/rapidata_client/settings/play_video_until_the_end.py +19 -0
- rapidata/rapidata_client/settings/rapidata_settings.py +51 -0
- rapidata/rapidata_client/settings/swap_context_instruction.py +20 -0
- rapidata/rapidata_client/settings/translation_behaviour.py +20 -0
- rapidata/rapidata_client/validation/__init__.py +1 -0
- rapidata/rapidata_client/validation/rapidata_validation_set.py +141 -0
- rapidata/rapidata_client/validation/rapids/__init__.py +1 -0
- rapidata/rapidata_client/validation/rapids/_validation_rapid_uploader.py +62 -0
- rapidata/rapidata_client/validation/rapids/box.py +42 -0
- rapidata/rapidata_client/validation/rapids/rapids.py +29 -0
- rapidata/rapidata_client/validation/rapids/rapids_manager.py +469 -0
- rapidata/rapidata_client/validation/validation_set_manager.py +814 -0
- rapidata/rapidata_client/workflow/__init__.py +11 -6
- rapidata/rapidata_client/workflow/_base_workflow.py +43 -0
- rapidata/rapidata_client/workflow/_classify_workflow.py +92 -0
- rapidata/rapidata_client/workflow/_compare_workflow.py +76 -0
- rapidata/rapidata_client/workflow/_draw_workflow.py +52 -0
- rapidata/rapidata_client/workflow/_evaluation_workflow.py +47 -0
- rapidata/rapidata_client/workflow/_free_text_workflow.py +81 -0
- rapidata/rapidata_client/workflow/_locate_workflow.py +52 -0
- rapidata/rapidata_client/workflow/_multi_ranking_workflow.py +87 -0
- rapidata/rapidata_client/workflow/_ranking_workflow.py +131 -0
- rapidata/rapidata_client/workflow/_select_words_workflow.py +74 -0
- rapidata/rapidata_client/workflow/_timestamp_workflow.py +65 -0
- rapidata/service/__init__.py +0 -1
- rapidata/service/credential_manager.py +41 -32
- rapidata/service/openapi_service.py +153 -35
- rapidata/types/__init__.py +166 -0
- rapidata-2.44.4.dist-info/METADATA +32 -0
- rapidata-2.44.4.dist-info/RECORD +1014 -0
- {rapidata-1.8.3.dist-info → rapidata-2.44.4.dist-info}/WHEEL +1 -1
- rapidata/constants.py +0 -1
- rapidata/rapidata_client/assets/__init__.py +0 -8
- rapidata/rapidata_client/assets/base_asset.py +0 -11
- rapidata/rapidata_client/assets/media_asset.py +0 -88
- rapidata/rapidata_client/assets/multi_asset.py +0 -55
- rapidata/rapidata_client/assets/text_asset.py +0 -28
- rapidata/rapidata_client/country_codes/__init__.py +0 -1
- rapidata/rapidata_client/country_codes/country_codes.py +0 -19
- 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 -32
- rapidata/rapidata_client/dataset/rapid_builders/transcription_rapid_builders.py +0 -132
- rapidata/rapidata_client/dataset/rapidata_dataset.py +0 -126
- rapidata/rapidata_client/dataset/rapidata_validation_set.py +0 -300
- rapidata/rapidata_client/dataset/validation_rapid_parts.py +0 -55
- rapidata/rapidata_client/dataset/validation_set_builder.py +0 -324
- rapidata/rapidata_client/filter/base_filter.py +0 -9
- rapidata/rapidata_client/metadata/__init__.py +0 -5
- rapidata/rapidata_client/metadata/base_metadata.py +0 -12
- rapidata/rapidata_client/metadata/private_text_metadata.py +0 -16
- rapidata/rapidata_client/metadata/prompt_metadata.py +0 -17
- rapidata/rapidata_client/metadata/public_text_metadata.py +0 -16
- rapidata/rapidata_client/metadata/transcription_metadata.py +0 -19
- rapidata/rapidata_client/order/rapidata_order_builder.py +0 -463
- rapidata/rapidata_client/referee/early_stopping_referee.py +0 -50
- rapidata/rapidata_client/referee/naive_referee.py +0 -33
- rapidata/rapidata_client/settings/feature_flags.py +0 -125
- rapidata/rapidata_client/settings/settings.py +0 -124
- rapidata/rapidata_client/simple_builders/simple_classification_builders.py +0 -245
- rapidata/rapidata_client/simple_builders/simple_compare_builders.py +0 -250
- rapidata/rapidata_client/simple_builders/simple_free_text_builders.py +0 -180
- rapidata/rapidata_client/simple_builders/simple_transcription_builders.py +0 -194
- rapidata/rapidata_client/workflow/base_workflow.py +0 -42
- rapidata/rapidata_client/workflow/classify_workflow.py +0 -49
- rapidata/rapidata_client/workflow/compare_workflow.py +0 -47
- rapidata/rapidata_client/workflow/evaluation_workflow.py +0 -15
- rapidata/rapidata_client/workflow/free_text_workflow.py +0 -50
- rapidata/rapidata_client/workflow/transcription_workflow.py +0 -40
- rapidata/service/local_file_service.py +0 -25
- rapidata/service/token_manager.py +0 -175
- rapidata-1.8.3.dist-info/METADATA +0 -28
- rapidata-1.8.3.dist-info/RECORD +0 -396
- /rapidata/rapidata_client/{dataset → api}/__init__.py +0 -0
- /rapidata/rapidata_client/{simple_builders → benchmark}/__init__.py +0 -0
- {rapidata-1.8.3.dist-info → rapidata-2.44.4.dist-info/licenses}/LICENSE +0 -0
|
@@ -0,0 +1,814 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import time
|
|
4
|
+
import urllib.parse
|
|
5
|
+
import webbrowser
|
|
6
|
+
from colorama import Fore
|
|
7
|
+
from typing import Literal, TYPE_CHECKING
|
|
8
|
+
from rapidata.api_client import QueryModel
|
|
9
|
+
from rapidata.rapidata_client.validation.rapidata_validation_set import (
|
|
10
|
+
RapidataValidationSet,
|
|
11
|
+
)
|
|
12
|
+
from rapidata.api_client.models.create_validation_set_model import (
|
|
13
|
+
CreateValidationSetModel,
|
|
14
|
+
)
|
|
15
|
+
from rapidata.service.openapi_service import OpenAPIService
|
|
16
|
+
from rapidata.rapidata_client.validation.rapids.rapids_manager import RapidsManager
|
|
17
|
+
|
|
18
|
+
from rapidata.api_client.models.page_info import PageInfo
|
|
19
|
+
from rapidata.api_client.models.root_filter import RootFilter
|
|
20
|
+
from rapidata.api_client.models.filter import Filter
|
|
21
|
+
from rapidata.api_client.models.sort_criterion import SortCriterion
|
|
22
|
+
from rapidata.api_client.models.sort_direction import SortDirection
|
|
23
|
+
from rapidata.api_client.models.filter_operator import FilterOperator
|
|
24
|
+
|
|
25
|
+
from rapidata.rapidata_client.validation.rapids.box import Box
|
|
26
|
+
|
|
27
|
+
from rapidata.rapidata_client.config import (
|
|
28
|
+
logger,
|
|
29
|
+
managed_print,
|
|
30
|
+
rapidata_config,
|
|
31
|
+
tracer,
|
|
32
|
+
)
|
|
33
|
+
from tqdm import tqdm
|
|
34
|
+
from rapidata.rapidata_client.validation.rapids.rapids import Rapid
|
|
35
|
+
|
|
36
|
+
if TYPE_CHECKING:
|
|
37
|
+
from rapidata.rapidata_client.workflow import Workflow
|
|
38
|
+
from rapidata.rapidata_client.datapoints._datapoint import Datapoint
|
|
39
|
+
from rapidata.rapidata_client.settings._rapidata_setting import RapidataSetting
|
|
40
|
+
from typing import Sequence
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class ValidationSetManager:
|
|
44
|
+
"""
|
|
45
|
+
Responsible for everything related to validation sets. From creation to retrieval.
|
|
46
|
+
|
|
47
|
+
Attributes:
|
|
48
|
+
rapid (RapidsManager): The RapidsManager instance.
|
|
49
|
+
"""
|
|
50
|
+
|
|
51
|
+
def __init__(self, openapi_service: OpenAPIService) -> None:
|
|
52
|
+
self._openapi_service = openapi_service
|
|
53
|
+
self.rapid = RapidsManager(openapi_service)
|
|
54
|
+
logger.debug("ValidationSetManager initialized")
|
|
55
|
+
|
|
56
|
+
def _get_total_and_labeled_rapids_count(
|
|
57
|
+
self, validation_set_id: str
|
|
58
|
+
) -> tuple[int, int]:
|
|
59
|
+
uploaded_rapids = self._openapi_service.validation_api.validation_set_validation_set_id_rapids_get(
|
|
60
|
+
validation_set_id=validation_set_id
|
|
61
|
+
).items
|
|
62
|
+
return len(uploaded_rapids), sum(1 for rapid in uploaded_rapids if rapid.truth)
|
|
63
|
+
|
|
64
|
+
def create_classification_set(
|
|
65
|
+
self,
|
|
66
|
+
name: str,
|
|
67
|
+
instruction: str,
|
|
68
|
+
answer_options: list[str],
|
|
69
|
+
datapoints: list[str],
|
|
70
|
+
truths: list[list[str]],
|
|
71
|
+
data_type: Literal["media", "text"] = "media",
|
|
72
|
+
contexts: list[str] | None = None,
|
|
73
|
+
media_contexts: list[str] | None = None,
|
|
74
|
+
explanations: list[str | None] | None = None,
|
|
75
|
+
dimensions: list[str] = [],
|
|
76
|
+
) -> RapidataValidationSet:
|
|
77
|
+
"""Create a classification validation set.
|
|
78
|
+
|
|
79
|
+
Args:
|
|
80
|
+
name (str): The name of the validation set. (will not be shown to the labeler)
|
|
81
|
+
instruction (str): The instruction by which the labeler will answer.
|
|
82
|
+
answer_options (list[str]): The options to choose from when answering.
|
|
83
|
+
datapoints (list[str]): The datapoints that will be used for validation.
|
|
84
|
+
truths (list[list[str]]): The truths for each datapoint. Outer list is for each datapoint, inner list is for each truth.\n
|
|
85
|
+
example:
|
|
86
|
+
options: ["yes", "no", "maybe"]
|
|
87
|
+
datapoints: ["datapoint1", "datapoint2"]
|
|
88
|
+
truths: [["yes"], ["no", "maybe"]] -> first datapoint correct answer is "yes", second datapoint is "no" or "maybe"
|
|
89
|
+
data_type (str, optional): The type of data. Defaults to "media" (any form of image, video or audio). Other option: "text".
|
|
90
|
+
contexts (list[str], optional): The contexts for each datapoint. Defaults to None.\n
|
|
91
|
+
If provided has to be the same length as datapoints and will be shown in addition to the instruction and answer options. (Therefore will be different for each datapoint)
|
|
92
|
+
Will be match up with the datapoints using the list index.
|
|
93
|
+
media_contexts (list[str], optional): The list of media contexts i.e. links to the images / videos for the comparison. Defaults to None.\n
|
|
94
|
+
If provided has to be the same length as datapoints and will be shown in addition to the instruction. (Therefore will be different for each datapoint)
|
|
95
|
+
Will be matched up with the datapoints using the list index.
|
|
96
|
+
explanations (list[str | None], optional): The explanations for each datapoint. Will be given to the annotators in case the answer is wrong. Defaults to None.
|
|
97
|
+
dimensions (list[str], optional): The dimensions to add to the validation set accross which users will be tracked. Defaults to [] which is the default dimension.
|
|
98
|
+
|
|
99
|
+
Example:
|
|
100
|
+
```python
|
|
101
|
+
options: ["yes", "no", "maybe"]
|
|
102
|
+
datapoints: ["datapoint1", "datapoint2"]
|
|
103
|
+
truths: [["yes"], ["no", "maybe"]]
|
|
104
|
+
```
|
|
105
|
+
This would mean: first datapoint correct answer is "yes", second datapoint is "no" or "maybe"
|
|
106
|
+
"""
|
|
107
|
+
with tracer.start_as_current_span(
|
|
108
|
+
"ValidationSetManager.create_classification_set"
|
|
109
|
+
):
|
|
110
|
+
if not datapoints:
|
|
111
|
+
raise ValueError("Datapoints cannot be empty")
|
|
112
|
+
|
|
113
|
+
if len(datapoints) != len(truths):
|
|
114
|
+
raise ValueError("The number of datapoints and truths must be equal")
|
|
115
|
+
|
|
116
|
+
if not all([isinstance(truth, (list, tuple)) for truth in truths]):
|
|
117
|
+
raise ValueError("Truths must be a list of lists or tuples")
|
|
118
|
+
|
|
119
|
+
if contexts and len(contexts) != len(datapoints):
|
|
120
|
+
raise ValueError("The number of contexts and datapoints must be equal")
|
|
121
|
+
|
|
122
|
+
if media_contexts and len(media_contexts) != len(datapoints):
|
|
123
|
+
raise ValueError(
|
|
124
|
+
"The number of media contexts and datapoints must be equal"
|
|
125
|
+
)
|
|
126
|
+
|
|
127
|
+
if explanations and len(explanations) != len(datapoints):
|
|
128
|
+
raise ValueError(
|
|
129
|
+
"The number of explanations and datapoints must be equal, the index must align, but can be padded with None"
|
|
130
|
+
)
|
|
131
|
+
|
|
132
|
+
logger.debug("Creating classification rapids")
|
|
133
|
+
rapids: list[Rapid] = []
|
|
134
|
+
for i in range(len(datapoints)):
|
|
135
|
+
rapids.append(
|
|
136
|
+
self.rapid.classification_rapid(
|
|
137
|
+
instruction=instruction,
|
|
138
|
+
answer_options=answer_options,
|
|
139
|
+
datapoint=datapoints[i],
|
|
140
|
+
truths=truths[i],
|
|
141
|
+
data_type=data_type,
|
|
142
|
+
context=contexts[i] if contexts != None else None,
|
|
143
|
+
media_context=(
|
|
144
|
+
media_contexts[i] if media_contexts != None else None
|
|
145
|
+
),
|
|
146
|
+
explanation=explanations[i] if explanations != None else None,
|
|
147
|
+
)
|
|
148
|
+
)
|
|
149
|
+
|
|
150
|
+
logger.debug("Submitting classification rapids")
|
|
151
|
+
return self._submit(name=name, rapids=rapids, dimensions=dimensions)
|
|
152
|
+
|
|
153
|
+
def create_compare_set(
|
|
154
|
+
self,
|
|
155
|
+
name: str,
|
|
156
|
+
instruction: str,
|
|
157
|
+
datapoints: list[list[str]],
|
|
158
|
+
truths: list[str],
|
|
159
|
+
data_type: Literal["media", "text"] = "media",
|
|
160
|
+
contexts: list[str] | None = None,
|
|
161
|
+
media_contexts: list[str] | None = None,
|
|
162
|
+
explanation: list[str | None] | None = None,
|
|
163
|
+
dimensions: list[str] = [],
|
|
164
|
+
) -> RapidataValidationSet:
|
|
165
|
+
"""Create a comparison validation set.
|
|
166
|
+
|
|
167
|
+
Args:
|
|
168
|
+
name (str): The name of the validation set. (will not be shown to the labeler)
|
|
169
|
+
instruction (str): The instruction to compare against.
|
|
170
|
+
truths (list[str]): The truths for each comparison. List is for each comparison.\n
|
|
171
|
+
example:
|
|
172
|
+
instruction: "Which image has a cat?"
|
|
173
|
+
datapoints = [["image1.jpg", "image2.jpg"], ["image3.jpg", "image4.jpg"]]
|
|
174
|
+
truths: ["image1.jpg", "image4.jpg"] -> first comparison image1.jpg has a cat, second comparison image4.jpg has a cat
|
|
175
|
+
datapoints (list[list[str]]): The compare datapoints to create the validation set with.
|
|
176
|
+
Outer list is for each comparison, inner list the two images/texts that will be compared.
|
|
177
|
+
data_type (str, optional): The type of data. Defaults to "media" (any form of image, video or audio). Other option: "text".
|
|
178
|
+
contexts (list[str], optional): The contexts for each datapoint. Defaults to None.\n
|
|
179
|
+
If provided has to be the same length as datapoints and will be shown in addition to the instruction and truth. (Therefore will be different for each datapoint)
|
|
180
|
+
Will be match up with the datapoints using the list index.
|
|
181
|
+
media_contexts (list[str], optional): The list of media contexts i.e. links to the images / videos for the comparison. Defaults to None.\n
|
|
182
|
+
If provided has to be the same length as datapoints and will be shown in addition to the instruction. (Therefore will be different for each datapoint)
|
|
183
|
+
Will be matched up with the datapoints using the list index.
|
|
184
|
+
explanation (list[str | None], optional): The explanations for each datapoint. Will be given to the annotators in case the answer is wrong. Defaults to None.
|
|
185
|
+
dimensions (list[str], optional): The dimensions to add to the validation set accross which users will be tracked. Defaults to [] which is the default dimension.
|
|
186
|
+
|
|
187
|
+
Example:
|
|
188
|
+
```python
|
|
189
|
+
instruction: "Which image has a cat?"
|
|
190
|
+
datapoints = [["image1.jpg", "image2.jpg"], ["image3.jpg", "image4.jpg"]]
|
|
191
|
+
truths: ["image1.jpg", "image4.jpg"]
|
|
192
|
+
```
|
|
193
|
+
This would mean: first comparison image1.jpg has a cat, second comparison image4.jpg has a cat
|
|
194
|
+
"""
|
|
195
|
+
with tracer.start_as_current_span("ValidationSetManager.create_compare_set"):
|
|
196
|
+
if not datapoints:
|
|
197
|
+
raise ValueError("Datapoints cannot be empty")
|
|
198
|
+
|
|
199
|
+
if len(datapoints) != len(truths):
|
|
200
|
+
raise ValueError("The number of datapoints and truths must be equal")
|
|
201
|
+
|
|
202
|
+
if not all([isinstance(truth, str) for truth in truths]):
|
|
203
|
+
raise ValueError("Truths must be a list of strings")
|
|
204
|
+
|
|
205
|
+
if contexts and len(contexts) != len(datapoints):
|
|
206
|
+
raise ValueError("The number of contexts and datapoints must be equal")
|
|
207
|
+
|
|
208
|
+
if media_contexts and len(media_contexts) != len(datapoints):
|
|
209
|
+
raise ValueError(
|
|
210
|
+
"The number of media contexts and datapoints must be equal"
|
|
211
|
+
)
|
|
212
|
+
|
|
213
|
+
if explanation and len(explanation) != len(datapoints):
|
|
214
|
+
raise ValueError(
|
|
215
|
+
"The number of explanations and datapoints must be equal, the index must align, but can be padded with None"
|
|
216
|
+
)
|
|
217
|
+
|
|
218
|
+
logger.debug("Creating comparison rapids")
|
|
219
|
+
rapids: list[Rapid] = []
|
|
220
|
+
for i in range(len(datapoints)):
|
|
221
|
+
rapids.append(
|
|
222
|
+
self.rapid.compare_rapid(
|
|
223
|
+
instruction=instruction,
|
|
224
|
+
truth=truths[i],
|
|
225
|
+
datapoint=datapoints[i],
|
|
226
|
+
data_type=data_type,
|
|
227
|
+
context=contexts[i] if contexts != None else None,
|
|
228
|
+
media_context=(
|
|
229
|
+
media_contexts[i] if media_contexts != None else None
|
|
230
|
+
),
|
|
231
|
+
explanation=explanation[i] if explanation != None else None,
|
|
232
|
+
)
|
|
233
|
+
)
|
|
234
|
+
|
|
235
|
+
logger.debug("Submitting comparison rapids")
|
|
236
|
+
return self._submit(name=name, rapids=rapids, dimensions=dimensions)
|
|
237
|
+
|
|
238
|
+
def create_select_words_set(
|
|
239
|
+
self,
|
|
240
|
+
name: str,
|
|
241
|
+
instruction: str,
|
|
242
|
+
truths: list[list[int]],
|
|
243
|
+
datapoints: list[str],
|
|
244
|
+
sentences: list[str],
|
|
245
|
+
required_precision: float = 1.0,
|
|
246
|
+
required_completeness: float = 1.0,
|
|
247
|
+
explanation: list[str | None] | None = None,
|
|
248
|
+
dimensions: list[str] = [],
|
|
249
|
+
) -> RapidataValidationSet:
|
|
250
|
+
"""Create a select words validation set.
|
|
251
|
+
|
|
252
|
+
Args:
|
|
253
|
+
name (str): The name of the validation set. (will not be shown to the labeler)
|
|
254
|
+
instruction (str): The instruction to show to the labeler.
|
|
255
|
+
truths (list[list[int]]): The truths for each datapoint. Outer list is for each datapoint, inner list is for each truth.\n
|
|
256
|
+
example:
|
|
257
|
+
datapoints: ["datapoint1", "datapoint2"]
|
|
258
|
+
sentences: ["this example 1", "this example with another text"]
|
|
259
|
+
truths: [[0, 1], [2]] -> first datapoint correct words are "this" and "example", second datapoint is "with"
|
|
260
|
+
datapoints (list[str]): The datapoints that will be used for validation.
|
|
261
|
+
sentences (list[str]): The sentences that will be used for validation. The sentece will be split up by spaces to be selected by the labeler.
|
|
262
|
+
Must be the same length as datapoints.
|
|
263
|
+
required_precision (float, optional): The required precision for the labeler to get the rapid correct (minimum ratio of the words selected that need to be correct). Defaults to 1.0 (no wrong word can be selected).
|
|
264
|
+
required_completeness (float, optional): The required completeness for the labeler to get the rapid correct (miminum ratio of total correct words selected). Defaults to 1.0 (all correct words need to be selected).
|
|
265
|
+
explanation (list[str | None], optional): The explanations for each datapoint. Will be given to the annotators in case the answer is wrong. Defaults to None.
|
|
266
|
+
dimensions (list[str], optional): The dimensions to add to the validation set accross which users will be tracked. Defaults to [] which is the default dimension.
|
|
267
|
+
|
|
268
|
+
Example:
|
|
269
|
+
```python
|
|
270
|
+
datapoints: ["datapoint1", "datapoint2"]
|
|
271
|
+
sentences: ["this example 1", "this example with another text"]
|
|
272
|
+
truths: [[0, 1], [2]]
|
|
273
|
+
```
|
|
274
|
+
This would mean: first datapoint the correct words are "this" and "example", second datapoint is "with"
|
|
275
|
+
"""
|
|
276
|
+
with tracer.start_as_current_span(
|
|
277
|
+
"ValidationSetManager.create_select_words_set"
|
|
278
|
+
):
|
|
279
|
+
if not datapoints:
|
|
280
|
+
raise ValueError("Datapoints cannot be empty")
|
|
281
|
+
|
|
282
|
+
if not all([isinstance(truth, (list, tuple)) for truth in truths]):
|
|
283
|
+
raise ValueError("Truths must be a list of lists or tuples")
|
|
284
|
+
|
|
285
|
+
if len(datapoints) != len(truths) or len(datapoints) != len(sentences):
|
|
286
|
+
raise ValueError(
|
|
287
|
+
"The number of datapoints, truths, and sentences must be equal"
|
|
288
|
+
)
|
|
289
|
+
|
|
290
|
+
if explanation and len(explanation) != len(datapoints):
|
|
291
|
+
raise ValueError(
|
|
292
|
+
"The number of explanations and datapoints must be equal, the index must align, but can be padded with None"
|
|
293
|
+
)
|
|
294
|
+
|
|
295
|
+
logger.debug("Creating select words rapids")
|
|
296
|
+
rapids: list[Rapid] = []
|
|
297
|
+
for i in range(len(datapoints)):
|
|
298
|
+
rapids.append(
|
|
299
|
+
self.rapid.select_words_rapid(
|
|
300
|
+
instruction=instruction,
|
|
301
|
+
truths=truths[i],
|
|
302
|
+
datapoint=datapoints[i],
|
|
303
|
+
sentence=sentences[i],
|
|
304
|
+
required_precision=required_precision,
|
|
305
|
+
required_completeness=required_completeness,
|
|
306
|
+
explanation=explanation[i] if explanation != None else None,
|
|
307
|
+
)
|
|
308
|
+
)
|
|
309
|
+
|
|
310
|
+
logger.debug("Submitting select words rapids")
|
|
311
|
+
return self._submit(name=name, rapids=rapids, dimensions=dimensions)
|
|
312
|
+
|
|
313
|
+
def create_locate_set(
|
|
314
|
+
self,
|
|
315
|
+
name: str,
|
|
316
|
+
instruction: str,
|
|
317
|
+
truths: list[list[Box]],
|
|
318
|
+
datapoints: list[str],
|
|
319
|
+
contexts: list[str] | None = None,
|
|
320
|
+
media_contexts: list[str] | None = None,
|
|
321
|
+
explanation: list[str | None] | None = None,
|
|
322
|
+
dimensions: list[str] = [],
|
|
323
|
+
) -> RapidataValidationSet:
|
|
324
|
+
"""Create a locate validation set.
|
|
325
|
+
|
|
326
|
+
Args:
|
|
327
|
+
name (str): The name of the validation set. (will not be shown to the labeler)
|
|
328
|
+
instruction (str): The instruction to show to the labeler.
|
|
329
|
+
truths (list[list[Box]]): The truths for each datapoint. Outer list is for each datapoint, inner list is for each truth.\n
|
|
330
|
+
example:
|
|
331
|
+
datapoints: ["datapoint1", "datapoint2"]
|
|
332
|
+
truths: [[Box(0, 0, 100, 100)], [Box(50, 50, 150, 150)]] -> first datapoint the object is in the top left corner, second datapoint the object is in the center
|
|
333
|
+
datapoints (list[str]): The datapoints that will be used for validation.
|
|
334
|
+
contexts (list[str], optional): The contexts for each datapoint. Defaults to None.
|
|
335
|
+
media_contexts (list[str], optional): The list of media contexts i.e. links to the images / videos for the comparison. Defaults to None.\n
|
|
336
|
+
If provided has to be the same length as datapoints and will be shown in addition to the instruction. (Therefore will be different for each datapoint)
|
|
337
|
+
Will be matched up with the datapoints using the list index.
|
|
338
|
+
explanation (list[str | None], optional): The explanations for each datapoint. Will be given to the annotators in case the answer is wrong. Defaults to None.
|
|
339
|
+
dimensions (list[str], optional): The dimensions to add to the validation set accross which users will be tracked. Defaults to [] which is the default dimension.
|
|
340
|
+
|
|
341
|
+
Example:
|
|
342
|
+
```python
|
|
343
|
+
datapoints: ["datapoint1", "datapoint2"]
|
|
344
|
+
truths: [[Box(0, 0, 100, 100)], [Box(50, 50, 150, 150)]]
|
|
345
|
+
```
|
|
346
|
+
This would mean: first datapoint the object is in the top left corner, second datapoint the object is in the center
|
|
347
|
+
"""
|
|
348
|
+
with tracer.start_as_current_span("ValidationSetManager.create_locate_set"):
|
|
349
|
+
if not datapoints:
|
|
350
|
+
raise ValueError("Datapoints cannot be empty")
|
|
351
|
+
|
|
352
|
+
if len(datapoints) != len(truths):
|
|
353
|
+
raise ValueError("The number of datapoints and truths must be equal")
|
|
354
|
+
|
|
355
|
+
if not all([isinstance(truth, (list, tuple)) for truth in truths]):
|
|
356
|
+
raise ValueError("Truths must be a list of lists or tuples")
|
|
357
|
+
|
|
358
|
+
if contexts and len(contexts) != len(datapoints):
|
|
359
|
+
raise ValueError("The number of contexts and datapoints must be equal")
|
|
360
|
+
|
|
361
|
+
if media_contexts and len(media_contexts) != len(datapoints):
|
|
362
|
+
raise ValueError(
|
|
363
|
+
"The number of media contexts and datapoints must be equal"
|
|
364
|
+
)
|
|
365
|
+
|
|
366
|
+
if explanation and len(explanation) != len(datapoints):
|
|
367
|
+
raise ValueError(
|
|
368
|
+
"The number of explanations and datapoints must be equal, the index must align, but can be padded with None"
|
|
369
|
+
)
|
|
370
|
+
|
|
371
|
+
logger.debug("Creating locate rapids")
|
|
372
|
+
rapids = []
|
|
373
|
+
rapids: list[Rapid] = []
|
|
374
|
+
for i in range(len(datapoints)):
|
|
375
|
+
rapids.append(
|
|
376
|
+
self.rapid.locate_rapid(
|
|
377
|
+
instruction=instruction,
|
|
378
|
+
truths=truths[i],
|
|
379
|
+
datapoint=datapoints[i],
|
|
380
|
+
context=contexts[i] if contexts != None else None,
|
|
381
|
+
media_context=(
|
|
382
|
+
media_contexts[i] if media_contexts != None else None
|
|
383
|
+
),
|
|
384
|
+
explanation=explanation[i] if explanation != None else None,
|
|
385
|
+
)
|
|
386
|
+
)
|
|
387
|
+
|
|
388
|
+
logger.debug("Submitting locate rapids")
|
|
389
|
+
return self._submit(name=name, rapids=rapids, dimensions=dimensions)
|
|
390
|
+
|
|
391
|
+
def create_draw_set(
|
|
392
|
+
self,
|
|
393
|
+
name: str,
|
|
394
|
+
instruction: str,
|
|
395
|
+
truths: list[list[Box]],
|
|
396
|
+
datapoints: list[str],
|
|
397
|
+
contexts: list[str] | None = None,
|
|
398
|
+
media_contexts: list[str] | None = None,
|
|
399
|
+
explanation: list[str | None] | None = None,
|
|
400
|
+
dimensions: list[str] = [],
|
|
401
|
+
) -> RapidataValidationSet:
|
|
402
|
+
"""Create a draw validation set.
|
|
403
|
+
|
|
404
|
+
Args:
|
|
405
|
+
name (str): The name of the validation set. (will not be shown to the labeler)
|
|
406
|
+
instruction (str): The instruction to show to the labeler.
|
|
407
|
+
truths (list[list[Box]]): The truths for each datapoint. Outer list is for each datapoint, inner list is for each truth.\n
|
|
408
|
+
example:
|
|
409
|
+
datapoints: ["datapoint1", "datapoint2"]
|
|
410
|
+
truths: [[Box(0, 0, 100, 100)], [Box(50, 50, 150, 150)]] -> first datapoint the object is in the top left corner, second datapoint the object is in the center
|
|
411
|
+
datapoints (list[str]): The datapoints that will be used for validation.
|
|
412
|
+
contexts (list[str], optional): The contexts for each datapoint. Defaults to None.
|
|
413
|
+
media_contexts (list[str], optional): The list of media contexts i.e. links to the images / videos for the comparison. Defaults to None.\n
|
|
414
|
+
If provided has to be the same length as datapoints and will be shown in addition to the instruction. (Therefore will be different for each datapoint)
|
|
415
|
+
Will be matched up with the datapoints using the list index.
|
|
416
|
+
explanation (list[str | None], optional): The explanations for each datapoint. Will be given to the annotators in case the answer is wrong. Defaults to None.
|
|
417
|
+
dimensions (list[str], optional): The dimensions to add to the validation set accross which users will be tracked. Defaults to [] which is the default dimension.
|
|
418
|
+
|
|
419
|
+
Example:
|
|
420
|
+
```python
|
|
421
|
+
datapoints: ["datapoint1", "datapoint2"]
|
|
422
|
+
truths: [[Box(0, 0, 100, 100)], [Box(50, 50, 150, 150)]]
|
|
423
|
+
```
|
|
424
|
+
This would mean: first datapoint the object is in the top left corner, second datapoint the object is in the center
|
|
425
|
+
"""
|
|
426
|
+
with tracer.start_as_current_span("ValidationSetManager.create_draw_set"):
|
|
427
|
+
if not datapoints:
|
|
428
|
+
raise ValueError("Datapoints cannot be empty")
|
|
429
|
+
|
|
430
|
+
if len(datapoints) != len(truths):
|
|
431
|
+
raise ValueError("The number of datapoints and truths must be equal")
|
|
432
|
+
|
|
433
|
+
if not all([isinstance(truth, (list, tuple)) for truth in truths]):
|
|
434
|
+
raise ValueError("Truths must be a list of lists or tuples")
|
|
435
|
+
|
|
436
|
+
if contexts and len(contexts) != len(datapoints):
|
|
437
|
+
raise ValueError("The number of contexts and datapoints must be equal")
|
|
438
|
+
|
|
439
|
+
if media_contexts and len(media_contexts) != len(datapoints):
|
|
440
|
+
raise ValueError(
|
|
441
|
+
"The number of media contexts and datapoints must be equal"
|
|
442
|
+
)
|
|
443
|
+
|
|
444
|
+
if explanation and len(explanation) != len(datapoints):
|
|
445
|
+
raise ValueError(
|
|
446
|
+
"The number of explanations and datapoints must be equal, the index must align, but can be padded with None"
|
|
447
|
+
)
|
|
448
|
+
|
|
449
|
+
logger.debug("Creating draw rapids")
|
|
450
|
+
rapids: list[Rapid] = []
|
|
451
|
+
for i in range(len(datapoints)):
|
|
452
|
+
rapids.append(
|
|
453
|
+
self.rapid.draw_rapid(
|
|
454
|
+
instruction=instruction,
|
|
455
|
+
truths=truths[i],
|
|
456
|
+
datapoint=datapoints[i],
|
|
457
|
+
context=contexts[i] if contexts != None else None,
|
|
458
|
+
media_context=(
|
|
459
|
+
media_contexts[i] if media_contexts != None else None
|
|
460
|
+
),
|
|
461
|
+
explanation=explanation[i] if explanation != None else None,
|
|
462
|
+
)
|
|
463
|
+
)
|
|
464
|
+
|
|
465
|
+
logger.debug("Submitting draw rapids")
|
|
466
|
+
return self._submit(name=name, rapids=rapids, dimensions=dimensions)
|
|
467
|
+
|
|
468
|
+
def create_timestamp_set(
|
|
469
|
+
self,
|
|
470
|
+
name: str,
|
|
471
|
+
instruction: str,
|
|
472
|
+
truths: list[list[tuple[int, int]]],
|
|
473
|
+
datapoints: list[str],
|
|
474
|
+
contexts: list[str] | None = None,
|
|
475
|
+
media_contexts: list[str] | None = None,
|
|
476
|
+
explanation: list[str | None] | None = None,
|
|
477
|
+
dimensions: list[str] = [],
|
|
478
|
+
) -> RapidataValidationSet:
|
|
479
|
+
"""Create a timestamp validation set.
|
|
480
|
+
|
|
481
|
+
Args:
|
|
482
|
+
name (str): The name of the validation set. (will not be shown to the labeler)
|
|
483
|
+
instruction (str): The instruction to show to the labeler.
|
|
484
|
+
truths (list[list[tuple[int, int]]]): The truths for each datapoint defined as start and endpoint based on miliseconds.
|
|
485
|
+
Outer list is for each datapoint, inner list is for each truth.\n
|
|
486
|
+
example:
|
|
487
|
+
datapoints: ["datapoint1", "datapoint2"]
|
|
488
|
+
truths: [[(0, 10)], [(20, 30)]] -> first datapoint the correct interval is from 0 to 10, second datapoint the correct interval is from 20 to 30
|
|
489
|
+
datapoints (list[str]): The datapoints that will be used for validation.
|
|
490
|
+
contexts (list[str], optional): The contexts for each datapoint. Defaults to None.
|
|
491
|
+
media_contexts (list[str], optional): The list of media contexts i.e. links to the images / videos for the comparison. Defaults to None.\n
|
|
492
|
+
If provided has to be the same length as datapoints and will be shown in addition to the instruction. (Therefore will be different for each datapoint)
|
|
493
|
+
Will be matched up with the datapoints using the list index.
|
|
494
|
+
explanation (list[str | None], optional): The explanations for each datapoint. Will be given to the annotators in case the answer is wrong. Defaults to None.
|
|
495
|
+
dimensions (list[str], optional): The dimensions to add to the validation set accross which users will be tracked. Defaults to [] which is the default dimension.
|
|
496
|
+
|
|
497
|
+
Example:
|
|
498
|
+
```python
|
|
499
|
+
datapoints: ["datapoint1", "datapoint2"]
|
|
500
|
+
truths: [[(0, 10)], [(20, 30)]]
|
|
501
|
+
```
|
|
502
|
+
This would mean: first datapoint the correct interval is from 0 to 10, second datapoint the correct interval is from 20 to 30
|
|
503
|
+
"""
|
|
504
|
+
with tracer.start_as_current_span("ValidationSetManager.create_timestamp_set"):
|
|
505
|
+
if not datapoints:
|
|
506
|
+
raise ValueError("Datapoints cannot be empty")
|
|
507
|
+
|
|
508
|
+
if len(datapoints) != len(truths):
|
|
509
|
+
raise ValueError("The number of datapoints and truths must be equal")
|
|
510
|
+
|
|
511
|
+
if not all([isinstance(truth, (list, tuple)) for truth in truths]):
|
|
512
|
+
raise ValueError("Truths must be a list of lists or tuples")
|
|
513
|
+
|
|
514
|
+
if contexts and len(contexts) != len(datapoints):
|
|
515
|
+
raise ValueError("The number of contexts and datapoints must be equal")
|
|
516
|
+
|
|
517
|
+
if media_contexts and len(media_contexts) != len(datapoints):
|
|
518
|
+
raise ValueError(
|
|
519
|
+
"The number of media contexts and datapoints must be equal"
|
|
520
|
+
)
|
|
521
|
+
|
|
522
|
+
if explanation and len(explanation) != len(datapoints):
|
|
523
|
+
raise ValueError(
|
|
524
|
+
"The number of explanations and datapoints must be equal, the index must align, but can be padded with None"
|
|
525
|
+
)
|
|
526
|
+
|
|
527
|
+
logger.debug("Creating timestamp rapids")
|
|
528
|
+
rapids: list[Rapid] = []
|
|
529
|
+
for i in range(len(datapoints)):
|
|
530
|
+
rapids.append(
|
|
531
|
+
self.rapid.timestamp_rapid(
|
|
532
|
+
instruction=instruction,
|
|
533
|
+
truths=truths[i],
|
|
534
|
+
datapoint=datapoints[i],
|
|
535
|
+
context=contexts[i] if contexts != None else None,
|
|
536
|
+
media_context=(
|
|
537
|
+
media_contexts[i] if media_contexts != None else None
|
|
538
|
+
),
|
|
539
|
+
explanation=explanation[i] if explanation != None else None,
|
|
540
|
+
)
|
|
541
|
+
)
|
|
542
|
+
|
|
543
|
+
logger.debug("Submitting timestamp rapids")
|
|
544
|
+
return self._submit(name=name, rapids=rapids, dimensions=dimensions)
|
|
545
|
+
|
|
546
|
+
def create_mixed_set(
|
|
547
|
+
self,
|
|
548
|
+
name: str,
|
|
549
|
+
rapids: list[Rapid],
|
|
550
|
+
dimensions: list[str] = [],
|
|
551
|
+
) -> RapidataValidationSet:
|
|
552
|
+
"""Create a validation set with a list of rapids.
|
|
553
|
+
|
|
554
|
+
Args:
|
|
555
|
+
name (str): The name of the validation set. (will not be shown to the labeler)
|
|
556
|
+
rapids (list[Rapid]): The list of rapids to add to the validation set.
|
|
557
|
+
dimensions (list[str], optional): The dimensions to add to the validation set accross which users will be tracked. Defaults to [] which is the default dimension.
|
|
558
|
+
"""
|
|
559
|
+
with tracer.start_as_current_span("ValidationSetManager.create_mixed_set"):
|
|
560
|
+
if not rapids:
|
|
561
|
+
raise ValueError("Rapids cannot be empty")
|
|
562
|
+
|
|
563
|
+
return self._submit(name=name, rapids=rapids, dimensions=dimensions)
|
|
564
|
+
|
|
565
|
+
def _submit(
|
|
566
|
+
self, name: str, rapids: list[Rapid], dimensions: list[str]
|
|
567
|
+
) -> RapidataValidationSet:
|
|
568
|
+
logger.debug("Creating validation set")
|
|
569
|
+
validation_set_id = (
|
|
570
|
+
self._openapi_service.validation_api.validation_set_post(
|
|
571
|
+
create_validation_set_model=CreateValidationSetModel(name=name)
|
|
572
|
+
)
|
|
573
|
+
).validation_set_id
|
|
574
|
+
|
|
575
|
+
logger.debug("Validation set created with ID: %s", validation_set_id)
|
|
576
|
+
|
|
577
|
+
if validation_set_id is None:
|
|
578
|
+
raise ValueError("Failed to create validation set")
|
|
579
|
+
|
|
580
|
+
logger.debug("Creating validation set instance")
|
|
581
|
+
|
|
582
|
+
validation_set = RapidataValidationSet(
|
|
583
|
+
name=name,
|
|
584
|
+
validation_set_id=validation_set_id,
|
|
585
|
+
dimensions=dimensions,
|
|
586
|
+
openapi_service=self._openapi_service,
|
|
587
|
+
)
|
|
588
|
+
with tracer.start_as_current_span("Adding rapids to validation set"):
|
|
589
|
+
logger.debug("Adding rapids to validation set")
|
|
590
|
+
failed_rapids = []
|
|
591
|
+
|
|
592
|
+
progress_bar = tqdm(
|
|
593
|
+
total=len(rapids),
|
|
594
|
+
desc="Uploading validation tasks",
|
|
595
|
+
disable=rapidata_config.logging.silent_mode,
|
|
596
|
+
)
|
|
597
|
+
|
|
598
|
+
for rapid in rapids:
|
|
599
|
+
try:
|
|
600
|
+
validation_set.add_rapid(rapid)
|
|
601
|
+
progress_bar.update(1)
|
|
602
|
+
except Exception as e:
|
|
603
|
+
logger.error(
|
|
604
|
+
"Failed to add rapid %s to validation set.\nError: %s",
|
|
605
|
+
rapid.asset,
|
|
606
|
+
str(e),
|
|
607
|
+
)
|
|
608
|
+
failed_rapids.append(rapid.asset)
|
|
609
|
+
|
|
610
|
+
progress_bar.close()
|
|
611
|
+
|
|
612
|
+
if failed_rapids:
|
|
613
|
+
logger.error(
|
|
614
|
+
"Failed to add %s datapoints to validation set: %s",
|
|
615
|
+
len(failed_rapids),
|
|
616
|
+
failed_rapids,
|
|
617
|
+
)
|
|
618
|
+
raise RuntimeError(
|
|
619
|
+
f"Failed to add {len(failed_rapids)} datapoints to validation set: {failed_rapids}"
|
|
620
|
+
)
|
|
621
|
+
|
|
622
|
+
managed_print()
|
|
623
|
+
managed_print(
|
|
624
|
+
f"Validation set '{name}' created with ID {validation_set_id}\n",
|
|
625
|
+
f"Now viewable under: {validation_set.validation_set_details_page}",
|
|
626
|
+
sep="",
|
|
627
|
+
)
|
|
628
|
+
|
|
629
|
+
if dimensions:
|
|
630
|
+
validation_set.update_dimensions(dimensions)
|
|
631
|
+
|
|
632
|
+
return validation_set
|
|
633
|
+
|
|
634
|
+
def _create_order_validation_set(
|
|
635
|
+
self,
|
|
636
|
+
workflow: Workflow,
|
|
637
|
+
name: str,
|
|
638
|
+
datapoints: list[Datapoint],
|
|
639
|
+
required_amount: int,
|
|
640
|
+
settings: Sequence[RapidataSetting] | None = None,
|
|
641
|
+
dimensions: list[str] = [],
|
|
642
|
+
) -> RapidataValidationSet:
|
|
643
|
+
with tracer.start_as_current_span(
|
|
644
|
+
"ValidationSetManager._create_order_validation_set"
|
|
645
|
+
):
|
|
646
|
+
rapids: list[Rapid] = []
|
|
647
|
+
for datapoint in workflow._format_datapoints(datapoints):
|
|
648
|
+
rapids.append(
|
|
649
|
+
Rapid(
|
|
650
|
+
asset=datapoint.asset,
|
|
651
|
+
payload=workflow._to_payload(datapoint),
|
|
652
|
+
context=datapoint.context,
|
|
653
|
+
media_context=datapoint.media_context,
|
|
654
|
+
data_type=datapoint.data_type,
|
|
655
|
+
settings=settings,
|
|
656
|
+
)
|
|
657
|
+
)
|
|
658
|
+
validation_set = RapidataValidationSet(
|
|
659
|
+
validation_set_id=self._openapi_service.validation_api.validation_set_post(
|
|
660
|
+
create_validation_set_model=CreateValidationSetModel(name=name)
|
|
661
|
+
).validation_set_id,
|
|
662
|
+
name=name,
|
|
663
|
+
dimensions=dimensions,
|
|
664
|
+
openapi_service=self._openapi_service,
|
|
665
|
+
)
|
|
666
|
+
|
|
667
|
+
managed_print()
|
|
668
|
+
managed_print(
|
|
669
|
+
Fore.YELLOW
|
|
670
|
+
+ f"A new validation set was created. Please annotate {required_amount} datapoint{('s' if required_amount != 1 else '')} before the order can run."
|
|
671
|
+
+ Fore.RESET
|
|
672
|
+
)
|
|
673
|
+
|
|
674
|
+
link = f"https://app.{self._openapi_service.environment}/validation-set/detail/{validation_set.id}/annotate?maxSize={len(datapoints)}&required={required_amount}"
|
|
675
|
+
could_open_browser = webbrowser.open(link)
|
|
676
|
+
if not could_open_browser:
|
|
677
|
+
encoded_url = urllib.parse.quote(link, safe="%/:=&?~#+!$,;'@()*[]")
|
|
678
|
+
managed_print(
|
|
679
|
+
Fore.RED
|
|
680
|
+
+ f"Please open this URL in your browser to annotate the validation set: '{encoded_url}'"
|
|
681
|
+
+ Fore.RESET
|
|
682
|
+
)
|
|
683
|
+
else:
|
|
684
|
+
managed_print(
|
|
685
|
+
Fore.YELLOW
|
|
686
|
+
+ f"Please annotate the validation set. \n'{link}'"
|
|
687
|
+
+ Fore.RESET
|
|
688
|
+
)
|
|
689
|
+
|
|
690
|
+
with tracer.start_as_current_span("Annotating validation set"):
|
|
691
|
+
progress_bar = tqdm(
|
|
692
|
+
total=required_amount,
|
|
693
|
+
desc="Annotate the validation set",
|
|
694
|
+
disable=rapidata_config.logging.silent_mode,
|
|
695
|
+
)
|
|
696
|
+
|
|
697
|
+
rapid_index = 0
|
|
698
|
+
while True:
|
|
699
|
+
total_rapids, labeled_rapids = (
|
|
700
|
+
self._get_total_and_labeled_rapids_count(validation_set.id)
|
|
701
|
+
)
|
|
702
|
+
|
|
703
|
+
progress_bar.n = labeled_rapids
|
|
704
|
+
progress_bar.refresh()
|
|
705
|
+
|
|
706
|
+
if labeled_rapids >= required_amount:
|
|
707
|
+
break
|
|
708
|
+
|
|
709
|
+
if total_rapids < required_amount and rapid_index >= len(rapids):
|
|
710
|
+
managed_print(
|
|
711
|
+
Fore.RED
|
|
712
|
+
+ f"""Warning: An order can only be started with at least {required_amount} annotated validation tasks. But only {labeled_rapids}/{required_amount} were annotated.
|
|
713
|
+
Either add clearer examples or turn off the 'autoValidationSetCreation' with:
|
|
714
|
+
|
|
715
|
+
from rapidata import rapidata_config
|
|
716
|
+
rapidata_config.order.autoValidationSetCreation = False"""
|
|
717
|
+
+ Fore.RESET
|
|
718
|
+
)
|
|
719
|
+
raise RuntimeError(
|
|
720
|
+
f"Not enough rapids annotated. Required: {required_amount}, Annotated: {labeled_rapids}"
|
|
721
|
+
)
|
|
722
|
+
|
|
723
|
+
if (
|
|
724
|
+
rapid_index < len(rapids)
|
|
725
|
+
and total_rapids - labeled_rapids <= required_amount * 2
|
|
726
|
+
):
|
|
727
|
+
validation_set.add_rapid(rapids[rapid_index])
|
|
728
|
+
rapid_index += 1
|
|
729
|
+
|
|
730
|
+
time.sleep(2)
|
|
731
|
+
|
|
732
|
+
progress_bar.close()
|
|
733
|
+
|
|
734
|
+
validation_set.update_dimensions(dimensions)
|
|
735
|
+
|
|
736
|
+
return validation_set
|
|
737
|
+
|
|
738
|
+
def get_validation_set_by_id(self, validation_set_id: str) -> RapidataValidationSet:
|
|
739
|
+
"""Get a validation set by ID.
|
|
740
|
+
|
|
741
|
+
Args:
|
|
742
|
+
validation_set_id (str): The ID of the validation set.
|
|
743
|
+
|
|
744
|
+
Returns:
|
|
745
|
+
RapidataValidationSet: The ValidationSet instance.
|
|
746
|
+
"""
|
|
747
|
+
|
|
748
|
+
with tracer.start_as_current_span(
|
|
749
|
+
"ValidationSetManager.get_validation_set_by_id"
|
|
750
|
+
):
|
|
751
|
+
logger.debug("Getting validation set by ID: %s", validation_set_id)
|
|
752
|
+
validation_set = self._openapi_service.validation_api.validation_set_validation_set_id_get(
|
|
753
|
+
validation_set_id=validation_set_id
|
|
754
|
+
)
|
|
755
|
+
|
|
756
|
+
return RapidataValidationSet(
|
|
757
|
+
validation_set_id,
|
|
758
|
+
str(validation_set.name),
|
|
759
|
+
validation_set.dimensions,
|
|
760
|
+
self._openapi_service,
|
|
761
|
+
)
|
|
762
|
+
|
|
763
|
+
def find_validation_sets(
|
|
764
|
+
self, name: str = "", amount: int = 10
|
|
765
|
+
) -> list[RapidataValidationSet]:
|
|
766
|
+
"""Find validation sets by name.
|
|
767
|
+
|
|
768
|
+
Args:
|
|
769
|
+
name (str, optional): The name to search for. Defaults to "" to match with any set.
|
|
770
|
+
amount (int, optional): The amount of validation sets to return. Defaults to 10.
|
|
771
|
+
|
|
772
|
+
Returns:
|
|
773
|
+
list[RapidataValidationSet]: The list of validation sets.
|
|
774
|
+
"""
|
|
775
|
+
with tracer.start_as_current_span("ValidationSetManager.find_validation_sets"):
|
|
776
|
+
logger.debug(
|
|
777
|
+
"Finding validation sets with name: %s and amount: %s", name, amount
|
|
778
|
+
)
|
|
779
|
+
|
|
780
|
+
validation_page_result = (
|
|
781
|
+
self._openapi_service.validation_api.validation_sets_get(
|
|
782
|
+
QueryModel(
|
|
783
|
+
page=PageInfo(index=1, size=amount),
|
|
784
|
+
filter=RootFilter(
|
|
785
|
+
filters=[
|
|
786
|
+
Filter(
|
|
787
|
+
field="Name",
|
|
788
|
+
operator=FilterOperator.CONTAINS,
|
|
789
|
+
value=name,
|
|
790
|
+
)
|
|
791
|
+
]
|
|
792
|
+
),
|
|
793
|
+
sortCriteria=[
|
|
794
|
+
SortCriterion(
|
|
795
|
+
direction=SortDirection.DESC, propertyName="CreatedAt"
|
|
796
|
+
)
|
|
797
|
+
],
|
|
798
|
+
)
|
|
799
|
+
)
|
|
800
|
+
)
|
|
801
|
+
|
|
802
|
+
logger.debug("Validation sets found: %s", validation_page_result.items)
|
|
803
|
+
|
|
804
|
+
validation_sets = [
|
|
805
|
+
self.get_validation_set_by_id(str(validation_set.id))
|
|
806
|
+
for validation_set in validation_page_result.items
|
|
807
|
+
]
|
|
808
|
+
return validation_sets
|
|
809
|
+
|
|
810
|
+
def __str__(self) -> str:
|
|
811
|
+
return "ValidationSetManager"
|
|
812
|
+
|
|
813
|
+
def __repr__(self) -> str:
|
|
814
|
+
return self.__str__()
|