rapidata 2.23.2__py3-none-any.whl → 3.0.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of rapidata might be problematic. Click here for more details.

Files changed (865) hide show
  1. rapidata/__init__.py +31 -14
  2. rapidata/api_client/__init__.py +84 -312
  3. rapidata/api_client/api/__init__.py +12 -3
  4. rapidata/api_client/api/asset_api.py +853 -0
  5. rapidata/api_client/api/audience_api.py +3044 -0
  6. rapidata/api_client/api/benchmark_api.py +4307 -0
  7. rapidata/api_client/api/campaign_api.py +232 -207
  8. rapidata/api_client/api/client_api.py +166 -145
  9. rapidata/api_client/api/coco_api.py +0 -571
  10. rapidata/api_client/api/compare_workflow_api.py +11 -10
  11. rapidata/api_client/api/customer_rapid_api.py +2216 -0
  12. rapidata/api_client/api/datapoint_api.py +8 -797
  13. rapidata/api_client/api/dataset_api.py +276 -2858
  14. rapidata/api_client/api/evaluation_workflow_api.py +29 -82
  15. rapidata/api_client/api/feedback_api.py +11 -281
  16. rapidata/api_client/api/grouped_ranking_workflow_api.py +319 -0
  17. rapidata/api_client/api/identity_api.py +83 -1171
  18. rapidata/api_client/api/job_api.py +4200 -0
  19. rapidata/api_client/api/job_definition_api.py +319 -0
  20. rapidata/api_client/api/job_revision_api.py +335 -0
  21. rapidata/api_client/api/leaderboard_api.py +2855 -0
  22. rapidata/api_client/api/newsletter_api.py +30 -317
  23. rapidata/api_client/api/order_api.py +758 -5487
  24. rapidata/api_client/api/participant_api.py +2181 -0
  25. rapidata/api_client/api/pipeline_api.py +24 -1783
  26. rapidata/api_client/api/prompt_api.py +320 -0
  27. rapidata/api_client/api/rapidata_identity_api_api.py +5 -4
  28. rapidata/api_client/api/sample_api.py +300 -0
  29. rapidata/api_client/api/simple_workflow_api.py +11 -10
  30. rapidata/api_client/api/survey_api.py +304 -0
  31. rapidata/api_client/api/user_rapid_api.py +1389 -0
  32. rapidata/api_client/api/validation_set_api.py +510 -3230
  33. rapidata/api_client/api/workflow_api.py +32 -825
  34. rapidata/api_client/api_client.py +2 -2
  35. rapidata/api_client/configuration.py +16 -29
  36. rapidata/api_client/exceptions.py +2 -2
  37. rapidata/api_client/models/__init__.py +65 -291
  38. rapidata/api_client/models/ab_test_selection_a_inner.py +27 -13
  39. rapidata/api_client/models/add_campaign_model.py +8 -3
  40. rapidata/api_client/models/add_rapid_to_audience_model.py +144 -0
  41. rapidata/api_client/models/add_user_response_result.py +10 -5
  42. rapidata/api_client/models/add_validation_rapid_model.py +49 -28
  43. rapidata/api_client/models/add_validation_rapid_model_asset.py +154 -0
  44. rapidata/api_client/models/add_validation_rapid_model_context_asset.py +160 -0
  45. rapidata/api_client/models/add_validation_rapid_model_metadata_inner.py +140 -0
  46. rapidata/api_client/models/add_validation_rapid_model_truth.py +32 -12
  47. rapidata/api_client/models/add_validation_rapid_new_model.py +137 -0
  48. rapidata/api_client/models/add_validation_rapid_new_model_asset.py +182 -0
  49. rapidata/api_client/models/add_validation_rapid_new_model_truth.py +286 -0
  50. rapidata/api_client/models/add_validation_text_rapid_model.py +4 -6
  51. rapidata/api_client/models/age_user_filter_model.py +2 -2
  52. rapidata/api_client/models/age_user_filter_model_age_group.py +41 -0
  53. rapidata/api_client/models/aggregated_orders_model.py +98 -0
  54. rapidata/api_client/models/aggregator_type.py +4 -2
  55. rapidata/api_client/models/and_filter.py +121 -0
  56. rapidata/api_client/models/and_filter_filters_inner.py +282 -0
  57. rapidata/api_client/models/and_user_filter_model.py +106 -0
  58. rapidata/api_client/models/and_user_filter_model_filters_inner.py +282 -0
  59. rapidata/api_client/models/are_rapids_active_result.py +2 -2
  60. rapidata/api_client/models/asset_metadata.py +106 -0
  61. rapidata/api_client/models/asset_metadata_asset.py +170 -0
  62. rapidata/api_client/models/asset_metadata_model.py +96 -0
  63. rapidata/api_client/models/asset_metadata_model_asset.py +170 -0
  64. rapidata/api_client/models/asset_type.py +40 -0
  65. rapidata/api_client/models/attach_category_rapid_blueprint.py +13 -3
  66. rapidata/api_client/models/attach_category_rapid_blueprint_category.py +89 -0
  67. rapidata/api_client/models/audience_job_state.py +38 -0
  68. rapidata/api_client/models/audience_status.py +39 -0
  69. rapidata/api_client/models/benchmark_query_result.py +98 -0
  70. rapidata/api_client/models/benchmark_query_result_paged_result.py +105 -0
  71. rapidata/api_client/models/boost_leaderboard_model.py +89 -0
  72. rapidata/api_client/models/boost_mode.py +37 -0
  73. rapidata/api_client/models/boost_query_result.py +97 -0
  74. rapidata/api_client/models/boost_query_result_boost_mode.py +37 -0
  75. rapidata/api_client/models/boost_query_result_boost_status.py +39 -0
  76. rapidata/api_client/models/boost_status.py +39 -0
  77. rapidata/api_client/models/boosting_profile.py +91 -0
  78. rapidata/api_client/models/box_shape.py +4 -33
  79. rapidata/api_client/models/campaign_filter.py +98 -0
  80. rapidata/api_client/models/campaign_query_result.py +15 -13
  81. rapidata/api_client/models/campaign_status.py +2 -2
  82. rapidata/api_client/models/change_boost_model.py +89 -0
  83. rapidata/api_client/models/classification_metadata.py +12 -1
  84. rapidata/api_client/models/classify_payload.py +14 -15
  85. rapidata/api_client/models/classify_payload_category.py +89 -0
  86. rapidata/api_client/models/client_model.py +181 -0
  87. rapidata/api_client/models/clients_query_result.py +5 -5
  88. rapidata/api_client/models/clone_order_model.py +6 -8
  89. rapidata/api_client/models/clone_order_result.py +9 -4
  90. rapidata/api_client/models/compare_rapid_blueprint.py +5 -3
  91. rapidata/api_client/models/compare_rapid_blueprint1.py +96 -0
  92. rapidata/api_client/models/compare_result.py +1 -10
  93. rapidata/api_client/models/compare_workflow_config.py +34 -23
  94. rapidata/api_client/models/compare_workflow_config_context_asset.py +174 -0
  95. rapidata/api_client/models/compare_workflow_config_metadata_value.py +75 -17
  96. rapidata/api_client/models/compare_workflow_config_model.py +15 -5
  97. rapidata/api_client/models/compare_workflow_model.py +34 -6
  98. rapidata/api_client/models/compare_workflow_model1.py +20 -9
  99. rapidata/api_client/models/compare_workflow_model_context_asset.py +160 -0
  100. rapidata/api_client/models/compare_workflow_model_metadata_inner.py +154 -0
  101. rapidata/api_client/models/compare_workflow_model_pair_maker_config.py +1 -1
  102. rapidata/api_client/models/comparison_operator.py +2 -2
  103. rapidata/api_client/models/conditional_validation_selection.py +8 -11
  104. rapidata/api_client/models/conditional_validation_selection_validation_chance.py +103 -0
  105. rapidata/api_client/models/confidence_interval.py +89 -0
  106. rapidata/api_client/models/count_metadata.py +12 -1
  107. rapidata/api_client/models/country_filter.py +98 -0
  108. rapidata/api_client/models/create_audience_request.py +122 -0
  109. rapidata/api_client/models/create_audience_result.py +87 -0
  110. rapidata/api_client/models/create_benchmark_model.py +87 -0
  111. rapidata/api_client/models/create_benchmark_participant_model.py +87 -0
  112. rapidata/api_client/models/create_benchmark_participant_result.py +89 -0
  113. rapidata/api_client/models/create_benchmark_prompt_result.py +87 -0
  114. rapidata/api_client/models/create_benchmark_result.py +87 -0
  115. rapidata/api_client/models/create_bridge_token_result.py +2 -2
  116. rapidata/api_client/models/create_client_model.py +6 -13
  117. rapidata/api_client/models/create_complex_order_model.py +9 -9
  118. rapidata/api_client/models/create_complex_order_result.py +6 -4
  119. rapidata/api_client/models/create_customer_client_result.py +89 -0
  120. rapidata/api_client/models/create_datapoint_from_files_model_metadata_inner.py +25 -11
  121. rapidata/api_client/models/create_datapoint_model.py +124 -0
  122. rapidata/api_client/models/create_datapoint_model_asset.py +154 -0
  123. rapidata/api_client/models/create_datapoint_model_context_asset.py +160 -0
  124. rapidata/api_client/models/create_datapoint_model_metadata_inner.py +154 -0
  125. rapidata/api_client/models/create_datapoint_result.py +6 -18
  126. rapidata/api_client/models/create_dataset_endpoint_input.py +87 -0
  127. rapidata/api_client/models/create_dataset_endpoint_output.py +87 -0
  128. rapidata/api_client/models/create_demographic_rapid_model.py +45 -7
  129. rapidata/api_client/models/create_demographic_rapid_model_asset.py +160 -0
  130. rapidata/api_client/models/create_demographic_rapid_model_context_asset.py +160 -0
  131. rapidata/api_client/models/create_demographic_rapid_model_new.py +119 -0
  132. rapidata/api_client/models/create_empty_validation_set_result.py +2 -2
  133. rapidata/api_client/models/create_job_definition_endpoint_input.py +119 -0
  134. rapidata/api_client/models/create_job_definition_endpoint_output.py +89 -0
  135. rapidata/api_client/models/create_job_endpoint_input.py +100 -0
  136. rapidata/api_client/models/create_job_endpoint_output.py +89 -0
  137. rapidata/api_client/models/create_job_revision_endpoint_input.py +127 -0
  138. rapidata/api_client/models/create_job_revision_endpoint_output.py +89 -0
  139. rapidata/api_client/models/create_leaderboard_model.py +147 -0
  140. rapidata/api_client/models/create_leaderboard_participant_model.py +87 -0
  141. rapidata/api_client/models/create_leaderboard_participant_result.py +89 -0
  142. rapidata/api_client/models/create_leaderboard_result.py +99 -0
  143. rapidata/api_client/models/create_order_definition_model.py +119 -0
  144. rapidata/api_client/models/create_order_definition_result.py +87 -0
  145. rapidata/api_client/models/create_order_definition_revision_model.py +117 -0
  146. rapidata/api_client/models/create_order_definition_revision_result.py +87 -0
  147. rapidata/api_client/models/create_order_model.py +30 -103
  148. rapidata/api_client/models/create_order_model_referee.py +12 -12
  149. rapidata/api_client/models/create_order_model_workflow.py +35 -21
  150. rapidata/api_client/models/create_order_result.py +6 -4
  151. rapidata/api_client/models/create_rapid_result.py +2 -2
  152. rapidata/api_client/models/create_sample_model.py +93 -0
  153. rapidata/api_client/models/create_sample_model_asset.py +154 -0
  154. rapidata/api_client/models/create_sample_model_obsolete.py +87 -0
  155. rapidata/api_client/models/create_simple_pipeline_model_pipeline_steps_inner.py +8 -22
  156. rapidata/api_client/models/create_unsupported_order_model.py +6 -6
  157. rapidata/api_client/models/create_validation_set_model.py +5 -5
  158. rapidata/api_client/models/datapoint_metadata_model.py +3 -3
  159. rapidata/api_client/models/datapoint_model.py +3 -3
  160. rapidata/api_client/models/datapoint_model_paged_result.py +105 -0
  161. rapidata/api_client/models/datapoint_state.py +2 -2
  162. rapidata/api_client/models/dataset_dataset_id_datapoints_post_request_metadata_inner.py +182 -0
  163. rapidata/api_client/models/definition_type.py +49 -0
  164. rapidata/api_client/models/demographic_filter.py +100 -0
  165. rapidata/api_client/models/dynamic_client_registration_request.py +160 -0
  166. rapidata/api_client/models/early_stopping_referee_model.py +3 -3
  167. rapidata/api_client/models/effort_capped_selection.py +106 -0
  168. rapidata/api_client/models/elo_config.py +2 -2
  169. rapidata/api_client/models/elo_config_model.py +6 -6
  170. rapidata/api_client/models/entity_tag_header_value.py +93 -0
  171. rapidata/api_client/models/evaluation_workflow_config.py +13 -3
  172. rapidata/api_client/models/evaluation_workflow_model.py +16 -6
  173. rapidata/api_client/models/existing_asset_input.py +109 -0
  174. rapidata/api_client/models/existing_asset_input_metadata_value.py +126 -0
  175. rapidata/api_client/models/feature_flag.py +2 -2
  176. rapidata/api_client/models/feature_flag_model.py +6 -6
  177. rapidata/api_client/models/feedback_model.py +7 -7
  178. rapidata/api_client/models/file_asset.py +15 -12
  179. rapidata/api_client/models/file_asset_input.py +104 -0
  180. rapidata/api_client/models/file_asset_input1.py +104 -0
  181. rapidata/api_client/models/file_asset_input1_file.py +168 -0
  182. rapidata/api_client/models/file_asset_input2.py +104 -0
  183. rapidata/api_client/models/file_asset_input3.py +104 -0
  184. rapidata/api_client/models/file_asset_input_file.py +168 -0
  185. rapidata/api_client/models/file_asset_metadata_value.py +252 -0
  186. rapidata/api_client/models/file_asset_model_metadata_value.py +37 -51
  187. rapidata/api_client/models/file_stream_result.py +122 -0
  188. rapidata/api_client/models/file_type.py +39 -0
  189. rapidata/api_client/models/file_type_metadata.py +110 -0
  190. rapidata/api_client/models/file_type_metadata_model.py +97 -0
  191. rapidata/api_client/models/filter.py +7 -25
  192. rapidata/api_client/models/filter_operator.py +3 -2
  193. rapidata/api_client/models/fork_benchmark_result.py +87 -0
  194. rapidata/api_client/models/form_file_wrapper.py +135 -0
  195. rapidata/api_client/models/free_text_payload.py +10 -3
  196. rapidata/api_client/models/free_text_rapid_blueprint.py +10 -3
  197. rapidata/api_client/models/gender_user_filter_model.py +2 -2
  198. rapidata/api_client/models/gender_user_filter_model_gender.py +38 -0
  199. rapidata/api_client/models/get_asset_metadata_result.py +100 -0
  200. rapidata/api_client/models/get_audience_by_id_result.py +118 -0
  201. rapidata/api_client/models/get_audience_user_state_metrics_result.py +87 -0
  202. rapidata/api_client/models/get_available_validation_sets_result.py +2 -2
  203. rapidata/api_client/models/get_benchmark_by_id_query.py +96 -0
  204. rapidata/api_client/models/get_benchmark_by_id_query_result.py +94 -0
  205. rapidata/api_client/models/get_benchmark_by_id_query_result_paged_result.py +105 -0
  206. rapidata/api_client/models/get_benchmark_by_id_result.py +98 -0
  207. rapidata/api_client/models/get_boost_result.py +97 -0
  208. rapidata/api_client/models/get_boost_result_boost_mode.py +37 -0
  209. rapidata/api_client/models/get_boost_result_boost_status.py +39 -0
  210. rapidata/api_client/models/get_compare_ab_summary_result.py +5 -5
  211. rapidata/api_client/models/get_compare_workflow_results_model.py +7 -7
  212. rapidata/api_client/models/get_compare_workflow_results_result.py +5 -5
  213. rapidata/api_client/models/get_datapoint_by_id_result.py +10 -21
  214. rapidata/api_client/models/get_datapoint_by_id_result_asset.py +170 -0
  215. rapidata/api_client/models/get_dataset_by_id_result.py +2 -2
  216. rapidata/api_client/models/get_dataset_progress_result.py +2 -2
  217. rapidata/api_client/models/get_evaluation_workflow_results_model.py +119 -0
  218. rapidata/api_client/models/get_failed_datapoints_result.py +5 -5
  219. rapidata/api_client/models/get_failed_datapoints_result_datapoint.py +100 -0
  220. rapidata/api_client/models/get_file_metadata_result.py +100 -0
  221. rapidata/api_client/models/get_grouped_ranking_workflow_results_model.py +106 -0
  222. rapidata/api_client/models/get_grouped_ranking_workflow_results_result.py +97 -0
  223. rapidata/api_client/models/get_grouped_ranking_workflow_results_result_paged_result.py +105 -0
  224. rapidata/api_client/models/get_job_by_id_endpoint_output.py +130 -0
  225. rapidata/api_client/models/get_job_definition_by_id_endpoint_output.py +95 -0
  226. rapidata/api_client/models/get_job_revision_endpoint_output.py +133 -0
  227. rapidata/api_client/models/get_leaderboard_by_id_result.py +135 -0
  228. rapidata/api_client/models/get_order_by_id_result.py +12 -5
  229. rapidata/api_client/models/get_participant_by_id_result.py +91 -0
  230. rapidata/api_client/models/get_pipeline_by_id_result.py +5 -5
  231. rapidata/api_client/models/get_public_orders_result.py +2 -2
  232. rapidata/api_client/models/get_public_responses_result.py +95 -0
  233. rapidata/api_client/models/get_public_responses_result_response.py +112 -0
  234. rapidata/api_client/models/get_rapid_responses_result.py +6 -12
  235. rapidata/api_client/models/get_recommended_validation_set_result.py +95 -0
  236. rapidata/api_client/models/get_responses_for_rapid_result.py +106 -0
  237. rapidata/api_client/models/get_responses_for_rapid_result_response.py +103 -0
  238. rapidata/api_client/models/get_responses_for_rapid_result_response_result.py +266 -0
  239. rapidata/api_client/models/get_responses_result.py +5 -5
  240. rapidata/api_client/models/get_responses_result_response.py +103 -0
  241. rapidata/api_client/models/get_sample_by_id_result.py +125 -0
  242. rapidata/api_client/models/get_simple_workflow_results_model.py +20 -15
  243. rapidata/api_client/models/get_standing_by_id_result.py +96 -0
  244. rapidata/api_client/models/get_validation_rapids_result.py +33 -33
  245. rapidata/api_client/models/get_validation_rapids_result_truth.py +25 -11
  246. rapidata/api_client/models/get_validation_set_by_id_result.py +10 -4
  247. rapidata/api_client/models/get_workflow_by_id_result.py +5 -5
  248. rapidata/api_client/models/get_workflow_by_id_result_workflow.py +23 -9
  249. rapidata/api_client/models/get_workflow_progress_result.py +5 -11
  250. rapidata/api_client/models/get_workflow_results_result.py +34 -23
  251. rapidata/api_client/models/get_workflow_results_result_response.py +103 -0
  252. rapidata/api_client/models/google_one_tap_login_model.py +4 -4
  253. rapidata/api_client/models/grouped_ranking_workflow_config.py +155 -0
  254. rapidata/api_client/models/grouped_ranking_workflow_config_context_assets_value.py +170 -0
  255. rapidata/api_client/models/grouped_ranking_workflow_model.py +147 -0
  256. rapidata/api_client/models/grouped_ranking_workflow_model1.py +121 -0
  257. rapidata/api_client/models/i_artifact_model.py +182 -0
  258. rapidata/api_client/models/i_artifact_model_campaign_artifact_model.py +98 -0
  259. rapidata/api_client/models/i_artifact_model_dataset_artifact_model.py +98 -0
  260. rapidata/api_client/models/i_artifact_model_file_artifact_model.py +98 -0
  261. rapidata/api_client/models/i_artifact_model_workflow_artifact_model.py +98 -0
  262. rapidata/api_client/models/i_artifact_model_workflow_config_artifact_model.py +102 -0
  263. rapidata/api_client/models/i_asset.py +170 -0
  264. rapidata/api_client/models/i_asset_file_asset.py +111 -0
  265. rapidata/api_client/models/i_asset_input.py +156 -0
  266. rapidata/api_client/models/i_asset_input_existing_asset_input.py +118 -0
  267. rapidata/api_client/models/i_asset_input_multi_asset_input.py +128 -0
  268. rapidata/api_client/models/i_asset_input_text_asset_input.py +118 -0
  269. rapidata/api_client/models/i_asset_model.py +170 -0
  270. rapidata/api_client/models/i_asset_model_file_asset_model.py +113 -0
  271. rapidata/api_client/models/i_asset_model_multi_asset_model.py +123 -0
  272. rapidata/api_client/models/i_asset_model_null_asset_model.py +111 -0
  273. rapidata/api_client/models/i_asset_model_text_asset_model.py +113 -0
  274. rapidata/api_client/models/i_asset_multi_asset.py +121 -0
  275. rapidata/api_client/models/i_asset_null_asset.py +109 -0
  276. rapidata/api_client/models/i_asset_text_asset.py +111 -0
  277. rapidata/api_client/models/i_audience_filter.py +184 -0
  278. rapidata/api_client/models/i_audience_filter_and_audience_filter.py +106 -0
  279. rapidata/api_client/models/i_audience_filter_country_audience_filter.py +96 -0
  280. rapidata/api_client/models/i_audience_filter_country_filter.py +96 -0
  281. rapidata/api_client/models/i_audience_filter_language_audience_filter.py +96 -0
  282. rapidata/api_client/models/i_audience_filter_language_filter.py +96 -0
  283. rapidata/api_client/models/i_audience_filter_not_audience_filter.py +102 -0
  284. rapidata/api_client/models/i_audience_filter_or_audience_filter.py +106 -0
  285. rapidata/api_client/models/i_campaign_filter.py +296 -0
  286. rapidata/api_client/models/i_campaign_filter_and_filter.py +117 -0
  287. rapidata/api_client/models/i_campaign_filter_campaign_filter.py +98 -0
  288. rapidata/api_client/models/i_campaign_filter_campaign_session_count_filter.py +101 -0
  289. rapidata/api_client/models/i_campaign_filter_country_filter.py +98 -0
  290. rapidata/api_client/models/i_campaign_filter_demographic_filter.py +100 -0
  291. rapidata/api_client/models/i_campaign_filter_device_filter.py +106 -0
  292. rapidata/api_client/models/i_campaign_filter_language_filter.py +98 -0
  293. rapidata/api_client/models/i_campaign_filter_new_user_filter.py +96 -0
  294. rapidata/api_client/models/i_campaign_filter_not_filter.py +113 -0
  295. rapidata/api_client/models/i_campaign_filter_or_filter.py +117 -0
  296. rapidata/api_client/models/i_campaign_filter_response_count_filter.py +103 -0
  297. rapidata/api_client/models/i_campaign_filter_user_action_restriction_filter.py +106 -0
  298. rapidata/api_client/models/i_campaign_filter_user_score_filter.py +102 -0
  299. rapidata/api_client/models/i_campaign_filter_user_state_filter.py +106 -0
  300. rapidata/api_client/models/i_dataset_metadata_input.py +154 -0
  301. rapidata/api_client/models/i_dataset_metadata_input_prompt_asset_metadata_input.py +100 -0
  302. rapidata/api_client/models/i_dataset_metadata_input_prompt_metadata_input.py +96 -0
  303. rapidata/api_client/models/i_dataset_metadata_input_transcription_metadata_input.py +96 -0
  304. rapidata/api_client/models/i_dataset_model.py +126 -0
  305. rapidata/api_client/models/i_dataset_model_clone_dataset_model.py +98 -0
  306. rapidata/api_client/models/i_metadata.py +252 -0
  307. rapidata/api_client/models/i_metadata_classification_metadata.py +109 -0
  308. rapidata/api_client/models/i_metadata_count_metadata.py +109 -0
  309. rapidata/api_client/models/i_metadata_duration_metadata.py +110 -0
  310. rapidata/api_client/models/i_metadata_file_type_metadata.py +110 -0
  311. rapidata/api_client/models/i_metadata_image_dimension_metadata.py +111 -0
  312. rapidata/api_client/models/i_metadata_input.py +126 -0
  313. rapidata/api_client/models/i_metadata_input_text_metadata_input.py +111 -0
  314. rapidata/api_client/models/i_metadata_location_metadata.py +111 -0
  315. rapidata/api_client/models/i_metadata_model.py +252 -0
  316. rapidata/api_client/models/i_metadata_model_classification_metadata_model.py +96 -0
  317. rapidata/api_client/models/i_metadata_model_count_metadata_model.py +96 -0
  318. rapidata/api_client/models/i_metadata_model_file_type_metadata_model.py +97 -0
  319. rapidata/api_client/models/i_metadata_model_image_dimension_metadata_model.py +98 -0
  320. rapidata/api_client/models/i_metadata_model_location_metadata_model.py +98 -0
  321. rapidata/api_client/models/i_metadata_model_original_filename_metadata_model.py +96 -0
  322. rapidata/api_client/models/i_metadata_model_source_url_metadata_model.py +96 -0
  323. rapidata/api_client/models/i_metadata_model_streams_metadata_model.py +100 -0
  324. rapidata/api_client/models/i_metadata_model_text_metadata_model.py +101 -0
  325. rapidata/api_client/models/i_metadata_model_video_duration_metadata_model.py +97 -0
  326. rapidata/api_client/models/i_metadata_original_filename_metadata.py +109 -0
  327. rapidata/api_client/models/i_metadata_source_url_metadata.py +109 -0
  328. rapidata/api_client/models/i_metadata_streams_metadata.py +113 -0
  329. rapidata/api_client/models/i_metadata_text_metadata.py +114 -0
  330. rapidata/api_client/models/i_metadata_video_duration_metadata.py +110 -0
  331. rapidata/api_client/models/i_order_workflow_model.py +168 -0
  332. rapidata/api_client/models/i_order_workflow_model_compare_workflow_model.py +146 -0
  333. rapidata/api_client/models/i_order_workflow_model_evaluation_workflow_model.py +108 -0
  334. rapidata/api_client/models/i_order_workflow_model_grouped_ranking_workflow_model.py +147 -0
  335. rapidata/api_client/models/i_order_workflow_model_simple_workflow_model.py +110 -0
  336. rapidata/api_client/models/i_pair_maker_config.py +126 -0
  337. rapidata/api_client/models/i_pair_maker_config_model.py +126 -0
  338. rapidata/api_client/models/i_pair_maker_config_model_online_pair_maker_config_model.py +98 -0
  339. rapidata/api_client/models/i_pair_maker_config_online_pair_maker_config.py +98 -0
  340. rapidata/api_client/models/i_pair_maker_information.py +126 -0
  341. rapidata/api_client/models/i_pair_maker_information_online_pair_maker_information.py +100 -0
  342. rapidata/api_client/models/i_pipeline_artifact_model.py +126 -0
  343. rapidata/api_client/models/i_pipeline_artifact_model_create_dataset_artifact_model.py +102 -0
  344. rapidata/api_client/models/i_pipeline_model.py +126 -0
  345. rapidata/api_client/models/i_pipeline_model_create_simple_pipeline_model.py +116 -0
  346. rapidata/api_client/models/i_pipeline_step_model.py +168 -0
  347. rapidata/api_client/models/i_pipeline_step_model_dataset_evaluation_step_model.py +102 -0
  348. rapidata/api_client/models/i_pipeline_step_model_send_completion_mail_step_model.py +98 -0
  349. rapidata/api_client/models/i_pipeline_step_model_workflow_aggregation_step_model.py +103 -0
  350. rapidata/api_client/models/i_pipeline_step_model_workflow_labeling_step_model.py +96 -0
  351. rapidata/api_client/models/i_rapid_blueprint.py +252 -0
  352. rapidata/api_client/models/i_rapid_blueprint_attach_category_rapid_blueprint.py +108 -0
  353. rapidata/api_client/models/i_rapid_blueprint_bounding_box_rapid_blueprint.py +96 -0
  354. rapidata/api_client/models/i_rapid_blueprint_compare_rapid_blueprint.py +98 -0
  355. rapidata/api_client/models/i_rapid_blueprint_free_text_rapid_blueprint.py +105 -0
  356. rapidata/api_client/models/i_rapid_blueprint_line_rapid_blueprint.py +96 -0
  357. rapidata/api_client/models/i_rapid_blueprint_locate_rapid_blueprint.py +96 -0
  358. rapidata/api_client/models/i_rapid_blueprint_named_entity_rapid_blueprint.py +98 -0
  359. rapidata/api_client/models/i_rapid_blueprint_polygon_rapid_blueprint.py +96 -0
  360. rapidata/api_client/models/i_rapid_blueprint_scrub_rapid_blueprint.py +96 -0
  361. rapidata/api_client/models/i_rapid_blueprint_transcription_rapid_blueprint.py +96 -0
  362. rapidata/api_client/models/i_rapid_payload.py +252 -0
  363. rapidata/api_client/models/i_rapid_payload_bounding_box_payload.py +96 -0
  364. rapidata/api_client/models/i_rapid_payload_classify_payload.py +106 -0
  365. rapidata/api_client/models/i_rapid_payload_compare_payload.py +96 -0
  366. rapidata/api_client/models/i_rapid_payload_free_text_payload.py +105 -0
  367. rapidata/api_client/models/i_rapid_payload_line_payload.py +96 -0
  368. rapidata/api_client/models/i_rapid_payload_locate_payload.py +96 -0
  369. rapidata/api_client/models/i_rapid_payload_named_entity_payload.py +98 -0
  370. rapidata/api_client/models/i_rapid_payload_polygon_payload.py +96 -0
  371. rapidata/api_client/models/i_rapid_payload_scrub_payload.py +96 -0
  372. rapidata/api_client/models/i_rapid_payload_transcription_payload.py +106 -0
  373. rapidata/api_client/models/i_rapid_result.py +266 -0
  374. rapidata/api_client/models/i_rapid_result_attach_category_result.py +98 -0
  375. rapidata/api_client/models/i_rapid_result_bounding_box_result.py +106 -0
  376. rapidata/api_client/models/i_rapid_result_compare_result.py +98 -0
  377. rapidata/api_client/models/i_rapid_result_free_text_result.py +98 -0
  378. rapidata/api_client/models/i_rapid_result_line_result.py +106 -0
  379. rapidata/api_client/models/i_rapid_result_locate_result.py +106 -0
  380. rapidata/api_client/models/i_rapid_result_named_entity_result.py +106 -0
  381. rapidata/api_client/models/i_rapid_result_polygon_result.py +106 -0
  382. rapidata/api_client/models/i_rapid_result_scrub_result.py +98 -0
  383. rapidata/api_client/models/i_rapid_result_skip_result.py +96 -0
  384. rapidata/api_client/models/i_rapid_result_transcription_result.py +106 -0
  385. rapidata/api_client/models/i_referee_config.py +154 -0
  386. rapidata/api_client/models/i_referee_config_naive_referee_config.py +96 -0
  387. rapidata/api_client/models/i_referee_config_never_ending_referee_config.py +94 -0
  388. rapidata/api_client/models/i_referee_config_probabilistic_attach_category_referee_config.py +98 -0
  389. rapidata/api_client/models/i_referee_info.py +154 -0
  390. rapidata/api_client/models/i_referee_info_naive_referee_info.py +96 -0
  391. rapidata/api_client/models/i_referee_info_never_ending_referee_info.py +94 -0
  392. rapidata/api_client/models/i_referee_info_probabilistic_attach_category_referee_info.py +98 -0
  393. rapidata/api_client/models/i_referee_model.py +140 -0
  394. rapidata/api_client/models/i_referee_model_early_stopping_referee_model.py +98 -0
  395. rapidata/api_client/models/i_referee_model_naive_referee_model.py +96 -0
  396. rapidata/api_client/models/i_selection.py +240 -0
  397. rapidata/api_client/models/i_selection_ab_test_selection.py +122 -0
  398. rapidata/api_client/models/i_selection_capped_selection.py +108 -0
  399. rapidata/api_client/models/i_selection_conditional_validation_selection.py +110 -0
  400. rapidata/api_client/models/i_selection_demographic_selection.py +98 -0
  401. rapidata/api_client/models/i_selection_effort_capped_selection.py +101 -0
  402. rapidata/api_client/models/i_selection_labeling_selection.py +103 -0
  403. rapidata/api_client/models/i_selection_shuffling_selection.py +106 -0
  404. rapidata/api_client/models/i_selection_static_selection.py +96 -0
  405. rapidata/api_client/models/i_selection_validation_selection.py +98 -0
  406. rapidata/api_client/models/i_user_filter_model.py +296 -0
  407. rapidata/api_client/models/i_user_filter_model_age_user_filter_model.py +104 -0
  408. rapidata/api_client/models/i_user_filter_model_and_user_filter_model.py +106 -0
  409. rapidata/api_client/models/i_user_filter_model_campaign_user_filter_model.py +96 -0
  410. rapidata/api_client/models/i_user_filter_model_country_user_filter_model.py +96 -0
  411. rapidata/api_client/models/i_user_filter_model_custom_user_filter_model.py +98 -0
  412. rapidata/api_client/models/i_user_filter_model_device_user_filter_model.py +104 -0
  413. rapidata/api_client/models/i_user_filter_model_gender_user_filter_model.py +104 -0
  414. rapidata/api_client/models/i_user_filter_model_language_user_filter_model.py +96 -0
  415. rapidata/api_client/models/i_user_filter_model_new_user_filter_model.py +94 -0
  416. rapidata/api_client/models/i_user_filter_model_not_user_filter_model.py +102 -0
  417. rapidata/api_client/models/i_user_filter_model_or_user_filter_model.py +106 -0
  418. rapidata/api_client/models/i_user_filter_model_response_count_user_filter_model.py +101 -0
  419. rapidata/api_client/models/i_user_filter_model_user_score_user_filter_model.py +105 -0
  420. rapidata/api_client/models/i_validation_metadata_input.py +140 -0
  421. rapidata/api_client/models/i_validation_metadata_input_prompt_asset_metadata_input.py +100 -0
  422. rapidata/api_client/models/i_validation_metadata_input_prompt_metadata_input.py +96 -0
  423. rapidata/api_client/models/i_validation_truth.py +280 -0
  424. rapidata/api_client/models/i_validation_truth_attach_category_truth.py +96 -0
  425. rapidata/api_client/models/i_validation_truth_bounding_box_truth.py +102 -0
  426. rapidata/api_client/models/i_validation_truth_compare_truth.py +96 -0
  427. rapidata/api_client/models/i_validation_truth_empty_validation_truth.py +94 -0
  428. rapidata/api_client/models/i_validation_truth_line_truth.py +94 -0
  429. rapidata/api_client/models/i_validation_truth_locate_box_truth.py +108 -0
  430. rapidata/api_client/models/i_validation_truth_model.py +294 -0
  431. rapidata/api_client/models/i_validation_truth_model_attach_category_truth_model.py +96 -0
  432. rapidata/api_client/models/i_validation_truth_model_bounding_box_truth_model.py +102 -0
  433. rapidata/api_client/models/i_validation_truth_model_classify_truth_model.py +96 -0
  434. rapidata/api_client/models/i_validation_truth_model_compare_truth_model.py +96 -0
  435. rapidata/api_client/models/i_validation_truth_model_empty_validation_truth_model.py +94 -0
  436. rapidata/api_client/models/i_validation_truth_model_line_truth_model.py +94 -0
  437. rapidata/api_client/models/i_validation_truth_model_locate_box_truth_model.py +108 -0
  438. rapidata/api_client/models/i_validation_truth_model_multi_compare_truth_model.py +96 -0
  439. rapidata/api_client/models/i_validation_truth_model_named_entity_truth_model.py +104 -0
  440. rapidata/api_client/models/i_validation_truth_model_polygon_truth_model.py +94 -0
  441. rapidata/api_client/models/i_validation_truth_model_scrub_truth_model.py +104 -0
  442. rapidata/api_client/models/i_validation_truth_model_skip_truth_model.py +94 -0
  443. rapidata/api_client/models/i_validation_truth_model_transcription_truth_model.py +115 -0
  444. rapidata/api_client/models/i_validation_truth_multi_compare_truth.py +96 -0
  445. rapidata/api_client/models/i_validation_truth_named_entity_truth.py +104 -0
  446. rapidata/api_client/models/i_validation_truth_polygon_truth.py +94 -0
  447. rapidata/api_client/models/i_validation_truth_scrub_truth.py +104 -0
  448. rapidata/api_client/models/i_validation_truth_skip_truth.py +94 -0
  449. rapidata/api_client/models/i_validation_truth_transcription_truth.py +115 -0
  450. rapidata/api_client/models/i_workflow_config.py +168 -0
  451. rapidata/api_client/models/i_workflow_config_compare_workflow_config.py +142 -0
  452. rapidata/api_client/models/i_workflow_config_evaluation_workflow_config.py +114 -0
  453. rapidata/api_client/models/i_workflow_config_grouped_ranking_workflow_config.py +155 -0
  454. rapidata/api_client/models/i_workflow_config_simple_workflow_config.py +116 -0
  455. rapidata/api_client/models/i_workflow_model.py +168 -0
  456. rapidata/api_client/models/i_workflow_model_compare_workflow_model.py +145 -0
  457. rapidata/api_client/models/i_workflow_model_evaluation_workflow_model.py +115 -0
  458. rapidata/api_client/models/i_workflow_model_grouped_ranking_workflow_model.py +121 -0
  459. rapidata/api_client/models/i_workflow_model_simple_workflow_model.py +119 -0
  460. rapidata/api_client/models/image_dimension_metadata.py +12 -1
  461. rapidata/api_client/models/inquire_file_metadata_result.py +100 -0
  462. rapidata/api_client/models/inspect_report_result.py +2 -2
  463. rapidata/api_client/models/job_definition_revision_state.py +38 -0
  464. rapidata/api_client/models/json_web_key.py +224 -0
  465. rapidata/api_client/models/json_web_key_set.py +95 -0
  466. rapidata/api_client/models/labeling_selection.py +11 -13
  467. rapidata/api_client/models/language_filter.py +98 -0
  468. rapidata/api_client/models/leaderboard_query_result.py +135 -0
  469. rapidata/api_client/models/leaderboard_query_result_paged_result.py +105 -0
  470. rapidata/api_client/models/leaderboards_query_result.py +135 -0
  471. rapidata/api_client/models/line_result.py +3 -3
  472. rapidata/api_client/models/line_result_line.py +97 -0
  473. rapidata/api_client/models/line_result_line_point.py +89 -0
  474. rapidata/api_client/models/local_file_wrapper.py +120 -0
  475. rapidata/api_client/models/locate_coordinate.py +4 -13
  476. rapidata/api_client/models/location_metadata.py +12 -1
  477. rapidata/api_client/models/logic_operator.py +2 -2
  478. rapidata/api_client/models/metadata_i_order_metadata_input.py +154 -0
  479. rapidata/api_client/models/metadata_i_order_metadata_input_metadata_prompt_asset_metadata_input.py +100 -0
  480. rapidata/api_client/models/metadata_i_order_metadata_input_metadata_prompt_metadata_input.py +96 -0
  481. rapidata/api_client/models/metadata_i_order_metadata_input_metadata_transcription_metadata_input.py +96 -0
  482. rapidata/api_client/models/metadata_prompt_asset_metadata_input.py +100 -0
  483. rapidata/api_client/models/metadata_prompt_metadata_input.py +96 -0
  484. rapidata/api_client/models/metadata_transcription_metadata_input.py +96 -0
  485. rapidata/api_client/models/multi_asset.py +17 -12
  486. rapidata/api_client/models/multi_asset_assets_inner.py +170 -0
  487. rapidata/api_client/models/multi_asset_input.py +130 -0
  488. rapidata/api_client/models/multi_asset_input1.py +110 -0
  489. rapidata/api_client/models/multi_asset_input1_assets_inner.py +198 -0
  490. rapidata/api_client/models/multi_asset_input2.py +110 -0
  491. rapidata/api_client/models/multi_asset_input3.py +110 -0
  492. rapidata/api_client/models/multi_asset_input3_assets_inner.py +198 -0
  493. rapidata/api_client/models/multi_asset_input_assets_inner.py +156 -0
  494. rapidata/api_client/models/multi_asset_model.py +3 -3
  495. rapidata/api_client/models/multi_compare_truth.py +96 -0
  496. rapidata/api_client/models/naive_referee_info.py +96 -0
  497. rapidata/api_client/models/naive_referee_model.py +2 -2
  498. rapidata/api_client/models/named_classification.py +4 -13
  499. rapidata/api_client/models/never_ending_referee_info.py +94 -0
  500. rapidata/api_client/models/new_user_filter.py +96 -0
  501. rapidata/api_client/models/newsletter_model.py +6 -6
  502. rapidata/api_client/models/not_available_yet_result.py +4 -13
  503. rapidata/api_client/models/not_filter.py +117 -0
  504. rapidata/api_client/models/not_user_filter_model.py +3 -3
  505. rapidata/api_client/models/null_asset.py +14 -9
  506. rapidata/api_client/models/online_pair_maker_config_model.py +3 -3
  507. rapidata/api_client/models/option_of_aggregator_type.py +49 -0
  508. rapidata/api_client/models/or_filter.py +121 -0
  509. rapidata/api_client/models/or_user_filter_model.py +3 -3
  510. rapidata/api_client/models/order_model.py +15 -14
  511. rapidata/api_client/models/order_state.py +2 -2
  512. rapidata/api_client/models/original_filename_metadata.py +12 -1
  513. rapidata/api_client/models/page_info.py +2 -7
  514. rapidata/api_client/models/paged_result_aggregated_orders_model.py +105 -0
  515. rapidata/api_client/models/paged_result_benchmark_query_result.py +105 -0
  516. rapidata/api_client/models/paged_result_campaign_query_result.py +105 -0
  517. rapidata/api_client/models/paged_result_clients_query_result.py +105 -0
  518. rapidata/api_client/models/paged_result_datapoint_model.py +105 -0
  519. rapidata/api_client/models/paged_result_get_compare_workflow_results_result.py +105 -0
  520. rapidata/api_client/models/paged_result_get_grouped_ranking_workflow_results_result.py +105 -0
  521. rapidata/api_client/models/paged_result_get_validation_rapids_result.py +105 -0
  522. rapidata/api_client/models/paged_result_get_workflow_results_result.py +105 -0
  523. rapidata/api_client/models/paged_result_i_workflow_model.py +105 -0
  524. rapidata/api_client/models/paged_result_leaderboard_query_result.py +105 -0
  525. rapidata/api_client/models/paged_result_leaderboards_query_result.py +105 -0
  526. rapidata/api_client/models/paged_result_of_aggregated_orders_model.py +103 -0
  527. rapidata/api_client/models/paged_result_of_benchmark_query_result.py +103 -0
  528. rapidata/api_client/models/paged_result_of_campaign_query_result.py +103 -0
  529. rapidata/api_client/models/paged_result_of_clients_query_result.py +103 -0
  530. rapidata/api_client/models/paged_result_of_get_compare_workflow_results_result.py +103 -0
  531. rapidata/api_client/models/paged_result_of_get_grouped_ranking_workflow_results_result.py +103 -0
  532. rapidata/api_client/models/paged_result_of_get_validation_rapids_result.py +103 -0
  533. rapidata/api_client/models/paged_result_of_get_workflow_results_result.py +103 -0
  534. rapidata/api_client/models/paged_result_of_i_workflow_model.py +103 -0
  535. rapidata/api_client/models/paged_result_of_leaderboards_query_result.py +103 -0
  536. rapidata/api_client/models/paged_result_of_order_model.py +103 -0
  537. rapidata/api_client/models/paged_result_of_participant_by_benchmark.py +103 -0
  538. rapidata/api_client/models/paged_result_of_prompt_by_benchmark_result.py +103 -0
  539. rapidata/api_client/models/paged_result_of_query_audiences_result.py +103 -0
  540. rapidata/api_client/models/paged_result_of_query_datapoints_by_dataset_id_result.py +103 -0
  541. rapidata/api_client/models/paged_result_of_query_job_definitions_result.py +103 -0
  542. rapidata/api_client/models/paged_result_of_query_job_revisions_result.py +103 -0
  543. rapidata/api_client/models/paged_result_of_query_jobs_result.py +103 -0
  544. rapidata/api_client/models/paged_result_of_query_rapids_for_audience_result.py +103 -0
  545. rapidata/api_client/models/paged_result_of_query_validation_rapid_eligibility_result.py +103 -0
  546. rapidata/api_client/models/paged_result_of_rapid_model.py +103 -0
  547. rapidata/api_client/models/paged_result_of_runs_by_leaderboard_result.py +103 -0
  548. rapidata/api_client/models/paged_result_of_sample_by_identifier.py +103 -0
  549. rapidata/api_client/models/paged_result_of_sample_by_participant.py +103 -0
  550. rapidata/api_client/models/paged_result_of_standing_by_leaderboard.py +103 -0
  551. rapidata/api_client/models/paged_result_of_validation_set_model.py +103 -0
  552. rapidata/api_client/models/paged_result_order_model.py +105 -0
  553. rapidata/api_client/models/paged_result_participant_by_benchmark.py +105 -0
  554. rapidata/api_client/models/paged_result_potential_validation_rapid.py +105 -0
  555. rapidata/api_client/models/paged_result_prompt_by_benchmark_result.py +105 -0
  556. rapidata/api_client/models/paged_result_query_audiences_result.py +105 -0
  557. rapidata/api_client/models/paged_result_query_datapoints_by_dataset_id_result.py +105 -0
  558. rapidata/api_client/models/paged_result_query_validation_rapid_eligibility_result.py +105 -0
  559. rapidata/api_client/models/paged_result_rapid_model.py +105 -0
  560. rapidata/api_client/models/paged_result_runs_by_leaderboard_result.py +105 -0
  561. rapidata/api_client/models/paged_result_sample_by_identifier.py +105 -0
  562. rapidata/api_client/models/paged_result_sample_by_participant.py +105 -0
  563. rapidata/api_client/models/paged_result_standing_by_leaderboard.py +105 -0
  564. rapidata/api_client/models/paged_result_validation_set_model.py +105 -0
  565. rapidata/api_client/models/participant_by_benchmark.py +94 -0
  566. rapidata/api_client/models/participant_by_benchmark_paged_result.py +105 -0
  567. rapidata/api_client/models/participant_by_leaderboard.py +113 -0
  568. rapidata/api_client/models/participant_by_leaderboard_paged_result.py +105 -0
  569. rapidata/api_client/models/participant_status.py +38 -0
  570. rapidata/api_client/models/pipeline_id_workflow_config_put_request.py +140 -0
  571. rapidata/api_client/models/polygon_result.py +3 -3
  572. rapidata/api_client/models/polygon_result_coordinate.py +89 -0
  573. rapidata/api_client/models/polygon_result_shape.py +95 -0
  574. rapidata/api_client/models/potential_validation_rapid.py +103 -0
  575. rapidata/api_client/models/potential_validation_rapid_paged_result.py +105 -0
  576. rapidata/api_client/models/potential_validation_rapid_truth.py +280 -0
  577. rapidata/api_client/models/preliminary_download_model.py +5 -5
  578. rapidata/api_client/models/preview_order_model.py +92 -0
  579. rapidata/api_client/models/probabilistic_attach_category_referee_info.py +98 -0
  580. rapidata/api_client/models/problem_details.py +2 -20
  581. rapidata/api_client/models/prompt_asset_metadata_input.py +100 -0
  582. rapidata/api_client/models/prompt_asset_metadata_input_asset.py +154 -0
  583. rapidata/api_client/models/prompt_by_benchmark_result.py +112 -0
  584. rapidata/api_client/models/prompt_by_benchmark_result_paged_result.py +105 -0
  585. rapidata/api_client/models/prompt_by_leaderboard_result.py +90 -0
  586. rapidata/api_client/models/prompt_by_leaderboard_result_paged_result.py +105 -0
  587. rapidata/api_client/models/prompt_metadata.py +12 -1
  588. rapidata/api_client/models/prompt_metadata_input.py +2 -2
  589. rapidata/api_client/models/prompt_type.py +38 -0
  590. rapidata/api_client/models/proxy_file_wrapper.py +129 -0
  591. rapidata/api_client/models/public_order_model.py +2 -2
  592. rapidata/api_client/models/public_rapid_response.py +112 -0
  593. rapidata/api_client/models/query_audiences_result.py +118 -0
  594. rapidata/api_client/models/query_datapoints_by_dataset_id_result.py +95 -0
  595. rapidata/api_client/models/query_job_definitions_result.py +97 -0
  596. rapidata/api_client/models/query_job_revisions_result.py +95 -0
  597. rapidata/api_client/models/query_jobs_result.py +103 -0
  598. rapidata/api_client/models/query_model.py +10 -5
  599. rapidata/api_client/models/query_rapids_for_audience_result.py +150 -0
  600. rapidata/api_client/models/query_validation_model.py +97 -0
  601. rapidata/api_client/models/query_validation_rapid_eligibility_model_query_validation_model.py +107 -0
  602. rapidata/api_client/models/query_validation_rapid_eligibility_result.py +103 -0
  603. rapidata/api_client/models/query_validation_rapid_eligibility_result_truth.py +280 -0
  604. rapidata/api_client/models/rapid_issue.py +2 -2
  605. rapidata/api_client/models/rapid_modality.py +46 -0
  606. rapidata/api_client/models/rapid_model.py +157 -0
  607. rapidata/api_client/models/rapid_model_paged_result.py +105 -0
  608. rapidata/api_client/models/rapid_model_referee.py +154 -0
  609. rapidata/api_client/models/rapid_result_model.py +7 -7
  610. rapidata/api_client/models/rapid_skipped_model.py +5 -5
  611. rapidata/api_client/models/rapid_state.py +3 -2
  612. rapidata/api_client/models/read_bridge_token_keys_result.py +10 -24
  613. rapidata/api_client/models/reference_asset_input.py +100 -0
  614. rapidata/api_client/models/report_model.py +9 -15
  615. rapidata/api_client/models/response_count_filter.py +103 -0
  616. rapidata/api_client/models/response_count_user_filter_model.py +2 -8
  617. rapidata/api_client/models/retrieval_mode.py +2 -2
  618. rapidata/api_client/models/root_filter.py +5 -14
  619. rapidata/api_client/models/run_status.py +39 -0
  620. rapidata/api_client/models/runs_by_leaderboard_result.py +104 -0
  621. rapidata/api_client/models/runs_by_leaderboard_result_paged_result.py +105 -0
  622. rapidata/api_client/models/sample_by_identifier.py +125 -0
  623. rapidata/api_client/models/sample_by_identifier_paged_result.py +105 -0
  624. rapidata/api_client/models/sample_by_participant.py +121 -0
  625. rapidata/api_client/models/sample_by_participant_paged_result.py +105 -0
  626. rapidata/api_client/models/scrub_range.py +2 -2
  627. rapidata/api_client/models/send_survey_model.py +87 -0
  628. rapidata/api_client/models/simple_workflow_config.py +15 -7
  629. rapidata/api_client/models/simple_workflow_config_blueprint.py +37 -23
  630. rapidata/api_client/models/simple_workflow_config_model.py +11 -3
  631. rapidata/api_client/models/simple_workflow_model.py +14 -4
  632. rapidata/api_client/models/simple_workflow_model1.py +4 -11
  633. rapidata/api_client/models/simple_workflow_model_blueprint.py +1 -1
  634. rapidata/api_client/models/sort_criterion.py +5 -11
  635. rapidata/api_client/models/sort_direction.py +2 -2
  636. rapidata/api_client/models/source_url_metadata.py +12 -1
  637. rapidata/api_client/models/standing_by_benchmark.py +113 -0
  638. rapidata/api_client/models/standing_by_leaderboard.py +113 -0
  639. rapidata/api_client/models/standing_by_leaderboard_paged_result.py +105 -0
  640. rapidata/api_client/models/standing_status.py +38 -0
  641. rapidata/api_client/models/standings_by_benchmark_result.py +95 -0
  642. rapidata/api_client/models/standings_by_leaderboard_result.py +95 -0
  643. rapidata/api_client/models/start_preliminary_download_result.py +87 -0
  644. rapidata/api_client/models/sticky_state.py +3 -2
  645. rapidata/api_client/models/stream_file_wrapper.py +138 -0
  646. rapidata/api_client/models/streams_metadata.py +113 -0
  647. rapidata/api_client/models/streams_metadata_model.py +100 -0
  648. rapidata/api_client/models/string_segment.py +105 -0
  649. rapidata/api_client/models/submit_coco_model.py +1 -3
  650. rapidata/api_client/models/submit_order_model.py +92 -0
  651. rapidata/api_client/models/submit_participant_result.py +89 -0
  652. rapidata/api_client/models/submit_prompt_model.py +107 -0
  653. rapidata/api_client/models/submit_prompt_model_prompt_asset.py +202 -0
  654. rapidata/api_client/models/tags_by_benchmark_result.py +87 -0
  655. rapidata/api_client/models/text_asset.py +15 -10
  656. rapidata/api_client/models/text_asset_input.py +120 -0
  657. rapidata/api_client/models/text_metadata.py +18 -2
  658. rapidata/api_client/models/text_metadata_input.py +111 -0
  659. rapidata/api_client/models/text_metadata_model.py +7 -2
  660. rapidata/api_client/models/transcription_metadata.py +9 -1
  661. rapidata/api_client/models/transcription_metadata_input.py +2 -2
  662. rapidata/api_client/models/transcription_word.py +2 -2
  663. rapidata/api_client/models/translated_string.py +2 -2
  664. rapidata/api_client/models/unlock_order_result.py +2 -2
  665. rapidata/api_client/models/update_access_model.py +1 -1
  666. rapidata/api_client/models/update_audience_request.py +113 -0
  667. rapidata/api_client/models/update_benchmark_model.py +99 -0
  668. rapidata/api_client/models/update_benchmark_name_model.py +87 -0
  669. rapidata/api_client/models/update_campaign_model.py +11 -11
  670. rapidata/api_client/models/update_dataset_name_model.py +5 -5
  671. rapidata/api_client/models/update_dimensions_model.py +3 -3
  672. rapidata/api_client/models/update_job_definition_endpoint_input.py +92 -0
  673. rapidata/api_client/models/update_job_endpoint_input.py +92 -0
  674. rapidata/api_client/models/update_leaderboard_model.py +106 -0
  675. rapidata/api_client/models/update_leaderboard_name_model.py +87 -0
  676. rapidata/api_client/models/update_leaderboard_response_config_model.py +89 -0
  677. rapidata/api_client/models/update_order_name_model.py +5 -5
  678. rapidata/api_client/models/update_participant_model.py +92 -0
  679. rapidata/api_client/models/update_participant_name_model.py +87 -0
  680. rapidata/api_client/models/update_priority_model.py +87 -0
  681. rapidata/api_client/models/update_prompt_tags_model.py +87 -0
  682. rapidata/api_client/models/update_should_alert_model.py +87 -0
  683. rapidata/api_client/models/update_validation_rapid_model.py +28 -12
  684. rapidata/api_client/models/update_validation_rapid_model_context_asset.py +160 -0
  685. rapidata/api_client/models/update_validation_rapid_model_truth.py +26 -12
  686. rapidata/api_client/models/update_validation_set_model.py +120 -0
  687. rapidata/api_client/models/upload_asset_result.py +102 -0
  688. rapidata/api_client/models/upload_file_from_url_result.py +87 -0
  689. rapidata/api_client/models/upload_file_result.py +87 -0
  690. rapidata/api_client/models/upload_files_from_s3_bucket_model.py +12 -2
  691. rapidata/api_client/models/upload_text_sources_to_dataset_model.py +3 -3
  692. rapidata/api_client/models/url_asset_input.py +100 -0
  693. rapidata/api_client/models/user_action_restriction.py +37 -0
  694. rapidata/api_client/models/user_action_restriction_filter.py +101 -0
  695. rapidata/api_client/models/user_score_filter.py +102 -0
  696. rapidata/api_client/models/user_state.py +38 -0
  697. rapidata/api_client/models/user_state_filter.py +101 -0
  698. rapidata/api_client/models/validation_chance.py +20 -3
  699. rapidata/api_client/models/validation_problem_details.py +117 -0
  700. rapidata/api_client/models/validation_set_model.py +39 -5
  701. rapidata/api_client/models/validation_set_overview_model.py +2 -2
  702. rapidata/api_client/models/validation_set_validation_set_id_rapid_post_payload_parameter.py +252 -0
  703. rapidata/api_client/models/validation_set_validation_set_id_rapid_post_truth_parameter.py +280 -0
  704. rapidata/api_client/models/validation_set_zip_post_request_blueprint.py +252 -0
  705. rapidata/api_client/models/video_duration_metadata.py +109 -0
  706. rapidata/api_client/models/video_duration_metadata_model.py +96 -0
  707. rapidata/api_client/models/vote_matrix_result.py +91 -0
  708. rapidata/api_client/models/workflow_aggregation_step_model.py +3 -12
  709. rapidata/api_client/models/workflow_config_artifact_model_workflow_config.py +23 -9
  710. rapidata/api_client/models/workflow_state.py +2 -2
  711. rapidata/api_client/models/zip_entry_file_wrapper.py +151 -0
  712. rapidata/api_client/rest.py +2 -2
  713. rapidata/api_client_README.md +469 -309
  714. rapidata/rapidata_client/__init__.py +23 -22
  715. rapidata/rapidata_client/api/rapidata_api_client.py +253 -0
  716. rapidata/rapidata_client/audience/__init__.py +2 -0
  717. rapidata/rapidata_client/audience/audience_example_handler.py +168 -0
  718. rapidata/rapidata_client/audience/rapidata_audience.py +287 -0
  719. rapidata/rapidata_client/audience/rapidata_audience_manager.py +162 -0
  720. rapidata/rapidata_client/benchmark/__init__.py +0 -0
  721. rapidata/rapidata_client/benchmark/_detail_mapper.py +34 -0
  722. rapidata/rapidata_client/benchmark/leaderboard/__init__.py +0 -0
  723. rapidata/rapidata_client/benchmark/leaderboard/rapidata_leaderboard.py +257 -0
  724. rapidata/rapidata_client/benchmark/participant/__init__.py +0 -0
  725. rapidata/rapidata_client/benchmark/participant/_participant.py +146 -0
  726. rapidata/rapidata_client/benchmark/rapidata_benchmark.py +592 -0
  727. rapidata/rapidata_client/benchmark/rapidata_benchmark_manager.py +216 -0
  728. rapidata/rapidata_client/config/__init__.py +4 -0
  729. rapidata/rapidata_client/config/logger.py +135 -0
  730. rapidata/rapidata_client/config/logging_config.py +55 -0
  731. rapidata/rapidata_client/config/managed_print.py +6 -0
  732. rapidata/rapidata_client/config/order_config.py +14 -0
  733. rapidata/rapidata_client/config/rapidata_config.py +36 -0
  734. rapidata/rapidata_client/config/tracer.py +184 -0
  735. rapidata/rapidata_client/config/upload_config.py +64 -0
  736. rapidata/rapidata_client/datapoints/__init__.py +8 -0
  737. rapidata/rapidata_client/datapoints/_asset_uploader.py +194 -0
  738. rapidata/rapidata_client/datapoints/_datapoint.py +92 -0
  739. rapidata/rapidata_client/datapoints/_datapoint_uploader.py +47 -0
  740. rapidata/rapidata_client/datapoints/_datapoints_validator.py +70 -0
  741. rapidata/rapidata_client/datapoints/_single_flight_cache.py +82 -0
  742. rapidata/rapidata_client/datapoints/assets/__init__.py +0 -0
  743. rapidata/rapidata_client/datapoints/assets/constants.py +7 -0
  744. rapidata/rapidata_client/{metadata → datapoints/metadata}/__init__.py +1 -1
  745. rapidata/rapidata_client/datapoints/metadata/_private_text_metadata.py +16 -0
  746. rapidata/rapidata_client/datapoints/metadata/_prompt_identifier_metadata.py +14 -0
  747. rapidata/rapidata_client/datapoints/metadata/_public_text_metadata.py +16 -0
  748. rapidata/rapidata_client/{metadata → datapoints/metadata}/_select_words_metadata.py +4 -5
  749. rapidata/rapidata_client/dataset/__init__.py +1 -0
  750. rapidata/rapidata_client/dataset/_rapidata_dataset.py +55 -0
  751. rapidata/rapidata_client/demographic/demographic_manager.py +44 -19
  752. rapidata/rapidata_client/exceptions/__init__.py +1 -0
  753. rapidata/rapidata_client/exceptions/failed_upload_exception.py +27 -0
  754. rapidata/rapidata_client/filter/__init__.py +3 -0
  755. rapidata/rapidata_client/filter/_backend_filter_mapper.py +134 -0
  756. rapidata/rapidata_client/filter/_base_filter.py +58 -2
  757. rapidata/rapidata_client/filter/age_filter.py +26 -10
  758. rapidata/rapidata_client/filter/and_filter.py +55 -0
  759. rapidata/rapidata_client/filter/campaign_filter.py +21 -10
  760. rapidata/rapidata_client/filter/country_filter.py +46 -12
  761. rapidata/rapidata_client/filter/custom_filter.py +25 -12
  762. rapidata/rapidata_client/filter/device_filter.py +38 -0
  763. rapidata/rapidata_client/filter/gender_filter.py +25 -10
  764. rapidata/rapidata_client/filter/language_filter.py +51 -21
  765. rapidata/rapidata_client/filter/models/age_group.py +14 -12
  766. rapidata/rapidata_client/filter/models/device_type.py +20 -0
  767. rapidata/rapidata_client/filter/models/gender.py +12 -8
  768. rapidata/rapidata_client/filter/new_user_filter.py +14 -4
  769. rapidata/rapidata_client/filter/not_filter.py +35 -11
  770. rapidata/rapidata_client/filter/or_filter.py +36 -11
  771. rapidata/rapidata_client/filter/rapidata_filters.py +30 -25
  772. rapidata/rapidata_client/filter/response_count_filter.py +51 -20
  773. rapidata/rapidata_client/filter/user_score_filter.py +62 -24
  774. rapidata/rapidata_client/job/__init__.py +3 -0
  775. rapidata/rapidata_client/job/job_definition.py +110 -0
  776. rapidata/rapidata_client/job/job_manager.py +758 -0
  777. rapidata/rapidata_client/job/rapidata_job.py +326 -0
  778. rapidata/rapidata_client/order/__init__.py +2 -0
  779. rapidata/rapidata_client/order/_rapidata_order_builder.py +286 -193
  780. rapidata/rapidata_client/order/rapidata_order.py +329 -153
  781. rapidata/rapidata_client/order/rapidata_order_manager.py +722 -420
  782. rapidata/rapidata_client/rapidata_client.py +130 -26
  783. rapidata/rapidata_client/referee/__init__.py +1 -1
  784. rapidata/rapidata_client/referee/_base_referee.py +14 -3
  785. rapidata/rapidata_client/referee/_early_stopping_referee.py +32 -17
  786. rapidata/rapidata_client/referee/_naive_referee.py +24 -3
  787. rapidata/rapidata_client/results/__init__.py +3 -0
  788. rapidata/rapidata_client/{order → results}/rapidata_results.py +98 -67
  789. rapidata/rapidata_client/selection/__init__.py +2 -1
  790. rapidata/rapidata_client/selection/_base_selection.py +9 -2
  791. rapidata/rapidata_client/selection/ab_test_selection.py +28 -20
  792. rapidata/rapidata_client/selection/capped_selection.py +23 -16
  793. rapidata/rapidata_client/selection/conditional_validation_selection.py +43 -24
  794. rapidata/rapidata_client/selection/demographic_selection.py +21 -6
  795. rapidata/rapidata_client/selection/effort_selection.py +49 -0
  796. rapidata/rapidata_client/selection/labeling_selection.py +36 -12
  797. rapidata/rapidata_client/selection/{retrieval_modes.py → rapidata_retrieval_modes.py} +10 -7
  798. rapidata/rapidata_client/selection/rapidata_selections.py +31 -21
  799. rapidata/rapidata_client/selection/shuffling_selection.py +21 -13
  800. rapidata/rapidata_client/selection/static_selection.py +20 -9
  801. rapidata/rapidata_client/selection/validation_selection.py +20 -4
  802. rapidata/rapidata_client/settings/__init__.py +4 -1
  803. rapidata/rapidata_client/settings/_rapidata_setting.py +22 -3
  804. rapidata/rapidata_client/settings/alert_on_fast_response.py +8 -5
  805. rapidata/rapidata_client/settings/allow_neither_both.py +17 -0
  806. rapidata/rapidata_client/settings/custom_setting.py +3 -2
  807. rapidata/rapidata_client/settings/free_text_minimum_characters.py +9 -4
  808. rapidata/rapidata_client/settings/models/translation_behaviour_options.py +3 -2
  809. rapidata/rapidata_client/settings/mute_video.py +15 -0
  810. rapidata/rapidata_client/settings/no_shuffle.py +4 -2
  811. rapidata/rapidata_client/settings/play_video_until_the_end.py +7 -4
  812. rapidata/rapidata_client/settings/rapidata_settings.py +28 -16
  813. rapidata/rapidata_client/settings/swap_context_instruction.py +20 -0
  814. rapidata/rapidata_client/settings/translation_behaviour.py +7 -5
  815. rapidata/rapidata_client/utils/__init__.py +3 -0
  816. rapidata/rapidata_client/utils/threaded_uploader.py +153 -0
  817. rapidata/rapidata_client/validation/__init__.py +2 -0
  818. rapidata/rapidata_client/validation/rapidata_validation_set.py +106 -12
  819. rapidata/rapidata_client/validation/rapids/__init__.py +2 -0
  820. rapidata/rapidata_client/validation/rapids/_validation_rapid_uploader.py +48 -0
  821. rapidata/rapidata_client/validation/rapids/box.py +37 -12
  822. rapidata/rapidata_client/validation/rapids/rapids.py +29 -104
  823. rapidata/rapidata_client/validation/rapids/rapids_manager.py +371 -214
  824. rapidata/rapidata_client/validation/validation_set_manager.py +529 -227
  825. rapidata/rapidata_client/workflow/__init__.py +2 -2
  826. rapidata/rapidata_client/workflow/_base_workflow.py +25 -7
  827. rapidata/rapidata_client/workflow/_classify_workflow.py +58 -15
  828. rapidata/rapidata_client/workflow/_compare_workflow.py +44 -9
  829. rapidata/rapidata_client/workflow/_draw_workflow.py +40 -10
  830. rapidata/rapidata_client/workflow/_evaluation_workflow.py +28 -7
  831. rapidata/rapidata_client/workflow/_free_text_workflow.py +46 -9
  832. rapidata/rapidata_client/workflow/_locate_workflow.py +40 -10
  833. rapidata/rapidata_client/workflow/_multi_ranking_workflow.py +90 -0
  834. rapidata/rapidata_client/workflow/_select_words_workflow.py +51 -11
  835. rapidata/rapidata_client/workflow/_timestamp_workflow.py +42 -11
  836. rapidata/service/__init__.py +0 -1
  837. rapidata/service/credential_manager.py +18 -18
  838. rapidata/service/openapi_service.py +128 -28
  839. rapidata/types/__init__.py +149 -0
  840. rapidata-3.0.1.dist-info/METADATA +32 -0
  841. rapidata-3.0.1.dist-info/RECORD +1089 -0
  842. {rapidata-2.23.2.dist-info → rapidata-3.0.1.dist-info}/WHEEL +1 -1
  843. rapidata/rapidata_client/api/rapidata_exception.py +0 -107
  844. rapidata/rapidata_client/assets/__init__.py +0 -10
  845. rapidata/rapidata_client/assets/_base_asset.py +0 -11
  846. rapidata/rapidata_client/assets/_media_asset.py +0 -306
  847. rapidata/rapidata_client/assets/_multi_asset.py +0 -66
  848. rapidata/rapidata_client/assets/_sessions.py +0 -35
  849. rapidata/rapidata_client/assets/_text_asset.py +0 -34
  850. rapidata/rapidata_client/assets/data_type_enum.py +0 -7
  851. rapidata/rapidata_client/country_codes/__init__.py +0 -1
  852. rapidata/rapidata_client/country_codes/country_codes.py +0 -19
  853. rapidata/rapidata_client/logging/__init__.py +0 -2
  854. rapidata/rapidata_client/logging/logger.py +0 -47
  855. rapidata/rapidata_client/logging/output_manager.py +0 -16
  856. rapidata/rapidata_client/metadata/_private_text_metadata.py +0 -17
  857. rapidata/rapidata_client/metadata/_prompt_metadata.py +0 -18
  858. rapidata/rapidata_client/metadata/_public_text_metadata.py +0 -17
  859. rapidata/rapidata_client/order/_rapidata_dataset.py +0 -443
  860. rapidata/rapidata_client/workflow/_ranking_workflow.py +0 -51
  861. rapidata/service/local_file_service.py +0 -25
  862. rapidata-2.23.2.dist-info/METADATA +0 -34
  863. rapidata-2.23.2.dist-info/RECORD +0 -523
  864. /rapidata/rapidata_client/{metadata → datapoints/metadata}/_base_metadata.py +0 -0
  865. {rapidata-2.23.2.dist-info → rapidata-3.0.1.dist-info/licenses}/LICENSE +0 -0
@@ -0,0 +1,758 @@
1
+ from __future__ import annotations
2
+
3
+ from rapidata.service.openapi_service import OpenAPIService
4
+ from rapidata.rapidata_client.config import logger, tracer
5
+ from rapidata.rapidata_client.datapoints._datapoint import Datapoint
6
+ from rapidata.rapidata_client.workflow import Workflow
7
+ from rapidata.rapidata_client.settings import RapidataSetting
8
+ from rapidata.rapidata_client.job.job_definition import JobDefinition
9
+ from typing import Sequence, Literal, TYPE_CHECKING
10
+ from rapidata.rapidata_client.datapoints._asset_uploader import AssetUploader
11
+ from rapidata.rapidata_client.dataset._rapidata_dataset import RapidataDataset
12
+ from rapidata.rapidata_client.exceptions.failed_upload_exception import (
13
+ FailedUploadException,
14
+ )
15
+ from rapidata.rapidata_client.datapoints._datapoints_validator import (
16
+ DatapointsValidator,
17
+ )
18
+
19
+ if TYPE_CHECKING:
20
+ from rapidata.rapidata_client.job.rapidata_job import RapidataJob
21
+
22
+
23
+ class JobManager:
24
+ """
25
+ A manager for job definitions.
26
+ Used to create and retrieve job definitions.
27
+ """
28
+
29
+ def __init__(self, openapi_service: OpenAPIService):
30
+ self._openapi_service = openapi_service
31
+
32
+ self.__priority: int | None = None
33
+ self._asset_uploader = AssetUploader(openapi_service)
34
+ logger.debug("JobManager initialized")
35
+
36
+ def _create_general_job_definition(
37
+ self,
38
+ name: str,
39
+ workflow: Workflow,
40
+ datapoints: list[Datapoint],
41
+ responses_per_datapoint: int = 10,
42
+ confidence_threshold: float | None = None,
43
+ settings: Sequence[RapidataSetting] | None = None,
44
+ ) -> JobDefinition:
45
+ if settings is None:
46
+ settings = []
47
+
48
+ if not confidence_threshold:
49
+ from rapidata.rapidata_client.referee._naive_referee import NaiveReferee
50
+
51
+ referee = NaiveReferee(responses=responses_per_datapoint)
52
+ else:
53
+ from rapidata.rapidata_client.referee._early_stopping_referee import (
54
+ EarlyStoppingReferee,
55
+ )
56
+
57
+ referee = EarlyStoppingReferee(
58
+ threshold=confidence_threshold,
59
+ max_responses=responses_per_datapoint,
60
+ )
61
+
62
+ logger.debug(
63
+ "Creating job with parameters: name %s, workflow %s, datapoints %s, responses_per_datapoint %s, confidence_threshold %s, settings %s",
64
+ name,
65
+ workflow,
66
+ datapoints,
67
+ responses_per_datapoint,
68
+ confidence_threshold,
69
+ settings,
70
+ )
71
+ from rapidata.api_client.models.create_dataset_endpoint_input import (
72
+ CreateDatasetEndpointInput,
73
+ )
74
+ from rapidata.api_client.models.create_job_definition_endpoint_input import (
75
+ CreateJobDefinitionEndpointInput,
76
+ )
77
+
78
+ dataset = self._openapi_service.dataset_api.dataset_post(
79
+ create_dataset_endpoint_input=CreateDatasetEndpointInput(
80
+ name=name + "_dataset"
81
+ )
82
+ )
83
+ rapidata_dataset = RapidataDataset(dataset.dataset_id, self._openapi_service)
84
+
85
+ with tracer.start_as_current_span("add_datapoints"):
86
+ _, failed_uploads = rapidata_dataset.add_datapoints(datapoints)
87
+
88
+ job_definition_response = self._openapi_service.job_api.job_definition_post(
89
+ create_job_definition_endpoint_input=CreateJobDefinitionEndpointInput(
90
+ definitionName=name,
91
+ workflow=workflow._to_model(),
92
+ datasetId=rapidata_dataset.id,
93
+ referee=referee._to_model(),
94
+ featureFlags=(
95
+ [s._to_feature_flag() for s in settings] if settings else None
96
+ ),
97
+ )
98
+ )
99
+ job_model = JobDefinition(
100
+ id=job_definition_response.definition_id,
101
+ name=name,
102
+ openapi_service=self._openapi_service,
103
+ )
104
+
105
+ if failed_uploads:
106
+ raise FailedUploadException(rapidata_dataset, failed_uploads, job=job_model)
107
+
108
+ return job_model
109
+
110
+ def create_classification_job_definition(
111
+ self,
112
+ name: str,
113
+ instruction: str,
114
+ answer_options: list[str],
115
+ datapoints: list[str],
116
+ data_type: Literal["media", "text"] = "media",
117
+ responses_per_datapoint: int = 10,
118
+ contexts: list[str] | None = None,
119
+ media_contexts: list[str] | None = None,
120
+ confidence_threshold: float | None = None,
121
+ settings: Sequence[RapidataSetting] | None = None,
122
+ private_notes: list[str] | None = None,
123
+ ) -> JobDefinition:
124
+ """Create a classification job definition.
125
+
126
+ With this order you can have a datapoint (image, text, video, audio) be classified into one of the answer options.
127
+ Each response will be exactly one of the answer options.
128
+
129
+ Args:
130
+ name (str): The name of the job. (Will not be shown to the labeler)
131
+ instruction (str): The instruction for how the data should be classified.
132
+ answer_options (list[str]): The list of options for the classification.
133
+ datapoints (list[str]): The list of datapoints for the classification - each datapoint will be labeled.
134
+ data_type (str, optional): The data type of the datapoints. Defaults to "media" (any form of image, video or audio). \n
135
+ Other option: "text".
136
+ responses_per_datapoint (int, optional): The number of responses that will be collected per datapoint. Defaults to 10.
137
+ contexts (list[str], optional): The list of contexts for the classification. Defaults to None.\n
138
+ If provided has to be the same length as datapoints and will be shown in addition to the instruction and options. (Therefore will be different for each datapoint)
139
+ Will be match up with the datapoints using the list index.
140
+ media_contexts (list[str], optional): The list of media contexts for the classification i.e links to the images / videos. Defaults to None.\n
141
+ If provided has to be the same length as datapoints and will be shown in addition to the instruction and options. (Therefore will be different for each datapoint)
142
+ confidence_threshold (float, optional): The probability threshold for the classification. Defaults to None.\n
143
+ If provided, the classification datapoint will stop after the threshold is reached or at the number of responses, whatever happens first.
144
+ settings (Sequence[RapidataSetting], optional): The list of settings for the classification. Defaults to []. Decides how the tasks should be shown.
145
+ private_notes (list[str], optional): The list of private notes for the classification. Defaults to None.
146
+ If provided has to be the same length as datapoints.\n
147
+ This will NOT be shown to the labelers but will be included in the result purely for your own reference.
148
+ """
149
+ with tracer.start_as_current_span("JobManager.create_classification_job"):
150
+ if not isinstance(datapoints, list) or not all(
151
+ isinstance(datapoint, str) for datapoint in datapoints
152
+ ):
153
+ raise ValueError("Datapoints must be a list of strings")
154
+
155
+ from rapidata.rapidata_client.workflow import ClassifyWorkflow
156
+
157
+ datapoints_instances = DatapointsValidator.map_datapoints(
158
+ datapoints=datapoints,
159
+ contexts=contexts,
160
+ media_contexts=media_contexts,
161
+ private_notes=private_notes,
162
+ data_type=data_type,
163
+ )
164
+ return self._create_general_job_definition(
165
+ name=name,
166
+ workflow=ClassifyWorkflow(
167
+ instruction=instruction, answer_options=answer_options
168
+ ),
169
+ datapoints=datapoints_instances,
170
+ responses_per_datapoint=responses_per_datapoint,
171
+ confidence_threshold=confidence_threshold,
172
+ settings=settings,
173
+ )
174
+
175
+ def create_compare_job_definition(
176
+ self,
177
+ name: str,
178
+ instruction: str,
179
+ datapoints: list[list[str]],
180
+ data_type: Literal["media", "text"] = "media",
181
+ responses_per_datapoint: int = 10,
182
+ contexts: list[str] | None = None,
183
+ media_contexts: list[str] | None = None,
184
+ a_b_names: list[str] | None = None,
185
+ confidence_threshold: float | None = None,
186
+ settings: Sequence[RapidataSetting] | None = None,
187
+ private_notes: list[str] | None = None,
188
+ ) -> JobDefinition:
189
+ """Create a compare job definition.
190
+
191
+ With this order you compare two datapoints (image, text, video, audio) and the annotators will choose one of the two based on the instruction.
192
+
193
+ Args:
194
+ name (str): The name of the job. (Will not be shown to the labeler)
195
+ instruction (str): The instruction for the comparison. Will be shown along side each datapoint.
196
+ datapoints (list[list[str]]): Outher list is the datapoints, inner list is the options for the comparison - each datapoint will be labeled.
197
+ data_type (str, optional): The data type of the datapoints. Defaults to "media" (any form of image, video or audio). \n
198
+ Other option: "text".
199
+ responses_per_datapoint (int, optional): The number of responses that will be collected per datapoint. Defaults to 10.
200
+ contexts (list[str], optional): The list of contexts for the comparison. Defaults to None.\n
201
+ 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)
202
+ Will be matched up with the datapoints using the list index.
203
+ media_contexts (list[str], optional): The list of media contexts i.e. links to the images / videos for the comparison. Defaults to None.\n
204
+ 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)
205
+ Will be matched up with the datapoints using the list index.
206
+ a_b_names (list[str], optional): Custom naming for the two opposing models defined by the index in the datapoints list. Defaults to None.\n
207
+ If provided has to be a list of exactly two strings.
208
+ example:
209
+ ```python
210
+ datapoints = [["path_to_image_A", "path_to_image_B"], ["path_to_text_A", "path_to_text_B"]]
211
+ a_b_naming = ["Model A", "Model B"]
212
+ ```
213
+ The results will then correctly show "Model A" and "Model B".
214
+ If not provided, the results will be shown as "A" and "B".
215
+ confidence_threshold (float, optional): The probability threshold for the comparison. Defaults to None.\n
216
+ If provided, the comparison datapoint will stop after the threshold is reached or at the number of responses, whatever happens first.
217
+ settings (Sequence[RapidataSetting], optional): The list of settings for the comparison. Defaults to []. Decides how the tasks should be shown.
218
+ private_notes (list[str], optional): The list of private notes for the comparison. Defaults to None.\n
219
+ If provided has to be the same length as datapoints.\n
220
+ This will NOT be shown to the labelers but will be included in the result purely for your own reference.
221
+ """
222
+ with tracer.start_as_current_span("JobManager.create_compare_job"):
223
+ if any(not isinstance(datapoint, list) for datapoint in datapoints):
224
+ raise ValueError("Each datapoint must be a list of 2 paths/texts")
225
+
226
+ if any(len(set(datapoint)) != 2 for datapoint in datapoints):
227
+ raise ValueError(
228
+ "Each datapoint must contain exactly two unique options"
229
+ )
230
+
231
+ if a_b_names is not None and len(a_b_names) != 2:
232
+ raise ValueError(
233
+ "A_B_naming must be a list of exactly two strings or None"
234
+ )
235
+
236
+ from rapidata.rapidata_client.workflow import CompareWorkflow
237
+
238
+ datapoints_instances = DatapointsValidator.map_datapoints(
239
+ datapoints=datapoints,
240
+ contexts=contexts,
241
+ media_contexts=media_contexts,
242
+ private_notes=private_notes,
243
+ data_type=data_type,
244
+ )
245
+ return self._create_general_job_definition(
246
+ name=name,
247
+ workflow=CompareWorkflow(instruction=instruction, a_b_names=a_b_names),
248
+ datapoints=datapoints_instances,
249
+ responses_per_datapoint=responses_per_datapoint,
250
+ confidence_threshold=confidence_threshold,
251
+ settings=settings,
252
+ )
253
+
254
+ def _create_ranking_job_definition(
255
+ self,
256
+ name: str,
257
+ instruction: str,
258
+ datapoints: list[list[str]],
259
+ comparison_budget_per_ranking: int,
260
+ responses_per_comparison: int = 1,
261
+ data_type: Literal["media", "text"] = "media",
262
+ random_comparisons_ratio: float = 0.5,
263
+ contexts: list[str] | None = None,
264
+ media_contexts: list[str] | None = None,
265
+ settings: Sequence[RapidataSetting] | None = None,
266
+ ) -> JobDefinition:
267
+ """
268
+ Create a ranking job definition.
269
+
270
+ With this order you can have a multiple lists of datapoints (image, text, video, audio) be ranked based on the instruction.
271
+ Each list will be ranked independently, based on comparison matchups.
272
+
273
+ Args:
274
+ name (str): The name of the job.
275
+ instruction (str): The instruction for the ranking. Will be shown with each matchup.
276
+ datapoints (list[list[str]]): The outer list is determines the independent rankings, the inner list is the datapoints for each ranking.
277
+ comparison_budget_per_ranking (int): The number of comparisons that will be collected per ranking (outer list of datapoints).
278
+ responses_per_comparison (int, optional): The number of responses that will be collected per comparison. Defaults to 1.
279
+ data_type (str, optional): The data type of the datapoints. Defaults to "media" (any form of image, video or audio). \n
280
+ Other option: "text".
281
+ random_comparisons_ratio (float, optional): The ratio of random comparisons to the total number of comparisons. Defaults to 0.5.
282
+ contexts (list[str], optional): The list of contexts for the ranking. Defaults to None.\n
283
+ If provided has to be the same length as the outer list of datapoints and will be shown in addition to the instruction. (Therefore will be different for each ranking)
284
+ Will be matched up with the datapoints using the list index.
285
+ media_contexts (list[str], optional): The list of media contexts for the ranking i.e links to the images / videos. Defaults to None.\n
286
+ If provided has to be the same length as the outer list of datapoints and will be shown in addition to the instruction. (Therefore will be different for each ranking)
287
+ Will be matched up with the datapoints using the list index.
288
+ validation_set_id (str, optional): The ID of the validation set. Defaults to None.\n
289
+ If provided, one validation task will be shown infront of the datapoints that will be labeled.
290
+ settings (Sequence[RapidataSetting], optional): The list of settings for the ranking. Defaults to []. Decides how the tasks should be shown.
291
+ """
292
+ with tracer.start_as_current_span("JobManager.create_ranking_job"):
293
+ if contexts and len(contexts) != len(datapoints):
294
+ raise ValueError(
295
+ "Number of contexts must match the number of sets that will be ranked"
296
+ )
297
+ if media_contexts and len(media_contexts) != len(datapoints):
298
+ raise ValueError(
299
+ "Number of media contexts must match the number of sets that will be ranked"
300
+ )
301
+ if not isinstance(datapoints, list) or not all(
302
+ isinstance(dp, list) for dp in datapoints
303
+ ):
304
+ raise ValueError(
305
+ "Datapoints must be a list of lists. Outer list is the independent rankings, inner list is the datapoints for each ranking."
306
+ )
307
+ if not all(len(set(dp)) == len(dp) for dp in datapoints):
308
+ raise ValueError("Each inner list must contain unique datapoints.")
309
+
310
+ if not all(len(inner_list) >= 2 for inner_list in datapoints):
311
+ raise ValueError(
312
+ "Each ranking must contain at least two unique datapoints."
313
+ )
314
+
315
+ from rapidata.rapidata_client.workflow import MultiRankingWorkflow
316
+ from rapidata.api_client.models.i_asset_input import IAssetInput
317
+ from rapidata.api_client.models.i_asset_input_existing_asset_input import (
318
+ IAssetInputExistingAssetInput,
319
+ )
320
+
321
+ datapoints_instances = []
322
+ for i, datapoint in enumerate(datapoints):
323
+ for d in datapoint:
324
+ datapoints_instances.append(
325
+ Datapoint(
326
+ asset=d,
327
+ data_type=data_type,
328
+ context=contexts[i] if contexts else None,
329
+ media_context=media_contexts[i] if media_contexts else None,
330
+ group=str(i),
331
+ )
332
+ )
333
+
334
+ contexts_dict = (
335
+ {str(i): context for i, context in enumerate(contexts)}
336
+ if contexts
337
+ else None
338
+ )
339
+
340
+ media_contexts_dict = (
341
+ {
342
+ str(i): IAssetInput(
343
+ actual_instance=IAssetInputExistingAssetInput(
344
+ _t="ExistingAssetInput",
345
+ name=self._asset_uploader.upload_asset(media_context),
346
+ )
347
+ )
348
+ for i, media_context in enumerate(media_contexts)
349
+ }
350
+ if media_contexts
351
+ else None
352
+ )
353
+
354
+ return self._create_general_job_definition(
355
+ name=name,
356
+ workflow=MultiRankingWorkflow(
357
+ instruction=instruction,
358
+ comparison_budget_per_ranking=comparison_budget_per_ranking,
359
+ random_comparisons_ratio=random_comparisons_ratio,
360
+ contexts=contexts_dict,
361
+ media_contexts=media_contexts_dict,
362
+ ),
363
+ datapoints=datapoints_instances,
364
+ responses_per_datapoint=responses_per_comparison,
365
+ settings=settings,
366
+ )
367
+
368
+ def _create_free_text_job_definition(
369
+ self,
370
+ name: str,
371
+ instruction: str,
372
+ datapoints: list[str],
373
+ data_type: Literal["media", "text"] = "media",
374
+ responses_per_datapoint: int = 10,
375
+ contexts: list[str] | None = None,
376
+ media_contexts: list[str] | None = None,
377
+ settings: Sequence[RapidataSetting] | None = None,
378
+ private_notes: list[str] | None = None,
379
+ ) -> JobDefinition:
380
+ """Create a free text job definition.
381
+
382
+ With this order you can have a datapoint (image, text, video, audio) be labeled with free text.
383
+ The annotators will be shown a datapoint and will be asked to answer a question with free text.
384
+
385
+ Args:
386
+ name (str): The name of the job.
387
+ instruction (str): The instruction to answer with free text. Will be shown along side each datapoint.
388
+ datapoints (list[str]): The list of datapoints for the free text - each datapoint will be labeled.
389
+ data_type (str, optional): The data type of the datapoints. Defaults to "media" (any form of image, video or audio). \n
390
+ Other option: "text".
391
+ responses_per_datapoint (int, optional): The number of responses that will be collected per datapoint. Defaults to 10.
392
+ contexts (list[str], optional): The list of contexts for the free text. Defaults to None.\n
393
+ 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)
394
+ Will be matched up with the datapoints using the list index.
395
+ media_contexts (list[str], optional): The list of media contexts for the free text i.e links to the images / videos. Defaults to None.\n
396
+ 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)
397
+ Will be matched up with the datapoints using the list index.
398
+ settings (Sequence[RapidataSetting], optional): The list of settings for the free text. Defaults to []. Decides how the tasks should be shown.
399
+ private_notes (list[str], optional): The list of private notes for the free text. Defaults to None.\n
400
+ If provided has to be the same length as datapoints.\n
401
+ This will NOT be shown to the labelers but will be included in the result purely for your own reference.
402
+ """
403
+ with tracer.start_as_current_span("JobManager.create_free_text_job"):
404
+ from rapidata.rapidata_client.workflow import FreeTextWorkflow
405
+
406
+ datapoints_instances = DatapointsValidator.map_datapoints(
407
+ datapoints=datapoints,
408
+ contexts=contexts,
409
+ media_contexts=media_contexts,
410
+ private_notes=private_notes,
411
+ data_type=data_type,
412
+ )
413
+ return self._create_general_job_definition(
414
+ name=name,
415
+ workflow=FreeTextWorkflow(instruction=instruction),
416
+ datapoints=datapoints_instances,
417
+ responses_per_datapoint=responses_per_datapoint,
418
+ settings=settings,
419
+ )
420
+
421
+ def _create_select_words_job_definition(
422
+ self,
423
+ name: str,
424
+ instruction: str,
425
+ datapoints: list[str],
426
+ sentences: list[str],
427
+ responses_per_datapoint: int = 10,
428
+ settings: Sequence[RapidataSetting] | None = None,
429
+ private_notes: list[str] | None = None,
430
+ ) -> JobDefinition:
431
+ """Create a select words job definition.
432
+
433
+ With this order you can have a datapoint (image, text, video, audio) be labeled with a list of words.
434
+ The annotators will be shown a datapoint as well as a list of sentences split up by spaces.
435
+ They will then select specific words based on the instruction.
436
+
437
+ Args:
438
+ name (str): The name of the job.
439
+ instruction (str): The instruction for how the words should be selected. Will be shown along side each datapoint.
440
+ datapoints (list[str]): The list of datapoints for the select words - each datapoint will be labeled.
441
+ sentences (list[str]): The list of sentences for the select words - Will be split up by spaces and shown along side each datapoint.\n
442
+ Must be the same length as datapoints.
443
+ responses_per_datapoint (int, optional): The number of responses that will be collected per datapoint. Defaults to 10.
444
+ settings (Sequence[RapidataSetting], optional): The list of settings for the select words. Defaults to []. Decides how the tasks should be shown.
445
+ private_notes (list[str], optional): The list of private notes for the select words. Defaults to None.\n
446
+ If provided has to be the same length as datapoints.\n
447
+ This will NOT be shown to the labelers but will be included in the result purely for your own reference.
448
+ """
449
+ with tracer.start_as_current_span("JobManager.create_select_words_job"):
450
+ from rapidata.rapidata_client.workflow import SelectWordsWorkflow
451
+
452
+ datapoints_instances = DatapointsValidator.map_datapoints(
453
+ datapoints=datapoints,
454
+ sentences=sentences,
455
+ private_notes=private_notes,
456
+ )
457
+ return self._create_general_job_definition(
458
+ name=name,
459
+ workflow=SelectWordsWorkflow(
460
+ instruction=instruction,
461
+ ),
462
+ datapoints=datapoints_instances,
463
+ responses_per_datapoint=responses_per_datapoint,
464
+ settings=settings,
465
+ )
466
+
467
+ def _create_locate_job_definition(
468
+ self,
469
+ name: str,
470
+ instruction: str,
471
+ datapoints: list[str],
472
+ responses_per_datapoint: int = 10,
473
+ contexts: list[str] | None = None,
474
+ media_contexts: list[str] | None = None,
475
+ settings: Sequence[RapidataSetting] | None = None,
476
+ private_notes: list[str] | None = None,
477
+ ) -> JobDefinition:
478
+ """Create a locate job definition.
479
+
480
+ With this order you can have people locate specific objects in a datapoint (image, text, video, audio).
481
+ The annotators will be shown a datapoint and will be asked to select locations based on the instruction.
482
+
483
+ Args:
484
+ name (str): The name of the job. (Will not be shown to the labeler)
485
+ instruction (str): The instruction what should be located. Will be shown along side each datapoint.
486
+ datapoints (list[str]): The list of datapoints for the locate - each datapoint will be labeled.
487
+ responses_per_datapoint (int, optional): The number of responses that will be collected per datapoint. Defaults to 10.
488
+ contexts (list[str], optional): The list of contexts for the locate. Defaults to None.\n
489
+ 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)
490
+ Will be match up with the datapoints using the list index.
491
+ media_contexts (list[str], optional): The list of media contexts for the locate i.e links to the images / videos. 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
+ settings (Sequence[RapidataSetting], optional): The list of settings for the locate. Defaults to []. Decides how the tasks should be shown.
494
+ private_notes (list[str], optional): The list of private notes for the locate. Defaults to None.\n
495
+ If provided has to be the same length as datapoints.\n
496
+ This will NOT be shown to the labelers but will be included in the result purely for your own reference.
497
+ """
498
+ with tracer.start_as_current_span("JobManager.create_locate_job"):
499
+ from rapidata.rapidata_client.workflow import LocateWorkflow
500
+
501
+ datapoints_instances = DatapointsValidator.map_datapoints(
502
+ datapoints=datapoints,
503
+ contexts=contexts,
504
+ media_contexts=media_contexts,
505
+ private_notes=private_notes,
506
+ )
507
+ return self._create_general_job_definition(
508
+ name=name,
509
+ workflow=LocateWorkflow(target=instruction),
510
+ datapoints=datapoints_instances,
511
+ responses_per_datapoint=responses_per_datapoint,
512
+ settings=settings,
513
+ )
514
+
515
+ def _create_draw_job_definition(
516
+ self,
517
+ name: str,
518
+ instruction: str,
519
+ datapoints: list[str],
520
+ responses_per_datapoint: int = 10,
521
+ contexts: list[str] | None = None,
522
+ media_contexts: list[str] | None = None,
523
+ settings: Sequence[RapidataSetting] | None = None,
524
+ private_notes: list[str] | None = None,
525
+ ) -> JobDefinition:
526
+ """Create a draw job definition.
527
+
528
+ With this order you can have people draw lines on a datapoint (image, text, video, audio).
529
+ The annotators will be shown a datapoint and will be asked to draw lines based on the instruction.
530
+
531
+ Args:
532
+ name (str): The name of the job. (Will not be shown to the labeler)
533
+ instruction (str): The instruction for how the lines should be drawn. Will be shown along side each datapoint.
534
+ datapoints (list[str]): The list of datapoints for the draw lines - each datapoint will be labeled.
535
+ responses_per_datapoint (int, optional): The number of responses that will be collected per datapoint. Defaults to 10.
536
+ contexts (list[str], optional): The list of contexts for the comparison. Defaults to None.\n
537
+ 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)
538
+ Will be match up with the datapoints using the list index.
539
+ media_contexts (list[str], optional): The list of media contexts for the draw lines i.e links to the images / videos. Defaults to None.\n
540
+ 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)
541
+ settings (Sequence[RapidataSetting], optional): The list of settings for the draw lines. Defaults to []. Decides how the tasks should be shown.
542
+ private_notes (list[str], optional): The list of private notes for the draw lines. Defaults to None.\n
543
+ If provided has to be the same length as datapoints.\n
544
+ This will NOT be shown to the labelers but will be included in the result purely for your own reference.
545
+ """
546
+ with tracer.start_as_current_span("JobManager.create_draw_job"):
547
+ from rapidata.rapidata_client.workflow import DrawWorkflow
548
+
549
+ datapoints_instances = DatapointsValidator.map_datapoints(
550
+ datapoints=datapoints,
551
+ contexts=contexts,
552
+ media_contexts=media_contexts,
553
+ private_notes=private_notes,
554
+ )
555
+ return self._create_general_job_definition(
556
+ name=name,
557
+ workflow=DrawWorkflow(target=instruction),
558
+ datapoints=datapoints_instances,
559
+ responses_per_datapoint=responses_per_datapoint,
560
+ settings=settings,
561
+ )
562
+
563
+ def _create_timestamp_job_definition(
564
+ self,
565
+ name: str,
566
+ instruction: str,
567
+ datapoints: list[str],
568
+ responses_per_datapoint: int = 10,
569
+ contexts: list[str] | None = None,
570
+ media_contexts: list[str] | None = None,
571
+ settings: Sequence[RapidataSetting] | None = None,
572
+ private_notes: list[str] | None = None,
573
+ ) -> JobDefinition:
574
+ """Create a timestamp job definition.
575
+
576
+ Warning:
577
+ This job is currently not fully supported and may give unexpected results.
578
+
579
+ With this order you can have people mark specific timestamps in a datapoint (video, audio).
580
+ The annotators will be shown a datapoint and will be asked to select a timestamp based on the instruction.
581
+
582
+ Args:
583
+ name (str): The name of the job. (Will not be shown to the labeler)
584
+ instruction (str): The instruction for the timestamp task. Will be shown along side each datapoint.
585
+ datapoints (list[str]): The list of datapoints for the timestamp - each datapoint will be labeled.
586
+ responses_per_datapoint (int, optional): The number of responses that will be collected per datapoint. Defaults to 10.
587
+ contexts (list[str], optional): The list of contexts for the comparison. Defaults to None.\n
588
+ 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)
589
+ Will be match up with the datapoints using the list index.
590
+ media_contexts (list[str], optional): The list of media contexts for the timestamp i.e links to the images / videos. Defaults to None.\n
591
+ 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)
592
+ settings (Sequence[RapidataSetting], optional): The list of settings for the timestamp. Defaults to []. Decides how the tasks should be shown.
593
+ private_notes (list[str], optional): The list of private notes for the timestamp. Defaults to None.\n
594
+ If provided has to be the same length as datapoints.\n
595
+ This will NOT be shown to the labelers but will be included in the result purely for your own reference.
596
+ """
597
+ with tracer.start_as_current_span("JobManager.create_timestamp_job"):
598
+ from rapidata.rapidata_client.workflow import TimestampWorkflow
599
+
600
+ datapoints_instances = DatapointsValidator.map_datapoints(
601
+ datapoints=datapoints,
602
+ contexts=contexts,
603
+ media_contexts=media_contexts,
604
+ private_notes=private_notes,
605
+ )
606
+ return self._create_general_job_definition(
607
+ name=name,
608
+ workflow=TimestampWorkflow(instruction=instruction),
609
+ datapoints=datapoints_instances,
610
+ responses_per_datapoint=responses_per_datapoint,
611
+ settings=settings,
612
+ )
613
+
614
+ def get_job_definition_by_id(self, job_definition_id: str) -> JobDefinition:
615
+ """Get a job definition by ID.
616
+
617
+ Args:
618
+ job_definition_id (str): The ID of the job definition.
619
+
620
+ Returns:
621
+ JobDefinition: The JobDefinition instance.
622
+ """
623
+ with tracer.start_as_current_span("JobManager.get_job_definition_by_id"):
624
+
625
+ job_definition = (
626
+ self._openapi_service.job_api.job_definition_definition_id_get(
627
+ definition_id=job_definition_id,
628
+ )
629
+ )
630
+
631
+ return JobDefinition(
632
+ id=job_definition.definition_id,
633
+ name=job_definition.name,
634
+ openapi_service=self._openapi_service,
635
+ )
636
+
637
+ def find_job_definitions(
638
+ self, name: str = "", amount: int = 10
639
+ ) -> list[JobDefinition]:
640
+ """Find your recent jobs given criteria. If nothing is provided, it will return the most recent job definitions.
641
+
642
+ Args:
643
+ name (str, optional): The name of the job definition - matching job definition will contain the name. Defaults to "" for any job definition.
644
+ amount (int, optional): The amount of job definitions to return. Defaults to 10.
645
+
646
+ Returns:
647
+ list[JobDefinition]: A list of JobDefinition instances.
648
+ """
649
+ with tracer.start_as_current_span("JobManager.find_job_definitions"):
650
+ from rapidata.api_client.models.page_info import PageInfo
651
+ from rapidata.api_client.models.query_model import QueryModel
652
+ from rapidata.api_client.models.root_filter import RootFilter
653
+ from rapidata.api_client.models.filter import Filter
654
+ from rapidata.api_client.models.filter_operator import FilterOperator
655
+ from rapidata.api_client.models.sort_criterion import SortCriterion
656
+ from rapidata.api_client.models.sort_direction import SortDirection
657
+
658
+ job_definition_page_result = (
659
+ self._openapi_service.job_api.job_definitions_get(
660
+ request=QueryModel(
661
+ page=PageInfo(index=1, size=amount),
662
+ filter=RootFilter(
663
+ filters=[
664
+ Filter(
665
+ field="Name",
666
+ operator=FilterOperator.CONTAINS,
667
+ value=name,
668
+ )
669
+ ]
670
+ ),
671
+ sortCriteria=[
672
+ SortCriterion(
673
+ direction=SortDirection.DESC, propertyName="CreatedAt"
674
+ )
675
+ ],
676
+ ),
677
+ )
678
+ )
679
+
680
+ jobs = [
681
+ JobDefinition(
682
+ id=job_def.definition_id,
683
+ name=job_def.name,
684
+ openapi_service=self._openapi_service,
685
+ )
686
+ for job_def in job_definition_page_result.items
687
+ ]
688
+ return jobs
689
+
690
+ def get_job_by_id(self, job_id: str) -> RapidataJob:
691
+ """Get a job by ID.
692
+
693
+ Args:
694
+ job_id (str): The ID of the job.
695
+
696
+ Returns:
697
+ RapidataJob: The Job instance.
698
+ """
699
+ with tracer.start_as_current_span("JobManager.get_job_by_id"):
700
+ from rapidata.rapidata_client.job.rapidata_job import RapidataJob
701
+
702
+ job_response = self._openapi_service.job_api.job_job_id_get(
703
+ job_id=job_id,
704
+ )
705
+ return RapidataJob(
706
+ job_response.job_id, job_response.name, self._openapi_service
707
+ )
708
+
709
+ def find_jobs(self, name: str = "", amount: int = 10) -> list[RapidataJob]:
710
+ """Find your recent jobs given criteria. If nothing is provided, it will return the most recent jobs.
711
+
712
+ Args:
713
+ name (str, optional): The name of the job - matching job will contain the name. Defaults to "" for any job.
714
+ amount (int, optional): The amount of jobs to return. Defaults to 10.
715
+
716
+ Returns:
717
+ list[RapidataJob]: A list of RapidataJob instances.
718
+ """
719
+ with tracer.start_as_current_span("JobManager.find_jobs"):
720
+ from rapidata.api_client.models.query_model import QueryModel
721
+ from rapidata.api_client.models.root_filter import RootFilter
722
+ from rapidata.api_client.models.filter import Filter
723
+ from rapidata.api_client.models.filter_operator import FilterOperator
724
+ from rapidata.api_client.models.page_info import PageInfo
725
+ from rapidata.api_client.models.sort_criterion import SortCriterion
726
+ from rapidata.api_client.models.sort_direction import SortDirection
727
+ from rapidata.rapidata_client.job.rapidata_job import RapidataJob
728
+
729
+ response = self._openapi_service.job_api.jobs_get(
730
+ request=QueryModel(
731
+ page=PageInfo(index=1, size=amount),
732
+ filter=RootFilter(
733
+ filters=[
734
+ Filter(
735
+ field="Name",
736
+ operator=FilterOperator.CONTAINS,
737
+ value=name,
738
+ )
739
+ ]
740
+ ),
741
+ sortCriteria=[
742
+ SortCriterion(
743
+ direction=SortDirection.DESC, propertyName="CreatedAt"
744
+ )
745
+ ],
746
+ ),
747
+ )
748
+ jobs = [
749
+ RapidataJob(job.job_id, job.name, self._openapi_service)
750
+ for job in response.items
751
+ ]
752
+ return jobs
753
+
754
+ def __str__(self) -> str:
755
+ return "JobManager"
756
+
757
+ def __repr__(self) -> str:
758
+ return self.__str__()