rapidata 2.42.1__py3-none-any.whl → 2.42.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of rapidata might be problematic. Click here for more details.
- rapidata/__init__.py +1 -1
- rapidata/api_client/__init__.py +8 -1
- rapidata/api_client/api/__init__.py +1 -0
- rapidata/api_client/api/grouped_ranking_workflow_api.py +318 -0
- rapidata/api_client/models/__init__.py +7 -1
- rapidata/api_client/models/asset_metadata.py +2 -8
- rapidata/api_client/models/create_datapoint_model.py +10 -3
- rapidata/api_client/models/create_order_model_workflow.py +23 -9
- rapidata/api_client/models/file_asset.py +1 -3
- rapidata/api_client/models/file_asset_metadata_value.py +1 -3
- rapidata/api_client/models/get_grouped_ranking_workflow_results_model.py +106 -0
- rapidata/api_client/models/get_grouped_ranking_workflow_results_result.py +97 -0
- rapidata/api_client/models/get_grouped_ranking_workflow_results_result_paged_result.py +105 -0
- rapidata/api_client/models/get_workflow_by_id_result_workflow.py +23 -9
- rapidata/api_client/models/grouped_ranking_workflow_config.py +143 -0
- rapidata/api_client/models/grouped_ranking_workflow_model.py +135 -0
- rapidata/api_client/models/grouped_ranking_workflow_model1.py +121 -0
- rapidata/api_client/models/multi_asset.py +4 -4
- rapidata/api_client/models/multi_asset_assets_inner.py +170 -0
- rapidata/api_client/models/null_asset.py +1 -3
- rapidata/api_client/models/text_asset.py +1 -3
- rapidata/api_client/models/workflow_config_artifact_model_workflow_config.py +23 -9
- rapidata/api_client_README.md +8 -1
- rapidata/rapidata_client/order/rapidata_order.py +16 -16
- rapidata/rapidata_client/order/rapidata_order_manager.py +3 -15
- rapidata/rapidata_client/validation/rapids/rapids.py +2 -2
- rapidata/rapidata_client/validation/validation_set_manager.py +3 -3
- rapidata/rapidata_client/workflow/_base_workflow.py +3 -0
- rapidata/rapidata_client/workflow/_ranking_workflow.py +42 -3
- {rapidata-2.42.1.dist-info → rapidata-2.42.2.dist-info}/METADATA +1 -1
- {rapidata-2.42.1.dist-info → rapidata-2.42.2.dist-info}/RECORD +33 -25
- {rapidata-2.42.1.dist-info → rapidata-2.42.2.dist-info}/WHEEL +0 -0
- {rapidata-2.42.1.dist-info → rapidata-2.42.2.dist-info}/licenses/LICENSE +0 -0
rapidata/__init__.py
CHANGED
rapidata/api_client/__init__.py
CHANGED
|
@@ -28,6 +28,7 @@ from rapidata.api_client.api.datapoint_api import DatapointApi
|
|
|
28
28
|
from rapidata.api_client.api.dataset_api import DatasetApi
|
|
29
29
|
from rapidata.api_client.api.evaluation_workflow_api import EvaluationWorkflowApi
|
|
30
30
|
from rapidata.api_client.api.feedback_api import FeedbackApi
|
|
31
|
+
from rapidata.api_client.api.grouped_ranking_workflow_api import GroupedRankingWorkflowApi
|
|
31
32
|
from rapidata.api_client.api.identity_api import IdentityApi
|
|
32
33
|
from rapidata.api_client.api.leaderboard_api import LeaderboardApi
|
|
33
34
|
from rapidata.api_client.api.newsletter_api import NewsletterApi
|
|
@@ -72,7 +73,6 @@ from rapidata.api_client.models.and_user_filter_model import AndUserFilterModel
|
|
|
72
73
|
from rapidata.api_client.models.and_user_filter_model_filters_inner import AndUserFilterModelFiltersInner
|
|
73
74
|
from rapidata.api_client.models.are_rapids_active_result import AreRapidsActiveResult
|
|
74
75
|
from rapidata.api_client.models.asset_metadata import AssetMetadata
|
|
75
|
-
from rapidata.api_client.models.asset_metadata_asset import AssetMetadataAsset
|
|
76
76
|
from rapidata.api_client.models.asset_metadata_model import AssetMetadataModel
|
|
77
77
|
from rapidata.api_client.models.attach_category_rapid_blueprint import AttachCategoryRapidBlueprint
|
|
78
78
|
from rapidata.api_client.models.attach_category_result import AttachCategoryResult
|
|
@@ -222,6 +222,9 @@ from rapidata.api_client.models.get_dataset_by_id_result import GetDatasetByIdRe
|
|
|
222
222
|
from rapidata.api_client.models.get_dataset_progress_result import GetDatasetProgressResult
|
|
223
223
|
from rapidata.api_client.models.get_evaluation_workflow_results_model import GetEvaluationWorkflowResultsModel
|
|
224
224
|
from rapidata.api_client.models.get_failed_datapoints_result import GetFailedDatapointsResult
|
|
225
|
+
from rapidata.api_client.models.get_grouped_ranking_workflow_results_model import GetGroupedRankingWorkflowResultsModel
|
|
226
|
+
from rapidata.api_client.models.get_grouped_ranking_workflow_results_result import GetGroupedRankingWorkflowResultsResult
|
|
227
|
+
from rapidata.api_client.models.get_grouped_ranking_workflow_results_result_paged_result import GetGroupedRankingWorkflowResultsResultPagedResult
|
|
225
228
|
from rapidata.api_client.models.get_leaderboard_by_id_result import GetLeaderboardByIdResult
|
|
226
229
|
from rapidata.api_client.models.get_order_by_id_result import GetOrderByIdResult
|
|
227
230
|
from rapidata.api_client.models.get_participant_by_id_result import GetParticipantByIdResult
|
|
@@ -247,6 +250,9 @@ from rapidata.api_client.models.get_workflow_progress_result import GetWorkflowP
|
|
|
247
250
|
from rapidata.api_client.models.get_workflow_results_result import GetWorkflowResultsResult
|
|
248
251
|
from rapidata.api_client.models.get_workflow_results_result_paged_result import GetWorkflowResultsResultPagedResult
|
|
249
252
|
from rapidata.api_client.models.google_one_tap_login_model import GoogleOneTapLoginModel
|
|
253
|
+
from rapidata.api_client.models.grouped_ranking_workflow_config import GroupedRankingWorkflowConfig
|
|
254
|
+
from rapidata.api_client.models.grouped_ranking_workflow_model import GroupedRankingWorkflowModel
|
|
255
|
+
from rapidata.api_client.models.grouped_ranking_workflow_model1 import GroupedRankingWorkflowModel1
|
|
250
256
|
from rapidata.api_client.models.i_workflow_model_paged_result import IWorkflowModelPagedResult
|
|
251
257
|
from rapidata.api_client.models.image_dimension_metadata import ImageDimensionMetadata
|
|
252
258
|
from rapidata.api_client.models.image_dimension_metadata_model import ImageDimensionMetadataModel
|
|
@@ -275,6 +281,7 @@ from rapidata.api_client.models.location_metadata import LocationMetadata
|
|
|
275
281
|
from rapidata.api_client.models.location_metadata_model import LocationMetadataModel
|
|
276
282
|
from rapidata.api_client.models.logic_operator import LogicOperator
|
|
277
283
|
from rapidata.api_client.models.multi_asset import MultiAsset
|
|
284
|
+
from rapidata.api_client.models.multi_asset_assets_inner import MultiAssetAssetsInner
|
|
278
285
|
from rapidata.api_client.models.multi_asset_input import MultiAssetInput
|
|
279
286
|
from rapidata.api_client.models.multi_asset_input_assets_inner import MultiAssetInputAssetsInner
|
|
280
287
|
from rapidata.api_client.models.multi_asset_model import MultiAssetModel
|
|
@@ -12,6 +12,7 @@ from rapidata.api_client.api.datapoint_api import DatapointApi
|
|
|
12
12
|
from rapidata.api_client.api.dataset_api import DatasetApi
|
|
13
13
|
from rapidata.api_client.api.evaluation_workflow_api import EvaluationWorkflowApi
|
|
14
14
|
from rapidata.api_client.api.feedback_api import FeedbackApi
|
|
15
|
+
from rapidata.api_client.api.grouped_ranking_workflow_api import GroupedRankingWorkflowApi
|
|
15
16
|
from rapidata.api_client.api.identity_api import IdentityApi
|
|
16
17
|
from rapidata.api_client.api.leaderboard_api import LeaderboardApi
|
|
17
18
|
from rapidata.api_client.api.newsletter_api import NewsletterApi
|
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Rapidata.Dataset
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: v1
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
import warnings
|
|
15
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
16
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
|
+
from typing_extensions import Annotated
|
|
18
|
+
|
|
19
|
+
from pydantic import Field, StrictStr
|
|
20
|
+
from typing import Optional
|
|
21
|
+
from typing_extensions import Annotated
|
|
22
|
+
from rapidata.api_client.models.get_grouped_ranking_workflow_results_model import GetGroupedRankingWorkflowResultsModel
|
|
23
|
+
from rapidata.api_client.models.get_grouped_ranking_workflow_results_result_paged_result import GetGroupedRankingWorkflowResultsResultPagedResult
|
|
24
|
+
|
|
25
|
+
from rapidata.api_client.api_client import ApiClient, RequestSerialized
|
|
26
|
+
from rapidata.api_client.api_response import ApiResponse
|
|
27
|
+
from rapidata.api_client.rest import RESTResponseType
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class GroupedRankingWorkflowApi:
|
|
31
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
32
|
+
Ref: https://openapi-generator.tech
|
|
33
|
+
|
|
34
|
+
Do not edit the class manually.
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
def __init__(self, api_client=None) -> None:
|
|
38
|
+
if api_client is None:
|
|
39
|
+
api_client = ApiClient.get_default()
|
|
40
|
+
self.api_client = api_client
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
@validate_call
|
|
44
|
+
def workflow_grouped_ranking_workflow_id_results_get(
|
|
45
|
+
self,
|
|
46
|
+
workflow_id: Annotated[StrictStr, Field(description="The ID of the workflow to get the results for.")],
|
|
47
|
+
model: Annotated[Optional[GetGroupedRankingWorkflowResultsModel], Field(description="The model for the request.")] = None,
|
|
48
|
+
_request_timeout: Union[
|
|
49
|
+
None,
|
|
50
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
51
|
+
Tuple[
|
|
52
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
53
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
54
|
+
]
|
|
55
|
+
] = None,
|
|
56
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
57
|
+
_content_type: Optional[StrictStr] = None,
|
|
58
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
59
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
60
|
+
) -> GetGroupedRankingWorkflowResultsResultPagedResult:
|
|
61
|
+
"""Get the result overview for a multi compare workflow.
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
:param workflow_id: The ID of the workflow to get the results for. (required)
|
|
65
|
+
:type workflow_id: str
|
|
66
|
+
:param model: The model for the request.
|
|
67
|
+
:type model: GetGroupedRankingWorkflowResultsModel
|
|
68
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
69
|
+
number provided, it will be total request
|
|
70
|
+
timeout. It can also be a pair (tuple) of
|
|
71
|
+
(connection, read) timeouts.
|
|
72
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
73
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
74
|
+
request; this effectively ignores the
|
|
75
|
+
authentication in the spec for a single request.
|
|
76
|
+
:type _request_auth: dict, optional
|
|
77
|
+
:param _content_type: force content-type for the request.
|
|
78
|
+
:type _content_type: str, Optional
|
|
79
|
+
:param _headers: set to override the headers for a single
|
|
80
|
+
request; this effectively ignores the headers
|
|
81
|
+
in the spec for a single request.
|
|
82
|
+
:type _headers: dict, optional
|
|
83
|
+
:param _host_index: set to override the host_index for a single
|
|
84
|
+
request; this effectively ignores the host_index
|
|
85
|
+
in the spec for a single request.
|
|
86
|
+
:type _host_index: int, optional
|
|
87
|
+
:return: Returns the result object.
|
|
88
|
+
""" # noqa: E501
|
|
89
|
+
|
|
90
|
+
_param = self._workflow_grouped_ranking_workflow_id_results_get_serialize(
|
|
91
|
+
workflow_id=workflow_id,
|
|
92
|
+
model=model,
|
|
93
|
+
_request_auth=_request_auth,
|
|
94
|
+
_content_type=_content_type,
|
|
95
|
+
_headers=_headers,
|
|
96
|
+
_host_index=_host_index
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
100
|
+
'200': "GetGroupedRankingWorkflowResultsResultPagedResult",
|
|
101
|
+
}
|
|
102
|
+
response_data = self.api_client.call_api(
|
|
103
|
+
*_param,
|
|
104
|
+
_request_timeout=_request_timeout
|
|
105
|
+
)
|
|
106
|
+
response_data.read()
|
|
107
|
+
return self.api_client.response_deserialize(
|
|
108
|
+
response_data=response_data,
|
|
109
|
+
response_types_map=_response_types_map,
|
|
110
|
+
).data
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
@validate_call
|
|
114
|
+
def workflow_grouped_ranking_workflow_id_results_get_with_http_info(
|
|
115
|
+
self,
|
|
116
|
+
workflow_id: Annotated[StrictStr, Field(description="The ID of the workflow to get the results for.")],
|
|
117
|
+
model: Annotated[Optional[GetGroupedRankingWorkflowResultsModel], Field(description="The model for the request.")] = None,
|
|
118
|
+
_request_timeout: Union[
|
|
119
|
+
None,
|
|
120
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
121
|
+
Tuple[
|
|
122
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
123
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
124
|
+
]
|
|
125
|
+
] = None,
|
|
126
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
127
|
+
_content_type: Optional[StrictStr] = None,
|
|
128
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
129
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
130
|
+
) -> ApiResponse[GetGroupedRankingWorkflowResultsResultPagedResult]:
|
|
131
|
+
"""Get the result overview for a multi compare workflow.
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
:param workflow_id: The ID of the workflow to get the results for. (required)
|
|
135
|
+
:type workflow_id: str
|
|
136
|
+
:param model: The model for the request.
|
|
137
|
+
:type model: GetGroupedRankingWorkflowResultsModel
|
|
138
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
139
|
+
number provided, it will be total request
|
|
140
|
+
timeout. It can also be a pair (tuple) of
|
|
141
|
+
(connection, read) timeouts.
|
|
142
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
143
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
144
|
+
request; this effectively ignores the
|
|
145
|
+
authentication in the spec for a single request.
|
|
146
|
+
:type _request_auth: dict, optional
|
|
147
|
+
:param _content_type: force content-type for the request.
|
|
148
|
+
:type _content_type: str, Optional
|
|
149
|
+
:param _headers: set to override the headers for a single
|
|
150
|
+
request; this effectively ignores the headers
|
|
151
|
+
in the spec for a single request.
|
|
152
|
+
:type _headers: dict, optional
|
|
153
|
+
:param _host_index: set to override the host_index for a single
|
|
154
|
+
request; this effectively ignores the host_index
|
|
155
|
+
in the spec for a single request.
|
|
156
|
+
:type _host_index: int, optional
|
|
157
|
+
:return: Returns the result object.
|
|
158
|
+
""" # noqa: E501
|
|
159
|
+
|
|
160
|
+
_param = self._workflow_grouped_ranking_workflow_id_results_get_serialize(
|
|
161
|
+
workflow_id=workflow_id,
|
|
162
|
+
model=model,
|
|
163
|
+
_request_auth=_request_auth,
|
|
164
|
+
_content_type=_content_type,
|
|
165
|
+
_headers=_headers,
|
|
166
|
+
_host_index=_host_index
|
|
167
|
+
)
|
|
168
|
+
|
|
169
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
170
|
+
'200': "GetGroupedRankingWorkflowResultsResultPagedResult",
|
|
171
|
+
}
|
|
172
|
+
response_data = self.api_client.call_api(
|
|
173
|
+
*_param,
|
|
174
|
+
_request_timeout=_request_timeout
|
|
175
|
+
)
|
|
176
|
+
response_data.read()
|
|
177
|
+
return self.api_client.response_deserialize(
|
|
178
|
+
response_data=response_data,
|
|
179
|
+
response_types_map=_response_types_map,
|
|
180
|
+
)
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
@validate_call
|
|
184
|
+
def workflow_grouped_ranking_workflow_id_results_get_without_preload_content(
|
|
185
|
+
self,
|
|
186
|
+
workflow_id: Annotated[StrictStr, Field(description="The ID of the workflow to get the results for.")],
|
|
187
|
+
model: Annotated[Optional[GetGroupedRankingWorkflowResultsModel], Field(description="The model for the request.")] = None,
|
|
188
|
+
_request_timeout: Union[
|
|
189
|
+
None,
|
|
190
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
191
|
+
Tuple[
|
|
192
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
193
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
194
|
+
]
|
|
195
|
+
] = None,
|
|
196
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
197
|
+
_content_type: Optional[StrictStr] = None,
|
|
198
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
199
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
200
|
+
) -> RESTResponseType:
|
|
201
|
+
"""Get the result overview for a multi compare workflow.
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
:param workflow_id: The ID of the workflow to get the results for. (required)
|
|
205
|
+
:type workflow_id: str
|
|
206
|
+
:param model: The model for the request.
|
|
207
|
+
:type model: GetGroupedRankingWorkflowResultsModel
|
|
208
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
209
|
+
number provided, it will be total request
|
|
210
|
+
timeout. It can also be a pair (tuple) of
|
|
211
|
+
(connection, read) timeouts.
|
|
212
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
213
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
214
|
+
request; this effectively ignores the
|
|
215
|
+
authentication in the spec for a single request.
|
|
216
|
+
:type _request_auth: dict, optional
|
|
217
|
+
:param _content_type: force content-type for the request.
|
|
218
|
+
:type _content_type: str, Optional
|
|
219
|
+
:param _headers: set to override the headers for a single
|
|
220
|
+
request; this effectively ignores the headers
|
|
221
|
+
in the spec for a single request.
|
|
222
|
+
:type _headers: dict, optional
|
|
223
|
+
:param _host_index: set to override the host_index for a single
|
|
224
|
+
request; this effectively ignores the host_index
|
|
225
|
+
in the spec for a single request.
|
|
226
|
+
:type _host_index: int, optional
|
|
227
|
+
:return: Returns the result object.
|
|
228
|
+
""" # noqa: E501
|
|
229
|
+
|
|
230
|
+
_param = self._workflow_grouped_ranking_workflow_id_results_get_serialize(
|
|
231
|
+
workflow_id=workflow_id,
|
|
232
|
+
model=model,
|
|
233
|
+
_request_auth=_request_auth,
|
|
234
|
+
_content_type=_content_type,
|
|
235
|
+
_headers=_headers,
|
|
236
|
+
_host_index=_host_index
|
|
237
|
+
)
|
|
238
|
+
|
|
239
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
240
|
+
'200': "GetGroupedRankingWorkflowResultsResultPagedResult",
|
|
241
|
+
}
|
|
242
|
+
response_data = self.api_client.call_api(
|
|
243
|
+
*_param,
|
|
244
|
+
_request_timeout=_request_timeout
|
|
245
|
+
)
|
|
246
|
+
return response_data.response
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
def _workflow_grouped_ranking_workflow_id_results_get_serialize(
|
|
250
|
+
self,
|
|
251
|
+
workflow_id,
|
|
252
|
+
model,
|
|
253
|
+
_request_auth,
|
|
254
|
+
_content_type,
|
|
255
|
+
_headers,
|
|
256
|
+
_host_index,
|
|
257
|
+
) -> RequestSerialized:
|
|
258
|
+
|
|
259
|
+
_host = None
|
|
260
|
+
|
|
261
|
+
_collection_formats: Dict[str, str] = {
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
_path_params: Dict[str, str] = {}
|
|
265
|
+
_query_params: List[Tuple[str, str]] = []
|
|
266
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
267
|
+
_form_params: List[Tuple[str, str]] = []
|
|
268
|
+
_files: Dict[
|
|
269
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
270
|
+
] = {}
|
|
271
|
+
_body_params: Optional[bytes] = None
|
|
272
|
+
|
|
273
|
+
# process the path parameters
|
|
274
|
+
if workflow_id is not None:
|
|
275
|
+
_path_params['workflowId'] = workflow_id
|
|
276
|
+
# process the query parameters
|
|
277
|
+
if model is not None:
|
|
278
|
+
|
|
279
|
+
_query_params.append(('model', model))
|
|
280
|
+
|
|
281
|
+
# process the header parameters
|
|
282
|
+
# process the form parameters
|
|
283
|
+
# process the body parameter
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
# set the HTTP header `Accept`
|
|
287
|
+
if 'Accept' not in _header_params:
|
|
288
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
289
|
+
[
|
|
290
|
+
'text/plain',
|
|
291
|
+
'application/json',
|
|
292
|
+
'text/json'
|
|
293
|
+
]
|
|
294
|
+
)
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
# authentication setting
|
|
298
|
+
_auth_settings: List[str] = [
|
|
299
|
+
'bearer',
|
|
300
|
+
'oauth2'
|
|
301
|
+
]
|
|
302
|
+
|
|
303
|
+
return self.api_client.param_serialize(
|
|
304
|
+
method='GET',
|
|
305
|
+
resource_path='/workflow/grouped-ranking/{workflowId}/results',
|
|
306
|
+
path_params=_path_params,
|
|
307
|
+
query_params=_query_params,
|
|
308
|
+
header_params=_header_params,
|
|
309
|
+
body=_body_params,
|
|
310
|
+
post_params=_form_params,
|
|
311
|
+
files=_files,
|
|
312
|
+
auth_settings=_auth_settings,
|
|
313
|
+
collection_formats=_collection_formats,
|
|
314
|
+
_host=_host,
|
|
315
|
+
_request_auth=_request_auth
|
|
316
|
+
)
|
|
317
|
+
|
|
318
|
+
|
|
@@ -31,7 +31,6 @@ from rapidata.api_client.models.and_user_filter_model import AndUserFilterModel
|
|
|
31
31
|
from rapidata.api_client.models.and_user_filter_model_filters_inner import AndUserFilterModelFiltersInner
|
|
32
32
|
from rapidata.api_client.models.are_rapids_active_result import AreRapidsActiveResult
|
|
33
33
|
from rapidata.api_client.models.asset_metadata import AssetMetadata
|
|
34
|
-
from rapidata.api_client.models.asset_metadata_asset import AssetMetadataAsset
|
|
35
34
|
from rapidata.api_client.models.asset_metadata_model import AssetMetadataModel
|
|
36
35
|
from rapidata.api_client.models.attach_category_rapid_blueprint import AttachCategoryRapidBlueprint
|
|
37
36
|
from rapidata.api_client.models.attach_category_result import AttachCategoryResult
|
|
@@ -181,6 +180,9 @@ from rapidata.api_client.models.get_dataset_by_id_result import GetDatasetByIdRe
|
|
|
181
180
|
from rapidata.api_client.models.get_dataset_progress_result import GetDatasetProgressResult
|
|
182
181
|
from rapidata.api_client.models.get_evaluation_workflow_results_model import GetEvaluationWorkflowResultsModel
|
|
183
182
|
from rapidata.api_client.models.get_failed_datapoints_result import GetFailedDatapointsResult
|
|
183
|
+
from rapidata.api_client.models.get_grouped_ranking_workflow_results_model import GetGroupedRankingWorkflowResultsModel
|
|
184
|
+
from rapidata.api_client.models.get_grouped_ranking_workflow_results_result import GetGroupedRankingWorkflowResultsResult
|
|
185
|
+
from rapidata.api_client.models.get_grouped_ranking_workflow_results_result_paged_result import GetGroupedRankingWorkflowResultsResultPagedResult
|
|
184
186
|
from rapidata.api_client.models.get_leaderboard_by_id_result import GetLeaderboardByIdResult
|
|
185
187
|
from rapidata.api_client.models.get_order_by_id_result import GetOrderByIdResult
|
|
186
188
|
from rapidata.api_client.models.get_participant_by_id_result import GetParticipantByIdResult
|
|
@@ -206,6 +208,9 @@ from rapidata.api_client.models.get_workflow_progress_result import GetWorkflowP
|
|
|
206
208
|
from rapidata.api_client.models.get_workflow_results_result import GetWorkflowResultsResult
|
|
207
209
|
from rapidata.api_client.models.get_workflow_results_result_paged_result import GetWorkflowResultsResultPagedResult
|
|
208
210
|
from rapidata.api_client.models.google_one_tap_login_model import GoogleOneTapLoginModel
|
|
211
|
+
from rapidata.api_client.models.grouped_ranking_workflow_config import GroupedRankingWorkflowConfig
|
|
212
|
+
from rapidata.api_client.models.grouped_ranking_workflow_model import GroupedRankingWorkflowModel
|
|
213
|
+
from rapidata.api_client.models.grouped_ranking_workflow_model1 import GroupedRankingWorkflowModel1
|
|
209
214
|
from rapidata.api_client.models.i_workflow_model_paged_result import IWorkflowModelPagedResult
|
|
210
215
|
from rapidata.api_client.models.image_dimension_metadata import ImageDimensionMetadata
|
|
211
216
|
from rapidata.api_client.models.image_dimension_metadata_model import ImageDimensionMetadataModel
|
|
@@ -234,6 +239,7 @@ from rapidata.api_client.models.location_metadata import LocationMetadata
|
|
|
234
239
|
from rapidata.api_client.models.location_metadata_model import LocationMetadataModel
|
|
235
240
|
from rapidata.api_client.models.logic_operator import LogicOperator
|
|
236
241
|
from rapidata.api_client.models.multi_asset import MultiAsset
|
|
242
|
+
from rapidata.api_client.models.multi_asset_assets_inner import MultiAssetAssetsInner
|
|
237
243
|
from rapidata.api_client.models.multi_asset_input import MultiAssetInput
|
|
238
244
|
from rapidata.api_client.models.multi_asset_input_assets_inner import MultiAssetInputAssetsInner
|
|
239
245
|
from rapidata.api_client.models.multi_asset_model import MultiAssetModel
|
|
@@ -27,7 +27,7 @@ class AssetMetadata(BaseModel):
|
|
|
27
27
|
AssetMetadata
|
|
28
28
|
""" # noqa: E501
|
|
29
29
|
t: StrictStr = Field(description="Discriminator value for AssetMetadata", alias="_t")
|
|
30
|
-
asset:
|
|
30
|
+
asset: Dict[str, Any]
|
|
31
31
|
visibilities: List[StrictStr]
|
|
32
32
|
__properties: ClassVar[List[str]] = ["_t", "asset", "visibilities"]
|
|
33
33
|
|
|
@@ -85,9 +85,6 @@ class AssetMetadata(BaseModel):
|
|
|
85
85
|
exclude=excluded_fields,
|
|
86
86
|
exclude_none=True,
|
|
87
87
|
)
|
|
88
|
-
# override the default output from pydantic by calling `to_dict()` of asset
|
|
89
|
-
if self.asset:
|
|
90
|
-
_dict['asset'] = self.asset.to_dict()
|
|
91
88
|
return _dict
|
|
92
89
|
|
|
93
90
|
@classmethod
|
|
@@ -101,12 +98,9 @@ class AssetMetadata(BaseModel):
|
|
|
101
98
|
|
|
102
99
|
_obj = cls.model_validate({
|
|
103
100
|
"_t": obj.get("_t") if obj.get("_t") is not None else 'AssetMetadata',
|
|
104
|
-
"asset":
|
|
101
|
+
"asset": obj.get("asset"),
|
|
105
102
|
"visibilities": obj.get("visibilities")
|
|
106
103
|
})
|
|
107
104
|
return _obj
|
|
108
105
|
|
|
109
|
-
from rapidata.api_client.models.asset_metadata_asset import AssetMetadataAsset
|
|
110
|
-
# TODO: Rewrite to not use raise_errors
|
|
111
|
-
AssetMetadata.model_rebuild(raise_errors=False)
|
|
112
106
|
|
|
@@ -17,7 +17,7 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictInt
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
22
|
from rapidata.api_client.models.create_datapoint_from_files_model_metadata_inner import CreateDatapointFromFilesModelMetadataInner
|
|
23
23
|
from rapidata.api_client.models.create_datapoint_model_asset import CreateDatapointModelAsset
|
|
@@ -31,7 +31,8 @@ class CreateDatapointModel(BaseModel):
|
|
|
31
31
|
asset: CreateDatapointModelAsset
|
|
32
32
|
metadata: List[CreateDatapointFromFilesModelMetadataInner] = Field(description="The metadata of the datapoint")
|
|
33
33
|
sort_index: Optional[StrictInt] = Field(default=None, description="The sort index represents the order of the datapoint in the dataset", alias="sortIndex")
|
|
34
|
-
|
|
34
|
+
group: Optional[StrictStr] = Field(default=None, description="The group a datapoint belongs to.")
|
|
35
|
+
__properties: ClassVar[List[str]] = ["asset", "metadata", "sortIndex", "group"]
|
|
35
36
|
|
|
36
37
|
model_config = ConfigDict(
|
|
37
38
|
populate_by_name=True,
|
|
@@ -87,6 +88,11 @@ class CreateDatapointModel(BaseModel):
|
|
|
87
88
|
if self.sort_index is None and "sort_index" in self.model_fields_set:
|
|
88
89
|
_dict['sortIndex'] = None
|
|
89
90
|
|
|
91
|
+
# set to None if group (nullable) is None
|
|
92
|
+
# and model_fields_set contains the field
|
|
93
|
+
if self.group is None and "group" in self.model_fields_set:
|
|
94
|
+
_dict['group'] = None
|
|
95
|
+
|
|
90
96
|
return _dict
|
|
91
97
|
|
|
92
98
|
@classmethod
|
|
@@ -101,7 +107,8 @@ class CreateDatapointModel(BaseModel):
|
|
|
101
107
|
_obj = cls.model_validate({
|
|
102
108
|
"asset": CreateDatapointModelAsset.from_dict(obj["asset"]) if obj.get("asset") is not None else None,
|
|
103
109
|
"metadata": [CreateDatapointFromFilesModelMetadataInner.from_dict(_item) for _item in obj["metadata"]] if obj.get("metadata") is not None else None,
|
|
104
|
-
"sortIndex": obj.get("sortIndex")
|
|
110
|
+
"sortIndex": obj.get("sortIndex"),
|
|
111
|
+
"group": obj.get("group")
|
|
105
112
|
})
|
|
106
113
|
return _obj
|
|
107
114
|
|
|
@@ -19,12 +19,13 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, f
|
|
|
19
19
|
from typing import Any, List, Optional
|
|
20
20
|
from rapidata.api_client.models.compare_workflow_model import CompareWorkflowModel
|
|
21
21
|
from rapidata.api_client.models.evaluation_workflow_model import EvaluationWorkflowModel
|
|
22
|
+
from rapidata.api_client.models.grouped_ranking_workflow_model import GroupedRankingWorkflowModel
|
|
22
23
|
from rapidata.api_client.models.simple_workflow_model import SimpleWorkflowModel
|
|
23
24
|
from pydantic import StrictStr, Field
|
|
24
25
|
from typing import Union, List, Set, Optional, Dict
|
|
25
26
|
from typing_extensions import Literal, Self
|
|
26
27
|
|
|
27
|
-
CREATEORDERMODELWORKFLOW_ONE_OF_SCHEMAS = ["CompareWorkflowModel", "EvaluationWorkflowModel", "SimpleWorkflowModel"]
|
|
28
|
+
CREATEORDERMODELWORKFLOW_ONE_OF_SCHEMAS = ["CompareWorkflowModel", "EvaluationWorkflowModel", "GroupedRankingWorkflowModel", "SimpleWorkflowModel"]
|
|
28
29
|
|
|
29
30
|
class CreateOrderModelWorkflow(BaseModel):
|
|
30
31
|
"""
|
|
@@ -34,10 +35,12 @@ class CreateOrderModelWorkflow(BaseModel):
|
|
|
34
35
|
oneof_schema_1_validator: Optional[CompareWorkflowModel] = None
|
|
35
36
|
# data type: EvaluationWorkflowModel
|
|
36
37
|
oneof_schema_2_validator: Optional[EvaluationWorkflowModel] = None
|
|
38
|
+
# data type: GroupedRankingWorkflowModel
|
|
39
|
+
oneof_schema_3_validator: Optional[GroupedRankingWorkflowModel] = None
|
|
37
40
|
# data type: SimpleWorkflowModel
|
|
38
|
-
|
|
39
|
-
actual_instance: Optional[Union[CompareWorkflowModel, EvaluationWorkflowModel, SimpleWorkflowModel]] = None
|
|
40
|
-
one_of_schemas: Set[str] = { "CompareWorkflowModel", "EvaluationWorkflowModel", "SimpleWorkflowModel" }
|
|
41
|
+
oneof_schema_4_validator: Optional[SimpleWorkflowModel] = None
|
|
42
|
+
actual_instance: Optional[Union[CompareWorkflowModel, EvaluationWorkflowModel, GroupedRankingWorkflowModel, SimpleWorkflowModel]] = None
|
|
43
|
+
one_of_schemas: Set[str] = { "CompareWorkflowModel", "EvaluationWorkflowModel", "GroupedRankingWorkflowModel", "SimpleWorkflowModel" }
|
|
41
44
|
|
|
42
45
|
model_config = ConfigDict(
|
|
43
46
|
validate_assignment=True,
|
|
@@ -73,6 +76,11 @@ class CreateOrderModelWorkflow(BaseModel):
|
|
|
73
76
|
error_messages.append(f"Error! Input type `{type(v)}` is not `EvaluationWorkflowModel`")
|
|
74
77
|
else:
|
|
75
78
|
match += 1
|
|
79
|
+
# validate data type: GroupedRankingWorkflowModel
|
|
80
|
+
if not isinstance(v, GroupedRankingWorkflowModel):
|
|
81
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `GroupedRankingWorkflowModel`")
|
|
82
|
+
else:
|
|
83
|
+
match += 1
|
|
76
84
|
# validate data type: SimpleWorkflowModel
|
|
77
85
|
if not isinstance(v, SimpleWorkflowModel):
|
|
78
86
|
error_messages.append(f"Error! Input type `{type(v)}` is not `SimpleWorkflowModel`")
|
|
@@ -80,10 +88,10 @@ class CreateOrderModelWorkflow(BaseModel):
|
|
|
80
88
|
match += 1
|
|
81
89
|
if match > 1:
|
|
82
90
|
# more than 1 match
|
|
83
|
-
raise ValueError("Multiple matches found when setting `actual_instance` in CreateOrderModelWorkflow with oneOf schemas: CompareWorkflowModel, EvaluationWorkflowModel, SimpleWorkflowModel. Details: " + ", ".join(error_messages))
|
|
91
|
+
raise ValueError("Multiple matches found when setting `actual_instance` in CreateOrderModelWorkflow with oneOf schemas: CompareWorkflowModel, EvaluationWorkflowModel, GroupedRankingWorkflowModel, SimpleWorkflowModel. Details: " + ", ".join(error_messages))
|
|
84
92
|
elif match == 0:
|
|
85
93
|
# no match
|
|
86
|
-
raise ValueError("No match found when setting `actual_instance` in CreateOrderModelWorkflow with oneOf schemas: CompareWorkflowModel, EvaluationWorkflowModel, SimpleWorkflowModel. Details: " + ", ".join(error_messages))
|
|
94
|
+
raise ValueError("No match found when setting `actual_instance` in CreateOrderModelWorkflow with oneOf schemas: CompareWorkflowModel, EvaluationWorkflowModel, GroupedRankingWorkflowModel, SimpleWorkflowModel. Details: " + ", ".join(error_messages))
|
|
87
95
|
else:
|
|
88
96
|
return v
|
|
89
97
|
|
|
@@ -110,6 +118,12 @@ class CreateOrderModelWorkflow(BaseModel):
|
|
|
110
118
|
match += 1
|
|
111
119
|
except (ValidationError, ValueError) as e:
|
|
112
120
|
error_messages.append(str(e))
|
|
121
|
+
# deserialize data into GroupedRankingWorkflowModel
|
|
122
|
+
try:
|
|
123
|
+
instance.actual_instance = GroupedRankingWorkflowModel.from_json(json_str)
|
|
124
|
+
match += 1
|
|
125
|
+
except (ValidationError, ValueError) as e:
|
|
126
|
+
error_messages.append(str(e))
|
|
113
127
|
# deserialize data into SimpleWorkflowModel
|
|
114
128
|
try:
|
|
115
129
|
instance.actual_instance = SimpleWorkflowModel.from_json(json_str)
|
|
@@ -119,10 +133,10 @@ class CreateOrderModelWorkflow(BaseModel):
|
|
|
119
133
|
|
|
120
134
|
if match > 1:
|
|
121
135
|
# more than 1 match
|
|
122
|
-
raise ValueError("Multiple matches found when deserializing the JSON string into CreateOrderModelWorkflow with oneOf schemas: CompareWorkflowModel, EvaluationWorkflowModel, SimpleWorkflowModel. Details: " + ", ".join(error_messages))
|
|
136
|
+
raise ValueError("Multiple matches found when deserializing the JSON string into CreateOrderModelWorkflow with oneOf schemas: CompareWorkflowModel, EvaluationWorkflowModel, GroupedRankingWorkflowModel, SimpleWorkflowModel. Details: " + ", ".join(error_messages))
|
|
123
137
|
elif match == 0:
|
|
124
138
|
# no match
|
|
125
|
-
raise ValueError("No match found when deserializing the JSON string into CreateOrderModelWorkflow with oneOf schemas: CompareWorkflowModel, EvaluationWorkflowModel, SimpleWorkflowModel. Details: " + ", ".join(error_messages))
|
|
139
|
+
raise ValueError("No match found when deserializing the JSON string into CreateOrderModelWorkflow with oneOf schemas: CompareWorkflowModel, EvaluationWorkflowModel, GroupedRankingWorkflowModel, SimpleWorkflowModel. Details: " + ", ".join(error_messages))
|
|
126
140
|
else:
|
|
127
141
|
return instance
|
|
128
142
|
|
|
@@ -136,7 +150,7 @@ class CreateOrderModelWorkflow(BaseModel):
|
|
|
136
150
|
else:
|
|
137
151
|
return json.dumps(self.actual_instance)
|
|
138
152
|
|
|
139
|
-
def to_dict(self) -> Optional[Union[Dict[str, Any], CompareWorkflowModel, EvaluationWorkflowModel, SimpleWorkflowModel]]:
|
|
153
|
+
def to_dict(self) -> Optional[Union[Dict[str, Any], CompareWorkflowModel, EvaluationWorkflowModel, GroupedRankingWorkflowModel, SimpleWorkflowModel]]:
|
|
140
154
|
"""Returns the dict representation of the actual instance"""
|
|
141
155
|
if self.actual_instance is None:
|
|
142
156
|
return None
|
|
@@ -19,6 +19,7 @@ import json
|
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from rapidata.api_client.models.file_asset_metadata_value import FileAssetMetadataValue
|
|
22
23
|
from typing import Optional, Set
|
|
23
24
|
from typing_extensions import Self
|
|
24
25
|
|
|
@@ -107,7 +108,4 @@ class FileAsset(BaseModel):
|
|
|
107
108
|
})
|
|
108
109
|
return _obj
|
|
109
110
|
|
|
110
|
-
from rapidata.api_client.models.file_asset_metadata_value import FileAssetMetadataValue
|
|
111
|
-
# TODO: Rewrite to not use raise_errors
|
|
112
|
-
FileAsset.model_rebuild(raise_errors=False)
|
|
113
111
|
|
|
@@ -17,6 +17,7 @@ import json
|
|
|
17
17
|
import pprint
|
|
18
18
|
from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
|
|
19
19
|
from typing import Any, List, Optional
|
|
20
|
+
from rapidata.api_client.models.asset_metadata import AssetMetadata
|
|
20
21
|
from rapidata.api_client.models.classification_metadata import ClassificationMetadata
|
|
21
22
|
from rapidata.api_client.models.count_metadata import CountMetadata
|
|
22
23
|
from rapidata.api_client.models.file_type_metadata import FileTypeMetadata
|
|
@@ -290,7 +291,4 @@ class FileAssetMetadataValue(BaseModel):
|
|
|
290
291
|
"""Returns the string representation of the actual instance"""
|
|
291
292
|
return pprint.pformat(self.model_dump())
|
|
292
293
|
|
|
293
|
-
from rapidata.api_client.models.asset_metadata import AssetMetadata
|
|
294
|
-
# TODO: Rewrite to not use raise_errors
|
|
295
|
-
FileAssetMetadataValue.model_rebuild(raise_errors=False)
|
|
296
294
|
|