rapidata 2.40.6__py3-none-any.whl → 2.41.0__py3-none-any.whl

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

Potentially problematic release.


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

Files changed (37) hide show
  1. rapidata/__init__.py +2 -1
  2. rapidata/api_client/__init__.py +5 -3
  3. rapidata/api_client/api/benchmark_api.py +610 -7
  4. rapidata/api_client/api/campaign_api.py +283 -0
  5. rapidata/api_client/api/evaluation_workflow_api.py +18 -72
  6. rapidata/api_client/api/identity_api.py +0 -278
  7. rapidata/api_client/api/leaderboard_api.py +9 -9
  8. rapidata/api_client/api/validation_set_api.py +5 -15
  9. rapidata/api_client/models/__init__.py +5 -3
  10. rapidata/api_client/models/benchmark_query_result.py +3 -1
  11. rapidata/api_client/models/create_benchmark_participant_result.py +2 -2
  12. rapidata/api_client/models/create_benchmark_prompt_result.py +87 -0
  13. rapidata/api_client/models/get_benchmark_by_id_result.py +4 -2
  14. rapidata/api_client/models/get_evaluation_workflow_results_model.py +114 -0
  15. rapidata/api_client/models/get_participant_by_id_result.py +2 -4
  16. rapidata/api_client/models/get_standing_by_id_result.py +2 -9
  17. rapidata/api_client/models/labeling_selection.py +9 -2
  18. rapidata/api_client/models/participant_by_benchmark.py +1 -3
  19. rapidata/api_client/models/standing_by_benchmark.py +113 -0
  20. rapidata/api_client/models/standing_by_leaderboard.py +1 -3
  21. rapidata/api_client/models/standings_by_benchmark_result.py +95 -0
  22. rapidata/api_client/models/sticky_state.py +1 -0
  23. rapidata/api_client/models/update_benchmark_model.py +5 -3
  24. rapidata/api_client/models/update_priority_model.py +87 -0
  25. rapidata/api_client/models/validation_set_model.py +32 -2
  26. rapidata/api_client_README.md +9 -5
  27. rapidata/rapidata_client/__init__.py +1 -0
  28. rapidata/rapidata_client/api/rapidata_api_client.py +3 -3
  29. rapidata/rapidata_client/benchmark/rapidata_benchmark_manager.py +3 -3
  30. rapidata/rapidata_client/settings/__init__.py +1 -0
  31. rapidata/rapidata_client/settings/rapidata_settings.py +3 -0
  32. rapidata/rapidata_client/settings/swap_context_instruction.py +20 -0
  33. rapidata/rapidata_client/validation/rapids/rapids.py +13 -0
  34. {rapidata-2.40.6.dist-info → rapidata-2.41.0.dist-info}/METADATA +1 -1
  35. {rapidata-2.40.6.dist-info → rapidata-2.41.0.dist-info}/RECORD +37 -31
  36. {rapidata-2.40.6.dist-info → rapidata-2.41.0.dist-info}/LICENSE +0 -0
  37. {rapidata-2.40.6.dist-info → rapidata-2.41.0.dist-info}/WHEEL +0 -0
@@ -23,6 +23,7 @@ from rapidata.api_client.models.boost_query_result import BoostQueryResult
23
23
  from rapidata.api_client.models.campaign_query_result_paged_result import CampaignQueryResultPagedResult
24
24
  from rapidata.api_client.models.change_boost_model import ChangeBoostModel
25
25
  from rapidata.api_client.models.query_model import QueryModel
26
+ from rapidata.api_client.models.update_priority_model import UpdatePriorityModel
26
27
 
27
28
  from rapidata.api_client.api_client import ApiClient, RequestSerialized
28
29
  from rapidata.api_client.api_response import ApiResponse
@@ -807,6 +808,288 @@ class CampaignApi:
807
808
 
808
809
 
809
810
 
811
+ @validate_call
812
+ def campaign_campaign_id_priority_put(
813
+ self,
814
+ campaign_id: Annotated[StrictStr, Field(description="id of the campaign to update")],
815
+ update_priority_model: Annotated[Optional[UpdatePriorityModel], Field(description="model containing the new priority")] = None,
816
+ _request_timeout: Union[
817
+ None,
818
+ Annotated[StrictFloat, Field(gt=0)],
819
+ Tuple[
820
+ Annotated[StrictFloat, Field(gt=0)],
821
+ Annotated[StrictFloat, Field(gt=0)]
822
+ ]
823
+ ] = None,
824
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
825
+ _content_type: Optional[StrictStr] = None,
826
+ _headers: Optional[Dict[StrictStr, Any]] = None,
827
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
828
+ ) -> None:
829
+ """Updates the priority of a campaign.
830
+
831
+
832
+ :param campaign_id: id of the campaign to update (required)
833
+ :type campaign_id: str
834
+ :param update_priority_model: model containing the new priority
835
+ :type update_priority_model: UpdatePriorityModel
836
+ :param _request_timeout: timeout setting for this request. If one
837
+ number provided, it will be total request
838
+ timeout. It can also be a pair (tuple) of
839
+ (connection, read) timeouts.
840
+ :type _request_timeout: int, tuple(int, int), optional
841
+ :param _request_auth: set to override the auth_settings for an a single
842
+ request; this effectively ignores the
843
+ authentication in the spec for a single request.
844
+ :type _request_auth: dict, optional
845
+ :param _content_type: force content-type for the request.
846
+ :type _content_type: str, Optional
847
+ :param _headers: set to override the headers for a single
848
+ request; this effectively ignores the headers
849
+ in the spec for a single request.
850
+ :type _headers: dict, optional
851
+ :param _host_index: set to override the host_index for a single
852
+ request; this effectively ignores the host_index
853
+ in the spec for a single request.
854
+ :type _host_index: int, optional
855
+ :return: Returns the result object.
856
+ """ # noqa: E501
857
+
858
+ _param = self._campaign_campaign_id_priority_put_serialize(
859
+ campaign_id=campaign_id,
860
+ update_priority_model=update_priority_model,
861
+ _request_auth=_request_auth,
862
+ _content_type=_content_type,
863
+ _headers=_headers,
864
+ _host_index=_host_index
865
+ )
866
+
867
+ _response_types_map: Dict[str, Optional[str]] = {
868
+ '204': None,
869
+ }
870
+ response_data = self.api_client.call_api(
871
+ *_param,
872
+ _request_timeout=_request_timeout
873
+ )
874
+ response_data.read()
875
+ return self.api_client.response_deserialize(
876
+ response_data=response_data,
877
+ response_types_map=_response_types_map,
878
+ ).data
879
+
880
+
881
+ @validate_call
882
+ def campaign_campaign_id_priority_put_with_http_info(
883
+ self,
884
+ campaign_id: Annotated[StrictStr, Field(description="id of the campaign to update")],
885
+ update_priority_model: Annotated[Optional[UpdatePriorityModel], Field(description="model containing the new priority")] = None,
886
+ _request_timeout: Union[
887
+ None,
888
+ Annotated[StrictFloat, Field(gt=0)],
889
+ Tuple[
890
+ Annotated[StrictFloat, Field(gt=0)],
891
+ Annotated[StrictFloat, Field(gt=0)]
892
+ ]
893
+ ] = None,
894
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
895
+ _content_type: Optional[StrictStr] = None,
896
+ _headers: Optional[Dict[StrictStr, Any]] = None,
897
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
898
+ ) -> ApiResponse[None]:
899
+ """Updates the priority of a campaign.
900
+
901
+
902
+ :param campaign_id: id of the campaign to update (required)
903
+ :type campaign_id: str
904
+ :param update_priority_model: model containing the new priority
905
+ :type update_priority_model: UpdatePriorityModel
906
+ :param _request_timeout: timeout setting for this request. If one
907
+ number provided, it will be total request
908
+ timeout. It can also be a pair (tuple) of
909
+ (connection, read) timeouts.
910
+ :type _request_timeout: int, tuple(int, int), optional
911
+ :param _request_auth: set to override the auth_settings for an a single
912
+ request; this effectively ignores the
913
+ authentication in the spec for a single request.
914
+ :type _request_auth: dict, optional
915
+ :param _content_type: force content-type for the request.
916
+ :type _content_type: str, Optional
917
+ :param _headers: set to override the headers for a single
918
+ request; this effectively ignores the headers
919
+ in the spec for a single request.
920
+ :type _headers: dict, optional
921
+ :param _host_index: set to override the host_index for a single
922
+ request; this effectively ignores the host_index
923
+ in the spec for a single request.
924
+ :type _host_index: int, optional
925
+ :return: Returns the result object.
926
+ """ # noqa: E501
927
+
928
+ _param = self._campaign_campaign_id_priority_put_serialize(
929
+ campaign_id=campaign_id,
930
+ update_priority_model=update_priority_model,
931
+ _request_auth=_request_auth,
932
+ _content_type=_content_type,
933
+ _headers=_headers,
934
+ _host_index=_host_index
935
+ )
936
+
937
+ _response_types_map: Dict[str, Optional[str]] = {
938
+ '204': None,
939
+ }
940
+ response_data = self.api_client.call_api(
941
+ *_param,
942
+ _request_timeout=_request_timeout
943
+ )
944
+ response_data.read()
945
+ return self.api_client.response_deserialize(
946
+ response_data=response_data,
947
+ response_types_map=_response_types_map,
948
+ )
949
+
950
+
951
+ @validate_call
952
+ def campaign_campaign_id_priority_put_without_preload_content(
953
+ self,
954
+ campaign_id: Annotated[StrictStr, Field(description="id of the campaign to update")],
955
+ update_priority_model: Annotated[Optional[UpdatePriorityModel], Field(description="model containing the new priority")] = None,
956
+ _request_timeout: Union[
957
+ None,
958
+ Annotated[StrictFloat, Field(gt=0)],
959
+ Tuple[
960
+ Annotated[StrictFloat, Field(gt=0)],
961
+ Annotated[StrictFloat, Field(gt=0)]
962
+ ]
963
+ ] = None,
964
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
965
+ _content_type: Optional[StrictStr] = None,
966
+ _headers: Optional[Dict[StrictStr, Any]] = None,
967
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
968
+ ) -> RESTResponseType:
969
+ """Updates the priority of a campaign.
970
+
971
+
972
+ :param campaign_id: id of the campaign to update (required)
973
+ :type campaign_id: str
974
+ :param update_priority_model: model containing the new priority
975
+ :type update_priority_model: UpdatePriorityModel
976
+ :param _request_timeout: timeout setting for this request. If one
977
+ number provided, it will be total request
978
+ timeout. It can also be a pair (tuple) of
979
+ (connection, read) timeouts.
980
+ :type _request_timeout: int, tuple(int, int), optional
981
+ :param _request_auth: set to override the auth_settings for an a single
982
+ request; this effectively ignores the
983
+ authentication in the spec for a single request.
984
+ :type _request_auth: dict, optional
985
+ :param _content_type: force content-type for the request.
986
+ :type _content_type: str, Optional
987
+ :param _headers: set to override the headers for a single
988
+ request; this effectively ignores the headers
989
+ in the spec for a single request.
990
+ :type _headers: dict, optional
991
+ :param _host_index: set to override the host_index for a single
992
+ request; this effectively ignores the host_index
993
+ in the spec for a single request.
994
+ :type _host_index: int, optional
995
+ :return: Returns the result object.
996
+ """ # noqa: E501
997
+
998
+ _param = self._campaign_campaign_id_priority_put_serialize(
999
+ campaign_id=campaign_id,
1000
+ update_priority_model=update_priority_model,
1001
+ _request_auth=_request_auth,
1002
+ _content_type=_content_type,
1003
+ _headers=_headers,
1004
+ _host_index=_host_index
1005
+ )
1006
+
1007
+ _response_types_map: Dict[str, Optional[str]] = {
1008
+ '204': None,
1009
+ }
1010
+ response_data = self.api_client.call_api(
1011
+ *_param,
1012
+ _request_timeout=_request_timeout
1013
+ )
1014
+ return response_data.response
1015
+
1016
+
1017
+ def _campaign_campaign_id_priority_put_serialize(
1018
+ self,
1019
+ campaign_id,
1020
+ update_priority_model,
1021
+ _request_auth,
1022
+ _content_type,
1023
+ _headers,
1024
+ _host_index,
1025
+ ) -> RequestSerialized:
1026
+
1027
+ _host = None
1028
+
1029
+ _collection_formats: Dict[str, str] = {
1030
+ }
1031
+
1032
+ _path_params: Dict[str, str] = {}
1033
+ _query_params: List[Tuple[str, str]] = []
1034
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1035
+ _form_params: List[Tuple[str, str]] = []
1036
+ _files: Dict[
1037
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1038
+ ] = {}
1039
+ _body_params: Optional[bytes] = None
1040
+
1041
+ # process the path parameters
1042
+ if campaign_id is not None:
1043
+ _path_params['campaignId'] = campaign_id
1044
+ # process the query parameters
1045
+ # process the header parameters
1046
+ # process the form parameters
1047
+ # process the body parameter
1048
+ if update_priority_model is not None:
1049
+ _body_params = update_priority_model
1050
+
1051
+
1052
+
1053
+ # set the HTTP header `Content-Type`
1054
+ if _content_type:
1055
+ _header_params['Content-Type'] = _content_type
1056
+ else:
1057
+ _default_content_type = (
1058
+ self.api_client.select_header_content_type(
1059
+ [
1060
+ 'application/json',
1061
+ 'text/json',
1062
+ 'application/*+json'
1063
+ ]
1064
+ )
1065
+ )
1066
+ if _default_content_type is not None:
1067
+ _header_params['Content-Type'] = _default_content_type
1068
+
1069
+ # authentication setting
1070
+ _auth_settings: List[str] = [
1071
+ 'bearer',
1072
+ 'oauth2'
1073
+ ]
1074
+
1075
+ return self.api_client.param_serialize(
1076
+ method='PUT',
1077
+ resource_path='/campaign/{campaignId}/priority',
1078
+ path_params=_path_params,
1079
+ query_params=_query_params,
1080
+ header_params=_header_params,
1081
+ body=_body_params,
1082
+ post_params=_form_params,
1083
+ files=_files,
1084
+ auth_settings=_auth_settings,
1085
+ collection_formats=_collection_formats,
1086
+ _host=_host,
1087
+ _request_auth=_request_auth
1088
+ )
1089
+
1090
+
1091
+
1092
+
810
1093
  @validate_call
811
1094
  def campaign_campaign_id_resume_post(
812
1095
  self,
@@ -16,12 +16,11 @@ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
16
  from typing import Any, Dict, List, Optional, Tuple, Union
17
17
  from typing_extensions import Annotated
18
18
 
19
- from pydantic import Field, StrictInt, StrictStr
20
- from typing import List, Optional
19
+ from pydantic import Field, StrictStr
20
+ from typing import Optional
21
21
  from typing_extensions import Annotated
22
+ from rapidata.api_client.models.get_evaluation_workflow_results_model import GetEvaluationWorkflowResultsModel
22
23
  from rapidata.api_client.models.get_workflow_results_result_paged_result import GetWorkflowResultsResultPagedResult
23
- from rapidata.api_client.models.rapid_state import RapidState
24
- from rapidata.api_client.models.sort_criterion import SortCriterion
25
24
 
26
25
  from rapidata.api_client.api_client import ApiClient, RequestSerialized
27
26
  from rapidata.api_client.api_response import ApiResponse
@@ -45,10 +44,7 @@ class EvaluationWorkflowApi:
45
44
  def workflow_evaluation_workflow_id_results_get(
46
45
  self,
47
46
  workflow_id: Annotated[StrictStr, Field(description="The ID of the workflow to get the results for.")],
48
- page_index: Optional[StrictInt] = None,
49
- page_size: Optional[StrictInt] = None,
50
- states: Annotated[Optional[List[RapidState]], Field(description="An optional list of states to filter the rapids by.")] = None,
51
- sort_criteria: Annotated[Optional[List[SortCriterion]], Field(description="A list of criteria to sort the results by.")] = None,
47
+ model: Annotated[Optional[GetEvaluationWorkflowResultsModel], Field(description="The body of the request.")] = None,
52
48
  _request_timeout: Union[
53
49
  None,
54
50
  Annotated[StrictFloat, Field(gt=0)],
@@ -67,14 +63,8 @@ class EvaluationWorkflowApi:
67
63
 
68
64
  :param workflow_id: The ID of the workflow to get the results for. (required)
69
65
  :type workflow_id: str
70
- :param page_index:
71
- :type page_index: int
72
- :param page_size:
73
- :type page_size: int
74
- :param states: An optional list of states to filter the rapids by.
75
- :type states: List[RapidState]
76
- :param sort_criteria: A list of criteria to sort the results by.
77
- :type sort_criteria: List[SortCriterion]
66
+ :param model: The body of the request.
67
+ :type model: GetEvaluationWorkflowResultsModel
78
68
  :param _request_timeout: timeout setting for this request. If one
79
69
  number provided, it will be total request
80
70
  timeout. It can also be a pair (tuple) of
@@ -99,10 +89,7 @@ class EvaluationWorkflowApi:
99
89
 
100
90
  _param = self._workflow_evaluation_workflow_id_results_get_serialize(
101
91
  workflow_id=workflow_id,
102
- page_index=page_index,
103
- page_size=page_size,
104
- states=states,
105
- sort_criteria=sort_criteria,
92
+ model=model,
106
93
  _request_auth=_request_auth,
107
94
  _content_type=_content_type,
108
95
  _headers=_headers,
@@ -127,10 +114,7 @@ class EvaluationWorkflowApi:
127
114
  def workflow_evaluation_workflow_id_results_get_with_http_info(
128
115
  self,
129
116
  workflow_id: Annotated[StrictStr, Field(description="The ID of the workflow to get the results for.")],
130
- page_index: Optional[StrictInt] = None,
131
- page_size: Optional[StrictInt] = None,
132
- states: Annotated[Optional[List[RapidState]], Field(description="An optional list of states to filter the rapids by.")] = None,
133
- sort_criteria: Annotated[Optional[List[SortCriterion]], Field(description="A list of criteria to sort the results by.")] = None,
117
+ model: Annotated[Optional[GetEvaluationWorkflowResultsModel], Field(description="The body of the request.")] = None,
134
118
  _request_timeout: Union[
135
119
  None,
136
120
  Annotated[StrictFloat, Field(gt=0)],
@@ -149,14 +133,8 @@ class EvaluationWorkflowApi:
149
133
 
150
134
  :param workflow_id: The ID of the workflow to get the results for. (required)
151
135
  :type workflow_id: str
152
- :param page_index:
153
- :type page_index: int
154
- :param page_size:
155
- :type page_size: int
156
- :param states: An optional list of states to filter the rapids by.
157
- :type states: List[RapidState]
158
- :param sort_criteria: A list of criteria to sort the results by.
159
- :type sort_criteria: List[SortCriterion]
136
+ :param model: The body of the request.
137
+ :type model: GetEvaluationWorkflowResultsModel
160
138
  :param _request_timeout: timeout setting for this request. If one
161
139
  number provided, it will be total request
162
140
  timeout. It can also be a pair (tuple) of
@@ -181,10 +159,7 @@ class EvaluationWorkflowApi:
181
159
 
182
160
  _param = self._workflow_evaluation_workflow_id_results_get_serialize(
183
161
  workflow_id=workflow_id,
184
- page_index=page_index,
185
- page_size=page_size,
186
- states=states,
187
- sort_criteria=sort_criteria,
162
+ model=model,
188
163
  _request_auth=_request_auth,
189
164
  _content_type=_content_type,
190
165
  _headers=_headers,
@@ -209,10 +184,7 @@ class EvaluationWorkflowApi:
209
184
  def workflow_evaluation_workflow_id_results_get_without_preload_content(
210
185
  self,
211
186
  workflow_id: Annotated[StrictStr, Field(description="The ID of the workflow to get the results for.")],
212
- page_index: Optional[StrictInt] = None,
213
- page_size: Optional[StrictInt] = None,
214
- states: Annotated[Optional[List[RapidState]], Field(description="An optional list of states to filter the rapids by.")] = None,
215
- sort_criteria: Annotated[Optional[List[SortCriterion]], Field(description="A list of criteria to sort the results by.")] = None,
187
+ model: Annotated[Optional[GetEvaluationWorkflowResultsModel], Field(description="The body of the request.")] = None,
216
188
  _request_timeout: Union[
217
189
  None,
218
190
  Annotated[StrictFloat, Field(gt=0)],
@@ -231,14 +203,8 @@ class EvaluationWorkflowApi:
231
203
 
232
204
  :param workflow_id: The ID of the workflow to get the results for. (required)
233
205
  :type workflow_id: str
234
- :param page_index:
235
- :type page_index: int
236
- :param page_size:
237
- :type page_size: int
238
- :param states: An optional list of states to filter the rapids by.
239
- :type states: List[RapidState]
240
- :param sort_criteria: A list of criteria to sort the results by.
241
- :type sort_criteria: List[SortCriterion]
206
+ :param model: The body of the request.
207
+ :type model: GetEvaluationWorkflowResultsModel
242
208
  :param _request_timeout: timeout setting for this request. If one
243
209
  number provided, it will be total request
244
210
  timeout. It can also be a pair (tuple) of
@@ -263,10 +229,7 @@ class EvaluationWorkflowApi:
263
229
 
264
230
  _param = self._workflow_evaluation_workflow_id_results_get_serialize(
265
231
  workflow_id=workflow_id,
266
- page_index=page_index,
267
- page_size=page_size,
268
- states=states,
269
- sort_criteria=sort_criteria,
232
+ model=model,
270
233
  _request_auth=_request_auth,
271
234
  _content_type=_content_type,
272
235
  _headers=_headers,
@@ -286,10 +249,7 @@ class EvaluationWorkflowApi:
286
249
  def _workflow_evaluation_workflow_id_results_get_serialize(
287
250
  self,
288
251
  workflow_id,
289
- page_index,
290
- page_size,
291
- states,
292
- sort_criteria,
252
+ model,
293
253
  _request_auth,
294
254
  _content_type,
295
255
  _headers,
@@ -299,8 +259,6 @@ class EvaluationWorkflowApi:
299
259
  _host = None
300
260
 
301
261
  _collection_formats: Dict[str, str] = {
302
- 'States': 'multi',
303
- 'SortCriteria': 'multi',
304
262
  }
305
263
 
306
264
  _path_params: Dict[str, str] = {}
@@ -316,21 +274,9 @@ class EvaluationWorkflowApi:
316
274
  if workflow_id is not None:
317
275
  _path_params['workflowId'] = workflow_id
318
276
  # process the query parameters
319
- if page_index is not None:
277
+ if model is not None:
320
278
 
321
- _query_params.append(('Page.Index', page_index))
322
-
323
- if page_size is not None:
324
-
325
- _query_params.append(('Page.Size', page_size))
326
-
327
- if states is not None:
328
-
329
- _query_params.append(('States', states))
330
-
331
- if sort_criteria is not None:
332
-
333
- _query_params.append(('SortCriteria', sort_criteria))
279
+ _query_params.append(('model', model))
334
280
 
335
281
  # process the header parameters
336
282
  # process the form parameters