rapidata 2.35.2__py3-none-any.whl → 2.36.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.
- rapidata/__init__.py +2 -1
- rapidata/api_client/__init__.py +21 -3
- rapidata/api_client/api/__init__.py +1 -0
- rapidata/api_client/api/benchmark_api.py +294 -0
- rapidata/api_client/api/campaign_api.py +268 -0
- rapidata/api_client/api/customer_rapid_api.py +247 -0
- rapidata/api_client/api/pipeline_api.py +0 -873
- rapidata/api_client/api/sample_api.py +299 -0
- rapidata/api_client/models/__init__.py +20 -3
- rapidata/api_client/models/and_filter.py +121 -0
- rapidata/api_client/models/and_filter_filters_inner.py +268 -0
- rapidata/api_client/models/boost_mode.py +37 -0
- rapidata/api_client/models/boost_query_result.py +10 -1
- rapidata/api_client/models/campaign_filter.py +98 -0
- rapidata/api_client/models/change_boost_model.py +89 -0
- rapidata/api_client/models/compare_rapid_blueprint.py +5 -3
- rapidata/api_client/models/compare_rapid_blueprint1.py +96 -0
- rapidata/api_client/models/country_filter.py +98 -0
- rapidata/api_client/models/create_leaderboard_model.py +32 -2
- rapidata/api_client/models/demographic_filter.py +100 -0
- rapidata/api_client/models/feature_flag_model.py +4 -4
- rapidata/api_client/models/free_text_payload.py +10 -3
- rapidata/api_client/models/free_text_rapid_blueprint.py +10 -3
- rapidata/api_client/models/get_compare_ab_summary_result.py +4 -2
- rapidata/api_client/models/get_leaderboard_by_id_result.py +29 -2
- rapidata/api_client/models/get_public_responses_result.py +95 -0
- rapidata/api_client/models/get_sample_by_id_result.py +126 -0
- rapidata/api_client/models/language_filter.py +98 -0
- rapidata/api_client/models/leaderboard_query_result.py +29 -2
- rapidata/api_client/models/new_user_filter.py +96 -0
- rapidata/api_client/models/not_filter.py +117 -0
- rapidata/api_client/models/or_filter.py +121 -0
- rapidata/api_client/models/public_rapid_response.py +112 -0
- rapidata/api_client/models/response_count_filter.py +109 -0
- rapidata/api_client/models/sample_by_identifier.py +126 -0
- rapidata/api_client/models/sample_by_identifier_paged_result.py +105 -0
- rapidata/api_client/models/simple_workflow_config_blueprint.py +37 -23
- rapidata/api_client/models/user_score_filter.py +102 -0
- rapidata/api_client/models/user_state.py +38 -0
- rapidata/api_client/models/user_state_filter.py +101 -0
- rapidata/api_client_README.md +24 -6
- rapidata/rapidata_client/__init__.py +5 -13
- rapidata/rapidata_client/benchmark/participant/_participant.py +45 -26
- rapidata/rapidata_client/benchmark/rapidata_benchmark.py +26 -2
- rapidata/rapidata_client/benchmark/rapidata_benchmark_manager.py +73 -30
- rapidata/rapidata_client/config/__init__.py +1 -0
- rapidata/rapidata_client/config/config.py +33 -0
- rapidata/rapidata_client/datapoints/assets/_sessions.py +13 -8
- rapidata/rapidata_client/order/_rapidata_dataset.py +23 -33
- rapidata/rapidata_client/order/rapidata_order_manager.py +298 -219
- rapidata/rapidata_client/workflow/_compare_workflow.py +7 -2
- {rapidata-2.35.2.dist-info → rapidata-2.36.0.dist-info}/METADATA +1 -1
- {rapidata-2.35.2.dist-info → rapidata-2.36.0.dist-info}/RECORD +55 -31
- {rapidata-2.35.2.dist-info → rapidata-2.36.0.dist-info}/LICENSE +0 -0
- {rapidata-2.35.2.dist-info → rapidata-2.36.0.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,299 @@
|
|
|
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_extensions import Annotated
|
|
21
|
+
from rapidata.api_client.models.get_sample_by_id_result import GetSampleByIdResult
|
|
22
|
+
|
|
23
|
+
from rapidata.api_client.api_client import ApiClient, RequestSerialized
|
|
24
|
+
from rapidata.api_client.api_response import ApiResponse
|
|
25
|
+
from rapidata.api_client.rest import RESTResponseType
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class SampleApi:
|
|
29
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
30
|
+
Ref: https://openapi-generator.tech
|
|
31
|
+
|
|
32
|
+
Do not edit the class manually.
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
def __init__(self, api_client=None) -> None:
|
|
36
|
+
if api_client is None:
|
|
37
|
+
api_client = ApiClient.get_default()
|
|
38
|
+
self.api_client = api_client
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
@validate_call
|
|
42
|
+
def benchmark_sample_sample_id_get(
|
|
43
|
+
self,
|
|
44
|
+
sample_id: Annotated[StrictStr, Field(description="The Id of the sample to be retrieved")],
|
|
45
|
+
_request_timeout: Union[
|
|
46
|
+
None,
|
|
47
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
48
|
+
Tuple[
|
|
49
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
50
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
51
|
+
]
|
|
52
|
+
] = None,
|
|
53
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
54
|
+
_content_type: Optional[StrictStr] = None,
|
|
55
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
56
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
57
|
+
) -> GetSampleByIdResult:
|
|
58
|
+
"""Gets a sample by its Id.
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
:param sample_id: The Id of the sample to be retrieved (required)
|
|
62
|
+
:type sample_id: str
|
|
63
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
64
|
+
number provided, it will be total request
|
|
65
|
+
timeout. It can also be a pair (tuple) of
|
|
66
|
+
(connection, read) timeouts.
|
|
67
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
68
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
69
|
+
request; this effectively ignores the
|
|
70
|
+
authentication in the spec for a single request.
|
|
71
|
+
:type _request_auth: dict, optional
|
|
72
|
+
:param _content_type: force content-type for the request.
|
|
73
|
+
:type _content_type: str, Optional
|
|
74
|
+
:param _headers: set to override the headers for a single
|
|
75
|
+
request; this effectively ignores the headers
|
|
76
|
+
in the spec for a single request.
|
|
77
|
+
:type _headers: dict, optional
|
|
78
|
+
:param _host_index: set to override the host_index for a single
|
|
79
|
+
request; this effectively ignores the host_index
|
|
80
|
+
in the spec for a single request.
|
|
81
|
+
:type _host_index: int, optional
|
|
82
|
+
:return: Returns the result object.
|
|
83
|
+
""" # noqa: E501
|
|
84
|
+
|
|
85
|
+
_param = self._benchmark_sample_sample_id_get_serialize(
|
|
86
|
+
sample_id=sample_id,
|
|
87
|
+
_request_auth=_request_auth,
|
|
88
|
+
_content_type=_content_type,
|
|
89
|
+
_headers=_headers,
|
|
90
|
+
_host_index=_host_index
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
94
|
+
'200': "GetSampleByIdResult",
|
|
95
|
+
}
|
|
96
|
+
response_data = self.api_client.call_api(
|
|
97
|
+
*_param,
|
|
98
|
+
_request_timeout=_request_timeout
|
|
99
|
+
)
|
|
100
|
+
response_data.read()
|
|
101
|
+
return self.api_client.response_deserialize(
|
|
102
|
+
response_data=response_data,
|
|
103
|
+
response_types_map=_response_types_map,
|
|
104
|
+
).data
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
@validate_call
|
|
108
|
+
def benchmark_sample_sample_id_get_with_http_info(
|
|
109
|
+
self,
|
|
110
|
+
sample_id: Annotated[StrictStr, Field(description="The Id of the sample to be retrieved")],
|
|
111
|
+
_request_timeout: Union[
|
|
112
|
+
None,
|
|
113
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
114
|
+
Tuple[
|
|
115
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
116
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
117
|
+
]
|
|
118
|
+
] = None,
|
|
119
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
120
|
+
_content_type: Optional[StrictStr] = None,
|
|
121
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
122
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
123
|
+
) -> ApiResponse[GetSampleByIdResult]:
|
|
124
|
+
"""Gets a sample by its Id.
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
:param sample_id: The Id of the sample to be retrieved (required)
|
|
128
|
+
:type sample_id: str
|
|
129
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
130
|
+
number provided, it will be total request
|
|
131
|
+
timeout. It can also be a pair (tuple) of
|
|
132
|
+
(connection, read) timeouts.
|
|
133
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
134
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
135
|
+
request; this effectively ignores the
|
|
136
|
+
authentication in the spec for a single request.
|
|
137
|
+
:type _request_auth: dict, optional
|
|
138
|
+
:param _content_type: force content-type for the request.
|
|
139
|
+
:type _content_type: str, Optional
|
|
140
|
+
:param _headers: set to override the headers for a single
|
|
141
|
+
request; this effectively ignores the headers
|
|
142
|
+
in the spec for a single request.
|
|
143
|
+
:type _headers: dict, optional
|
|
144
|
+
:param _host_index: set to override the host_index for a single
|
|
145
|
+
request; this effectively ignores the host_index
|
|
146
|
+
in the spec for a single request.
|
|
147
|
+
:type _host_index: int, optional
|
|
148
|
+
:return: Returns the result object.
|
|
149
|
+
""" # noqa: E501
|
|
150
|
+
|
|
151
|
+
_param = self._benchmark_sample_sample_id_get_serialize(
|
|
152
|
+
sample_id=sample_id,
|
|
153
|
+
_request_auth=_request_auth,
|
|
154
|
+
_content_type=_content_type,
|
|
155
|
+
_headers=_headers,
|
|
156
|
+
_host_index=_host_index
|
|
157
|
+
)
|
|
158
|
+
|
|
159
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
160
|
+
'200': "GetSampleByIdResult",
|
|
161
|
+
}
|
|
162
|
+
response_data = self.api_client.call_api(
|
|
163
|
+
*_param,
|
|
164
|
+
_request_timeout=_request_timeout
|
|
165
|
+
)
|
|
166
|
+
response_data.read()
|
|
167
|
+
return self.api_client.response_deserialize(
|
|
168
|
+
response_data=response_data,
|
|
169
|
+
response_types_map=_response_types_map,
|
|
170
|
+
)
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
@validate_call
|
|
174
|
+
def benchmark_sample_sample_id_get_without_preload_content(
|
|
175
|
+
self,
|
|
176
|
+
sample_id: Annotated[StrictStr, Field(description="The Id of the sample to be retrieved")],
|
|
177
|
+
_request_timeout: Union[
|
|
178
|
+
None,
|
|
179
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
180
|
+
Tuple[
|
|
181
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
182
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
183
|
+
]
|
|
184
|
+
] = None,
|
|
185
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
186
|
+
_content_type: Optional[StrictStr] = None,
|
|
187
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
188
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
189
|
+
) -> RESTResponseType:
|
|
190
|
+
"""Gets a sample by its Id.
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
:param sample_id: The Id of the sample to be retrieved (required)
|
|
194
|
+
:type sample_id: str
|
|
195
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
196
|
+
number provided, it will be total request
|
|
197
|
+
timeout. It can also be a pair (tuple) of
|
|
198
|
+
(connection, read) timeouts.
|
|
199
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
200
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
201
|
+
request; this effectively ignores the
|
|
202
|
+
authentication in the spec for a single request.
|
|
203
|
+
:type _request_auth: dict, optional
|
|
204
|
+
:param _content_type: force content-type for the request.
|
|
205
|
+
:type _content_type: str, Optional
|
|
206
|
+
:param _headers: set to override the headers for a single
|
|
207
|
+
request; this effectively ignores the headers
|
|
208
|
+
in the spec for a single request.
|
|
209
|
+
:type _headers: dict, optional
|
|
210
|
+
:param _host_index: set to override the host_index for a single
|
|
211
|
+
request; this effectively ignores the host_index
|
|
212
|
+
in the spec for a single request.
|
|
213
|
+
:type _host_index: int, optional
|
|
214
|
+
:return: Returns the result object.
|
|
215
|
+
""" # noqa: E501
|
|
216
|
+
|
|
217
|
+
_param = self._benchmark_sample_sample_id_get_serialize(
|
|
218
|
+
sample_id=sample_id,
|
|
219
|
+
_request_auth=_request_auth,
|
|
220
|
+
_content_type=_content_type,
|
|
221
|
+
_headers=_headers,
|
|
222
|
+
_host_index=_host_index
|
|
223
|
+
)
|
|
224
|
+
|
|
225
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
226
|
+
'200': "GetSampleByIdResult",
|
|
227
|
+
}
|
|
228
|
+
response_data = self.api_client.call_api(
|
|
229
|
+
*_param,
|
|
230
|
+
_request_timeout=_request_timeout
|
|
231
|
+
)
|
|
232
|
+
return response_data.response
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
def _benchmark_sample_sample_id_get_serialize(
|
|
236
|
+
self,
|
|
237
|
+
sample_id,
|
|
238
|
+
_request_auth,
|
|
239
|
+
_content_type,
|
|
240
|
+
_headers,
|
|
241
|
+
_host_index,
|
|
242
|
+
) -> RequestSerialized:
|
|
243
|
+
|
|
244
|
+
_host = None
|
|
245
|
+
|
|
246
|
+
_collection_formats: Dict[str, str] = {
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
_path_params: Dict[str, str] = {}
|
|
250
|
+
_query_params: List[Tuple[str, str]] = []
|
|
251
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
252
|
+
_form_params: List[Tuple[str, str]] = []
|
|
253
|
+
_files: Dict[
|
|
254
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
255
|
+
] = {}
|
|
256
|
+
_body_params: Optional[bytes] = None
|
|
257
|
+
|
|
258
|
+
# process the path parameters
|
|
259
|
+
if sample_id is not None:
|
|
260
|
+
_path_params['sampleId'] = sample_id
|
|
261
|
+
# process the query parameters
|
|
262
|
+
# process the header parameters
|
|
263
|
+
# process the form parameters
|
|
264
|
+
# process the body parameter
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
# set the HTTP header `Accept`
|
|
268
|
+
if 'Accept' not in _header_params:
|
|
269
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
270
|
+
[
|
|
271
|
+
'text/plain',
|
|
272
|
+
'application/json',
|
|
273
|
+
'text/json'
|
|
274
|
+
]
|
|
275
|
+
)
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
# authentication setting
|
|
279
|
+
_auth_settings: List[str] = [
|
|
280
|
+
'bearer',
|
|
281
|
+
'oauth2'
|
|
282
|
+
]
|
|
283
|
+
|
|
284
|
+
return self.api_client.param_serialize(
|
|
285
|
+
method='GET',
|
|
286
|
+
resource_path='/benchmark-sample/{sampleId}',
|
|
287
|
+
path_params=_path_params,
|
|
288
|
+
query_params=_query_params,
|
|
289
|
+
header_params=_header_params,
|
|
290
|
+
body=_body_params,
|
|
291
|
+
post_params=_form_params,
|
|
292
|
+
files=_files,
|
|
293
|
+
auth_settings=_auth_settings,
|
|
294
|
+
collection_formats=_collection_formats,
|
|
295
|
+
_host=_host,
|
|
296
|
+
_request_auth=_request_auth
|
|
297
|
+
)
|
|
298
|
+
|
|
299
|
+
|
|
@@ -16,8 +16,6 @@
|
|
|
16
16
|
# import models into model package
|
|
17
17
|
from rapidata.api_client.models.ab_test_selection import AbTestSelection
|
|
18
18
|
from rapidata.api_client.models.ab_test_selection_a_inner import AbTestSelectionAInner
|
|
19
|
-
from rapidata.api_client.models.add_campaign_artifact_result import AddCampaignArtifactResult
|
|
20
|
-
from rapidata.api_client.models.add_campaign_model import AddCampaignModel
|
|
21
19
|
from rapidata.api_client.models.add_user_response_result import AddUserResponseResult
|
|
22
20
|
from rapidata.api_client.models.add_validation_rapid_model import AddValidationRapidModel
|
|
23
21
|
from rapidata.api_client.models.add_validation_rapid_model_payload import AddValidationRapidModelPayload
|
|
@@ -27,6 +25,8 @@ from rapidata.api_client.models.add_validation_text_rapid_model import AddValida
|
|
|
27
25
|
from rapidata.api_client.models.age_group import AgeGroup
|
|
28
26
|
from rapidata.api_client.models.age_user_filter_model import AgeUserFilterModel
|
|
29
27
|
from rapidata.api_client.models.aggregator_type import AggregatorType
|
|
28
|
+
from rapidata.api_client.models.and_filter import AndFilter
|
|
29
|
+
from rapidata.api_client.models.and_filter_filters_inner import AndFilterFiltersInner
|
|
30
30
|
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
|
|
@@ -39,6 +39,7 @@ from rapidata.api_client.models.attach_category_truth import AttachCategoryTruth
|
|
|
39
39
|
from rapidata.api_client.models.benchmark_query_result import BenchmarkQueryResult
|
|
40
40
|
from rapidata.api_client.models.benchmark_query_result_paged_result import BenchmarkQueryResultPagedResult
|
|
41
41
|
from rapidata.api_client.models.boost_leaderboard_model import BoostLeaderboardModel
|
|
42
|
+
from rapidata.api_client.models.boost_mode import BoostMode
|
|
42
43
|
from rapidata.api_client.models.boost_query_result import BoostQueryResult
|
|
43
44
|
from rapidata.api_client.models.boost_status import BoostStatus
|
|
44
45
|
from rapidata.api_client.models.bounding_box_payload import BoundingBoxPayload
|
|
@@ -47,11 +48,13 @@ from rapidata.api_client.models.bounding_box_result import BoundingBoxResult
|
|
|
47
48
|
from rapidata.api_client.models.bounding_box_truth import BoundingBoxTruth
|
|
48
49
|
from rapidata.api_client.models.box_shape import BoxShape
|
|
49
50
|
from rapidata.api_client.models.campaign_artifact_model import CampaignArtifactModel
|
|
51
|
+
from rapidata.api_client.models.campaign_filter import CampaignFilter
|
|
50
52
|
from rapidata.api_client.models.campaign_query_result import CampaignQueryResult
|
|
51
53
|
from rapidata.api_client.models.campaign_query_result_paged_result import CampaignQueryResultPagedResult
|
|
52
54
|
from rapidata.api_client.models.campaign_status import CampaignStatus
|
|
53
55
|
from rapidata.api_client.models.campaign_user_filter_model import CampaignUserFilterModel
|
|
54
56
|
from rapidata.api_client.models.capped_selection import CappedSelection
|
|
57
|
+
from rapidata.api_client.models.change_boost_model import ChangeBoostModel
|
|
55
58
|
from rapidata.api_client.models.classification_metadata import ClassificationMetadata
|
|
56
59
|
from rapidata.api_client.models.classification_metadata_filter_config import ClassificationMetadataFilterConfig
|
|
57
60
|
from rapidata.api_client.models.classification_metadata_model import ClassificationMetadataModel
|
|
@@ -82,6 +85,7 @@ from rapidata.api_client.models.coordinate import Coordinate
|
|
|
82
85
|
from rapidata.api_client.models.count_classification_metadata_filter_config import CountClassificationMetadataFilterConfig
|
|
83
86
|
from rapidata.api_client.models.count_metadata import CountMetadata
|
|
84
87
|
from rapidata.api_client.models.count_metadata_model import CountMetadataModel
|
|
88
|
+
from rapidata.api_client.models.country_filter import CountryFilter
|
|
85
89
|
from rapidata.api_client.models.country_user_filter_model import CountryUserFilterModel
|
|
86
90
|
from rapidata.api_client.models.create_benchmark_model import CreateBenchmarkModel
|
|
87
91
|
from rapidata.api_client.models.create_benchmark_participant_model import CreateBenchmarkParticipantModel
|
|
@@ -125,6 +129,7 @@ from rapidata.api_client.models.dataset_artifact_model import DatasetArtifactMod
|
|
|
125
129
|
from rapidata.api_client.models.dataset_dataset_id_datapoints_post_request_metadata_inner import DatasetDatasetIdDatapointsPostRequestMetadataInner
|
|
126
130
|
from rapidata.api_client.models.dataset_evaluation_step_model import DatasetEvaluationStepModel
|
|
127
131
|
from rapidata.api_client.models.demographic import Demographic
|
|
132
|
+
from rapidata.api_client.models.demographic_filter import DemographicFilter
|
|
128
133
|
from rapidata.api_client.models.demographic_metadata_model import DemographicMetadataModel
|
|
129
134
|
from rapidata.api_client.models.demographic_selection import DemographicSelection
|
|
130
135
|
from rapidata.api_client.models.dynamic_client_registration_request import DynamicClientRegistrationRequest
|
|
@@ -176,8 +181,10 @@ from rapidata.api_client.models.get_participant_by_id_result import GetParticipa
|
|
|
176
181
|
from rapidata.api_client.models.get_pipeline_by_id_result import GetPipelineByIdResult
|
|
177
182
|
from rapidata.api_client.models.get_pipeline_by_id_result_artifacts_value import GetPipelineByIdResultArtifactsValue
|
|
178
183
|
from rapidata.api_client.models.get_public_orders_result import GetPublicOrdersResult
|
|
184
|
+
from rapidata.api_client.models.get_public_responses_result import GetPublicResponsesResult
|
|
179
185
|
from rapidata.api_client.models.get_rapid_responses_result import GetRapidResponsesResult
|
|
180
186
|
from rapidata.api_client.models.get_responses_result import GetResponsesResult
|
|
187
|
+
from rapidata.api_client.models.get_sample_by_id_result import GetSampleByIdResult
|
|
181
188
|
from rapidata.api_client.models.get_simple_workflow_results_model import GetSimpleWorkflowResultsModel
|
|
182
189
|
from rapidata.api_client.models.get_standing_by_id_result import GetStandingByIdResult
|
|
183
190
|
from rapidata.api_client.models.get_validation_rapids_result import GetValidationRapidsResult
|
|
@@ -201,6 +208,7 @@ from rapidata.api_client.models.inspect_report_result import InspectReportResult
|
|
|
201
208
|
from rapidata.api_client.models.json_web_key import JsonWebKey
|
|
202
209
|
from rapidata.api_client.models.json_web_key_set import JsonWebKeySet
|
|
203
210
|
from rapidata.api_client.models.labeling_selection import LabelingSelection
|
|
211
|
+
from rapidata.api_client.models.language_filter import LanguageFilter
|
|
204
212
|
from rapidata.api_client.models.language_user_filter_model import LanguageUserFilterModel
|
|
205
213
|
from rapidata.api_client.models.leaderboard_query_result import LeaderboardQueryResult
|
|
206
214
|
from rapidata.api_client.models.leaderboard_query_result_paged_result import LeaderboardQueryResultPagedResult
|
|
@@ -241,15 +249,18 @@ from rapidata.api_client.models.named_entity_result import NamedEntityResult
|
|
|
241
249
|
from rapidata.api_client.models.named_entity_truth import NamedEntityTruth
|
|
242
250
|
from rapidata.api_client.models.never_ending_referee_config import NeverEndingRefereeConfig
|
|
243
251
|
from rapidata.api_client.models.never_ending_referee_info import NeverEndingRefereeInfo
|
|
252
|
+
from rapidata.api_client.models.new_user_filter import NewUserFilter
|
|
244
253
|
from rapidata.api_client.models.new_user_filter_model import NewUserFilterModel
|
|
245
254
|
from rapidata.api_client.models.newsletter_model import NewsletterModel
|
|
246
255
|
from rapidata.api_client.models.not_available_yet_result import NotAvailableYetResult
|
|
256
|
+
from rapidata.api_client.models.not_filter import NotFilter
|
|
247
257
|
from rapidata.api_client.models.not_user_filter_model import NotUserFilterModel
|
|
248
258
|
from rapidata.api_client.models.null_asset import NullAsset
|
|
249
259
|
from rapidata.api_client.models.null_asset_model import NullAssetModel
|
|
250
260
|
from rapidata.api_client.models.online_pair_maker_config import OnlinePairMakerConfig
|
|
251
261
|
from rapidata.api_client.models.online_pair_maker_config_model import OnlinePairMakerConfigModel
|
|
252
262
|
from rapidata.api_client.models.online_pair_maker_information import OnlinePairMakerInformation
|
|
263
|
+
from rapidata.api_client.models.or_filter import OrFilter
|
|
253
264
|
from rapidata.api_client.models.or_user_filter_model import OrUserFilterModel
|
|
254
265
|
from rapidata.api_client.models.order_model import OrderModel
|
|
255
266
|
from rapidata.api_client.models.order_model_paged_result import OrderModelPagedResult
|
|
@@ -283,6 +294,7 @@ from rapidata.api_client.models.prompt_metadata_input import PromptMetadataInput
|
|
|
283
294
|
from rapidata.api_client.models.prompt_metadata_model import PromptMetadataModel
|
|
284
295
|
from rapidata.api_client.models.proxy_file_wrapper import ProxyFileWrapper
|
|
285
296
|
from rapidata.api_client.models.public_order_model import PublicOrderModel
|
|
297
|
+
from rapidata.api_client.models.public_rapid_response import PublicRapidResponse
|
|
286
298
|
from rapidata.api_client.models.public_text_metadata_input import PublicTextMetadataInput
|
|
287
299
|
from rapidata.api_client.models.query_model import QueryModel
|
|
288
300
|
from rapidata.api_client.models.query_validation_model import QueryValidationModel
|
|
@@ -300,12 +312,15 @@ from rapidata.api_client.models.read_bridge_token_keys_result import ReadBridgeT
|
|
|
300
312
|
from rapidata.api_client.models.register_temporary_customer_model import RegisterTemporaryCustomerModel
|
|
301
313
|
from rapidata.api_client.models.register_temporary_customer_result import RegisterTemporaryCustomerResult
|
|
302
314
|
from rapidata.api_client.models.report_model import ReportModel
|
|
315
|
+
from rapidata.api_client.models.response_count_filter import ResponseCountFilter
|
|
303
316
|
from rapidata.api_client.models.response_count_user_filter_model import ResponseCountUserFilterModel
|
|
304
317
|
from rapidata.api_client.models.retrieval_mode import RetrievalMode
|
|
305
318
|
from rapidata.api_client.models.root_filter import RootFilter
|
|
306
319
|
from rapidata.api_client.models.run_status import RunStatus
|
|
307
320
|
from rapidata.api_client.models.runs_by_leaderboard_result import RunsByLeaderboardResult
|
|
308
321
|
from rapidata.api_client.models.runs_by_leaderboard_result_paged_result import RunsByLeaderboardResultPagedResult
|
|
322
|
+
from rapidata.api_client.models.sample_by_identifier import SampleByIdentifier
|
|
323
|
+
from rapidata.api_client.models.sample_by_identifier_paged_result import SampleByIdentifierPagedResult
|
|
309
324
|
from rapidata.api_client.models.sample_by_participant import SampleByParticipant
|
|
310
325
|
from rapidata.api_client.models.sample_by_participant_paged_result import SampleByParticipantPagedResult
|
|
311
326
|
from rapidata.api_client.models.scrub_payload import ScrubPayload
|
|
@@ -361,7 +376,6 @@ from rapidata.api_client.models.translated_prompt_metadata_model import Translat
|
|
|
361
376
|
from rapidata.api_client.models.translated_string import TranslatedString
|
|
362
377
|
from rapidata.api_client.models.unlock_order_result import UnlockOrderResult
|
|
363
378
|
from rapidata.api_client.models.update_benchmark_name_model import UpdateBenchmarkNameModel
|
|
364
|
-
from rapidata.api_client.models.update_campaign_model import UpdateCampaignModel
|
|
365
379
|
from rapidata.api_client.models.update_dataset_name_model import UpdateDatasetNameModel
|
|
366
380
|
from rapidata.api_client.models.update_dimensions_model import UpdateDimensionsModel
|
|
367
381
|
from rapidata.api_client.models.update_leaderboard_name_model import UpdateLeaderboardNameModel
|
|
@@ -375,7 +389,10 @@ from rapidata.api_client.models.update_validation_rapid_model_truth import Updat
|
|
|
375
389
|
from rapidata.api_client.models.upload_coco_result import UploadCocoResult
|
|
376
390
|
from rapidata.api_client.models.upload_from_s3_result import UploadFromS3Result
|
|
377
391
|
from rapidata.api_client.models.url_asset_input import UrlAssetInput
|
|
392
|
+
from rapidata.api_client.models.user_score_filter import UserScoreFilter
|
|
378
393
|
from rapidata.api_client.models.user_score_user_filter_model import UserScoreUserFilterModel
|
|
394
|
+
from rapidata.api_client.models.user_state import UserState
|
|
395
|
+
from rapidata.api_client.models.user_state_filter import UserStateFilter
|
|
379
396
|
from rapidata.api_client.models.validation_chance import ValidationChance
|
|
380
397
|
from rapidata.api_client.models.validation_selection import ValidationSelection
|
|
381
398
|
from rapidata.api_client.models.validation_set_model import ValidationSetModel
|
|
@@ -0,0 +1,121 @@
|
|
|
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
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class AndFilter(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
AndFilter
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
t: StrictStr = Field(description="Discriminator value for AndFilter", alias="_t")
|
|
30
|
+
filters: List[AndFilterFiltersInner]
|
|
31
|
+
execution_order: Optional[StrictInt] = Field(default=None, alias="executionOrder")
|
|
32
|
+
inner_filters: Optional[List[AndFilterFiltersInner]] = Field(default=None, alias="innerFilters")
|
|
33
|
+
__properties: ClassVar[List[str]] = ["_t", "filters", "executionOrder", "innerFilters"]
|
|
34
|
+
|
|
35
|
+
@field_validator('t')
|
|
36
|
+
def t_validate_enum(cls, value):
|
|
37
|
+
"""Validates the enum"""
|
|
38
|
+
if value not in set(['AndFilter']):
|
|
39
|
+
raise ValueError("must be one of enum values ('AndFilter')")
|
|
40
|
+
return value
|
|
41
|
+
|
|
42
|
+
model_config = ConfigDict(
|
|
43
|
+
populate_by_name=True,
|
|
44
|
+
validate_assignment=True,
|
|
45
|
+
protected_namespaces=(),
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def to_str(self) -> str:
|
|
50
|
+
"""Returns the string representation of the model using alias"""
|
|
51
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
52
|
+
|
|
53
|
+
def to_json(self) -> str:
|
|
54
|
+
"""Returns the JSON representation of the model using alias"""
|
|
55
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
56
|
+
return json.dumps(self.to_dict())
|
|
57
|
+
|
|
58
|
+
@classmethod
|
|
59
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
60
|
+
"""Create an instance of AndFilter from a JSON string"""
|
|
61
|
+
return cls.from_dict(json.loads(json_str))
|
|
62
|
+
|
|
63
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
64
|
+
"""Return the dictionary representation of the model using alias.
|
|
65
|
+
|
|
66
|
+
This has the following differences from calling pydantic's
|
|
67
|
+
`self.model_dump(by_alias=True)`:
|
|
68
|
+
|
|
69
|
+
* `None` is only added to the output dict for nullable fields that
|
|
70
|
+
were set at model initialization. Other fields with value `None`
|
|
71
|
+
are ignored.
|
|
72
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
73
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
74
|
+
"""
|
|
75
|
+
excluded_fields: Set[str] = set([
|
|
76
|
+
"execution_order",
|
|
77
|
+
"inner_filters",
|
|
78
|
+
])
|
|
79
|
+
|
|
80
|
+
_dict = self.model_dump(
|
|
81
|
+
by_alias=True,
|
|
82
|
+
exclude=excluded_fields,
|
|
83
|
+
exclude_none=True,
|
|
84
|
+
)
|
|
85
|
+
# override the default output from pydantic by calling `to_dict()` of each item in filters (list)
|
|
86
|
+
_items = []
|
|
87
|
+
if self.filters:
|
|
88
|
+
for _item_filters in self.filters:
|
|
89
|
+
if _item_filters:
|
|
90
|
+
_items.append(_item_filters.to_dict())
|
|
91
|
+
_dict['filters'] = _items
|
|
92
|
+
# override the default output from pydantic by calling `to_dict()` of each item in inner_filters (list)
|
|
93
|
+
_items = []
|
|
94
|
+
if self.inner_filters:
|
|
95
|
+
for _item_inner_filters in self.inner_filters:
|
|
96
|
+
if _item_inner_filters:
|
|
97
|
+
_items.append(_item_inner_filters.to_dict())
|
|
98
|
+
_dict['innerFilters'] = _items
|
|
99
|
+
return _dict
|
|
100
|
+
|
|
101
|
+
@classmethod
|
|
102
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
103
|
+
"""Create an instance of AndFilter from a dict"""
|
|
104
|
+
if obj is None:
|
|
105
|
+
return None
|
|
106
|
+
|
|
107
|
+
if not isinstance(obj, dict):
|
|
108
|
+
return cls.model_validate(obj)
|
|
109
|
+
|
|
110
|
+
_obj = cls.model_validate({
|
|
111
|
+
"_t": obj.get("_t") if obj.get("_t") is not None else 'AndFilter',
|
|
112
|
+
"filters": [AndFilterFiltersInner.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None,
|
|
113
|
+
"executionOrder": obj.get("executionOrder"),
|
|
114
|
+
"innerFilters": [AndFilterFiltersInner.from_dict(_item) for _item in obj["innerFilters"]] if obj.get("innerFilters") is not None else None
|
|
115
|
+
})
|
|
116
|
+
return _obj
|
|
117
|
+
|
|
118
|
+
from rapidata.api_client.models.and_filter_filters_inner import AndFilterFiltersInner
|
|
119
|
+
# TODO: Rewrite to not use raise_errors
|
|
120
|
+
AndFilter.model_rebuild(raise_errors=False)
|
|
121
|
+
|