rapidata 2.21.5__py3-none-any.whl → 2.22.0__py3-none-any.whl

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

Potentially problematic release.


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

Files changed (60) hide show
  1. rapidata/__init__.py +5 -0
  2. rapidata/api_client/__init__.py +8 -4
  3. rapidata/api_client/api/__init__.py +1 -0
  4. rapidata/api_client/api/evaluation_workflow_api.py +372 -0
  5. rapidata/api_client/api/identity_api.py +268 -0
  6. rapidata/api_client/api/rapid_api.py +353 -1987
  7. rapidata/api_client/api/simple_workflow_api.py +6 -6
  8. rapidata/api_client/models/__init__.py +7 -4
  9. rapidata/api_client/models/add_campaign_model.py +25 -1
  10. rapidata/api_client/models/add_validation_rapid_model_truth.py +24 -10
  11. rapidata/api_client/models/compare_result.py +2 -0
  12. rapidata/api_client/models/create_order_model.py +43 -2
  13. rapidata/api_client/models/evaluation_workflow_model1.py +115 -0
  14. rapidata/api_client/models/filter.py +2 -2
  15. rapidata/api_client/models/get_validation_rapids_result.py +11 -4
  16. rapidata/api_client/models/get_validation_rapids_result_truth.py +24 -10
  17. rapidata/api_client/models/get_workflow_by_id_result_workflow.py +23 -9
  18. rapidata/api_client/models/get_workflow_results_result.py +118 -0
  19. rapidata/api_client/models/get_workflow_results_result_paged_result.py +105 -0
  20. rapidata/api_client/models/google_one_tap_login_model.py +87 -0
  21. rapidata/api_client/models/labeling_selection.py +22 -3
  22. rapidata/api_client/models/logic_operator.py +1 -0
  23. rapidata/api_client/models/rapid_response.py +3 -1
  24. rapidata/api_client/models/retrieval_mode.py +38 -0
  25. rapidata/api_client/models/root_filter.py +2 -2
  26. rapidata/api_client/models/skip_truth.py +94 -0
  27. rapidata/api_client/models/sticky_state.py +38 -0
  28. rapidata/api_client/models/update_validation_rapid_model.py +11 -4
  29. rapidata/api_client/models/update_validation_rapid_model_truth.py +24 -10
  30. rapidata/api_client/rest.py +1 -0
  31. rapidata/api_client_README.md +10 -11
  32. rapidata/rapidata_client/__init__.py +7 -0
  33. rapidata/rapidata_client/api/rapidata_exception.py +5 -3
  34. rapidata/rapidata_client/assets/_media_asset.py +8 -1
  35. rapidata/rapidata_client/assets/_multi_asset.py +6 -0
  36. rapidata/rapidata_client/assets/_text_asset.py +6 -0
  37. rapidata/rapidata_client/demographic/demographic_manager.py +2 -3
  38. rapidata/rapidata_client/logging/__init__.py +2 -0
  39. rapidata/rapidata_client/logging/logger.py +47 -0
  40. rapidata/rapidata_client/logging/output_manager.py +16 -0
  41. rapidata/rapidata_client/order/_rapidata_dataset.py +11 -13
  42. rapidata/rapidata_client/order/_rapidata_order_builder.py +15 -2
  43. rapidata/rapidata_client/order/rapidata_order.py +22 -13
  44. rapidata/rapidata_client/order/rapidata_order_manager.py +4 -2
  45. rapidata/rapidata_client/order/rapidata_results.py +2 -1
  46. rapidata/rapidata_client/rapidata_client.py +6 -1
  47. rapidata/rapidata_client/selection/__init__.py +1 -0
  48. rapidata/rapidata_client/selection/labeling_selection.py +8 -2
  49. rapidata/rapidata_client/selection/retrieval_modes.py +9 -0
  50. rapidata/rapidata_client/settings/alert_on_fast_response.py +2 -1
  51. rapidata/rapidata_client/settings/free_text_minimum_characters.py +2 -1
  52. rapidata/rapidata_client/validation/rapidata_validation_set.py +2 -2
  53. rapidata/rapidata_client/validation/rapids/rapids.py +3 -1
  54. rapidata/rapidata_client/validation/validation_set_manager.py +39 -36
  55. rapidata/service/credential_manager.py +22 -30
  56. rapidata/service/openapi_service.py +11 -0
  57. {rapidata-2.21.5.dist-info → rapidata-2.22.0.dist-info}/METADATA +2 -1
  58. {rapidata-2.21.5.dist-info → rapidata-2.22.0.dist-info}/RECORD +60 -48
  59. {rapidata-2.21.5.dist-info → rapidata-2.22.0.dist-info}/WHEEL +1 -1
  60. {rapidata-2.21.5.dist-info → rapidata-2.22.0.dist-info}/LICENSE +0 -0
@@ -20,7 +20,7 @@ from pydantic import Field, StrictStr
20
20
  from typing import Optional
21
21
  from typing_extensions import Annotated
22
22
  from rapidata.api_client.models.get_simple_workflow_results_model import GetSimpleWorkflowResultsModel
23
- from rapidata.api_client.models.get_simple_workflow_results_result_paged_result import GetSimpleWorkflowResultsResultPagedResult
23
+ from rapidata.api_client.models.get_workflow_results_result_paged_result import GetWorkflowResultsResultPagedResult
24
24
 
25
25
  from rapidata.api_client.api_client import ApiClient, RequestSerialized
26
26
  from rapidata.api_client.api_response import ApiResponse
@@ -57,7 +57,7 @@ class SimpleWorkflowApi:
57
57
  _content_type: Optional[StrictStr] = None,
58
58
  _headers: Optional[Dict[StrictStr, Any]] = None,
59
59
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
60
- ) -> GetSimpleWorkflowResultsResultPagedResult:
60
+ ) -> GetWorkflowResultsResultPagedResult:
61
61
  """Get the result overview for a simple workflow.
62
62
 
63
63
 
@@ -97,7 +97,7 @@ class SimpleWorkflowApi:
97
97
  )
98
98
 
99
99
  _response_types_map: Dict[str, Optional[str]] = {
100
- '200': "GetSimpleWorkflowResultsResultPagedResult",
100
+ '200': "GetWorkflowResultsResultPagedResult",
101
101
  }
102
102
  response_data = self.api_client.call_api(
103
103
  *_param,
@@ -127,7 +127,7 @@ class SimpleWorkflowApi:
127
127
  _content_type: Optional[StrictStr] = None,
128
128
  _headers: Optional[Dict[StrictStr, Any]] = None,
129
129
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
130
- ) -> ApiResponse[GetSimpleWorkflowResultsResultPagedResult]:
130
+ ) -> ApiResponse[GetWorkflowResultsResultPagedResult]:
131
131
  """Get the result overview for a simple workflow.
132
132
 
133
133
 
@@ -167,7 +167,7 @@ class SimpleWorkflowApi:
167
167
  )
168
168
 
169
169
  _response_types_map: Dict[str, Optional[str]] = {
170
- '200': "GetSimpleWorkflowResultsResultPagedResult",
170
+ '200': "GetWorkflowResultsResultPagedResult",
171
171
  }
172
172
  response_data = self.api_client.call_api(
173
173
  *_param,
@@ -237,7 +237,7 @@ class SimpleWorkflowApi:
237
237
  )
238
238
 
239
239
  _response_types_map: Dict[str, Optional[str]] = {
240
- '200': "GetSimpleWorkflowResultsResultPagedResult",
240
+ '200': "GetWorkflowResultsResultPagedResult",
241
241
  }
242
242
  response_data = self.api_client.call_api(
243
243
  *_param,
@@ -117,6 +117,7 @@ from rapidata.api_client.models.elo_config_model import EloConfigModel
117
117
  from rapidata.api_client.models.empty_validation_truth import EmptyValidationTruth
118
118
  from rapidata.api_client.models.evaluation_workflow_config import EvaluationWorkflowConfig
119
119
  from rapidata.api_client.models.evaluation_workflow_model import EvaluationWorkflowModel
120
+ from rapidata.api_client.models.evaluation_workflow_model1 import EvaluationWorkflowModel1
120
121
  from rapidata.api_client.models.feature_flag import FeatureFlag
121
122
  from rapidata.api_client.models.feature_flag_model import FeatureFlagModel
122
123
  from rapidata.api_client.models.feedback_model import FeedbackModel
@@ -147,8 +148,6 @@ from rapidata.api_client.models.get_public_orders_result import GetPublicOrdersR
147
148
  from rapidata.api_client.models.get_rapid_responses_result import GetRapidResponsesResult
148
149
  from rapidata.api_client.models.get_responses_result import GetResponsesResult
149
150
  from rapidata.api_client.models.get_simple_workflow_results_model import GetSimpleWorkflowResultsModel
150
- from rapidata.api_client.models.get_simple_workflow_results_result import GetSimpleWorkflowResultsResult
151
- from rapidata.api_client.models.get_simple_workflow_results_result_paged_result import GetSimpleWorkflowResultsResultPagedResult
152
151
  from rapidata.api_client.models.get_validation_rapids_result import GetValidationRapidsResult
153
152
  from rapidata.api_client.models.get_validation_rapids_result_asset import GetValidationRapidsResultAsset
154
153
  from rapidata.api_client.models.get_validation_rapids_result_paged_result import GetValidationRapidsResultPagedResult
@@ -158,6 +157,9 @@ from rapidata.api_client.models.get_validation_set_by_id_result import GetValida
158
157
  from rapidata.api_client.models.get_workflow_by_id_result import GetWorkflowByIdResult
159
158
  from rapidata.api_client.models.get_workflow_by_id_result_workflow import GetWorkflowByIdResultWorkflow
160
159
  from rapidata.api_client.models.get_workflow_progress_result import GetWorkflowProgressResult
160
+ from rapidata.api_client.models.get_workflow_results_result import GetWorkflowResultsResult
161
+ from rapidata.api_client.models.get_workflow_results_result_paged_result import GetWorkflowResultsResultPagedResult
162
+ from rapidata.api_client.models.google_one_tap_login_model import GoogleOneTapLoginModel
161
163
  from rapidata.api_client.models.i_workflow_model_paged_result import IWorkflowModelPagedResult
162
164
  from rapidata.api_client.models.image_dimension_metadata import ImageDimensionMetadata
163
165
  from rapidata.api_client.models.image_dimension_metadata_model import ImageDimensionMetadataModel
@@ -221,8 +223,6 @@ from rapidata.api_client.models.prompt_metadata_model import PromptMetadataModel
221
223
  from rapidata.api_client.models.public_order_model import PublicOrderModel
222
224
  from rapidata.api_client.models.public_text_metadata_input import PublicTextMetadataInput
223
225
  from rapidata.api_client.models.query_model import QueryModel
224
- from rapidata.api_client.models.query_validation_rapids_result import QueryValidationRapidsResult
225
- from rapidata.api_client.models.query_validation_rapids_result_paged_result import QueryValidationRapidsResultPagedResult
226
226
  from rapidata.api_client.models.query_workflows_model import QueryWorkflowsModel
227
227
  from rapidata.api_client.models.rapid_issue import RapidIssue
228
228
  from rapidata.api_client.models.rapid_response import RapidResponse
@@ -236,6 +236,7 @@ from rapidata.api_client.models.register_temporary_customer_model import Registe
236
236
  from rapidata.api_client.models.register_temporary_customer_result import RegisterTemporaryCustomerResult
237
237
  from rapidata.api_client.models.report_model import ReportModel
238
238
  from rapidata.api_client.models.response_count_user_filter_model import ResponseCountUserFilterModel
239
+ from rapidata.api_client.models.retrieval_mode import RetrievalMode
239
240
  from rapidata.api_client.models.root_filter import RootFilter
240
241
  from rapidata.api_client.models.scrub_payload import ScrubPayload
241
242
  from rapidata.api_client.models.scrub_range import ScrubRange
@@ -252,11 +253,13 @@ from rapidata.api_client.models.simple_workflow_model import SimpleWorkflowModel
252
253
  from rapidata.api_client.models.simple_workflow_model1 import SimpleWorkflowModel1
253
254
  from rapidata.api_client.models.simple_workflow_model_blueprint import SimpleWorkflowModelBlueprint
254
255
  from rapidata.api_client.models.skip_result import SkipResult
256
+ from rapidata.api_client.models.skip_truth import SkipTruth
255
257
  from rapidata.api_client.models.sort_criterion import SortCriterion
256
258
  from rapidata.api_client.models.sort_direction import SortDirection
257
259
  from rapidata.api_client.models.source_url_metadata import SourceUrlMetadata
258
260
  from rapidata.api_client.models.source_url_metadata_model import SourceUrlMetadataModel
259
261
  from rapidata.api_client.models.static_selection import StaticSelection
262
+ from rapidata.api_client.models.sticky_state import StickyState
260
263
  from rapidata.api_client.models.submit_coco_model import SubmitCocoModel
261
264
  from rapidata.api_client.models.submit_coco_result import SubmitCocoResult
262
265
  from rapidata.api_client.models.text_asset_model import TextAssetModel
@@ -35,11 +35,13 @@ class AddCampaignModel(BaseModel):
35
35
  user_filters: Optional[List[CreateOrderModelUserFiltersInner]] = Field(default=None, description="The user filters to apply to the campaign.", alias="userFilters")
36
36
  validation_set_id: Optional[StrictStr] = Field(default=None, description="A validation set that should be used.", alias="validationSetId")
37
37
  selections: Optional[List[AbTestSelectionAInner]] = Field(default=None, description="The selections that the campaign should have.")
38
+ retrieval_mode: Optional[StrictStr] = Field(default=None, description="The retrieval mode defines how rapids are retrieved from the active labeling pool.", alias="retrievalMode")
39
+ max_iterations: Optional[StrictInt] = Field(default=None, description="The maximum number of times a user is allowed to see the same rapid.", alias="maxIterations")
38
40
  feature_flags: List[FeatureFlag] = Field(description="The feature flags that should be applied to the campaign.", alias="featureFlags")
39
41
  priority: StrictInt = Field(description="The priority of the campaign.")
40
42
  is_sticky: Optional[StrictBool] = Field(default=None, description="Indicates if the campaign is sticky.", alias="isSticky")
41
43
  is_preview_enabled: Optional[StrictBool] = Field(default=None, description="A flag to indicate whether the campaign should be put into preview mode after creation. This way the campaign will not start automatically and the user will have to manually start it.", alias="isPreviewEnabled")
42
- __properties: ClassVar[List[str]] = ["_t", "artifactId", "campaignName", "userFilters", "validationSetId", "selections", "featureFlags", "priority", "isSticky", "isPreviewEnabled"]
44
+ __properties: ClassVar[List[str]] = ["_t", "artifactId", "campaignName", "userFilters", "validationSetId", "selections", "retrievalMode", "maxIterations", "featureFlags", "priority", "isSticky", "isPreviewEnabled"]
43
45
 
44
46
  @field_validator('t')
45
47
  def t_validate_enum(cls, value):
@@ -48,6 +50,16 @@ class AddCampaignModel(BaseModel):
48
50
  raise ValueError("must be one of enum values ('AddCampaignModel')")
49
51
  return value
50
52
 
53
+ @field_validator('retrieval_mode')
54
+ def retrieval_mode_validate_enum(cls, value):
55
+ """Validates the enum"""
56
+ if value is None:
57
+ return value
58
+
59
+ if value not in set(['Random', 'Shuffled', 'Sequential']):
60
+ raise ValueError("must be one of enum values ('Random', 'Shuffled', 'Sequential')")
61
+ return value
62
+
51
63
  model_config = ConfigDict(
52
64
  populate_by_name=True,
53
65
  validate_assignment=True,
@@ -128,6 +140,16 @@ class AddCampaignModel(BaseModel):
128
140
  if self.selections is None and "selections" in self.model_fields_set:
129
141
  _dict['selections'] = None
130
142
 
143
+ # set to None if retrieval_mode (nullable) is None
144
+ # and model_fields_set contains the field
145
+ if self.retrieval_mode is None and "retrieval_mode" in self.model_fields_set:
146
+ _dict['retrievalMode'] = None
147
+
148
+ # set to None if max_iterations (nullable) is None
149
+ # and model_fields_set contains the field
150
+ if self.max_iterations is None and "max_iterations" in self.model_fields_set:
151
+ _dict['maxIterations'] = None
152
+
131
153
  # set to None if is_preview_enabled (nullable) is None
132
154
  # and model_fields_set contains the field
133
155
  if self.is_preview_enabled is None and "is_preview_enabled" in self.model_fields_set:
@@ -151,6 +173,8 @@ class AddCampaignModel(BaseModel):
151
173
  "userFilters": [CreateOrderModelUserFiltersInner.from_dict(_item) for _item in obj["userFilters"]] if obj.get("userFilters") is not None else None,
152
174
  "validationSetId": obj.get("validationSetId"),
153
175
  "selections": [AbTestSelectionAInner.from_dict(_item) for _item in obj["selections"]] if obj.get("selections") is not None else None,
176
+ "retrievalMode": obj.get("retrievalMode"),
177
+ "maxIterations": obj.get("maxIterations"),
154
178
  "featureFlags": [FeatureFlag.from_dict(_item) for _item in obj["featureFlags"]] if obj.get("featureFlags") is not None else None,
155
179
  "priority": obj.get("priority"),
156
180
  "isSticky": obj.get("isSticky"),
@@ -26,12 +26,13 @@ from rapidata.api_client.models.locate_box_truth import LocateBoxTruth
26
26
  from rapidata.api_client.models.named_entity_truth import NamedEntityTruth
27
27
  from rapidata.api_client.models.polygon_truth import PolygonTruth
28
28
  from rapidata.api_client.models.scrub_truth import ScrubTruth
29
+ from rapidata.api_client.models.skip_truth import SkipTruth
29
30
  from rapidata.api_client.models.transcription_truth import TranscriptionTruth
30
31
  from pydantic import StrictStr, Field
31
32
  from typing import Union, List, Set, Optional, Dict
32
33
  from typing_extensions import Literal, Self
33
34
 
34
- ADDVALIDATIONRAPIDMODELTRUTH_ONE_OF_SCHEMAS = ["AttachCategoryTruth", "BoundingBoxTruth", "CompareTruth", "EmptyValidationTruth", "LineTruth", "LocateBoxTruth", "NamedEntityTruth", "PolygonTruth", "ScrubTruth", "TranscriptionTruth"]
35
+ ADDVALIDATIONRAPIDMODELTRUTH_ONE_OF_SCHEMAS = ["AttachCategoryTruth", "BoundingBoxTruth", "CompareTruth", "EmptyValidationTruth", "LineTruth", "LocateBoxTruth", "NamedEntityTruth", "PolygonTruth", "ScrubTruth", "SkipTruth", "TranscriptionTruth"]
35
36
 
36
37
  class AddValidationRapidModelTruth(BaseModel):
37
38
  """
@@ -53,12 +54,14 @@ class AddValidationRapidModelTruth(BaseModel):
53
54
  oneof_schema_7_validator: Optional[EmptyValidationTruth] = None
54
55
  # data type: CompareTruth
55
56
  oneof_schema_8_validator: Optional[CompareTruth] = None
57
+ # data type: SkipTruth
58
+ oneof_schema_9_validator: Optional[SkipTruth] = None
56
59
  # data type: AttachCategoryTruth
57
- oneof_schema_9_validator: Optional[AttachCategoryTruth] = None
60
+ oneof_schema_10_validator: Optional[AttachCategoryTruth] = None
58
61
  # data type: BoundingBoxTruth
59
- oneof_schema_10_validator: Optional[BoundingBoxTruth] = None
60
- actual_instance: Optional[Union[AttachCategoryTruth, BoundingBoxTruth, CompareTruth, EmptyValidationTruth, LineTruth, LocateBoxTruth, NamedEntityTruth, PolygonTruth, ScrubTruth, TranscriptionTruth]] = None
61
- one_of_schemas: Set[str] = { "AttachCategoryTruth", "BoundingBoxTruth", "CompareTruth", "EmptyValidationTruth", "LineTruth", "LocateBoxTruth", "NamedEntityTruth", "PolygonTruth", "ScrubTruth", "TranscriptionTruth" }
62
+ oneof_schema_11_validator: Optional[BoundingBoxTruth] = None
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" }
62
65
 
63
66
  model_config = ConfigDict(
64
67
  validate_assignment=True,
@@ -124,6 +127,11 @@ class AddValidationRapidModelTruth(BaseModel):
124
127
  error_messages.append(f"Error! Input type `{type(v)}` is not `CompareTruth`")
125
128
  else:
126
129
  match += 1
130
+ # validate data type: SkipTruth
131
+ if not isinstance(v, SkipTruth):
132
+ error_messages.append(f"Error! Input type `{type(v)}` is not `SkipTruth`")
133
+ else:
134
+ match += 1
127
135
  # validate data type: AttachCategoryTruth
128
136
  if not isinstance(v, AttachCategoryTruth):
129
137
  error_messages.append(f"Error! Input type `{type(v)}` is not `AttachCategoryTruth`")
@@ -136,10 +144,10 @@ class AddValidationRapidModelTruth(BaseModel):
136
144
  match += 1
137
145
  if match > 1:
138
146
  # more than 1 match
139
- raise ValueError("Multiple matches found when setting `actual_instance` in AddValidationRapidModelTruth with oneOf schemas: AttachCategoryTruth, BoundingBoxTruth, CompareTruth, EmptyValidationTruth, LineTruth, LocateBoxTruth, NamedEntityTruth, PolygonTruth, ScrubTruth, TranscriptionTruth. Details: " + ", ".join(error_messages))
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))
140
148
  elif match == 0:
141
149
  # no match
142
- raise ValueError("No match found when setting `actual_instance` in AddValidationRapidModelTruth with oneOf schemas: AttachCategoryTruth, BoundingBoxTruth, CompareTruth, EmptyValidationTruth, LineTruth, LocateBoxTruth, NamedEntityTruth, PolygonTruth, ScrubTruth, TranscriptionTruth. Details: " + ", ".join(error_messages))
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))
143
151
  else:
144
152
  return v
145
153
 
@@ -202,6 +210,12 @@ class AddValidationRapidModelTruth(BaseModel):
202
210
  match += 1
203
211
  except (ValidationError, ValueError) as e:
204
212
  error_messages.append(str(e))
213
+ # deserialize data into SkipTruth
214
+ try:
215
+ instance.actual_instance = SkipTruth.from_json(json_str)
216
+ match += 1
217
+ except (ValidationError, ValueError) as e:
218
+ error_messages.append(str(e))
205
219
  # deserialize data into AttachCategoryTruth
206
220
  try:
207
221
  instance.actual_instance = AttachCategoryTruth.from_json(json_str)
@@ -217,10 +231,10 @@ class AddValidationRapidModelTruth(BaseModel):
217
231
 
218
232
  if match > 1:
219
233
  # more than 1 match
220
- raise ValueError("Multiple matches found when deserializing the JSON string into AddValidationRapidModelTruth with oneOf schemas: AttachCategoryTruth, BoundingBoxTruth, CompareTruth, EmptyValidationTruth, LineTruth, LocateBoxTruth, NamedEntityTruth, PolygonTruth, ScrubTruth, TranscriptionTruth. Details: " + ", ".join(error_messages))
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))
221
235
  elif match == 0:
222
236
  # no match
223
- raise ValueError("No match found when deserializing the JSON string into AddValidationRapidModelTruth with oneOf schemas: AttachCategoryTruth, BoundingBoxTruth, CompareTruth, EmptyValidationTruth, LineTruth, LocateBoxTruth, NamedEntityTruth, PolygonTruth, ScrubTruth, TranscriptionTruth. Details: " + ", ".join(error_messages))
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))
224
238
  else:
225
239
  return instance
226
240
 
@@ -234,7 +248,7 @@ class AddValidationRapidModelTruth(BaseModel):
234
248
  else:
235
249
  return json.dumps(self.actual_instance)
236
250
 
237
- def to_dict(self) -> Optional[Union[Dict[str, Any], AttachCategoryTruth, BoundingBoxTruth, CompareTruth, EmptyValidationTruth, LineTruth, LocateBoxTruth, NamedEntityTruth, PolygonTruth, ScrubTruth, TranscriptionTruth]]:
251
+ def to_dict(self) -> Optional[Union[Dict[str, Any], AttachCategoryTruth, BoundingBoxTruth, CompareTruth, EmptyValidationTruth, LineTruth, LocateBoxTruth, NamedEntityTruth, PolygonTruth, ScrubTruth, SkipTruth, TranscriptionTruth]]:
238
252
  """Returns the dict representation of the actual instance"""
239
253
  if self.actual_instance is None:
240
254
  return None
@@ -69,8 +69,10 @@ class CompareResult(BaseModel):
69
69
  * `None` is only added to the output dict for nullable fields that
70
70
  were set at model initialization. Other fields with value `None`
71
71
  are ignored.
72
+ * OpenAPI `readOnly` fields are excluded.
72
73
  """
73
74
  excluded_fields: Set[str] = set([
75
+ "winner_id",
74
76
  ])
75
77
 
76
78
  _dict = self.model_dump(
@@ -39,12 +39,15 @@ class CreateOrderModel(BaseModel):
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
41
  is_sticky: Optional[StrictBool] = Field(default=None, description="Indicates if the underlying campaign should be sticky.", alias="isSticky")
42
+ sticky_state: Optional[StrictStr] = Field(default=None, description="Indicates if the underlying campaign should be sticky.", alias="stickyState")
42
43
  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")
43
44
  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")
44
45
  user_filters: Optional[List[CreateOrderModelUserFiltersInner]] = Field(default=None, description="The user filters are used to restrict the order to only collect votes from a specific demographic.", alias="userFilters")
45
46
  validation_set_id: Optional[StrictStr] = Field(default=None, description="The validation set id can be changed to point to a specific validation set. if not provided a sane default will be used.", alias="validationSetId")
46
47
  selections: Optional[List[AbTestSelectionAInner]] = Field(default=None, description="The selections are used to determine which tasks are shown to a user.")
47
- __properties: ClassVar[List[str]] = ["_t", "orderName", "workflow", "referee", "aggregator", "featureFlags", "priority", "isSticky", "userScoreDimensions", "demographicKeys", "userFilters", "validationSetId", "selections"]
48
+ retrieval_mode: Optional[StrictStr] = Field(default=None, description="The retrieval mode defines how rapids are retrieved from the active labeling pool.", alias="retrievalMode")
49
+ 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", "isSticky", "stickyState", "userScoreDimensions", "demographicKeys", "userFilters", "validationSetId", "selections", "retrievalMode", "maxIterations"]
48
51
 
49
52
  @field_validator('t')
50
53
  def t_validate_enum(cls, value):
@@ -63,6 +66,26 @@ class CreateOrderModel(BaseModel):
63
66
  raise ValueError("must be one of enum values ('NonCommittal', 'MajorityVote', 'SimpleMatchup', 'LocateCluster', 'Classification', 'Locate', 'BoundingBox', 'Line', 'Transcription', 'SinglePointLocate', 'FreeText', 'Scrub')")
64
67
  return value
65
68
 
69
+ @field_validator('sticky_state')
70
+ def sticky_state_validate_enum(cls, value):
71
+ """Validates the enum"""
72
+ if value is None:
73
+ return value
74
+
75
+ if value not in set(['None', 'Temporary', 'Permanent']):
76
+ raise ValueError("must be one of enum values ('None', 'Temporary', 'Permanent')")
77
+ return value
78
+
79
+ @field_validator('retrieval_mode')
80
+ def retrieval_mode_validate_enum(cls, value):
81
+ """Validates the enum"""
82
+ if value is None:
83
+ return value
84
+
85
+ if value not in set(['Random', 'Shuffled', 'Sequential']):
86
+ raise ValueError("must be one of enum values ('Random', 'Shuffled', 'Sequential')")
87
+ return value
88
+
66
89
  model_config = ConfigDict(
67
90
  populate_by_name=True,
68
91
  validate_assignment=True,
@@ -144,6 +167,11 @@ class CreateOrderModel(BaseModel):
144
167
  if self.priority is None and "priority" in self.model_fields_set:
145
168
  _dict['priority'] = None
146
169
 
170
+ # set to None if sticky_state (nullable) is None
171
+ # and model_fields_set contains the field
172
+ if self.sticky_state is None and "sticky_state" in self.model_fields_set:
173
+ _dict['stickyState'] = None
174
+
147
175
  # set to None if user_score_dimensions (nullable) is None
148
176
  # and model_fields_set contains the field
149
177
  if self.user_score_dimensions is None and "user_score_dimensions" in self.model_fields_set:
@@ -169,6 +197,16 @@ class CreateOrderModel(BaseModel):
169
197
  if self.selections is None and "selections" in self.model_fields_set:
170
198
  _dict['selections'] = None
171
199
 
200
+ # set to None if retrieval_mode (nullable) is None
201
+ # and model_fields_set contains the field
202
+ if self.retrieval_mode is None and "retrieval_mode" in self.model_fields_set:
203
+ _dict['retrievalMode'] = None
204
+
205
+ # set to None if max_iterations (nullable) is None
206
+ # and model_fields_set contains the field
207
+ if self.max_iterations is None and "max_iterations" in self.model_fields_set:
208
+ _dict['maxIterations'] = None
209
+
172
210
  return _dict
173
211
 
174
212
  @classmethod
@@ -189,11 +227,14 @@ class CreateOrderModel(BaseModel):
189
227
  "featureFlags": [FeatureFlagModel.from_dict(_item) for _item in obj["featureFlags"]] if obj.get("featureFlags") is not None else None,
190
228
  "priority": obj.get("priority"),
191
229
  "isSticky": obj.get("isSticky"),
230
+ "stickyState": obj.get("stickyState"),
192
231
  "userScoreDimensions": obj.get("userScoreDimensions"),
193
232
  "demographicKeys": obj.get("demographicKeys"),
194
233
  "userFilters": [CreateOrderModelUserFiltersInner.from_dict(_item) for _item in obj["userFilters"]] if obj.get("userFilters") is not None else None,
195
234
  "validationSetId": obj.get("validationSetId"),
196
- "selections": [AbTestSelectionAInner.from_dict(_item) for _item in obj["selections"]] if obj.get("selections") is not None else None
235
+ "selections": [AbTestSelectionAInner.from_dict(_item) for _item in obj["selections"]] if obj.get("selections") is not None else None,
236
+ "retrievalMode": obj.get("retrievalMode"),
237
+ "maxIterations": obj.get("maxIterations")
197
238
  })
198
239
  return _obj
199
240
 
@@ -0,0 +1,115 @@
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, StrictStr, field_validator
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from rapidata.api_client.models.compare_workflow_model1_referee import CompareWorkflowModel1Referee
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class EvaluationWorkflowModel1(BaseModel):
27
+ """
28
+ EvaluationWorkflowModel1
29
+ """ # noqa: E501
30
+ t: StrictStr = Field(description="Discriminator value for EvaluationWorkflow", alias="_t")
31
+ id: StrictStr
32
+ validation_set_id: StrictStr = Field(alias="validationSetId")
33
+ state: StrictStr
34
+ referee: CompareWorkflowModel1Referee
35
+ name: StrictStr
36
+ owner_mail: Optional[StrictStr] = Field(default=None, alias="ownerMail")
37
+ __properties: ClassVar[List[str]] = ["_t", "id", "validationSetId", "state", "referee", "name", "ownerMail"]
38
+
39
+ @field_validator('t')
40
+ def t_validate_enum(cls, value):
41
+ """Validates the enum"""
42
+ if value not in set(['EvaluationWorkflow']):
43
+ raise ValueError("must be one of enum values ('EvaluationWorkflow')")
44
+ return value
45
+
46
+ model_config = ConfigDict(
47
+ populate_by_name=True,
48
+ validate_assignment=True,
49
+ protected_namespaces=(),
50
+ )
51
+
52
+
53
+ def to_str(self) -> str:
54
+ """Returns the string representation of the model using alias"""
55
+ return pprint.pformat(self.model_dump(by_alias=True))
56
+
57
+ def to_json(self) -> str:
58
+ """Returns the JSON representation of the model using alias"""
59
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
60
+ return json.dumps(self.to_dict())
61
+
62
+ @classmethod
63
+ def from_json(cls, json_str: str) -> Optional[Self]:
64
+ """Create an instance of EvaluationWorkflowModel1 from a JSON string"""
65
+ return cls.from_dict(json.loads(json_str))
66
+
67
+ def to_dict(self) -> Dict[str, Any]:
68
+ """Return the dictionary representation of the model using alias.
69
+
70
+ This has the following differences from calling pydantic's
71
+ `self.model_dump(by_alias=True)`:
72
+
73
+ * `None` is only added to the output dict for nullable fields that
74
+ were set at model initialization. Other fields with value `None`
75
+ are ignored.
76
+ """
77
+ excluded_fields: Set[str] = set([
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 referee
86
+ if self.referee:
87
+ _dict['referee'] = self.referee.to_dict()
88
+ # set to None if owner_mail (nullable) is None
89
+ # and model_fields_set contains the field
90
+ if self.owner_mail is None and "owner_mail" in self.model_fields_set:
91
+ _dict['ownerMail'] = None
92
+
93
+ return _dict
94
+
95
+ @classmethod
96
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
97
+ """Create an instance of EvaluationWorkflowModel1 from a dict"""
98
+ if obj is None:
99
+ return None
100
+
101
+ if not isinstance(obj, dict):
102
+ return cls.model_validate(obj)
103
+
104
+ _obj = cls.model_validate({
105
+ "_t": obj.get("_t") if obj.get("_t") is not None else 'EvaluationWorkflow',
106
+ "id": obj.get("id"),
107
+ "validationSetId": obj.get("validationSetId"),
108
+ "state": obj.get("state"),
109
+ "referee": CompareWorkflowModel1Referee.from_dict(obj["referee"]) if obj.get("referee") is not None else None,
110
+ "name": obj.get("name"),
111
+ "ownerMail": obj.get("ownerMail")
112
+ })
113
+ return _obj
114
+
115
+
@@ -49,8 +49,8 @@ class Filter(BaseModel):
49
49
  if value is None:
50
50
  return value
51
51
 
52
- if value not in set(['And', 'Or']):
53
- raise ValueError("must be one of enum values ('And', 'Or')")
52
+ if value not in set(['And', 'Or', 'Not']):
53
+ raise ValueError("must be one of enum values ('And', 'Or', 'Not')")
54
54
  return value
55
55
 
56
56
  model_config = ConfigDict(
@@ -17,8 +17,8 @@ import pprint
17
17
  import re # noqa: F401
18
18
  import json
19
19
 
20
- from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
21
- from typing import Any, ClassVar, Dict, List, Optional
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional, Union
22
22
  from rapidata.api_client.models.file_asset_model_metadata_value import FileAssetModelMetadataValue
23
23
  from rapidata.api_client.models.get_validation_rapids_result_asset import GetValidationRapidsResultAsset
24
24
  from rapidata.api_client.models.get_validation_rapids_result_payload import GetValidationRapidsResultPayload
@@ -39,7 +39,8 @@ class GetValidationRapidsResult(BaseModel):
39
39
  correct_validation_count: StrictInt = Field(alias="correctValidationCount")
40
40
  invalid_validation_count: StrictInt = Field(alias="invalidValidationCount")
41
41
  explanation: Optional[StrictStr] = None
42
- __properties: ClassVar[List[str]] = ["id", "type", "asset", "truth", "payload", "metadata", "correctValidationCount", "invalidValidationCount", "explanation"]
42
+ random_correct_probability: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="randomCorrectProbability")
43
+ __properties: ClassVar[List[str]] = ["id", "type", "asset", "truth", "payload", "metadata", "correctValidationCount", "invalidValidationCount", "explanation", "randomCorrectProbability"]
43
44
 
44
45
  model_config = ConfigDict(
45
46
  populate_by_name=True,
@@ -111,6 +112,11 @@ class GetValidationRapidsResult(BaseModel):
111
112
  if self.explanation is None and "explanation" in self.model_fields_set:
112
113
  _dict['explanation'] = None
113
114
 
115
+ # set to None if random_correct_probability (nullable) is None
116
+ # and model_fields_set contains the field
117
+ if self.random_correct_probability is None and "random_correct_probability" in self.model_fields_set:
118
+ _dict['randomCorrectProbability'] = None
119
+
114
120
  return _dict
115
121
 
116
122
  @classmethod
@@ -136,7 +142,8 @@ class GetValidationRapidsResult(BaseModel):
136
142
  else None,
137
143
  "correctValidationCount": obj.get("correctValidationCount"),
138
144
  "invalidValidationCount": obj.get("invalidValidationCount"),
139
- "explanation": obj.get("explanation")
145
+ "explanation": obj.get("explanation"),
146
+ "randomCorrectProbability": obj.get("randomCorrectProbability")
140
147
  })
141
148
  return _obj
142
149
 
@@ -26,12 +26,13 @@ from rapidata.api_client.models.locate_box_truth import LocateBoxTruth
26
26
  from rapidata.api_client.models.named_entity_truth import NamedEntityTruth
27
27
  from rapidata.api_client.models.polygon_truth import PolygonTruth
28
28
  from rapidata.api_client.models.scrub_truth import ScrubTruth
29
+ from rapidata.api_client.models.skip_truth import SkipTruth
29
30
  from rapidata.api_client.models.transcription_truth import TranscriptionTruth
30
31
  from pydantic import StrictStr, Field
31
32
  from typing import Union, List, Set, Optional, Dict
32
33
  from typing_extensions import Literal, Self
33
34
 
34
- GETVALIDATIONRAPIDSRESULTTRUTH_ONE_OF_SCHEMAS = ["AttachCategoryTruth", "BoundingBoxTruth", "CompareTruth", "EmptyValidationTruth", "LineTruth", "LocateBoxTruth", "NamedEntityTruth", "PolygonTruth", "ScrubTruth", "TranscriptionTruth"]
35
+ GETVALIDATIONRAPIDSRESULTTRUTH_ONE_OF_SCHEMAS = ["AttachCategoryTruth", "BoundingBoxTruth", "CompareTruth", "EmptyValidationTruth", "LineTruth", "LocateBoxTruth", "NamedEntityTruth", "PolygonTruth", "ScrubTruth", "SkipTruth", "TranscriptionTruth"]
35
36
 
36
37
  class GetValidationRapidsResultTruth(BaseModel):
37
38
  """
@@ -53,12 +54,14 @@ class GetValidationRapidsResultTruth(BaseModel):
53
54
  oneof_schema_7_validator: Optional[EmptyValidationTruth] = None
54
55
  # data type: CompareTruth
55
56
  oneof_schema_8_validator: Optional[CompareTruth] = None
57
+ # data type: SkipTruth
58
+ oneof_schema_9_validator: Optional[SkipTruth] = None
56
59
  # data type: AttachCategoryTruth
57
- oneof_schema_9_validator: Optional[AttachCategoryTruth] = None
60
+ oneof_schema_10_validator: Optional[AttachCategoryTruth] = None
58
61
  # data type: BoundingBoxTruth
59
- oneof_schema_10_validator: Optional[BoundingBoxTruth] = None
60
- actual_instance: Optional[Union[AttachCategoryTruth, BoundingBoxTruth, CompareTruth, EmptyValidationTruth, LineTruth, LocateBoxTruth, NamedEntityTruth, PolygonTruth, ScrubTruth, TranscriptionTruth]] = None
61
- one_of_schemas: Set[str] = { "AttachCategoryTruth", "BoundingBoxTruth", "CompareTruth", "EmptyValidationTruth", "LineTruth", "LocateBoxTruth", "NamedEntityTruth", "PolygonTruth", "ScrubTruth", "TranscriptionTruth" }
62
+ oneof_schema_11_validator: Optional[BoundingBoxTruth] = None
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" }
62
65
 
63
66
  model_config = ConfigDict(
64
67
  validate_assignment=True,
@@ -127,6 +130,11 @@ class GetValidationRapidsResultTruth(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: SkipTruth
134
+ if not isinstance(v, SkipTruth):
135
+ error_messages.append(f"Error! Input type `{type(v)}` is not `SkipTruth`")
136
+ else:
137
+ match += 1
130
138
  # validate data type: AttachCategoryTruth
131
139
  if not isinstance(v, AttachCategoryTruth):
132
140
  error_messages.append(f"Error! Input type `{type(v)}` is not `AttachCategoryTruth`")
@@ -139,10 +147,10 @@ class GetValidationRapidsResultTruth(BaseModel):
139
147
  match += 1
140
148
  if match > 1:
141
149
  # more than 1 match
142
- raise ValueError("Multiple matches found when setting `actual_instance` in GetValidationRapidsResultTruth with oneOf schemas: AttachCategoryTruth, BoundingBoxTruth, CompareTruth, EmptyValidationTruth, LineTruth, LocateBoxTruth, NamedEntityTruth, PolygonTruth, ScrubTruth, TranscriptionTruth. Details: " + ", ".join(error_messages))
150
+ raise ValueError("Multiple matches found when setting `actual_instance` in GetValidationRapidsResultTruth with oneOf schemas: AttachCategoryTruth, BoundingBoxTruth, CompareTruth, EmptyValidationTruth, LineTruth, LocateBoxTruth, NamedEntityTruth, PolygonTruth, ScrubTruth, SkipTruth, TranscriptionTruth. Details: " + ", ".join(error_messages))
143
151
  elif match == 0:
144
152
  # no match
145
- raise ValueError("No match found when setting `actual_instance` in GetValidationRapidsResultTruth with oneOf schemas: AttachCategoryTruth, BoundingBoxTruth, CompareTruth, EmptyValidationTruth, LineTruth, LocateBoxTruth, NamedEntityTruth, PolygonTruth, ScrubTruth, TranscriptionTruth. Details: " + ", ".join(error_messages))
153
+ raise ValueError("No match found when setting `actual_instance` in GetValidationRapidsResultTruth with oneOf schemas: AttachCategoryTruth, BoundingBoxTruth, CompareTruth, EmptyValidationTruth, LineTruth, LocateBoxTruth, NamedEntityTruth, PolygonTruth, ScrubTruth, SkipTruth, TranscriptionTruth. Details: " + ", ".join(error_messages))
146
154
  else:
147
155
  return v
148
156
 
@@ -208,6 +216,12 @@ class GetValidationRapidsResultTruth(BaseModel):
208
216
  match += 1
209
217
  except (ValidationError, ValueError) as e:
210
218
  error_messages.append(str(e))
219
+ # deserialize data into SkipTruth
220
+ try:
221
+ instance.actual_instance = SkipTruth.from_json(json_str)
222
+ match += 1
223
+ except (ValidationError, ValueError) as e:
224
+ error_messages.append(str(e))
211
225
  # deserialize data into AttachCategoryTruth
212
226
  try:
213
227
  instance.actual_instance = AttachCategoryTruth.from_json(json_str)
@@ -223,10 +237,10 @@ class GetValidationRapidsResultTruth(BaseModel):
223
237
 
224
238
  if match > 1:
225
239
  # more than 1 match
226
- raise ValueError("Multiple matches found when deserializing the JSON string into GetValidationRapidsResultTruth with oneOf schemas: AttachCategoryTruth, BoundingBoxTruth, CompareTruth, EmptyValidationTruth, LineTruth, LocateBoxTruth, NamedEntityTruth, PolygonTruth, ScrubTruth, TranscriptionTruth. Details: " + ", ".join(error_messages))
240
+ raise ValueError("Multiple matches found when deserializing the JSON string into GetValidationRapidsResultTruth with oneOf schemas: AttachCategoryTruth, BoundingBoxTruth, CompareTruth, EmptyValidationTruth, LineTruth, LocateBoxTruth, NamedEntityTruth, PolygonTruth, ScrubTruth, SkipTruth, TranscriptionTruth. Details: " + ", ".join(error_messages))
227
241
  elif match == 0:
228
242
  # no match
229
- raise ValueError("No match found when deserializing the JSON string into GetValidationRapidsResultTruth with oneOf schemas: AttachCategoryTruth, BoundingBoxTruth, CompareTruth, EmptyValidationTruth, LineTruth, LocateBoxTruth, NamedEntityTruth, PolygonTruth, ScrubTruth, TranscriptionTruth. Details: " + ", ".join(error_messages))
243
+ raise ValueError("No match found when deserializing the JSON string into GetValidationRapidsResultTruth with oneOf schemas: AttachCategoryTruth, BoundingBoxTruth, CompareTruth, EmptyValidationTruth, LineTruth, LocateBoxTruth, NamedEntityTruth, PolygonTruth, ScrubTruth, SkipTruth, TranscriptionTruth. Details: " + ", ".join(error_messages))
230
244
  else:
231
245
  return instance
232
246
 
@@ -240,7 +254,7 @@ class GetValidationRapidsResultTruth(BaseModel):
240
254
  else:
241
255
  return json.dumps(self.actual_instance)
242
256
 
243
- def to_dict(self) -> Optional[Union[Dict[str, Any], AttachCategoryTruth, BoundingBoxTruth, CompareTruth, EmptyValidationTruth, LineTruth, LocateBoxTruth, NamedEntityTruth, PolygonTruth, ScrubTruth, TranscriptionTruth]]:
257
+ def to_dict(self) -> Optional[Union[Dict[str, Any], AttachCategoryTruth, BoundingBoxTruth, CompareTruth, EmptyValidationTruth, LineTruth, LocateBoxTruth, NamedEntityTruth, PolygonTruth, ScrubTruth, SkipTruth, TranscriptionTruth]]:
244
258
  """Returns the dict representation of the actual instance"""
245
259
  if self.actual_instance is None:
246
260
  return None