rapidata 2.37.0__py3-none-any.whl → 3.0.0a8__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 +23 -15
- rapidata/api_client/__init__.py +84 -427
- rapidata/api_client/api/__init__.py +5 -2
- rapidata/api_client/api/asset_api.py +853 -0
- rapidata/api_client/api/audience_api.py +2505 -0
- rapidata/api_client/api/benchmark_api.py +618 -253
- rapidata/api_client/api/campaign_api.py +322 -32
- rapidata/api_client/api/client_api.py +38 -33
- rapidata/api_client/api/compare_workflow_api.py +11 -10
- rapidata/api_client/api/customer_rapid_api.py +119 -125
- rapidata/api_client/api/datapoint_api.py +8 -6
- rapidata/api_client/api/dataset_api.py +240 -1516
- rapidata/api_client/api/evaluation_workflow_api.py +29 -82
- rapidata/api_client/api/feedback_api.py +11 -11
- rapidata/api_client/api/grouped_ranking_workflow_api.py +319 -0
- rapidata/api_client/api/identity_api.py +26 -300
- rapidata/api_client/api/job_api.py +3902 -0
- rapidata/api_client/api/job_definition_api.py +319 -0
- rapidata/api_client/api/job_revision_api.py +335 -0
- rapidata/api_client/api/leaderboard_api.py +139 -2355
- rapidata/api_client/api/newsletter_api.py +20 -19
- rapidata/api_client/api/order_api.py +375 -91
- rapidata/api_client/api/participant_api.py +80 -118
- rapidata/api_client/api/pipeline_api.py +24 -607
- rapidata/api_client/api/prompt_api.py +11 -11
- rapidata/api_client/api/rapidata_identity_api_api.py +5 -4
- rapidata/api_client/api/sample_api.py +5 -4
- rapidata/api_client/api/simple_workflow_api.py +11 -10
- rapidata/api_client/api/survey_api.py +304 -0
- rapidata/api_client/api/user_rapid_api.py +35 -31
- rapidata/api_client/api/validation_set_api.py +337 -2043
- rapidata/api_client/api/workflow_api.py +32 -26
- 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 -400
- rapidata/api_client/models/ab_test_selection_a_inner.py +1 -1
- rapidata/api_client/models/add_rapid_to_audience_model.py +144 -0
- rapidata/api_client/models/add_user_response_result.py +10 -5
- rapidata/api_client/models/add_validation_rapid_model.py +34 -36
- 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_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/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 +4 -2
- rapidata/api_client/models/and_filter_filters_inner.py +24 -10
- rapidata/api_client/models/are_rapids_active_result.py +2 -2
- rapidata/api_client/models/asset_metadata.py +2 -8
- 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_job_state.py +38 -0
- rapidata/api_client/models/audience_status.py +39 -0
- rapidata/api_client/models/benchmark_query_result.py +5 -3
- rapidata/api_client/models/boost_leaderboard_model.py +5 -5
- rapidata/api_client/models/boost_query_result.py +4 -4
- 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/boosting_profile.py +91 -0
- rapidata/api_client/models/box_shape.py +4 -33
- rapidata/api_client/models/campaign_query_result.py +13 -5
- rapidata/api_client/models/campaign_status.py +2 -2
- rapidata/api_client/models/change_boost_model.py +5 -5
- 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 +25 -35
- rapidata/api_client/models/clients_query_result.py +5 -5
- rapidata/api_client/models/clone_order_model.py +4 -4
- rapidata/api_client/models/clone_order_result.py +9 -4
- rapidata/api_client/models/compare_workflow_config.py +19 -18
- rapidata/api_client/models/compare_workflow_config_context_asset.py +174 -0
- rapidata/api_client/models/compare_workflow_config_model.py +3 -3
- rapidata/api_client/models/compare_workflow_model.py +25 -7
- rapidata/api_client/models/compare_workflow_model1.py +20 -9
- 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 +1 -1
- rapidata/api_client/models/comparison_operator.py +2 -2
- rapidata/api_client/models/conditional_validation_selection.py +6 -11
- 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/create_audience_request.py +122 -0
- rapidata/api_client/models/create_audience_result.py +87 -0
- rapidata/api_client/models/create_benchmark_model.py +5 -5
- rapidata/api_client/models/create_benchmark_participant_model.py +5 -5
- rapidata/api_client/models/create_benchmark_participant_result.py +4 -4
- rapidata/api_client/models/create_benchmark_prompt_result.py +87 -0
- rapidata/api_client/models/create_benchmark_result.py +2 -2
- 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 +2 -2
- rapidata/api_client/models/create_customer_client_result.py +2 -2
- rapidata/api_client/models/create_datapoint_from_files_model.py +3 -3
- rapidata/api_client/models/create_datapoint_from_text_sources_model.py +3 -3
- rapidata/api_client/models/create_datapoint_from_urls_model.py +3 -3
- rapidata/api_client/models/create_datapoint_model.py +124 -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 +2 -2
- rapidata/api_client/models/create_dataset_endpoint_input.py +87 -0
- rapidata/api_client/models/create_dataset_endpoint_output.py +87 -0
- rapidata/api_client/models/create_demographic_rapid_model.py +33 -10
- 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_job_definition_endpoint_input.py +119 -0
- rapidata/api_client/models/create_job_definition_endpoint_output.py +89 -0
- rapidata/api_client/models/create_job_endpoint_input.py +100 -0
- rapidata/api_client/models/create_job_endpoint_output.py +89 -0
- rapidata/api_client/models/create_job_revision_endpoint_input.py +127 -0
- rapidata/api_client/models/create_job_revision_endpoint_output.py +89 -0
- rapidata/api_client/models/create_leaderboard_model.py +23 -26
- rapidata/api_client/models/create_leaderboard_result.py +2 -2
- rapidata/api_client/models/create_order_definition_model.py +119 -0
- rapidata/api_client/models/create_order_definition_result.py +87 -0
- rapidata/api_client/models/create_order_definition_revision_model.py +117 -0
- rapidata/api_client/models/create_order_definition_revision_result.py +87 -0
- rapidata/api_client/models/create_order_model.py +33 -62
- rapidata/api_client/models/create_order_model_referee.py +12 -12
- rapidata/api_client/models/create_order_model_workflow.py +35 -21
- rapidata/api_client/models/create_order_result.py +2 -2
- rapidata/api_client/models/create_rapid_result.py +2 -2
- rapidata/api_client/models/create_sample_model.py +13 -7
- 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 +5 -5
- rapidata/api_client/models/datapoint_model.py +3 -3
- rapidata/api_client/models/datapoint_state.py +2 -2
- rapidata/api_client/models/definition_type.py +49 -0
- rapidata/api_client/models/dynamic_client_registration_request.py +21 -36
- rapidata/api_client/models/early_stopping_referee_model.py +3 -3
- rapidata/api_client/models/elo_config.py +2 -2
- rapidata/api_client/models/elo_config_model.py +6 -6
- rapidata/api_client/models/entity_tag_header_value.py +93 -0
- rapidata/api_client/models/evaluation_workflow_model.py +4 -4
- rapidata/api_client/models/existing_asset_input.py +109 -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 +2 -2
- rapidata/api_client/models/feedback_model.py +7 -7
- rapidata/api_client/models/file_asset.py +3 -5
- rapidata/api_client/models/file_asset_input_file.py +8 -22
- rapidata/api_client/models/file_asset_metadata_value.py +252 -0
- rapidata/api_client/models/file_asset_model_metadata_value.py +18 -88
- rapidata/api_client/models/file_stream_result.py +122 -0
- rapidata/api_client/models/file_type.py +2 -2
- rapidata/api_client/models/filter.py +2 -2
- rapidata/api_client/models/filter_operator.py +2 -2
- rapidata/api_client/models/fork_benchmark_result.py +87 -0
- rapidata/api_client/models/form_file_wrapper.py +17 -2
- 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 +118 -0
- rapidata/api_client/models/get_available_validation_sets_result.py +2 -2
- rapidata/api_client/models/get_benchmark_by_id_result.py +8 -4
- 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_compare_ab_summary_result.py +3 -5
- rapidata/api_client/models/get_compare_workflow_results_model.py +7 -7
- rapidata/api_client/models/get_compare_workflow_results_result.py +5 -5
- rapidata/api_client/models/get_datapoint_by_id_result.py +7 -12
- 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 +2 -2
- rapidata/api_client/models/get_evaluation_workflow_results_model.py +119 -0
- rapidata/api_client/models/get_failed_datapoints_result.py +5 -5
- 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_job_by_id_endpoint_output.py +130 -0
- rapidata/api_client/models/get_job_definition_by_id_endpoint_output.py +95 -0
- rapidata/api_client/models/get_job_revision_endpoint_output.py +133 -0
- rapidata/api_client/models/get_leaderboard_by_id_result.py +5 -5
- rapidata/api_client/models/get_order_by_id_result.py +12 -5
- rapidata/api_client/models/get_participant_by_id_result.py +4 -6
- rapidata/api_client/models/get_pipeline_by_id_result.py +5 -5
- rapidata/api_client/models/get_public_orders_result.py +2 -2
- rapidata/api_client/models/get_public_responses_result.py +5 -5
- rapidata/api_client/models/get_public_responses_result_response.py +112 -0
- rapidata/api_client/models/get_rapid_responses_result.py +3 -3
- rapidata/api_client/models/get_recommended_validation_set_result.py +2 -2
- 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 +5 -5
- rapidata/api_client/models/get_responses_result_response.py +103 -0
- rapidata/api_client/models/get_sample_by_id_result.py +7 -8
- rapidata/api_client/models/get_simple_workflow_results_model.py +20 -15
- rapidata/api_client/models/get_standing_by_id_result.py +3 -5
- rapidata/api_client/models/get_validation_rapids_result.py +29 -32
- 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 +23 -9
- rapidata/api_client/models/get_workflow_progress_result.py +2 -2
- rapidata/api_client/models/get_workflow_results_result.py +31 -14
- rapidata/api_client/models/get_workflow_results_result_response.py +103 -0
- rapidata/api_client/models/google_one_tap_login_model.py +4 -4
- 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_audience_filter.py +184 -0
- rapidata/api_client/models/i_audience_filter_and_audience_filter.py +106 -0
- rapidata/api_client/models/i_audience_filter_country_audience_filter.py +96 -0
- rapidata/api_client/models/i_audience_filter_country_filter.py +96 -0
- rapidata/api_client/models/i_audience_filter_language_audience_filter.py +96 -0
- rapidata/api_client/models/i_audience_filter_language_filter.py +96 -0
- rapidata/api_client/models/i_audience_filter_not_audience_filter.py +102 -0
- rapidata/api_client/models/i_audience_filter_or_audience_filter.py +106 -0
- rapidata/api_client/models/i_campaign_filter.py +296 -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_campaign_session_count_filter.py +101 -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_device_filter.py +106 -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_duration_metadata.py +110 -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 +105 -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 +105 -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 +296 -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_device_user_filter_model.py +104 -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 +108 -0
- rapidata/api_client/models/i_validation_truth_model.py +294 -0
- rapidata/api_client/models/i_validation_truth_model_attach_category_truth_model.py +96 -0
- rapidata/api_client/models/i_validation_truth_model_bounding_box_truth_model.py +102 -0
- rapidata/api_client/models/i_validation_truth_model_classify_truth_model.py +96 -0
- rapidata/api_client/models/i_validation_truth_model_compare_truth_model.py +96 -0
- rapidata/api_client/models/i_validation_truth_model_empty_validation_truth_model.py +94 -0
- rapidata/api_client/models/i_validation_truth_model_line_truth_model.py +94 -0
- rapidata/api_client/models/i_validation_truth_model_locate_box_truth_model.py +108 -0
- rapidata/api_client/models/i_validation_truth_model_multi_compare_truth_model.py +96 -0
- rapidata/api_client/models/i_validation_truth_model_named_entity_truth_model.py +104 -0
- rapidata/api_client/models/i_validation_truth_model_polygon_truth_model.py +94 -0
- rapidata/api_client/models/i_validation_truth_model_scrub_truth_model.py +104 -0
- rapidata/api_client/models/i_validation_truth_model_skip_truth_model.py +94 -0
- rapidata/api_client/models/i_validation_truth_model_transcription_truth_model.py +115 -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/inquire_file_metadata_result.py +100 -0
- rapidata/api_client/models/inspect_report_result.py +2 -2
- rapidata/api_client/models/job_definition_revision_state.py +38 -0
- rapidata/api_client/models/json_web_key.py +2 -36
- rapidata/api_client/models/json_web_key_set.py +2 -22
- rapidata/api_client/models/labeling_selection.py +9 -2
- 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/locate_coordinate.py +4 -13
- rapidata/api_client/models/logic_operator.py +2 -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/multi_asset.py +6 -6
- rapidata/api_client/models/multi_asset_assets_inner.py +170 -0
- rapidata/api_client/models/multi_asset_input.py +21 -1
- rapidata/api_client/models/multi_asset_input1_assets_inner.py +40 -12
- rapidata/api_client/models/multi_asset_input3_assets_inner.py +40 -12
- rapidata/api_client/models/multi_asset_input_assets_inner.py +16 -30
- rapidata/api_client/models/multi_asset_model.py +3 -3
- rapidata/api_client/models/naive_referee_model.py +2 -2
- rapidata/api_client/models/named_classification.py +4 -13
- rapidata/api_client/models/newsletter_model.py +6 -6
- rapidata/api_client/models/not_available_yet_result.py +4 -13
- rapidata/api_client/models/null_asset.py +3 -5
- rapidata/api_client/models/online_pair_maker_config_model.py +3 -3
- rapidata/api_client/models/option_of_aggregator_type.py +49 -0
- rapidata/api_client/models/order_model.py +12 -5
- rapidata/api_client/models/order_state.py +2 -2
- 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_job_definitions_result.py +103 -0
- rapidata/api_client/models/paged_result_of_query_job_revisions_result.py +103 -0
- rapidata/api_client/models/paged_result_of_query_jobs_result.py +103 -0
- rapidata/api_client/models/paged_result_of_query_rapids_for_audience_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 +3 -5
- rapidata/api_client/models/participant_status.py +2 -2
- 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/preliminary_download_model.py +5 -5
- rapidata/api_client/models/preview_order_model.py +5 -5
- rapidata/api_client/models/problem_details.py +2 -20
- rapidata/api_client/models/prompt_asset_metadata_input.py +4 -6
- rapidata/api_client/models/prompt_asset_metadata_input_asset.py +25 -41
- rapidata/api_client/models/prompt_by_benchmark_result.py +5 -5
- rapidata/api_client/models/prompt_metadata_input.py +5 -7
- rapidata/api_client/models/proxy_file_wrapper.py +17 -2
- rapidata/api_client/models/public_order_model.py +2 -2
- rapidata/api_client/models/query_audiences_result.py +118 -0
- rapidata/api_client/models/query_datapoints_by_dataset_id_result.py +95 -0
- rapidata/api_client/models/query_job_definitions_result.py +97 -0
- rapidata/api_client/models/query_job_revisions_result.py +95 -0
- rapidata/api_client/models/query_jobs_result.py +103 -0
- rapidata/api_client/models/query_model.py +10 -5
- rapidata/api_client/models/query_rapids_for_audience_result.py +150 -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/rapid_issue.py +2 -2
- rapidata/api_client/models/rapid_model.py +30 -40
- rapidata/api_client/models/rapid_result_model.py +7 -7
- rapidata/api_client/models/rapid_skipped_model.py +5 -5
- rapidata/api_client/models/rapid_state.py +2 -2
- rapidata/api_client/models/read_bridge_token_keys_result.py +10 -24
- rapidata/api_client/models/reference_asset_input.py +100 -0
- rapidata/api_client/models/report_model.py +7 -7
- rapidata/api_client/models/retrieval_mode.py +2 -2
- rapidata/api_client/models/root_filter.py +2 -2
- rapidata/api_client/models/run_status.py +2 -2
- rapidata/api_client/models/runs_by_leaderboard_result.py +3 -3
- rapidata/api_client/models/sample_by_identifier.py +7 -8
- rapidata/api_client/models/sample_by_participant.py +7 -8
- rapidata/api_client/models/scrub_range.py +2 -2
- rapidata/api_client/models/send_survey_model.py +87 -0
- rapidata/api_client/models/simple_workflow_config.py +3 -3
- rapidata/api_client/models/simple_workflow_model.py +2 -2
- rapidata/api_client/models/simple_workflow_model1.py +4 -11
- rapidata/api_client/models/simple_workflow_model_blueprint.py +1 -1
- rapidata/api_client/models/sort_criterion.py +2 -2
- rapidata/api_client/models/sort_direction.py +2 -2
- rapidata/api_client/models/standing_by_benchmark.py +113 -0
- rapidata/api_client/models/standing_by_leaderboard.py +16 -12
- rapidata/api_client/models/standing_status.py +2 -2
- rapidata/api_client/models/standings_by_benchmark_result.py +95 -0
- rapidata/api_client/models/standings_by_leaderboard_result.py +2 -2
- rapidata/api_client/models/start_preliminary_download_result.py +87 -0
- rapidata/api_client/models/sticky_state.py +3 -2
- rapidata/api_client/models/stream_file_wrapper.py +25 -3
- rapidata/api_client/models/string_segment.py +105 -0
- rapidata/api_client/models/submit_order_model.py +5 -5
- rapidata/api_client/models/submit_participant_result.py +2 -2
- rapidata/api_client/models/submit_prompt_model.py +9 -14
- rapidata/api_client/models/submit_prompt_model_prompt_asset.py +40 -12
- rapidata/api_client/models/tags_by_benchmark_result.py +2 -2
- rapidata/api_client/models/text_asset.py +3 -5
- rapidata/api_client/models/text_asset_input.py +21 -1
- rapidata/api_client/models/text_metadata.py +6 -1
- rapidata/api_client/models/text_metadata_input.py +111 -0
- rapidata/api_client/models/text_metadata_model.py +7 -2
- rapidata/api_client/models/transcription_metadata_input.py +5 -7
- rapidata/api_client/models/transcription_word.py +2 -2
- rapidata/api_client/models/translated_string.py +2 -2
- rapidata/api_client/models/unlock_order_result.py +2 -2
- rapidata/api_client/models/update_audience_request.py +113 -0
- rapidata/api_client/models/update_benchmark_model.py +99 -0
- rapidata/api_client/models/update_benchmark_name_model.py +5 -5
- rapidata/api_client/models/update_campaign_model.py +11 -11
- rapidata/api_client/models/update_dataset_name_model.py +5 -5
- rapidata/api_client/models/update_dimensions_model.py +3 -3
- rapidata/api_client/models/update_job_definition_endpoint_input.py +92 -0
- rapidata/api_client/models/update_leaderboard_model.py +18 -3
- rapidata/api_client/models/update_leaderboard_name_model.py +5 -5
- rapidata/api_client/models/update_leaderboard_response_config_model.py +5 -5
- rapidata/api_client/models/update_order_name_model.py +5 -5
- rapidata/api_client/models/update_participant_model.py +92 -0
- rapidata/api_client/models/update_participant_name_model.py +5 -5
- rapidata/api_client/models/update_priority_model.py +87 -0
- rapidata/api_client/models/update_prompt_tags_model.py +5 -5
- rapidata/api_client/models/update_should_alert_model.py +4 -4
- rapidata/api_client/models/update_validation_rapid_model.py +35 -14
- rapidata/api_client/models/update_validation_rapid_model_context_asset.py +160 -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/user_action_restriction.py +37 -0
- rapidata/api_client/models/user_action_restriction_filter.py +101 -0
- rapidata/api_client/models/validation_chance.py +20 -3
- rapidata/api_client/models/validation_problem_details.py +117 -0
- rapidata/api_client/models/validation_set_model.py +11 -16
- rapidata/api_client/models/validation_set_overview_model.py +2 -2
- 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 +33 -2
- rapidata/api_client/rest.py +2 -2
- rapidata/api_client_README.md +371 -326
- rapidata/rapidata_client/__init__.py +14 -11
- rapidata/rapidata_client/api/{rapidata_exception.py → rapidata_api_client.py} +119 -2
- rapidata/rapidata_client/audience/__init__.py +2 -0
- rapidata/rapidata_client/audience/audience_example_handler.py +168 -0
- rapidata/rapidata_client/audience/rapidata_audience.py +287 -0
- rapidata/rapidata_client/audience/rapidata_audience_manager.py +162 -0
- rapidata/rapidata_client/benchmark/_detail_mapper.py +11 -9
- rapidata/rapidata_client/benchmark/leaderboard/rapidata_leaderboard.py +98 -54
- rapidata/rapidata_client/benchmark/participant/_participant.py +57 -32
- rapidata/rapidata_client/benchmark/rapidata_benchmark.py +384 -246
- rapidata/rapidata_client/benchmark/rapidata_benchmark_manager.py +137 -81
- rapidata/rapidata_client/config/__init__.py +3 -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 +15 -10
- rapidata/rapidata_client/config/tracer.py +184 -0
- rapidata/rapidata_client/config/upload_config.py +64 -0
- rapidata/rapidata_client/datapoints/__init__.py +0 -3
- rapidata/rapidata_client/datapoints/_asset_uploader.py +184 -0
- rapidata/rapidata_client/datapoints/_datapoint.py +72 -176
- 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 -10
- rapidata/rapidata_client/datapoints/metadata/__init__.py +0 -2
- rapidata/rapidata_client/datapoints/metadata/_private_text_metadata.py +5 -6
- rapidata/rapidata_client/datapoints/metadata/_prompt_identifier_metadata.py +4 -5
- rapidata/rapidata_client/datapoints/metadata/_public_text_metadata.py +5 -6
- rapidata/rapidata_client/datapoints/metadata/_select_words_metadata.py +3 -4
- rapidata/rapidata_client/dataset/__init__.py +1 -0
- rapidata/rapidata_client/dataset/_rapidata_dataset.py +55 -0
- rapidata/rapidata_client/demographic/demographic_manager.py +44 -19
- rapidata/rapidata_client/exceptions/failed_upload_exception.py +10 -65
- rapidata/rapidata_client/filter/_backend_filter_mapper.py +134 -0
- rapidata/rapidata_client/filter/_base_filter.py +13 -8
- rapidata/rapidata_client/filter/age_filter.py +26 -10
- rapidata/rapidata_client/filter/and_filter.py +36 -11
- rapidata/rapidata_client/filter/campaign_filter.py +21 -10
- rapidata/rapidata_client/filter/country_filter.py +46 -12
- rapidata/rapidata_client/filter/custom_filter.py +25 -12
- rapidata/rapidata_client/filter/gender_filter.py +25 -10
- rapidata/rapidata_client/filter/language_filter.py +51 -21
- rapidata/rapidata_client/filter/models/age_group.py +14 -12
- rapidata/rapidata_client/filter/models/gender.py +12 -8
- rapidata/rapidata_client/filter/new_user_filter.py +14 -4
- rapidata/rapidata_client/filter/not_filter.py +35 -11
- rapidata/rapidata_client/filter/or_filter.py +36 -11
- rapidata/rapidata_client/filter/rapidata_filters.py +17 -23
- rapidata/rapidata_client/filter/response_count_filter.py +40 -14
- rapidata/rapidata_client/filter/user_score_filter.py +62 -24
- rapidata/rapidata_client/job/__init__.py +3 -0
- rapidata/rapidata_client/job/job_definition.py +110 -0
- rapidata/rapidata_client/job/job_manager.py +758 -0
- rapidata/rapidata_client/job/rapidata_job.py +326 -0
- rapidata/rapidata_client/order/__init__.py +2 -0
- rapidata/rapidata_client/order/_rapidata_order_builder.py +236 -196
- rapidata/rapidata_client/order/rapidata_order.py +271 -176
- rapidata/rapidata_client/order/rapidata_order_manager.py +520 -364
- rapidata/rapidata_client/rapidata_client.py +96 -29
- rapidata/rapidata_client/referee/__init__.py +1 -1
- rapidata/rapidata_client/referee/_base_referee.py +14 -3
- rapidata/rapidata_client/referee/_early_stopping_referee.py +32 -17
- rapidata/rapidata_client/referee/_naive_referee.py +24 -3
- rapidata/rapidata_client/results/__init__.py +3 -0
- rapidata/rapidata_client/{order → results}/rapidata_results.py +86 -63
- rapidata/rapidata_client/selection/_base_selection.py +9 -2
- rapidata/rapidata_client/selection/ab_test_selection.py +28 -20
- rapidata/rapidata_client/selection/capped_selection.py +23 -16
- rapidata/rapidata_client/selection/conditional_validation_selection.py +43 -24
- rapidata/rapidata_client/selection/demographic_selection.py +21 -6
- rapidata/rapidata_client/selection/effort_selection.py +20 -8
- rapidata/rapidata_client/selection/labeling_selection.py +21 -10
- rapidata/rapidata_client/selection/rapidata_selections.py +23 -14
- rapidata/rapidata_client/selection/shuffling_selection.py +21 -13
- rapidata/rapidata_client/selection/static_selection.py +19 -8
- rapidata/rapidata_client/selection/validation_selection.py +20 -4
- rapidata/rapidata_client/settings/__init__.py +2 -0
- rapidata/rapidata_client/settings/_rapidata_setting.py +22 -3
- rapidata/rapidata_client/settings/alert_on_fast_response.py +8 -5
- rapidata/rapidata_client/settings/allow_neither_both.py +3 -0
- rapidata/rapidata_client/settings/custom_setting.py +3 -2
- rapidata/rapidata_client/settings/free_text_minimum_characters.py +9 -4
- rapidata/rapidata_client/settings/models/translation_behaviour_options.py +3 -2
- rapidata/rapidata_client/settings/mute_video.py +15 -0
- rapidata/rapidata_client/settings/no_shuffle.py +4 -2
- rapidata/rapidata_client/settings/play_video_until_the_end.py +7 -4
- rapidata/rapidata_client/settings/rapidata_settings.py +22 -9
- rapidata/rapidata_client/settings/swap_context_instruction.py +20 -0
- rapidata/rapidata_client/settings/translation_behaviour.py +7 -5
- rapidata/rapidata_client/utils/__init__.py +3 -0
- rapidata/rapidata_client/utils/threaded_uploader.py +153 -0
- rapidata/rapidata_client/validation/__init__.py +2 -0
- rapidata/rapidata_client/validation/rapidata_validation_set.py +68 -21
- rapidata/rapidata_client/validation/rapids/__init__.py +2 -0
- rapidata/rapidata_client/validation/rapids/_validation_rapid_uploader.py +48 -0
- rapidata/rapidata_client/validation/rapids/box.py +37 -12
- rapidata/rapidata_client/validation/rapids/rapids.py +28 -109
- rapidata/rapidata_client/validation/rapids/rapids_manager.py +369 -211
- rapidata/rapidata_client/validation/validation_set_manager.py +417 -294
- rapidata/rapidata_client/workflow/__init__.py +2 -2
- rapidata/rapidata_client/workflow/_base_workflow.py +17 -26
- rapidata/rapidata_client/workflow/_classify_workflow.py +44 -17
- rapidata/rapidata_client/workflow/_compare_workflow.py +33 -14
- rapidata/rapidata_client/workflow/_draw_workflow.py +35 -13
- rapidata/rapidata_client/workflow/_evaluation_workflow.py +20 -6
- rapidata/rapidata_client/workflow/_free_text_workflow.py +34 -15
- rapidata/rapidata_client/workflow/_locate_workflow.py +35 -13
- rapidata/rapidata_client/workflow/_multi_ranking_workflow.py +90 -0
- rapidata/rapidata_client/workflow/_select_words_workflow.py +38 -32
- rapidata/rapidata_client/workflow/_timestamp_workflow.py +35 -13
- rapidata/service/__init__.py +0 -1
- rapidata/service/credential_manager.py +1 -1
- rapidata/service/openapi_service.py +99 -23
- rapidata/types/__init__.py +149 -0
- rapidata-3.0.0a8.dist-info/METADATA +32 -0
- rapidata-3.0.0a8.dist-info/RECORD +1083 -0
- {rapidata-2.37.0.dist-info → rapidata-3.0.0a8.dist-info}/WHEEL +1 -1
- rapidata/rapidata_client/country_codes/__init__.py +0 -1
- rapidata/rapidata_client/country_codes/country_codes.py +0 -19
- rapidata/rapidata_client/datapoints/assets/_base_asset.py +0 -11
- rapidata/rapidata_client/datapoints/assets/_media_asset.py +0 -318
- rapidata/rapidata_client/datapoints/assets/_multi_asset.py +0 -61
- rapidata/rapidata_client/datapoints/assets/_sessions.py +0 -40
- rapidata/rapidata_client/datapoints/assets/_text_asset.py +0 -34
- rapidata/rapidata_client/datapoints/assets/data_type_enum.py +0 -8
- rapidata/rapidata_client/datapoints/metadata/_media_asset_metadata.py +0 -22
- rapidata/rapidata_client/datapoints/metadata/_prompt_metadata.py +0 -18
- rapidata/rapidata_client/logging/__init__.py +0 -2
- rapidata/rapidata_client/logging/logger.py +0 -122
- rapidata/rapidata_client/logging/output_manager.py +0 -20
- rapidata/rapidata_client/order/_rapidata_dataset.py +0 -447
- rapidata/rapidata_client/workflow/_ranking_workflow.py +0 -71
- rapidata/service/local_file_service.py +0 -25
- rapidata-2.37.0.dist-info/METADATA +0 -35
- rapidata-2.37.0.dist-info/RECORD +0 -687
- {rapidata-2.37.0.dist-info → rapidata-3.0.0a8.dist-info/licenses}/LICENSE +0 -0
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
class RapidataOutputManager:
|
|
2
|
-
"""Manages print outputs and progress bars for the Rapidata module."""
|
|
3
|
-
|
|
4
|
-
silent_mode: bool = False
|
|
5
|
-
|
|
6
|
-
@classmethod
|
|
7
|
-
def enable_silent_mode(cls) -> None:
|
|
8
|
-
"""Enable silent mode, suppressing all print outputs and progress bars, not logging."""
|
|
9
|
-
cls.silent_mode = True
|
|
10
|
-
|
|
11
|
-
@classmethod
|
|
12
|
-
def disable_silent_mode(cls) -> None:
|
|
13
|
-
"""Disable silent mode, allowing outputs to be printed.
|
|
14
|
-
This is the default behavior.
|
|
15
|
-
"""
|
|
16
|
-
cls.silent_mode = False
|
|
17
|
-
|
|
18
|
-
def managed_print(*args, **kwargs) -> None:
|
|
19
|
-
if not RapidataOutputManager.silent_mode:
|
|
20
|
-
print(*args, **kwargs)
|
|
@@ -1,447 +0,0 @@
|
|
|
1
|
-
from rapidata.rapidata_client.datapoints._datapoint import Datapoint
|
|
2
|
-
from rapidata.rapidata_client.datapoints.assets import TextAsset, MediaAsset
|
|
3
|
-
from rapidata.service import LocalFileService
|
|
4
|
-
from rapidata.service.openapi_service import OpenAPIService
|
|
5
|
-
from concurrent.futures import ThreadPoolExecutor, as_completed
|
|
6
|
-
from tqdm import tqdm
|
|
7
|
-
|
|
8
|
-
from typing import Generator
|
|
9
|
-
from rapidata.rapidata_client.logging import (
|
|
10
|
-
logger,
|
|
11
|
-
managed_print,
|
|
12
|
-
RapidataOutputManager,
|
|
13
|
-
)
|
|
14
|
-
import time
|
|
15
|
-
import threading
|
|
16
|
-
from rapidata.rapidata_client.api.rapidata_exception import (
|
|
17
|
-
suppress_rapidata_error_logging,
|
|
18
|
-
)
|
|
19
|
-
from rapidata.rapidata_client.config.rapidata_config import rapidata_config
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
def chunk_list(lst: list, chunk_size: int) -> Generator:
|
|
23
|
-
for i in range(0, len(lst), chunk_size):
|
|
24
|
-
yield lst[i : i + chunk_size]
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
class RapidataDataset:
|
|
28
|
-
def __init__(self, dataset_id: str, openapi_service: OpenAPIService):
|
|
29
|
-
self.id = dataset_id
|
|
30
|
-
self.openapi_service = openapi_service
|
|
31
|
-
self.local_file_service = LocalFileService()
|
|
32
|
-
|
|
33
|
-
def add_datapoints(
|
|
34
|
-
self,
|
|
35
|
-
datapoints: list[Datapoint],
|
|
36
|
-
) -> tuple[list[Datapoint], list[Datapoint]]:
|
|
37
|
-
if not datapoints:
|
|
38
|
-
return [], []
|
|
39
|
-
|
|
40
|
-
effective_asset_type = datapoints[0]._get_effective_asset_type()
|
|
41
|
-
|
|
42
|
-
logger.debug(f"Config for datapoint upload: {rapidata_config}")
|
|
43
|
-
|
|
44
|
-
if issubclass(effective_asset_type, MediaAsset):
|
|
45
|
-
return self._add_media_from_paths(
|
|
46
|
-
datapoints,
|
|
47
|
-
)
|
|
48
|
-
elif issubclass(effective_asset_type, TextAsset):
|
|
49
|
-
return self._add_texts(datapoints)
|
|
50
|
-
else:
|
|
51
|
-
raise ValueError(f"Unsupported asset type: {effective_asset_type}")
|
|
52
|
-
|
|
53
|
-
def _add_texts(
|
|
54
|
-
self, datapoints: list[Datapoint]
|
|
55
|
-
) -> tuple[list[Datapoint], list[Datapoint]]:
|
|
56
|
-
|
|
57
|
-
def upload_text_datapoint(datapoint: Datapoint, index: int) -> Datapoint:
|
|
58
|
-
model = datapoint.create_text_upload_model(index)
|
|
59
|
-
|
|
60
|
-
self.openapi_service.dataset_api.dataset_dataset_id_datapoints_texts_post(
|
|
61
|
-
dataset_id=self.id, create_datapoint_from_text_sources_model=model
|
|
62
|
-
)
|
|
63
|
-
return datapoint
|
|
64
|
-
|
|
65
|
-
successful_uploads: list[Datapoint] = []
|
|
66
|
-
failed_uploads: list[Datapoint] = []
|
|
67
|
-
|
|
68
|
-
total_uploads = len(datapoints)
|
|
69
|
-
with ThreadPoolExecutor(
|
|
70
|
-
max_workers=rapidata_config.maxUploadWorkers
|
|
71
|
-
) as executor:
|
|
72
|
-
future_to_datapoint = {
|
|
73
|
-
executor.submit(upload_text_datapoint, datapoint, index=i): datapoint
|
|
74
|
-
for i, datapoint in enumerate(datapoints)
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
with tqdm(
|
|
78
|
-
total=total_uploads,
|
|
79
|
-
desc="Uploading text datapoints",
|
|
80
|
-
disable=RapidataOutputManager.silent_mode,
|
|
81
|
-
) as pbar:
|
|
82
|
-
for future in as_completed(future_to_datapoint.keys()):
|
|
83
|
-
datapoint = future_to_datapoint[future]
|
|
84
|
-
try:
|
|
85
|
-
result = future.result()
|
|
86
|
-
pbar.update(1)
|
|
87
|
-
successful_uploads.append(result)
|
|
88
|
-
except Exception as e:
|
|
89
|
-
failed_uploads.append(datapoint)
|
|
90
|
-
logger.error("Upload failed for %s: %s", datapoint, str(e))
|
|
91
|
-
|
|
92
|
-
return successful_uploads, failed_uploads
|
|
93
|
-
|
|
94
|
-
def _process_single_upload(
|
|
95
|
-
self,
|
|
96
|
-
datapoint: Datapoint,
|
|
97
|
-
index: int,
|
|
98
|
-
) -> tuple[list[Datapoint], list[Datapoint]]:
|
|
99
|
-
"""
|
|
100
|
-
Process single upload with retry logic and error tracking.
|
|
101
|
-
|
|
102
|
-
Args:
|
|
103
|
-
media_asset: MediaAsset or MultiAsset to upload
|
|
104
|
-
meta_list: Optional sequence of metadata for the asset
|
|
105
|
-
index: Sort index for the upload
|
|
106
|
-
max_retries: Maximum number of retry attempts (default: 3)
|
|
107
|
-
|
|
108
|
-
Returns:
|
|
109
|
-
tuple[list[Datapoint], list[Datapoint]]: Lists of successful and failed datapoints
|
|
110
|
-
"""
|
|
111
|
-
logger.debug("Processing single upload for %s with index %s", datapoint, index)
|
|
112
|
-
|
|
113
|
-
local_successful: list[Datapoint] = []
|
|
114
|
-
local_failed: list[Datapoint] = []
|
|
115
|
-
|
|
116
|
-
metadata = datapoint.get_prepared_metadata()
|
|
117
|
-
|
|
118
|
-
local_paths = datapoint.get_local_file_paths()
|
|
119
|
-
urls = datapoint.get_urls()
|
|
120
|
-
|
|
121
|
-
last_exception = None
|
|
122
|
-
for attempt in range(rapidata_config.uploadMaxRetries):
|
|
123
|
-
try:
|
|
124
|
-
with suppress_rapidata_error_logging():
|
|
125
|
-
self.openapi_service.dataset_api.dataset_dataset_id_datapoints_post(
|
|
126
|
-
dataset_id=self.id,
|
|
127
|
-
file=local_paths,
|
|
128
|
-
url=urls,
|
|
129
|
-
metadata=metadata,
|
|
130
|
-
sort_index=index,
|
|
131
|
-
)
|
|
132
|
-
|
|
133
|
-
local_successful.append(datapoint)
|
|
134
|
-
|
|
135
|
-
return local_successful, local_failed
|
|
136
|
-
|
|
137
|
-
except Exception as e:
|
|
138
|
-
last_exception = e
|
|
139
|
-
if attempt < rapidata_config.uploadMaxRetries - 1:
|
|
140
|
-
# Exponential backoff: wait 1s, then 2s, then 4s
|
|
141
|
-
retry_delay = 2**attempt
|
|
142
|
-
time.sleep(retry_delay)
|
|
143
|
-
logger.debug("Error: %s", str(last_exception))
|
|
144
|
-
logger.debug(
|
|
145
|
-
"Retrying %s of %s...",
|
|
146
|
-
attempt + 1,
|
|
147
|
-
rapidata_config.uploadMaxRetries,
|
|
148
|
-
)
|
|
149
|
-
|
|
150
|
-
# If we get here, all retries failed
|
|
151
|
-
local_failed.append(datapoint)
|
|
152
|
-
tqdm.write(
|
|
153
|
-
f"Upload failed for {datapoint} after {rapidata_config.uploadMaxRetries} attempts. \nFinal error: \n{str(last_exception)}"
|
|
154
|
-
)
|
|
155
|
-
|
|
156
|
-
return local_successful, local_failed
|
|
157
|
-
|
|
158
|
-
def _get_progress_tracker(
|
|
159
|
-
self,
|
|
160
|
-
total_uploads: int,
|
|
161
|
-
stop_event: threading.Event,
|
|
162
|
-
progress_error_event: threading.Event,
|
|
163
|
-
progress_poll_interval: float,
|
|
164
|
-
) -> threading.Thread:
|
|
165
|
-
"""
|
|
166
|
-
Create and return a progress tracking thread that shows actual API progress.
|
|
167
|
-
|
|
168
|
-
Args:
|
|
169
|
-
total_uploads: Total number of uploads to track
|
|
170
|
-
initial_ready: Initial number of ready items
|
|
171
|
-
initial_progress: Initial progress state
|
|
172
|
-
stop_event: Event to signal thread to stop
|
|
173
|
-
progress_error_event: Event to signal an error in progress tracking
|
|
174
|
-
progress_poll_interval: Time between progress checks
|
|
175
|
-
|
|
176
|
-
Returns:
|
|
177
|
-
threading.Thread: The progress tracking thread
|
|
178
|
-
"""
|
|
179
|
-
|
|
180
|
-
def progress_tracking_thread():
|
|
181
|
-
try:
|
|
182
|
-
# Initialize progress bar with 0 completions
|
|
183
|
-
with tqdm(
|
|
184
|
-
total=total_uploads,
|
|
185
|
-
desc="Uploading datapoints",
|
|
186
|
-
disable=RapidataOutputManager.silent_mode,
|
|
187
|
-
) as pbar:
|
|
188
|
-
prev_ready = 0
|
|
189
|
-
prev_failed = 0
|
|
190
|
-
stall_count = 0
|
|
191
|
-
last_progress_time = time.time()
|
|
192
|
-
|
|
193
|
-
# We'll wait for all uploads to finish + some extra time
|
|
194
|
-
# for the backend to fully process everything
|
|
195
|
-
all_uploads_complete = threading.Event()
|
|
196
|
-
|
|
197
|
-
while not stop_event.is_set() or not all_uploads_complete.is_set():
|
|
198
|
-
try:
|
|
199
|
-
current_progress = self.openapi_service.dataset_api.dataset_dataset_id_progress_get(
|
|
200
|
-
self.id
|
|
201
|
-
)
|
|
202
|
-
|
|
203
|
-
# Calculate items completed since our initialization
|
|
204
|
-
completed_ready = current_progress.ready
|
|
205
|
-
completed_failed = current_progress.failed
|
|
206
|
-
total_completed = completed_ready + completed_failed
|
|
207
|
-
|
|
208
|
-
# Calculate newly completed items since our last check
|
|
209
|
-
new_ready = current_progress.ready - prev_ready
|
|
210
|
-
new_failed = current_progress.failed - prev_failed
|
|
211
|
-
|
|
212
|
-
# Update progress bar position to show actual completed items
|
|
213
|
-
# First reset to match the actual completed count
|
|
214
|
-
pbar.n = total_completed
|
|
215
|
-
pbar.refresh()
|
|
216
|
-
|
|
217
|
-
if new_ready > 0 or new_failed > 0:
|
|
218
|
-
# We saw progress
|
|
219
|
-
stall_count = 0
|
|
220
|
-
last_progress_time = time.time()
|
|
221
|
-
else:
|
|
222
|
-
stall_count += 1
|
|
223
|
-
|
|
224
|
-
# Update our tracking variables
|
|
225
|
-
prev_ready = current_progress.ready
|
|
226
|
-
prev_failed = current_progress.failed or 0
|
|
227
|
-
|
|
228
|
-
# Check if stop_event was set (all uploads submitted)
|
|
229
|
-
if stop_event.is_set():
|
|
230
|
-
elapsed_since_last_progress = (
|
|
231
|
-
time.time() - last_progress_time
|
|
232
|
-
)
|
|
233
|
-
|
|
234
|
-
# If we haven't seen progress for a while after all uploads were submitted
|
|
235
|
-
if elapsed_since_last_progress > 5.0:
|
|
236
|
-
# If we're at 100%, we're done
|
|
237
|
-
if total_completed >= total_uploads:
|
|
238
|
-
all_uploads_complete.set()
|
|
239
|
-
break
|
|
240
|
-
|
|
241
|
-
# If we're not at 100% but it's been a while with no progress
|
|
242
|
-
if stall_count > 5:
|
|
243
|
-
# We've polled several times with no progress, assume we're done
|
|
244
|
-
logger.warning(
|
|
245
|
-
"\nProgress seems stalled at %s/%s.",
|
|
246
|
-
total_completed,
|
|
247
|
-
total_uploads,
|
|
248
|
-
)
|
|
249
|
-
break
|
|
250
|
-
|
|
251
|
-
except Exception as e:
|
|
252
|
-
logger.error("\nError checking progress: %s", str(e))
|
|
253
|
-
stall_count += 1
|
|
254
|
-
|
|
255
|
-
if stall_count > 10: # Too many consecutive errors
|
|
256
|
-
progress_error_event.set()
|
|
257
|
-
break
|
|
258
|
-
|
|
259
|
-
# Sleep before next poll
|
|
260
|
-
time.sleep(progress_poll_interval)
|
|
261
|
-
|
|
262
|
-
except Exception as e:
|
|
263
|
-
logger.error("Progress tracking thread error: %s", str(e))
|
|
264
|
-
progress_error_event.set()
|
|
265
|
-
|
|
266
|
-
# Create and return the thread
|
|
267
|
-
progress_thread = threading.Thread(target=progress_tracking_thread)
|
|
268
|
-
progress_thread.daemon = True
|
|
269
|
-
return progress_thread
|
|
270
|
-
|
|
271
|
-
def _process_uploads_in_chunks(
|
|
272
|
-
self,
|
|
273
|
-
datapoints: list[Datapoint],
|
|
274
|
-
chunk_size: int,
|
|
275
|
-
stop_progress_tracking: threading.Event,
|
|
276
|
-
progress_tracking_error: threading.Event,
|
|
277
|
-
) -> tuple[list[Datapoint], list[Datapoint]]:
|
|
278
|
-
"""
|
|
279
|
-
Process uploads in chunks with a ThreadPoolExecutor.
|
|
280
|
-
|
|
281
|
-
Args:
|
|
282
|
-
media_paths: List of assets to upload
|
|
283
|
-
multi_metadata: Optional sequence of sequences of metadata
|
|
284
|
-
chunk_size: Number of items to process in each batch
|
|
285
|
-
stop_progress_tracking: Event to signal progress tracking to stop
|
|
286
|
-
progress_tracking_error: Event to detect progress tracking errors
|
|
287
|
-
|
|
288
|
-
Returns:
|
|
289
|
-
tuple[list[str], list[str]]: Lists of successful and failed uploads
|
|
290
|
-
"""
|
|
291
|
-
successful_uploads: list[Datapoint] = []
|
|
292
|
-
failed_uploads: list[Datapoint] = []
|
|
293
|
-
|
|
294
|
-
try:
|
|
295
|
-
with ThreadPoolExecutor(
|
|
296
|
-
max_workers=rapidata_config.maxUploadWorkers
|
|
297
|
-
) as executor:
|
|
298
|
-
# Process uploads in chunks to avoid overwhelming the system
|
|
299
|
-
for chunk_idx, chunk in enumerate(chunk_list(datapoints, chunk_size)):
|
|
300
|
-
futures = [
|
|
301
|
-
executor.submit(
|
|
302
|
-
self._process_single_upload,
|
|
303
|
-
datapoint,
|
|
304
|
-
index=(chunk_idx * chunk_size + i),
|
|
305
|
-
)
|
|
306
|
-
for i, datapoint in enumerate(chunk)
|
|
307
|
-
]
|
|
308
|
-
|
|
309
|
-
# Wait for this chunk to complete before starting the next one
|
|
310
|
-
for future in as_completed(futures):
|
|
311
|
-
if progress_tracking_error.is_set():
|
|
312
|
-
raise RuntimeError(
|
|
313
|
-
"Progress tracking failed, aborting uploads"
|
|
314
|
-
)
|
|
315
|
-
|
|
316
|
-
try:
|
|
317
|
-
chunk_successful, chunk_failed = future.result()
|
|
318
|
-
successful_uploads.extend(chunk_successful)
|
|
319
|
-
failed_uploads.extend(chunk_failed)
|
|
320
|
-
except Exception as e:
|
|
321
|
-
logger.error("Future execution failed: %s", str(e))
|
|
322
|
-
finally:
|
|
323
|
-
# Signal to the progress tracking thread that all uploads have been submitted
|
|
324
|
-
stop_progress_tracking.set()
|
|
325
|
-
|
|
326
|
-
return successful_uploads, failed_uploads
|
|
327
|
-
|
|
328
|
-
def _log_final_progress(
|
|
329
|
-
self,
|
|
330
|
-
total_uploads: int,
|
|
331
|
-
progress_poll_interval: float,
|
|
332
|
-
successful_uploads: list[Datapoint],
|
|
333
|
-
failed_uploads: list[Datapoint],
|
|
334
|
-
) -> None:
|
|
335
|
-
"""
|
|
336
|
-
Log the final progress of the upload operation.
|
|
337
|
-
|
|
338
|
-
Args:
|
|
339
|
-
total_uploads: Total number of uploads
|
|
340
|
-
initial_ready: Initial number of ready items
|
|
341
|
-
initial_progress: Initial progress state
|
|
342
|
-
progress_poll_interval: Time between progress checks
|
|
343
|
-
successful_uploads: List of successful uploads for fallback reporting
|
|
344
|
-
failed_uploads: List of failed uploads for fallback reporting
|
|
345
|
-
"""
|
|
346
|
-
try:
|
|
347
|
-
# Get final progress
|
|
348
|
-
final_progress = (
|
|
349
|
-
self.openapi_service.dataset_api.dataset_dataset_id_progress_get(
|
|
350
|
-
self.id
|
|
351
|
-
)
|
|
352
|
-
)
|
|
353
|
-
total_ready = final_progress.ready
|
|
354
|
-
total_failed = final_progress.failed
|
|
355
|
-
|
|
356
|
-
# Make sure we account for all uploads
|
|
357
|
-
if total_ready + total_failed < total_uploads:
|
|
358
|
-
# Try one more time after a longer wait
|
|
359
|
-
time.sleep(5 * progress_poll_interval)
|
|
360
|
-
final_progress = (
|
|
361
|
-
self.openapi_service.dataset_api.dataset_dataset_id_progress_get(
|
|
362
|
-
self.id
|
|
363
|
-
)
|
|
364
|
-
)
|
|
365
|
-
total_ready = final_progress.ready
|
|
366
|
-
total_failed = final_progress.failed
|
|
367
|
-
|
|
368
|
-
success_rate = (
|
|
369
|
-
(total_ready / total_uploads * 100) if total_uploads > 0 else 0
|
|
370
|
-
)
|
|
371
|
-
|
|
372
|
-
logger.info(
|
|
373
|
-
"Upload complete: %s ready, %s failed (%s%% success rate)",
|
|
374
|
-
total_ready,
|
|
375
|
-
total_uploads - total_ready,
|
|
376
|
-
success_rate,
|
|
377
|
-
)
|
|
378
|
-
except Exception as e:
|
|
379
|
-
logger.error("Error getting final progress: %s", str(e))
|
|
380
|
-
logger.info(
|
|
381
|
-
"Upload summary from local tracking: %s succeeded, %s failed",
|
|
382
|
-
len(successful_uploads),
|
|
383
|
-
len(failed_uploads),
|
|
384
|
-
)
|
|
385
|
-
|
|
386
|
-
if failed_uploads:
|
|
387
|
-
logger.error("Failed uploads: %s", failed_uploads)
|
|
388
|
-
|
|
389
|
-
def _add_media_from_paths(
|
|
390
|
-
self,
|
|
391
|
-
datapoints: list[Datapoint],
|
|
392
|
-
chunk_size: int = 50,
|
|
393
|
-
progress_poll_interval: float = 0.5,
|
|
394
|
-
) -> tuple[list[Datapoint], list[Datapoint]]:
|
|
395
|
-
"""
|
|
396
|
-
Upload media paths in chunks with managed resources.
|
|
397
|
-
|
|
398
|
-
Args:
|
|
399
|
-
datapoints: List of Datapoint objects to upload
|
|
400
|
-
chunk_size: Number of items to process in each batch
|
|
401
|
-
progress_poll_interval: Time in seconds between progress checks
|
|
402
|
-
Returns:
|
|
403
|
-
tuple[list[Datapoint], list[Datapoint]]: Lists of successful and failed datapoints
|
|
404
|
-
|
|
405
|
-
Raises:
|
|
406
|
-
ValueError: If multi_metadata lengths don't match media_paths length
|
|
407
|
-
"""
|
|
408
|
-
|
|
409
|
-
# Setup tracking variables
|
|
410
|
-
total_uploads = len(datapoints)
|
|
411
|
-
|
|
412
|
-
# Create thread control events
|
|
413
|
-
stop_progress_tracking = threading.Event()
|
|
414
|
-
progress_tracking_error = threading.Event()
|
|
415
|
-
|
|
416
|
-
# Create and start progress tracking thread
|
|
417
|
-
progress_thread = self._get_progress_tracker(
|
|
418
|
-
total_uploads,
|
|
419
|
-
stop_progress_tracking,
|
|
420
|
-
progress_tracking_error,
|
|
421
|
-
progress_poll_interval,
|
|
422
|
-
)
|
|
423
|
-
progress_thread.start()
|
|
424
|
-
|
|
425
|
-
# Process uploads in chunks
|
|
426
|
-
try:
|
|
427
|
-
successful_uploads, failed_uploads = self._process_uploads_in_chunks(
|
|
428
|
-
datapoints,
|
|
429
|
-
chunk_size,
|
|
430
|
-
stop_progress_tracking,
|
|
431
|
-
progress_tracking_error,
|
|
432
|
-
)
|
|
433
|
-
finally:
|
|
434
|
-
progress_thread.join(10) # Add margin to the timeout for tqdm
|
|
435
|
-
|
|
436
|
-
# Log final progress
|
|
437
|
-
self._log_final_progress(
|
|
438
|
-
total_uploads, progress_poll_interval, successful_uploads, failed_uploads
|
|
439
|
-
)
|
|
440
|
-
|
|
441
|
-
return successful_uploads, failed_uploads
|
|
442
|
-
|
|
443
|
-
def __str__(self) -> str:
|
|
444
|
-
return f"RapidataDataset(id={self.id})"
|
|
445
|
-
|
|
446
|
-
def __repr__(self) -> str:
|
|
447
|
-
return self.__str__()
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
from rapidata.api_client import (
|
|
2
|
-
CompareWorkflowModelPairMakerConfig,
|
|
3
|
-
OnlinePairMakerConfigModel,
|
|
4
|
-
EloConfigModel,
|
|
5
|
-
)
|
|
6
|
-
from rapidata.api_client.models.compare_workflow_model import CompareWorkflowModel
|
|
7
|
-
from rapidata.rapidata_client.workflow._base_workflow import Workflow
|
|
8
|
-
from rapidata.rapidata_client.datapoints.metadata import PromptMetadata
|
|
9
|
-
from rapidata.api_client.models.dataset_dataset_id_datapoints_post_request_metadata_inner import (
|
|
10
|
-
DatasetDatasetIdDatapointsPostRequestMetadataInner,
|
|
11
|
-
)
|
|
12
|
-
from rapidata.api_client import ComparePayload
|
|
13
|
-
from rapidata.rapidata_client.datapoints._datapoint import Datapoint
|
|
14
|
-
from rapidata.api_client.models.rapid_modality import RapidModality
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
class RankingWorkflow(Workflow):
|
|
18
|
-
modality = RapidModality.COMPARE
|
|
19
|
-
|
|
20
|
-
def __init__(
|
|
21
|
-
self,
|
|
22
|
-
criteria: str,
|
|
23
|
-
total_comparison_budget: int,
|
|
24
|
-
random_comparisons_ratio,
|
|
25
|
-
elo_start: int = 1200,
|
|
26
|
-
elo_k_factor: int = 40,
|
|
27
|
-
elo_scaling_factor: int = 400,
|
|
28
|
-
context: str | None = None,
|
|
29
|
-
):
|
|
30
|
-
super().__init__(type="CompareWorkflowConfig")
|
|
31
|
-
|
|
32
|
-
self.context = (
|
|
33
|
-
[
|
|
34
|
-
DatasetDatasetIdDatapointsPostRequestMetadataInner(
|
|
35
|
-
PromptMetadata(context).to_model()
|
|
36
|
-
)
|
|
37
|
-
]
|
|
38
|
-
if context
|
|
39
|
-
else None
|
|
40
|
-
)
|
|
41
|
-
|
|
42
|
-
self.criteria = criteria
|
|
43
|
-
self.pair_maker_config = CompareWorkflowModelPairMakerConfig(
|
|
44
|
-
OnlinePairMakerConfigModel(
|
|
45
|
-
_t="OnlinePairMaker",
|
|
46
|
-
totalComparisonBudget=total_comparison_budget,
|
|
47
|
-
randomMatchesRatio=random_comparisons_ratio,
|
|
48
|
-
)
|
|
49
|
-
)
|
|
50
|
-
|
|
51
|
-
self.elo_config = EloConfigModel(
|
|
52
|
-
startingElo=elo_start,
|
|
53
|
-
kFactor=elo_k_factor,
|
|
54
|
-
scalingFactor=elo_scaling_factor,
|
|
55
|
-
)
|
|
56
|
-
|
|
57
|
-
def _to_model(self) -> CompareWorkflowModel:
|
|
58
|
-
|
|
59
|
-
return CompareWorkflowModel(
|
|
60
|
-
_t="CompareWorkflow",
|
|
61
|
-
criteria=self.criteria,
|
|
62
|
-
eloConfig=self.elo_config,
|
|
63
|
-
pairMakerConfig=self.pair_maker_config,
|
|
64
|
-
metadata=self.context,
|
|
65
|
-
)
|
|
66
|
-
|
|
67
|
-
def _to_payload(self, datapoint: Datapoint) -> ComparePayload:
|
|
68
|
-
return ComparePayload(
|
|
69
|
-
_t="ComparePayload",
|
|
70
|
-
criteria=self.criteria,
|
|
71
|
-
)
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import os
|
|
2
|
-
from PIL import Image
|
|
3
|
-
|
|
4
|
-
class LocalFileService:
|
|
5
|
-
|
|
6
|
-
def load_image(self, image_path: str) -> Image.Image:
|
|
7
|
-
self.check_file_exists(image_path)
|
|
8
|
-
return Image.open(image_path)
|
|
9
|
-
|
|
10
|
-
def load_images(self, image_paths: list[str]) -> list[Image.Image]:
|
|
11
|
-
return [self.load_image(image_path) for image_path in image_paths]
|
|
12
|
-
|
|
13
|
-
def load_video(self, video_path: str):
|
|
14
|
-
self.check_file_exists(video_path)
|
|
15
|
-
return open(video_path, 'rb')
|
|
16
|
-
|
|
17
|
-
def load_videos(self, video_paths: list[str]):
|
|
18
|
-
return [self.load_video(video_path) for video_path in video_paths]
|
|
19
|
-
|
|
20
|
-
def _file_exists(self, file_path: str) -> bool:
|
|
21
|
-
return os.path.exists(file_path)
|
|
22
|
-
|
|
23
|
-
def check_file_exists(self, file_path: str):
|
|
24
|
-
if not self._file_exists(file_path):
|
|
25
|
-
raise FileNotFoundError(f"File {file_path} not found.")
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.3
|
|
2
|
-
Name: rapidata
|
|
3
|
-
Version: 2.37.0
|
|
4
|
-
Summary: Rapidata package containing the Rapidata Python Client to interact with the Rapidata Web API in an easy way.
|
|
5
|
-
License: Apache-2.0
|
|
6
|
-
Author: Rapidata AG
|
|
7
|
-
Author-email: info@rapidata.ai
|
|
8
|
-
Requires-Python: >=3.10,<4.0
|
|
9
|
-
Classifier: License :: OSI Approved :: Apache Software License
|
|
10
|
-
Classifier: Programming Language :: Python :: 3
|
|
11
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
15
|
-
Requires-Dist: authlib (>=1.5.1,<2.0.0)
|
|
16
|
-
Requires-Dist: colorama (==0.4.6)
|
|
17
|
-
Requires-Dist: deprecated (>=1.2.14,<2.0.0)
|
|
18
|
-
Requires-Dist: httpx (>=0.28.1,<0.29.0)
|
|
19
|
-
Requires-Dist: packaging (>=16.0.0)
|
|
20
|
-
Requires-Dist: pandas (>=2.2.3,<3.0.0)
|
|
21
|
-
Requires-Dist: pillow (>=10.4.0,<11.0.0)
|
|
22
|
-
Requires-Dist: pydantic (>=2.8.2,<3.0.0)
|
|
23
|
-
Requires-Dist: pyjwt (>=2.9.0,<3.0.0)
|
|
24
|
-
Requires-Dist: python-dateutil (>=2.9.0.post0,<3.0.0)
|
|
25
|
-
Requires-Dist: requests (>=2.32.3,<3.0.0)
|
|
26
|
-
Requires-Dist: tinytag (>=2.0.0,<3.0.0)
|
|
27
|
-
Requires-Dist: tqdm (>=4.66.5,<5.0.0)
|
|
28
|
-
Description-Content-Type: text/markdown
|
|
29
|
-
|
|
30
|
-
# Rapidata Python Client
|
|
31
|
-
|
|
32
|
-
Python client to interface with the Rapidata API.
|
|
33
|
-
|
|
34
|
-
Docs: https://docs.rapidata.ai/
|
|
35
|
-
|