rapidata 2.26.0__py3-none-any.whl → 2.27.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 -2
- rapidata/api_client/__init__.py +11 -3
- rapidata/api_client/api/__init__.py +2 -1
- rapidata/api_client/api/client_api.py +0 -257
- rapidata/api_client/api/customer_rapid_api.py +1644 -0
- rapidata/api_client/api/dataset_api.py +358 -1
- rapidata/api_client/api/newsletter_api.py +11 -299
- rapidata/api_client/api/user_rapid_api.py +1385 -0
- rapidata/api_client/api/validation_set_api.py +6 -6
- rapidata/api_client/models/__init__.py +9 -2
- rapidata/api_client/models/add_campaign_model.py +5 -0
- rapidata/api_client/models/add_validation_rapid_model.py +3 -3
- rapidata/api_client/models/add_validation_rapid_model_truth.py +25 -11
- rapidata/api_client/models/add_validation_text_rapid_model.py +3 -3
- rapidata/api_client/models/asset_metadata_model.py +2 -8
- rapidata/api_client/models/compare_result.py +1 -10
- rapidata/api_client/models/compare_workflow_model.py +3 -3
- rapidata/api_client/models/create_datapoint_from_files_model.py +3 -3
- rapidata/api_client/models/create_datapoint_from_text_sources_model.py +3 -3
- rapidata/api_client/models/create_datapoint_from_urls_model.py +3 -3
- rapidata/api_client/models/create_order_model.py +2 -4
- rapidata/api_client/models/datapoint.py +3 -3
- rapidata/api_client/models/datapoint_metadata_model.py +3 -3
- rapidata/api_client/models/datapoint_model.py +3 -3
- rapidata/api_client/models/dataset_dataset_id_datapoints_post_request_metadata_inner.py +182 -0
- rapidata/api_client/models/file_asset_model.py +1 -3
- rapidata/api_client/models/file_asset_model_metadata_value.py +1 -3
- rapidata/api_client/models/get_compare_workflow_results_result.py +3 -3
- rapidata/api_client/models/get_datapoint_by_id_result.py +3 -3
- rapidata/api_client/models/get_rapid_responses_result.py +5 -5
- rapidata/api_client/models/get_validation_rapids_result.py +12 -3
- rapidata/api_client/models/get_validation_rapids_result_truth.py +25 -11
- rapidata/api_client/models/get_workflow_results_result.py +5 -5
- rapidata/api_client/models/multi_asset_model.py +4 -4
- rapidata/api_client/models/multi_compare_truth.py +96 -0
- rapidata/api_client/models/naive_referee_info.py +96 -0
- rapidata/api_client/models/never_ending_referee_info.py +94 -0
- rapidata/api_client/models/null_asset_model.py +1 -3
- rapidata/api_client/models/probabilistic_attach_category_referee_info.py +98 -0
- rapidata/api_client/models/rapid_model.py +173 -0
- rapidata/api_client/models/rapid_model_paged_result.py +105 -0
- rapidata/api_client/models/rapid_model_referee.py +154 -0
- rapidata/api_client/models/rapid_state.py +1 -0
- rapidata/api_client/models/text_asset_model.py +1 -3
- rapidata/api_client/models/update_access_model.py +1 -1
- rapidata/api_client/models/update_validation_rapid_model.py +3 -8
- rapidata/api_client/models/update_validation_rapid_model_truth.py +26 -12
- rapidata/api_client/models/upload_files_from_s3_bucket_model.py +12 -2
- rapidata/api_client/models/upload_text_sources_to_dataset_model.py +3 -3
- rapidata/api_client_README.md +21 -13
- rapidata/rapidata_client/__init__.py +1 -1
- rapidata/rapidata_client/assets/_multi_asset.py +0 -5
- rapidata/rapidata_client/logging/__init__.py +1 -1
- rapidata/rapidata_client/logging/output_manager.py +2 -2
- rapidata/rapidata_client/order/_rapidata_dataset.py +16 -39
- rapidata/rapidata_client/order/rapidata_order.py +21 -16
- rapidata/rapidata_client/order/rapidata_order_manager.py +2 -3
- rapidata/rapidata_client/validation/rapids/rapids.py +3 -4
- rapidata/rapidata_client/validation/validation_set_manager.py +2 -3
- rapidata/rapidata_client/workflow/_ranking_workflow.py +2 -6
- {rapidata-2.26.0.dist-info → rapidata-2.27.0.dist-info}/METADATA +1 -1
- {rapidata-2.26.0.dist-info → rapidata-2.27.0.dist-info}/RECORD +64 -54
- {rapidata-2.26.0.dist-info → rapidata-2.27.0.dist-info}/LICENSE +0 -0
- {rapidata-2.26.0.dist-info → rapidata-2.27.0.dist-info}/WHEEL +0 -0
|
@@ -4156,7 +4156,7 @@ class ValidationSetApi:
|
|
|
4156
4156
|
def validation_set_validation_set_id_rapids_get(
|
|
4157
4157
|
self,
|
|
4158
4158
|
validation_set_id: Annotated[StrictStr, Field(description="The validation set to query.")],
|
|
4159
|
-
model: Annotated[Optional[QueryModel], Field(description="The request formatted as a
|
|
4159
|
+
model: Annotated[Optional[QueryModel], Field(description="The request formatted as a JSON in the query parameters.")] = None,
|
|
4160
4160
|
_request_timeout: Union[
|
|
4161
4161
|
None,
|
|
4162
4162
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -4175,7 +4175,7 @@ class ValidationSetApi:
|
|
|
4175
4175
|
|
|
4176
4176
|
:param validation_set_id: The validation set to query. (required)
|
|
4177
4177
|
:type validation_set_id: str
|
|
4178
|
-
:param model: The request formatted as a
|
|
4178
|
+
:param model: The request formatted as a JSON in the query parameters.
|
|
4179
4179
|
:type model: QueryModel
|
|
4180
4180
|
:param _request_timeout: timeout setting for this request. If one
|
|
4181
4181
|
number provided, it will be total request
|
|
@@ -4226,7 +4226,7 @@ class ValidationSetApi:
|
|
|
4226
4226
|
def validation_set_validation_set_id_rapids_get_with_http_info(
|
|
4227
4227
|
self,
|
|
4228
4228
|
validation_set_id: Annotated[StrictStr, Field(description="The validation set to query.")],
|
|
4229
|
-
model: Annotated[Optional[QueryModel], Field(description="The request formatted as a
|
|
4229
|
+
model: Annotated[Optional[QueryModel], Field(description="The request formatted as a JSON in the query parameters.")] = None,
|
|
4230
4230
|
_request_timeout: Union[
|
|
4231
4231
|
None,
|
|
4232
4232
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -4245,7 +4245,7 @@ class ValidationSetApi:
|
|
|
4245
4245
|
|
|
4246
4246
|
:param validation_set_id: The validation set to query. (required)
|
|
4247
4247
|
:type validation_set_id: str
|
|
4248
|
-
:param model: The request formatted as a
|
|
4248
|
+
:param model: The request formatted as a JSON in the query parameters.
|
|
4249
4249
|
:type model: QueryModel
|
|
4250
4250
|
:param _request_timeout: timeout setting for this request. If one
|
|
4251
4251
|
number provided, it will be total request
|
|
@@ -4296,7 +4296,7 @@ class ValidationSetApi:
|
|
|
4296
4296
|
def validation_set_validation_set_id_rapids_get_without_preload_content(
|
|
4297
4297
|
self,
|
|
4298
4298
|
validation_set_id: Annotated[StrictStr, Field(description="The validation set to query.")],
|
|
4299
|
-
model: Annotated[Optional[QueryModel], Field(description="The request formatted as a
|
|
4299
|
+
model: Annotated[Optional[QueryModel], Field(description="The request formatted as a JSON in the query parameters.")] = None,
|
|
4300
4300
|
_request_timeout: Union[
|
|
4301
4301
|
None,
|
|
4302
4302
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -4315,7 +4315,7 @@ class ValidationSetApi:
|
|
|
4315
4315
|
|
|
4316
4316
|
:param validation_set_id: The validation set to query. (required)
|
|
4317
4317
|
:type validation_set_id: str
|
|
4318
|
-
:param model: The request formatted as a
|
|
4318
|
+
:param model: The request formatted as a JSON in the query parameters.
|
|
4319
4319
|
:type model: QueryModel
|
|
4320
4320
|
:param _request_timeout: timeout setting for this request. If one
|
|
4321
4321
|
number provided, it will be total request
|
|
@@ -31,7 +31,6 @@ from rapidata.api_client.models.are_rapids_active_result import AreRapidsActiveR
|
|
|
31
31
|
from rapidata.api_client.models.asset_metadata import AssetMetadata
|
|
32
32
|
from rapidata.api_client.models.asset_metadata_asset import AssetMetadataAsset
|
|
33
33
|
from rapidata.api_client.models.asset_metadata_model import AssetMetadataModel
|
|
34
|
-
from rapidata.api_client.models.asset_metadata_model_asset import AssetMetadataModelAsset
|
|
35
34
|
from rapidata.api_client.models.attach_category_rapid_blueprint import AttachCategoryRapidBlueprint
|
|
36
35
|
from rapidata.api_client.models.attach_category_result import AttachCategoryResult
|
|
37
36
|
from rapidata.api_client.models.attach_category_truth import AttachCategoryTruth
|
|
@@ -84,7 +83,6 @@ from rapidata.api_client.models.create_complex_order_model import CreateComplexO
|
|
|
84
83
|
from rapidata.api_client.models.create_complex_order_model_pipeline import CreateComplexOrderModelPipeline
|
|
85
84
|
from rapidata.api_client.models.create_complex_order_result import CreateComplexOrderResult
|
|
86
85
|
from rapidata.api_client.models.create_datapoint_from_files_model import CreateDatapointFromFilesModel
|
|
87
|
-
from rapidata.api_client.models.create_datapoint_from_files_model_metadata_inner import CreateDatapointFromFilesModelMetadataInner
|
|
88
86
|
from rapidata.api_client.models.create_datapoint_from_text_sources_model import CreateDatapointFromTextSourcesModel
|
|
89
87
|
from rapidata.api_client.models.create_datapoint_from_urls_model import CreateDatapointFromUrlsModel
|
|
90
88
|
from rapidata.api_client.models.create_datapoint_result import CreateDatapointResult
|
|
@@ -106,10 +104,12 @@ from rapidata.api_client.models.create_unsupported_order_model import CreateUnsu
|
|
|
106
104
|
from rapidata.api_client.models.create_validation_set_model import CreateValidationSetModel
|
|
107
105
|
from rapidata.api_client.models.custom_user_filter_model import CustomUserFilterModel
|
|
108
106
|
from rapidata.api_client.models.datapoint import Datapoint
|
|
107
|
+
from rapidata.api_client.models.datapoint_asset import DatapointAsset
|
|
109
108
|
from rapidata.api_client.models.datapoint_metadata_model import DatapointMetadataModel
|
|
110
109
|
from rapidata.api_client.models.datapoint_model import DatapointModel
|
|
111
110
|
from rapidata.api_client.models.datapoint_state import DatapointState
|
|
112
111
|
from rapidata.api_client.models.dataset_artifact_model import DatasetArtifactModel
|
|
112
|
+
from rapidata.api_client.models.dataset_dataset_id_datapoints_post_request_metadata_inner import DatasetDatasetIdDatapointsPostRequestMetadataInner
|
|
113
113
|
from rapidata.api_client.models.dataset_evaluation_step_model import DatasetEvaluationStepModel
|
|
114
114
|
from rapidata.api_client.models.demographic import Demographic
|
|
115
115
|
from rapidata.api_client.models.demographic_metadata_model import DemographicMetadataModel
|
|
@@ -190,7 +190,9 @@ from rapidata.api_client.models.logic_operator import LogicOperator
|
|
|
190
190
|
from rapidata.api_client.models.metadata_visibilities import MetadataVisibilities
|
|
191
191
|
from rapidata.api_client.models.multi_asset import MultiAsset
|
|
192
192
|
from rapidata.api_client.models.multi_asset_model import MultiAssetModel
|
|
193
|
+
from rapidata.api_client.models.multi_compare_truth import MultiCompareTruth
|
|
193
194
|
from rapidata.api_client.models.naive_referee_config import NaiveRefereeConfig
|
|
195
|
+
from rapidata.api_client.models.naive_referee_info import NaiveRefereeInfo
|
|
194
196
|
from rapidata.api_client.models.naive_referee_model import NaiveRefereeModel
|
|
195
197
|
from rapidata.api_client.models.named_classification import NamedClassification
|
|
196
198
|
from rapidata.api_client.models.named_entity_payload import NamedEntityPayload
|
|
@@ -198,6 +200,7 @@ from rapidata.api_client.models.named_entity_rapid_blueprint import NamedEntityR
|
|
|
198
200
|
from rapidata.api_client.models.named_entity_result import NamedEntityResult
|
|
199
201
|
from rapidata.api_client.models.named_entity_truth import NamedEntityTruth
|
|
200
202
|
from rapidata.api_client.models.never_ending_referee_config import NeverEndingRefereeConfig
|
|
203
|
+
from rapidata.api_client.models.never_ending_referee_info import NeverEndingRefereeInfo
|
|
201
204
|
from rapidata.api_client.models.new_user_filter_model import NewUserFilterModel
|
|
202
205
|
from rapidata.api_client.models.newsletter_model import NewsletterModel
|
|
203
206
|
from rapidata.api_client.models.not_available_yet_result import NotAvailableYetResult
|
|
@@ -223,6 +226,7 @@ from rapidata.api_client.models.preliminary_download_model import PreliminaryDow
|
|
|
223
226
|
from rapidata.api_client.models.preliminary_download_result import PreliminaryDownloadResult
|
|
224
227
|
from rapidata.api_client.models.private_text_metadata_input import PrivateTextMetadataInput
|
|
225
228
|
from rapidata.api_client.models.probabilistic_attach_category_referee_config import ProbabilisticAttachCategoryRefereeConfig
|
|
229
|
+
from rapidata.api_client.models.probabilistic_attach_category_referee_info import ProbabilisticAttachCategoryRefereeInfo
|
|
226
230
|
from rapidata.api_client.models.prompt_asset_metadata_input import PromptAssetMetadataInput
|
|
227
231
|
from rapidata.api_client.models.prompt_metadata import PromptMetadata
|
|
228
232
|
from rapidata.api_client.models.prompt_metadata_input import PromptMetadataInput
|
|
@@ -232,6 +236,9 @@ from rapidata.api_client.models.public_text_metadata_input import PublicTextMeta
|
|
|
232
236
|
from rapidata.api_client.models.query_model import QueryModel
|
|
233
237
|
from rapidata.api_client.models.query_workflows_model import QueryWorkflowsModel
|
|
234
238
|
from rapidata.api_client.models.rapid_issue import RapidIssue
|
|
239
|
+
from rapidata.api_client.models.rapid_model import RapidModel
|
|
240
|
+
from rapidata.api_client.models.rapid_model_paged_result import RapidModelPagedResult
|
|
241
|
+
from rapidata.api_client.models.rapid_model_referee import RapidModelReferee
|
|
235
242
|
from rapidata.api_client.models.rapid_response import RapidResponse
|
|
236
243
|
from rapidata.api_client.models.rapid_response_result import RapidResponseResult
|
|
237
244
|
from rapidata.api_client.models.rapid_result_model import RapidResultModel
|
|
@@ -150,6 +150,11 @@ class AddCampaignModel(BaseModel):
|
|
|
150
150
|
if self.max_iterations is None and "max_iterations" in self.model_fields_set:
|
|
151
151
|
_dict['maxIterations'] = None
|
|
152
152
|
|
|
153
|
+
# set to None if is_sticky (nullable) is None
|
|
154
|
+
# and model_fields_set contains the field
|
|
155
|
+
if self.is_sticky is None and "is_sticky" in self.model_fields_set:
|
|
156
|
+
_dict['isSticky'] = None
|
|
157
|
+
|
|
153
158
|
# set to None if is_preview_enabled (nullable) is None
|
|
154
159
|
# and model_fields_set contains the field
|
|
155
160
|
if self.is_preview_enabled is None and "is_preview_enabled" in self.model_fields_set:
|
|
@@ -21,7 +21,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, Stric
|
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
22
22
|
from rapidata.api_client.models.add_validation_rapid_model_payload import AddValidationRapidModelPayload
|
|
23
23
|
from rapidata.api_client.models.add_validation_rapid_model_truth import AddValidationRapidModelTruth
|
|
24
|
-
from rapidata.api_client.models.
|
|
24
|
+
from rapidata.api_client.models.dataset_dataset_id_datapoints_post_request_metadata_inner import DatasetDatasetIdDatapointsPostRequestMetadataInner
|
|
25
25
|
from typing import Optional, Set
|
|
26
26
|
from typing_extensions import Self
|
|
27
27
|
|
|
@@ -31,7 +31,7 @@ class AddValidationRapidModel(BaseModel):
|
|
|
31
31
|
""" # noqa: E501
|
|
32
32
|
validation_set_id: StrictStr = Field(description="The ID of the validation set to add the rapid to.", alias="validationSetId")
|
|
33
33
|
payload: AddValidationRapidModelPayload
|
|
34
|
-
metadata: List[
|
|
34
|
+
metadata: List[DatasetDatasetIdDatapointsPostRequestMetadataInner] = Field(description="Some metadata to attach to the rapid.")
|
|
35
35
|
truth: AddValidationRapidModelTruth
|
|
36
36
|
random_correct_probability: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The probability for an answer to be correct when randomly guessing.", alias="randomCorrectProbability")
|
|
37
37
|
explanation: Optional[StrictStr] = Field(default=None, description="An explanation for the users if they answer the rapid incorrectly.")
|
|
@@ -113,7 +113,7 @@ class AddValidationRapidModel(BaseModel):
|
|
|
113
113
|
_obj = cls.model_validate({
|
|
114
114
|
"validationSetId": obj.get("validationSetId"),
|
|
115
115
|
"payload": AddValidationRapidModelPayload.from_dict(obj["payload"]) if obj.get("payload") is not None else None,
|
|
116
|
-
"metadata": [
|
|
116
|
+
"metadata": [DatasetDatasetIdDatapointsPostRequestMetadataInner.from_dict(_item) for _item in obj["metadata"]] if obj.get("metadata") is not None else None,
|
|
117
117
|
"truth": AddValidationRapidModelTruth.from_dict(obj["truth"]) if obj.get("truth") is not None else None,
|
|
118
118
|
"randomCorrectProbability": obj.get("randomCorrectProbability"),
|
|
119
119
|
"explanation": obj.get("explanation")
|
|
@@ -23,6 +23,7 @@ from rapidata.api_client.models.compare_truth import CompareTruth
|
|
|
23
23
|
from rapidata.api_client.models.empty_validation_truth import EmptyValidationTruth
|
|
24
24
|
from rapidata.api_client.models.line_truth import LineTruth
|
|
25
25
|
from rapidata.api_client.models.locate_box_truth import LocateBoxTruth
|
|
26
|
+
from rapidata.api_client.models.multi_compare_truth import MultiCompareTruth
|
|
26
27
|
from rapidata.api_client.models.named_entity_truth import NamedEntityTruth
|
|
27
28
|
from rapidata.api_client.models.polygon_truth import PolygonTruth
|
|
28
29
|
from rapidata.api_client.models.scrub_truth import ScrubTruth
|
|
@@ -32,7 +33,7 @@ from pydantic import StrictStr, Field
|
|
|
32
33
|
from typing import Union, List, Set, Optional, Dict
|
|
33
34
|
from typing_extensions import Literal, Self
|
|
34
35
|
|
|
35
|
-
ADDVALIDATIONRAPIDMODELTRUTH_ONE_OF_SCHEMAS = ["AttachCategoryTruth", "BoundingBoxTruth", "CompareTruth", "EmptyValidationTruth", "LineTruth", "LocateBoxTruth", "NamedEntityTruth", "PolygonTruth", "ScrubTruth", "SkipTruth", "TranscriptionTruth"]
|
|
36
|
+
ADDVALIDATIONRAPIDMODELTRUTH_ONE_OF_SCHEMAS = ["AttachCategoryTruth", "BoundingBoxTruth", "CompareTruth", "EmptyValidationTruth", "LineTruth", "LocateBoxTruth", "MultiCompareTruth", "NamedEntityTruth", "PolygonTruth", "ScrubTruth", "SkipTruth", "TranscriptionTruth"]
|
|
36
37
|
|
|
37
38
|
class AddValidationRapidModelTruth(BaseModel):
|
|
38
39
|
"""
|
|
@@ -54,14 +55,16 @@ class AddValidationRapidModelTruth(BaseModel):
|
|
|
54
55
|
oneof_schema_7_validator: Optional[EmptyValidationTruth] = None
|
|
55
56
|
# data type: CompareTruth
|
|
56
57
|
oneof_schema_8_validator: Optional[CompareTruth] = None
|
|
58
|
+
# data type: MultiCompareTruth
|
|
59
|
+
oneof_schema_9_validator: Optional[MultiCompareTruth] = None
|
|
57
60
|
# data type: SkipTruth
|
|
58
|
-
|
|
61
|
+
oneof_schema_10_validator: Optional[SkipTruth] = None
|
|
59
62
|
# data type: AttachCategoryTruth
|
|
60
|
-
|
|
63
|
+
oneof_schema_11_validator: Optional[AttachCategoryTruth] = None
|
|
61
64
|
# data type: BoundingBoxTruth
|
|
62
|
-
|
|
63
|
-
actual_instance: Optional[Union[AttachCategoryTruth, BoundingBoxTruth, CompareTruth, EmptyValidationTruth, LineTruth, LocateBoxTruth, NamedEntityTruth, PolygonTruth, ScrubTruth, SkipTruth, TranscriptionTruth]] = None
|
|
64
|
-
one_of_schemas: Set[str] = { "AttachCategoryTruth", "BoundingBoxTruth", "CompareTruth", "EmptyValidationTruth", "LineTruth", "LocateBoxTruth", "NamedEntityTruth", "PolygonTruth", "ScrubTruth", "SkipTruth", "TranscriptionTruth" }
|
|
65
|
+
oneof_schema_12_validator: Optional[BoundingBoxTruth] = None
|
|
66
|
+
actual_instance: Optional[Union[AttachCategoryTruth, BoundingBoxTruth, CompareTruth, EmptyValidationTruth, LineTruth, LocateBoxTruth, MultiCompareTruth, NamedEntityTruth, PolygonTruth, ScrubTruth, SkipTruth, TranscriptionTruth]] = None
|
|
67
|
+
one_of_schemas: Set[str] = { "AttachCategoryTruth", "BoundingBoxTruth", "CompareTruth", "EmptyValidationTruth", "LineTruth", "LocateBoxTruth", "MultiCompareTruth", "NamedEntityTruth", "PolygonTruth", "ScrubTruth", "SkipTruth", "TranscriptionTruth" }
|
|
65
68
|
|
|
66
69
|
model_config = ConfigDict(
|
|
67
70
|
validate_assignment=True,
|
|
@@ -127,6 +130,11 @@ class AddValidationRapidModelTruth(BaseModel):
|
|
|
127
130
|
error_messages.append(f"Error! Input type `{type(v)}` is not `CompareTruth`")
|
|
128
131
|
else:
|
|
129
132
|
match += 1
|
|
133
|
+
# validate data type: MultiCompareTruth
|
|
134
|
+
if not isinstance(v, MultiCompareTruth):
|
|
135
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `MultiCompareTruth`")
|
|
136
|
+
else:
|
|
137
|
+
match += 1
|
|
130
138
|
# validate data type: SkipTruth
|
|
131
139
|
if not isinstance(v, SkipTruth):
|
|
132
140
|
error_messages.append(f"Error! Input type `{type(v)}` is not `SkipTruth`")
|
|
@@ -144,10 +152,10 @@ class AddValidationRapidModelTruth(BaseModel):
|
|
|
144
152
|
match += 1
|
|
145
153
|
if match > 1:
|
|
146
154
|
# more than 1 match
|
|
147
|
-
raise ValueError("Multiple matches found when setting `actual_instance` in AddValidationRapidModelTruth with oneOf schemas: AttachCategoryTruth, BoundingBoxTruth, CompareTruth, EmptyValidationTruth, LineTruth, LocateBoxTruth, NamedEntityTruth, PolygonTruth, ScrubTruth, SkipTruth, TranscriptionTruth. Details: " + ", ".join(error_messages))
|
|
155
|
+
raise ValueError("Multiple matches found when setting `actual_instance` in AddValidationRapidModelTruth with oneOf schemas: AttachCategoryTruth, BoundingBoxTruth, CompareTruth, EmptyValidationTruth, LineTruth, LocateBoxTruth, MultiCompareTruth, NamedEntityTruth, PolygonTruth, ScrubTruth, SkipTruth, TranscriptionTruth. Details: " + ", ".join(error_messages))
|
|
148
156
|
elif match == 0:
|
|
149
157
|
# no match
|
|
150
|
-
raise ValueError("No match found when setting `actual_instance` in AddValidationRapidModelTruth with oneOf schemas: AttachCategoryTruth, BoundingBoxTruth, CompareTruth, EmptyValidationTruth, LineTruth, LocateBoxTruth, NamedEntityTruth, PolygonTruth, ScrubTruth, SkipTruth, TranscriptionTruth. Details: " + ", ".join(error_messages))
|
|
158
|
+
raise ValueError("No match found when setting `actual_instance` in AddValidationRapidModelTruth with oneOf schemas: AttachCategoryTruth, BoundingBoxTruth, CompareTruth, EmptyValidationTruth, LineTruth, LocateBoxTruth, MultiCompareTruth, NamedEntityTruth, PolygonTruth, ScrubTruth, SkipTruth, TranscriptionTruth. Details: " + ", ".join(error_messages))
|
|
151
159
|
else:
|
|
152
160
|
return v
|
|
153
161
|
|
|
@@ -210,6 +218,12 @@ class AddValidationRapidModelTruth(BaseModel):
|
|
|
210
218
|
match += 1
|
|
211
219
|
except (ValidationError, ValueError) as e:
|
|
212
220
|
error_messages.append(str(e))
|
|
221
|
+
# deserialize data into MultiCompareTruth
|
|
222
|
+
try:
|
|
223
|
+
instance.actual_instance = MultiCompareTruth.from_json(json_str)
|
|
224
|
+
match += 1
|
|
225
|
+
except (ValidationError, ValueError) as e:
|
|
226
|
+
error_messages.append(str(e))
|
|
213
227
|
# deserialize data into SkipTruth
|
|
214
228
|
try:
|
|
215
229
|
instance.actual_instance = SkipTruth.from_json(json_str)
|
|
@@ -231,10 +245,10 @@ class AddValidationRapidModelTruth(BaseModel):
|
|
|
231
245
|
|
|
232
246
|
if match > 1:
|
|
233
247
|
# more than 1 match
|
|
234
|
-
raise ValueError("Multiple matches found when deserializing the JSON string into AddValidationRapidModelTruth with oneOf schemas: AttachCategoryTruth, BoundingBoxTruth, CompareTruth, EmptyValidationTruth, LineTruth, LocateBoxTruth, NamedEntityTruth, PolygonTruth, ScrubTruth, SkipTruth, TranscriptionTruth. Details: " + ", ".join(error_messages))
|
|
248
|
+
raise ValueError("Multiple matches found when deserializing the JSON string into AddValidationRapidModelTruth with oneOf schemas: AttachCategoryTruth, BoundingBoxTruth, CompareTruth, EmptyValidationTruth, LineTruth, LocateBoxTruth, MultiCompareTruth, NamedEntityTruth, PolygonTruth, ScrubTruth, SkipTruth, TranscriptionTruth. Details: " + ", ".join(error_messages))
|
|
235
249
|
elif match == 0:
|
|
236
250
|
# no match
|
|
237
|
-
raise ValueError("No match found when deserializing the JSON string into AddValidationRapidModelTruth with oneOf schemas: AttachCategoryTruth, BoundingBoxTruth, CompareTruth, EmptyValidationTruth, LineTruth, LocateBoxTruth, NamedEntityTruth, PolygonTruth, ScrubTruth, SkipTruth, TranscriptionTruth. Details: " + ", ".join(error_messages))
|
|
251
|
+
raise ValueError("No match found when deserializing the JSON string into AddValidationRapidModelTruth with oneOf schemas: AttachCategoryTruth, BoundingBoxTruth, CompareTruth, EmptyValidationTruth, LineTruth, LocateBoxTruth, MultiCompareTruth, NamedEntityTruth, PolygonTruth, ScrubTruth, SkipTruth, TranscriptionTruth. Details: " + ", ".join(error_messages))
|
|
238
252
|
else:
|
|
239
253
|
return instance
|
|
240
254
|
|
|
@@ -248,7 +262,7 @@ class AddValidationRapidModelTruth(BaseModel):
|
|
|
248
262
|
else:
|
|
249
263
|
return json.dumps(self.actual_instance)
|
|
250
264
|
|
|
251
|
-
def to_dict(self) -> Optional[Union[Dict[str, Any], AttachCategoryTruth, BoundingBoxTruth, CompareTruth, EmptyValidationTruth, LineTruth, LocateBoxTruth, NamedEntityTruth, PolygonTruth, ScrubTruth, SkipTruth, TranscriptionTruth]]:
|
|
265
|
+
def to_dict(self) -> Optional[Union[Dict[str, Any], AttachCategoryTruth, BoundingBoxTruth, CompareTruth, EmptyValidationTruth, LineTruth, LocateBoxTruth, MultiCompareTruth, NamedEntityTruth, PolygonTruth, ScrubTruth, SkipTruth, TranscriptionTruth]]:
|
|
252
266
|
"""Returns the dict representation of the actual instance"""
|
|
253
267
|
if self.actual_instance is None:
|
|
254
268
|
return None
|
|
@@ -21,7 +21,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, Stric
|
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
22
22
|
from rapidata.api_client.models.add_validation_rapid_model_payload import AddValidationRapidModelPayload
|
|
23
23
|
from rapidata.api_client.models.add_validation_rapid_model_truth import AddValidationRapidModelTruth
|
|
24
|
-
from rapidata.api_client.models.
|
|
24
|
+
from rapidata.api_client.models.dataset_dataset_id_datapoints_post_request_metadata_inner import DatasetDatasetIdDatapointsPostRequestMetadataInner
|
|
25
25
|
from typing import Optional, Set
|
|
26
26
|
from typing_extensions import Self
|
|
27
27
|
|
|
@@ -31,7 +31,7 @@ class AddValidationTextRapidModel(BaseModel):
|
|
|
31
31
|
""" # noqa: E501
|
|
32
32
|
validation_set_id: StrictStr = Field(description="The ID of the validation set to add the rapid to.", alias="validationSetId")
|
|
33
33
|
payload: AddValidationRapidModelPayload
|
|
34
|
-
metadata: List[
|
|
34
|
+
metadata: List[DatasetDatasetIdDatapointsPostRequestMetadataInner] = Field(description="Some metadata to attach to the rapid.")
|
|
35
35
|
truth: AddValidationRapidModelTruth
|
|
36
36
|
texts: List[StrictStr] = Field(description="The texts to use for the rapid.")
|
|
37
37
|
random_correct_probability: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The probability for an answer to be correct when randomly guessing.", alias="randomCorrectProbability")
|
|
@@ -114,7 +114,7 @@ class AddValidationTextRapidModel(BaseModel):
|
|
|
114
114
|
_obj = cls.model_validate({
|
|
115
115
|
"validationSetId": obj.get("validationSetId"),
|
|
116
116
|
"payload": AddValidationRapidModelPayload.from_dict(obj["payload"]) if obj.get("payload") is not None else None,
|
|
117
|
-
"metadata": [
|
|
117
|
+
"metadata": [DatasetDatasetIdDatapointsPostRequestMetadataInner.from_dict(_item) for _item in obj["metadata"]] if obj.get("metadata") is not None else None,
|
|
118
118
|
"truth": AddValidationRapidModelTruth.from_dict(obj["truth"]) if obj.get("truth") is not None else None,
|
|
119
119
|
"texts": obj.get("texts"),
|
|
120
120
|
"randomCorrectProbability": obj.get("randomCorrectProbability"),
|
|
@@ -27,7 +27,7 @@ class AssetMetadataModel(BaseModel):
|
|
|
27
27
|
AssetMetadataModel
|
|
28
28
|
""" # noqa: E501
|
|
29
29
|
t: StrictStr = Field(description="Discriminator value for AssetModel", alias="_t")
|
|
30
|
-
asset:
|
|
30
|
+
asset: Dict[str, Any]
|
|
31
31
|
__properties: ClassVar[List[str]] = ["_t", "asset"]
|
|
32
32
|
|
|
33
33
|
@field_validator('t')
|
|
@@ -76,9 +76,6 @@ class AssetMetadataModel(BaseModel):
|
|
|
76
76
|
exclude=excluded_fields,
|
|
77
77
|
exclude_none=True,
|
|
78
78
|
)
|
|
79
|
-
# override the default output from pydantic by calling `to_dict()` of asset
|
|
80
|
-
if self.asset:
|
|
81
|
-
_dict['asset'] = self.asset.to_dict()
|
|
82
79
|
return _dict
|
|
83
80
|
|
|
84
81
|
@classmethod
|
|
@@ -92,11 +89,8 @@ class AssetMetadataModel(BaseModel):
|
|
|
92
89
|
|
|
93
90
|
_obj = cls.model_validate({
|
|
94
91
|
"_t": obj.get("_t") if obj.get("_t") is not None else 'AssetModel',
|
|
95
|
-
"asset":
|
|
92
|
+
"asset": obj.get("asset")
|
|
96
93
|
})
|
|
97
94
|
return _obj
|
|
98
95
|
|
|
99
|
-
from rapidata.api_client.models.asset_metadata_model_asset import AssetMetadataModelAsset
|
|
100
|
-
# TODO: Rewrite to not use raise_errors
|
|
101
|
-
AssetMetadataModel.model_rebuild(raise_errors=False)
|
|
102
96
|
|
|
@@ -27,10 +27,9 @@ class CompareResult(BaseModel):
|
|
|
27
27
|
CompareResult
|
|
28
28
|
""" # noqa: E501
|
|
29
29
|
t: StrictStr = Field(description="Discriminator value for CompareResult", alias="_t")
|
|
30
|
-
winner_id: Optional[StrictStr] = Field(default=None, alias="winnerId")
|
|
31
30
|
winners: Optional[List[StrictStr]] = None
|
|
32
31
|
rapid_id: StrictStr = Field(alias="rapidId")
|
|
33
|
-
__properties: ClassVar[List[str]] = ["_t", "
|
|
32
|
+
__properties: ClassVar[List[str]] = ["_t", "winners", "rapidId"]
|
|
34
33
|
|
|
35
34
|
@field_validator('t')
|
|
36
35
|
def t_validate_enum(cls, value):
|
|
@@ -69,10 +68,8 @@ class CompareResult(BaseModel):
|
|
|
69
68
|
* `None` is only added to the output dict for nullable fields that
|
|
70
69
|
were set at model initialization. Other fields with value `None`
|
|
71
70
|
are ignored.
|
|
72
|
-
* OpenAPI `readOnly` fields are excluded.
|
|
73
71
|
"""
|
|
74
72
|
excluded_fields: Set[str] = set([
|
|
75
|
-
"winner_id",
|
|
76
73
|
])
|
|
77
74
|
|
|
78
75
|
_dict = self.model_dump(
|
|
@@ -80,11 +77,6 @@ class CompareResult(BaseModel):
|
|
|
80
77
|
exclude=excluded_fields,
|
|
81
78
|
exclude_none=True,
|
|
82
79
|
)
|
|
83
|
-
# set to None if winner_id (nullable) is None
|
|
84
|
-
# and model_fields_set contains the field
|
|
85
|
-
if self.winner_id is None and "winner_id" in self.model_fields_set:
|
|
86
|
-
_dict['winnerId'] = None
|
|
87
|
-
|
|
88
80
|
return _dict
|
|
89
81
|
|
|
90
82
|
@classmethod
|
|
@@ -98,7 +90,6 @@ class CompareResult(BaseModel):
|
|
|
98
90
|
|
|
99
91
|
_obj = cls.model_validate({
|
|
100
92
|
"_t": obj.get("_t") if obj.get("_t") is not None else 'CompareResult',
|
|
101
|
-
"winnerId": obj.get("winnerId"),
|
|
102
93
|
"winners": obj.get("winners"),
|
|
103
94
|
"rapidId": obj.get("rapidId")
|
|
104
95
|
})
|
|
@@ -20,7 +20,7 @@ import json
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
22
|
from rapidata.api_client.models.compare_workflow_model_pair_maker_config import CompareWorkflowModelPairMakerConfig
|
|
23
|
-
from rapidata.api_client.models.
|
|
23
|
+
from rapidata.api_client.models.dataset_dataset_id_datapoints_post_request_metadata_inner import DatasetDatasetIdDatapointsPostRequestMetadataInner
|
|
24
24
|
from rapidata.api_client.models.elo_config_model import EloConfigModel
|
|
25
25
|
from typing import Optional, Set
|
|
26
26
|
from typing_extensions import Self
|
|
@@ -33,7 +33,7 @@ class CompareWorkflowModel(BaseModel):
|
|
|
33
33
|
criteria: StrictStr = Field(description="The criteria that the datapoints should be compared based on. No default value.")
|
|
34
34
|
pair_maker_config: Optional[CompareWorkflowModelPairMakerConfig] = Field(default=None, alias="pairMakerConfig")
|
|
35
35
|
elo_config: Optional[EloConfigModel] = Field(default=None, alias="eloConfig")
|
|
36
|
-
metadata: Optional[List[
|
|
36
|
+
metadata: Optional[List[DatasetDatasetIdDatapointsPostRequestMetadataInner]] = Field(default=None, description="The metadata is attached to every single rapid and can be used for something like the prompt.")
|
|
37
37
|
__properties: ClassVar[List[str]] = ["_t", "criteria", "pairMakerConfig", "eloConfig", "metadata"]
|
|
38
38
|
|
|
39
39
|
@field_validator('t')
|
|
@@ -116,7 +116,7 @@ class CompareWorkflowModel(BaseModel):
|
|
|
116
116
|
"criteria": obj.get("criteria"),
|
|
117
117
|
"pairMakerConfig": CompareWorkflowModelPairMakerConfig.from_dict(obj["pairMakerConfig"]) if obj.get("pairMakerConfig") is not None else None,
|
|
118
118
|
"eloConfig": EloConfigModel.from_dict(obj["eloConfig"]) if obj.get("eloConfig") is not None else None,
|
|
119
|
-
"metadata": [
|
|
119
|
+
"metadata": [DatasetDatasetIdDatapointsPostRequestMetadataInner.from_dict(_item) for _item in obj["metadata"]] if obj.get("metadata") is not None else None
|
|
120
120
|
})
|
|
121
121
|
return _obj
|
|
122
122
|
|
|
@@ -19,7 +19,7 @@ import json
|
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field, StrictInt
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
-
from rapidata.api_client.models.
|
|
22
|
+
from rapidata.api_client.models.dataset_dataset_id_datapoints_post_request_metadata_inner import DatasetDatasetIdDatapointsPostRequestMetadataInner
|
|
23
23
|
from typing import Optional, Set
|
|
24
24
|
from typing_extensions import Self
|
|
25
25
|
|
|
@@ -27,7 +27,7 @@ class CreateDatapointFromFilesModel(BaseModel):
|
|
|
27
27
|
"""
|
|
28
28
|
The form request for creating a datapoint from files. Needs to be encoded as a json string in the form request.
|
|
29
29
|
""" # noqa: E501
|
|
30
|
-
metadata: List[
|
|
30
|
+
metadata: List[DatasetDatasetIdDatapointsPostRequestMetadataInner] = Field(description="The metadata of the datapoint.")
|
|
31
31
|
sort_index: Optional[StrictInt] = Field(default=None, description="The index will be used to keep the datapoints in order. Useful if upload is parallelized", alias="sortIndex")
|
|
32
32
|
__properties: ClassVar[List[str]] = ["metadata", "sortIndex"]
|
|
33
33
|
|
|
@@ -94,7 +94,7 @@ class CreateDatapointFromFilesModel(BaseModel):
|
|
|
94
94
|
return cls.model_validate(obj)
|
|
95
95
|
|
|
96
96
|
_obj = cls.model_validate({
|
|
97
|
-
"metadata": [
|
|
97
|
+
"metadata": [DatasetDatasetIdDatapointsPostRequestMetadataInner.from_dict(_item) for _item in obj["metadata"]] if obj.get("metadata") is not None else None,
|
|
98
98
|
"sortIndex": obj.get("sortIndex")
|
|
99
99
|
})
|
|
100
100
|
return _obj
|
|
@@ -19,7 +19,7 @@ import json
|
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
-
from rapidata.api_client.models.
|
|
22
|
+
from rapidata.api_client.models.dataset_dataset_id_datapoints_post_request_metadata_inner import DatasetDatasetIdDatapointsPostRequestMetadataInner
|
|
23
23
|
from typing import Optional, Set
|
|
24
24
|
from typing_extensions import Self
|
|
25
25
|
|
|
@@ -29,7 +29,7 @@ class CreateDatapointFromTextSourcesModel(BaseModel):
|
|
|
29
29
|
""" # noqa: E501
|
|
30
30
|
text_sources: List[StrictStr] = Field(description="The text sources to upload.", alias="textSources")
|
|
31
31
|
sort_index: Optional[StrictInt] = Field(default=None, description="The index will be used to keep the datapoints in order. Useful if upload is parallelized", alias="sortIndex")
|
|
32
|
-
metadata: Optional[List[
|
|
32
|
+
metadata: Optional[List[DatasetDatasetIdDatapointsPostRequestMetadataInner]] = Field(default=None, description="Additional metadata to attach to the datapoint. Most commonly used to add a prompt to the datapoint using the Rapidata.Shared.Assets.Abstraction.Models.Metadata.Input.PromptMetadataInput.")
|
|
33
33
|
__properties: ClassVar[List[str]] = ["textSources", "sortIndex", "metadata"]
|
|
34
34
|
|
|
35
35
|
model_config = ConfigDict(
|
|
@@ -102,7 +102,7 @@ class CreateDatapointFromTextSourcesModel(BaseModel):
|
|
|
102
102
|
_obj = cls.model_validate({
|
|
103
103
|
"textSources": obj.get("textSources"),
|
|
104
104
|
"sortIndex": obj.get("sortIndex"),
|
|
105
|
-
"metadata": [
|
|
105
|
+
"metadata": [DatasetDatasetIdDatapointsPostRequestMetadataInner.from_dict(_item) for _item in obj["metadata"]] if obj.get("metadata") is not None else None
|
|
106
106
|
})
|
|
107
107
|
return _obj
|
|
108
108
|
|
|
@@ -19,7 +19,7 @@ import json
|
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
-
from rapidata.api_client.models.
|
|
22
|
+
from rapidata.api_client.models.dataset_dataset_id_datapoints_post_request_metadata_inner import DatasetDatasetIdDatapointsPostRequestMetadataInner
|
|
23
23
|
from typing import Optional, Set
|
|
24
24
|
from typing_extensions import Self
|
|
25
25
|
|
|
@@ -28,7 +28,7 @@ class CreateDatapointFromUrlsModel(BaseModel):
|
|
|
28
28
|
The body request for creating a datapoint from urls.
|
|
29
29
|
""" # noqa: E501
|
|
30
30
|
urls: List[StrictStr] = Field(description="The urls to fetch the assets from. The urls must be publicly accessible. A HEAD request will be made to each url to check if it is accessible.")
|
|
31
|
-
metadata: Optional[List[
|
|
31
|
+
metadata: Optional[List[DatasetDatasetIdDatapointsPostRequestMetadataInner]] = Field(default=None, description="Additional metadata to attach to the datapoint. Most commonly used to add a prompt to the datapoint using the Rapidata.Shared.Assets.Abstraction.Models.Metadata.Input.PromptMetadataInput.")
|
|
32
32
|
sort_index: Optional[StrictInt] = Field(default=None, description="The index will be used to keep the datapoints in order. Useful if upload is parallelized", alias="sortIndex")
|
|
33
33
|
__properties: ClassVar[List[str]] = ["urls", "metadata", "sortIndex"]
|
|
34
34
|
|
|
@@ -101,7 +101,7 @@ class CreateDatapointFromUrlsModel(BaseModel):
|
|
|
101
101
|
|
|
102
102
|
_obj = cls.model_validate({
|
|
103
103
|
"urls": obj.get("urls"),
|
|
104
|
-
"metadata": [
|
|
104
|
+
"metadata": [DatasetDatasetIdDatapointsPostRequestMetadataInner.from_dict(_item) for _item in obj["metadata"]] if obj.get("metadata") is not None else None,
|
|
105
105
|
"sortIndex": obj.get("sortIndex")
|
|
106
106
|
})
|
|
107
107
|
return _obj
|
|
@@ -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,
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
22
|
from rapidata.api_client.models.ab_test_selection_a_inner import AbTestSelectionAInner
|
|
23
23
|
from rapidata.api_client.models.create_order_model_referee import CreateOrderModelReferee
|
|
@@ -38,7 +38,6 @@ class CreateOrderModel(BaseModel):
|
|
|
38
38
|
aggregator: Optional[StrictStr] = Field(default=None, description="The aggregator is used to determine how the data will be aggregated. The default behavior is enough for most cases")
|
|
39
39
|
feature_flags: Optional[List[FeatureFlagModel]] = Field(default=None, description="The feature flags are used to enable or disable certain features.", alias="featureFlags")
|
|
40
40
|
priority: Optional[StrictInt] = Field(default=None, description="The priority is used to prioritize over other orders.")
|
|
41
|
-
is_sticky: Optional[StrictBool] = Field(default=None, description="Indicates if the underlying campaign should be sticky.", alias="isSticky")
|
|
42
41
|
sticky_state: Optional[StrictStr] = Field(default=None, description="Indicates if the underlying campaign should be sticky.", alias="stickyState")
|
|
43
42
|
user_score_dimensions: Optional[List[StrictStr]] = Field(default=None, description="The user score dimensions are used to determine the score of the responses from the user.", alias="userScoreDimensions")
|
|
44
43
|
demographic_keys: Optional[List[StrictStr]] = Field(default=None, description="The demographic keys are used to determine which demographics to store on the resposnes from the user.", alias="demographicKeys")
|
|
@@ -47,7 +46,7 @@ class CreateOrderModel(BaseModel):
|
|
|
47
46
|
selections: Optional[List[AbTestSelectionAInner]] = Field(default=None, description="The selections are used to determine which tasks are shown to a user.")
|
|
48
47
|
retrieval_mode: Optional[StrictStr] = Field(default=None, description="The retrieval mode defines how rapids are retrieved from the active labeling pool.", alias="retrievalMode")
|
|
49
48
|
max_iterations: Optional[StrictInt] = Field(default=None, description="The maximum number of times a user is allowed to see the same rapid.", alias="maxIterations")
|
|
50
|
-
__properties: ClassVar[List[str]] = ["_t", "orderName", "workflow", "referee", "aggregator", "featureFlags", "priority", "
|
|
49
|
+
__properties: ClassVar[List[str]] = ["_t", "orderName", "workflow", "referee", "aggregator", "featureFlags", "priority", "stickyState", "userScoreDimensions", "demographicKeys", "userFilters", "validationSetId", "selections", "retrievalMode", "maxIterations"]
|
|
51
50
|
|
|
52
51
|
@field_validator('t')
|
|
53
52
|
def t_validate_enum(cls, value):
|
|
@@ -226,7 +225,6 @@ class CreateOrderModel(BaseModel):
|
|
|
226
225
|
"aggregator": obj.get("aggregator"),
|
|
227
226
|
"featureFlags": [FeatureFlagModel.from_dict(_item) for _item in obj["featureFlags"]] if obj.get("featureFlags") is not None else None,
|
|
228
227
|
"priority": obj.get("priority"),
|
|
229
|
-
"isSticky": obj.get("isSticky"),
|
|
230
228
|
"stickyState": obj.get("stickyState"),
|
|
231
229
|
"userScoreDimensions": obj.get("userScoreDimensions"),
|
|
232
230
|
"demographicKeys": obj.get("demographicKeys"),
|
|
@@ -20,7 +20,7 @@ import json
|
|
|
20
20
|
from datetime import datetime
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
-
from rapidata.api_client.models.
|
|
23
|
+
from rapidata.api_client.models.datapoint_asset import DatapointAsset
|
|
24
24
|
from typing import Optional, Set
|
|
25
25
|
from typing_extensions import Self
|
|
26
26
|
|
|
@@ -31,7 +31,7 @@ class Datapoint(BaseModel):
|
|
|
31
31
|
id: StrictStr
|
|
32
32
|
dataset_id: StrictStr = Field(alias="datasetId")
|
|
33
33
|
sort_index: Optional[StrictInt] = Field(default=None, alias="sortIndex")
|
|
34
|
-
asset:
|
|
34
|
+
asset: DatapointAsset
|
|
35
35
|
created_at: datetime = Field(alias="createdAt")
|
|
36
36
|
__properties: ClassVar[List[str]] = ["id", "datasetId", "sortIndex", "asset", "createdAt"]
|
|
37
37
|
|
|
@@ -97,7 +97,7 @@ class Datapoint(BaseModel):
|
|
|
97
97
|
"id": obj.get("id"),
|
|
98
98
|
"datasetId": obj.get("datasetId"),
|
|
99
99
|
"sortIndex": obj.get("sortIndex"),
|
|
100
|
-
"asset":
|
|
100
|
+
"asset": DatapointAsset.from_dict(obj["asset"]) if obj.get("asset") is not None else None,
|
|
101
101
|
"createdAt": obj.get("createdAt")
|
|
102
102
|
})
|
|
103
103
|
return _obj
|
|
@@ -19,7 +19,7 @@ import json
|
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
-
from rapidata.api_client.models.
|
|
22
|
+
from rapidata.api_client.models.dataset_dataset_id_datapoints_post_request_metadata_inner import DatasetDatasetIdDatapointsPostRequestMetadataInner
|
|
23
23
|
from typing import Optional, Set
|
|
24
24
|
from typing_extensions import Self
|
|
25
25
|
|
|
@@ -28,7 +28,7 @@ class DatapointMetadataModel(BaseModel):
|
|
|
28
28
|
The model for creating a datapoint.
|
|
29
29
|
""" # noqa: E501
|
|
30
30
|
dataset_id: StrictStr = Field(description="The id of the dataset to create the datapoint in.", alias="datasetId")
|
|
31
|
-
metadata: List[
|
|
31
|
+
metadata: List[DatasetDatasetIdDatapointsPostRequestMetadataInner] = Field(description="The metadata of the datapoint.")
|
|
32
32
|
sort_index: Optional[StrictInt] = Field(default=None, description="The index will be used to keep the datapoints in order. Useful if upload is parallelized", alias="sortIndex")
|
|
33
33
|
__properties: ClassVar[List[str]] = ["datasetId", "metadata", "sortIndex"]
|
|
34
34
|
|
|
@@ -96,7 +96,7 @@ class DatapointMetadataModel(BaseModel):
|
|
|
96
96
|
|
|
97
97
|
_obj = cls.model_validate({
|
|
98
98
|
"datasetId": obj.get("datasetId"),
|
|
99
|
-
"metadata": [
|
|
99
|
+
"metadata": [DatasetDatasetIdDatapointsPostRequestMetadataInner.from_dict(_item) for _item in obj["metadata"]] if obj.get("metadata") is not None else None,
|
|
100
100
|
"sortIndex": obj.get("sortIndex")
|
|
101
101
|
})
|
|
102
102
|
return _obj
|
|
@@ -19,7 +19,7 @@ import json
|
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
21
|
from typing import Any, ClassVar, Dict, List
|
|
22
|
-
from rapidata.api_client.models.
|
|
22
|
+
from rapidata.api_client.models.datapoint_asset import DatapointAsset
|
|
23
23
|
from typing import Optional, Set
|
|
24
24
|
from typing_extensions import Self
|
|
25
25
|
|
|
@@ -29,7 +29,7 @@ class DatapointModel(BaseModel):
|
|
|
29
29
|
""" # noqa: E501
|
|
30
30
|
id: StrictStr
|
|
31
31
|
dataset_id: StrictStr = Field(alias="datasetId")
|
|
32
|
-
asset:
|
|
32
|
+
asset: DatapointAsset
|
|
33
33
|
__properties: ClassVar[List[str]] = ["id", "datasetId", "asset"]
|
|
34
34
|
|
|
35
35
|
model_config = ConfigDict(
|
|
@@ -88,7 +88,7 @@ class DatapointModel(BaseModel):
|
|
|
88
88
|
_obj = cls.model_validate({
|
|
89
89
|
"id": obj.get("id"),
|
|
90
90
|
"datasetId": obj.get("datasetId"),
|
|
91
|
-
"asset":
|
|
91
|
+
"asset": DatapointAsset.from_dict(obj["asset"]) if obj.get("asset") is not None else None
|
|
92
92
|
})
|
|
93
93
|
return _obj
|
|
94
94
|
|