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
|
@@ -0,0 +1,154 @@
|
|
|
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 json
|
|
17
|
+
import pprint
|
|
18
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
|
|
19
|
+
from typing import Any, List, Optional
|
|
20
|
+
from rapidata.api_client.models.naive_referee_info import NaiveRefereeInfo
|
|
21
|
+
from rapidata.api_client.models.never_ending_referee_info import NeverEndingRefereeInfo
|
|
22
|
+
from rapidata.api_client.models.probabilistic_attach_category_referee_info import ProbabilisticAttachCategoryRefereeInfo
|
|
23
|
+
from pydantic import StrictStr, Field
|
|
24
|
+
from typing import Union, List, Set, Optional, Dict
|
|
25
|
+
from typing_extensions import Literal, Self
|
|
26
|
+
|
|
27
|
+
RAPIDMODELREFEREE_ONE_OF_SCHEMAS = ["NaiveRefereeInfo", "NeverEndingRefereeInfo", "ProbabilisticAttachCategoryRefereeInfo"]
|
|
28
|
+
|
|
29
|
+
class RapidModelReferee(BaseModel):
|
|
30
|
+
"""
|
|
31
|
+
RapidModelReferee
|
|
32
|
+
"""
|
|
33
|
+
# data type: ProbabilisticAttachCategoryRefereeInfo
|
|
34
|
+
oneof_schema_1_validator: Optional[ProbabilisticAttachCategoryRefereeInfo] = None
|
|
35
|
+
# data type: NeverEndingRefereeInfo
|
|
36
|
+
oneof_schema_2_validator: Optional[NeverEndingRefereeInfo] = None
|
|
37
|
+
# data type: NaiveRefereeInfo
|
|
38
|
+
oneof_schema_3_validator: Optional[NaiveRefereeInfo] = None
|
|
39
|
+
actual_instance: Optional[Union[NaiveRefereeInfo, NeverEndingRefereeInfo, ProbabilisticAttachCategoryRefereeInfo]] = None
|
|
40
|
+
one_of_schemas: Set[str] = { "NaiveRefereeInfo", "NeverEndingRefereeInfo", "ProbabilisticAttachCategoryRefereeInfo" }
|
|
41
|
+
|
|
42
|
+
model_config = ConfigDict(
|
|
43
|
+
validate_assignment=True,
|
|
44
|
+
protected_namespaces=(),
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
discriminator_value_class_map: Dict[str, str] = {
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
def __init__(self, *args, **kwargs) -> None:
|
|
52
|
+
if args:
|
|
53
|
+
if len(args) > 1:
|
|
54
|
+
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
|
55
|
+
if kwargs:
|
|
56
|
+
raise ValueError("If a position argument is used, keyword arguments cannot be used.")
|
|
57
|
+
super().__init__(actual_instance=args[0])
|
|
58
|
+
else:
|
|
59
|
+
super().__init__(**kwargs)
|
|
60
|
+
|
|
61
|
+
@field_validator('actual_instance')
|
|
62
|
+
def actual_instance_must_validate_oneof(cls, v):
|
|
63
|
+
instance = RapidModelReferee.model_construct()
|
|
64
|
+
error_messages = []
|
|
65
|
+
match = 0
|
|
66
|
+
# validate data type: ProbabilisticAttachCategoryRefereeInfo
|
|
67
|
+
if not isinstance(v, ProbabilisticAttachCategoryRefereeInfo):
|
|
68
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `ProbabilisticAttachCategoryRefereeInfo`")
|
|
69
|
+
else:
|
|
70
|
+
match += 1
|
|
71
|
+
# validate data type: NeverEndingRefereeInfo
|
|
72
|
+
if not isinstance(v, NeverEndingRefereeInfo):
|
|
73
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `NeverEndingRefereeInfo`")
|
|
74
|
+
else:
|
|
75
|
+
match += 1
|
|
76
|
+
# validate data type: NaiveRefereeInfo
|
|
77
|
+
if not isinstance(v, NaiveRefereeInfo):
|
|
78
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `NaiveRefereeInfo`")
|
|
79
|
+
else:
|
|
80
|
+
match += 1
|
|
81
|
+
if match > 1:
|
|
82
|
+
# more than 1 match
|
|
83
|
+
raise ValueError("Multiple matches found when setting `actual_instance` in RapidModelReferee with oneOf schemas: NaiveRefereeInfo, NeverEndingRefereeInfo, ProbabilisticAttachCategoryRefereeInfo. Details: " + ", ".join(error_messages))
|
|
84
|
+
elif match == 0:
|
|
85
|
+
# no match
|
|
86
|
+
raise ValueError("No match found when setting `actual_instance` in RapidModelReferee with oneOf schemas: NaiveRefereeInfo, NeverEndingRefereeInfo, ProbabilisticAttachCategoryRefereeInfo. Details: " + ", ".join(error_messages))
|
|
87
|
+
else:
|
|
88
|
+
return v
|
|
89
|
+
|
|
90
|
+
@classmethod
|
|
91
|
+
def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
|
|
92
|
+
return cls.from_json(json.dumps(obj))
|
|
93
|
+
|
|
94
|
+
@classmethod
|
|
95
|
+
def from_json(cls, json_str: str) -> Self:
|
|
96
|
+
"""Returns the object represented by the json string"""
|
|
97
|
+
instance = cls.model_construct()
|
|
98
|
+
error_messages = []
|
|
99
|
+
match = 0
|
|
100
|
+
|
|
101
|
+
# deserialize data into ProbabilisticAttachCategoryRefereeInfo
|
|
102
|
+
try:
|
|
103
|
+
instance.actual_instance = ProbabilisticAttachCategoryRefereeInfo.from_json(json_str)
|
|
104
|
+
match += 1
|
|
105
|
+
except (ValidationError, ValueError) as e:
|
|
106
|
+
error_messages.append(str(e))
|
|
107
|
+
# deserialize data into NeverEndingRefereeInfo
|
|
108
|
+
try:
|
|
109
|
+
instance.actual_instance = NeverEndingRefereeInfo.from_json(json_str)
|
|
110
|
+
match += 1
|
|
111
|
+
except (ValidationError, ValueError) as e:
|
|
112
|
+
error_messages.append(str(e))
|
|
113
|
+
# deserialize data into NaiveRefereeInfo
|
|
114
|
+
try:
|
|
115
|
+
instance.actual_instance = NaiveRefereeInfo.from_json(json_str)
|
|
116
|
+
match += 1
|
|
117
|
+
except (ValidationError, ValueError) as e:
|
|
118
|
+
error_messages.append(str(e))
|
|
119
|
+
|
|
120
|
+
if match > 1:
|
|
121
|
+
# more than 1 match
|
|
122
|
+
raise ValueError("Multiple matches found when deserializing the JSON string into RapidModelReferee with oneOf schemas: NaiveRefereeInfo, NeverEndingRefereeInfo, ProbabilisticAttachCategoryRefereeInfo. Details: " + ", ".join(error_messages))
|
|
123
|
+
elif match == 0:
|
|
124
|
+
# no match
|
|
125
|
+
raise ValueError("No match found when deserializing the JSON string into RapidModelReferee with oneOf schemas: NaiveRefereeInfo, NeverEndingRefereeInfo, ProbabilisticAttachCategoryRefereeInfo. Details: " + ", ".join(error_messages))
|
|
126
|
+
else:
|
|
127
|
+
return instance
|
|
128
|
+
|
|
129
|
+
def to_json(self) -> str:
|
|
130
|
+
"""Returns the JSON representation of the actual instance"""
|
|
131
|
+
if self.actual_instance is None:
|
|
132
|
+
return "null"
|
|
133
|
+
|
|
134
|
+
if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
|
|
135
|
+
return self.actual_instance.to_json()
|
|
136
|
+
else:
|
|
137
|
+
return json.dumps(self.actual_instance)
|
|
138
|
+
|
|
139
|
+
def to_dict(self) -> Optional[Union[Dict[str, Any], NaiveRefereeInfo, NeverEndingRefereeInfo, ProbabilisticAttachCategoryRefereeInfo]]:
|
|
140
|
+
"""Returns the dict representation of the actual instance"""
|
|
141
|
+
if self.actual_instance is None:
|
|
142
|
+
return None
|
|
143
|
+
|
|
144
|
+
if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
|
|
145
|
+
return self.actual_instance.to_dict()
|
|
146
|
+
else:
|
|
147
|
+
# primitive type
|
|
148
|
+
return self.actual_instance
|
|
149
|
+
|
|
150
|
+
def to_str(self) -> str:
|
|
151
|
+
"""Returns the string representation of the actual instance"""
|
|
152
|
+
return pprint.pformat(self.model_dump())
|
|
153
|
+
|
|
154
|
+
|
|
@@ -19,6 +19,7 @@ import json
|
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
|
21
21
|
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from rapidata.api_client.models.file_asset_model_metadata_value import FileAssetModelMetadataValue
|
|
22
23
|
from typing import Optional, Set
|
|
23
24
|
from typing_extensions import Self
|
|
24
25
|
|
|
@@ -109,7 +110,4 @@ class TextAssetModel(BaseModel):
|
|
|
109
110
|
})
|
|
110
111
|
return _obj
|
|
111
112
|
|
|
112
|
-
from rapidata.api_client.models.file_asset_model_metadata_value import FileAssetModelMetadataValue
|
|
113
|
-
# TODO: Rewrite to not use raise_errors
|
|
114
|
-
TextAssetModel.model_rebuild(raise_errors=False)
|
|
115
113
|
|
|
@@ -26,7 +26,7 @@ class UpdateAccessModel(BaseModel):
|
|
|
26
26
|
"""
|
|
27
27
|
The model for updating the access of an order.
|
|
28
28
|
""" # noqa: E501
|
|
29
|
-
is_public: StrictBool = Field(description="
|
|
29
|
+
is_public: StrictBool = Field(description="A flag indicating whether to update the order to be public or not.", alias="isPublic")
|
|
30
30
|
__properties: ClassVar[List[str]] = ["isPublic"]
|
|
31
31
|
|
|
32
32
|
model_config = ConfigDict(
|
|
@@ -28,9 +28,9 @@ class UpdateValidationRapidModel(BaseModel):
|
|
|
28
28
|
The model for updating a validation rapid.
|
|
29
29
|
""" # noqa: E501
|
|
30
30
|
truth: UpdateValidationRapidModelTruth
|
|
31
|
-
explanation: Optional[StrictStr] = None
|
|
32
|
-
prompt: Optional[StrictStr] = None
|
|
33
|
-
random_correct_probability:
|
|
31
|
+
explanation: Optional[StrictStr] = Field(default=None, description="The optional explanation that will be shown to the user when answering wrong.")
|
|
32
|
+
prompt: Optional[StrictStr] = Field(default=None, description="The optional prompt that will be shown to the user.")
|
|
33
|
+
random_correct_probability: Union[StrictFloat, StrictInt] = Field(description="The probability that if the user answers at random that he'll be correct.", alias="randomCorrectProbability")
|
|
34
34
|
__properties: ClassVar[List[str]] = ["truth", "explanation", "prompt", "randomCorrectProbability"]
|
|
35
35
|
|
|
36
36
|
model_config = ConfigDict(
|
|
@@ -85,11 +85,6 @@ class UpdateValidationRapidModel(BaseModel):
|
|
|
85
85
|
if self.prompt is None and "prompt" in self.model_fields_set:
|
|
86
86
|
_dict['prompt'] = None
|
|
87
87
|
|
|
88
|
-
# set to None if random_correct_probability (nullable) is None
|
|
89
|
-
# and model_fields_set contains the field
|
|
90
|
-
if self.random_correct_probability is None and "random_correct_probability" in self.model_fields_set:
|
|
91
|
-
_dict['randomCorrectProbability'] = None
|
|
92
|
-
|
|
93
88
|
return _dict
|
|
94
89
|
|
|
95
90
|
@classmethod
|
|
@@ -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,11 +33,11 @@ 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
|
-
UPDATEVALIDATIONRAPIDMODELTRUTH_ONE_OF_SCHEMAS = ["AttachCategoryTruth", "BoundingBoxTruth", "CompareTruth", "EmptyValidationTruth", "LineTruth", "LocateBoxTruth", "NamedEntityTruth", "PolygonTruth", "ScrubTruth", "SkipTruth", "TranscriptionTruth"]
|
|
36
|
+
UPDATEVALIDATIONRAPIDMODELTRUTH_ONE_OF_SCHEMAS = ["AttachCategoryTruth", "BoundingBoxTruth", "CompareTruth", "EmptyValidationTruth", "LineTruth", "LocateBoxTruth", "MultiCompareTruth", "NamedEntityTruth", "PolygonTruth", "ScrubTruth", "SkipTruth", "TranscriptionTruth"]
|
|
36
37
|
|
|
37
38
|
class UpdateValidationRapidModelTruth(BaseModel):
|
|
38
39
|
"""
|
|
39
|
-
|
|
40
|
+
The truth for the validation rapid.
|
|
40
41
|
"""
|
|
41
42
|
# data type: TranscriptionTruth
|
|
42
43
|
oneof_schema_1_validator: Optional[TranscriptionTruth] = None
|
|
@@ -54,14 +55,16 @@ class UpdateValidationRapidModelTruth(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 UpdateValidationRapidModelTruth(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 UpdateValidationRapidModelTruth(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 UpdateValidationRapidModelTruth 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 UpdateValidationRapidModelTruth 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 UpdateValidationRapidModelTruth 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 UpdateValidationRapidModelTruth 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 UpdateValidationRapidModelTruth(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 UpdateValidationRapidModelTruth(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 UpdateValidationRapidModelTruth 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 UpdateValidationRapidModelTruth 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 UpdateValidationRapidModelTruth 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 UpdateValidationRapidModelTruth 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 UpdateValidationRapidModelTruth(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
|
|
@@ -32,8 +32,8 @@ class UploadFilesFromS3BucketModel(BaseModel):
|
|
|
32
32
|
source_prefix: StrictStr = Field(description="The prefix of the files to upload.", alias="sourcePrefix")
|
|
33
33
|
access_key: Optional[StrictStr] = Field(default=None, description="The access key to use for the S3 bucket.", alias="accessKey")
|
|
34
34
|
secret_key: Optional[StrictStr] = Field(default=None, description="The secret key to use for the S3 bucket.", alias="secretKey")
|
|
35
|
-
use_custom_aws_credentials: StrictBool = Field(description="Whether to use custom AWS credentials.", alias="useCustomAwsCredentials")
|
|
36
|
-
clear_dataset: StrictBool = Field(description="Whether to clear the dataset before uploading the files.", alias="clearDataset")
|
|
35
|
+
use_custom_aws_credentials: Optional[StrictBool] = Field(default=None, description="Whether to use custom AWS credentials.", alias="useCustomAwsCredentials")
|
|
36
|
+
clear_dataset: Optional[StrictBool] = Field(default=None, description="Whether to clear the dataset before uploading the files.", alias="clearDataset")
|
|
37
37
|
__properties: ClassVar[List[str]] = ["datasetId", "bucketName", "region", "sourcePrefix", "accessKey", "secretKey", "useCustomAwsCredentials", "clearDataset"]
|
|
38
38
|
|
|
39
39
|
model_config = ConfigDict(
|
|
@@ -90,6 +90,16 @@ class UploadFilesFromS3BucketModel(BaseModel):
|
|
|
90
90
|
if self.secret_key is None and "secret_key" in self.model_fields_set:
|
|
91
91
|
_dict['secretKey'] = None
|
|
92
92
|
|
|
93
|
+
# set to None if use_custom_aws_credentials (nullable) is None
|
|
94
|
+
# and model_fields_set contains the field
|
|
95
|
+
if self.use_custom_aws_credentials is None and "use_custom_aws_credentials" in self.model_fields_set:
|
|
96
|
+
_dict['useCustomAwsCredentials'] = None
|
|
97
|
+
|
|
98
|
+
# set to None if clear_dataset (nullable) is None
|
|
99
|
+
# and model_fields_set contains the field
|
|
100
|
+
if self.clear_dataset is None and "clear_dataset" in self.model_fields_set:
|
|
101
|
+
_dict['clearDataset'] = None
|
|
102
|
+
|
|
93
103
|
return _dict
|
|
94
104
|
|
|
95
105
|
@classmethod
|
|
@@ -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
|
|
|
@@ -30,7 +30,7 @@ class UploadTextSourcesToDatasetModel(BaseModel):
|
|
|
30
30
|
dataset_id: StrictStr = Field(description="The id of the dataset to upload the text sources to.", alias="datasetId")
|
|
31
31
|
text_sources: List[StrictStr] = Field(description="The text sources to upload.", alias="textSources")
|
|
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
|
-
metadata: Optional[List[
|
|
33
|
+
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.")
|
|
34
34
|
__properties: ClassVar[List[str]] = ["datasetId", "textSources", "sortIndex", "metadata"]
|
|
35
35
|
|
|
36
36
|
model_config = ConfigDict(
|
|
@@ -104,7 +104,7 @@ class UploadTextSourcesToDatasetModel(BaseModel):
|
|
|
104
104
|
"datasetId": obj.get("datasetId"),
|
|
105
105
|
"textSources": obj.get("textSources"),
|
|
106
106
|
"sortIndex": obj.get("sortIndex"),
|
|
107
|
-
"metadata": [
|
|
107
|
+
"metadata": [DatasetDatasetIdDatapointsPostRequestMetadataInner.from_dict(_item) for _item in obj["metadata"]] if obj.get("metadata") is not None else None
|
|
108
108
|
})
|
|
109
109
|
return _obj
|
|
110
110
|
|
rapidata/api_client_README.md
CHANGED
|
@@ -82,13 +82,18 @@ Class | Method | HTTP request | Description
|
|
|
82
82
|
*ClientApi* | [**client_client_id_delete**](rapidata/api_client/docs/ClientApi.md#client_client_id_delete) | **DELETE** /client/{clientId} | Deletes a customers' client.
|
|
83
83
|
*ClientApi* | [**client_post**](rapidata/api_client/docs/ClientApi.md#client_post) | **POST** /client | Creates a new client for the current customer.
|
|
84
84
|
*ClientApi* | [**client_query_get**](rapidata/api_client/docs/ClientApi.md#client_query_get) | **GET** /client/query | Gets the clients for the current customer.
|
|
85
|
-
*ClientApi* | [**client_setreferrer_post**](rapidata/api_client/docs/ClientApi.md#client_setreferrer_post) | **POST** /client/setreferrer | Sets the referrer for the current customer.
|
|
86
85
|
*ClientApi* | [**clients_get**](rapidata/api_client/docs/ClientApi.md#clients_get) | **GET** /clients | Queries the clients for the current customer.
|
|
87
86
|
*CocoApi* | [**coco_coco_set_id_submit_post**](rapidata/api_client/docs/CocoApi.md#coco_coco_set_id_submit_post) | **POST** /coco/{cocoSetId}/submit | Creates a new validation set based on a previously uploaded CoCo set.
|
|
88
87
|
*CocoApi* | [**coco_post**](rapidata/api_client/docs/CocoApi.md#coco_post) | **POST** /coco | Uploads a CoCo set to the system.
|
|
89
88
|
*CocoApi* | [**coco_submit_post**](rapidata/api_client/docs/CocoApi.md#coco_submit_post) | **POST** /coco/submit | Creates a new validation set based on a previously uploaded CoCo set.
|
|
90
89
|
*CocoApi* | [**coco_upload_post**](rapidata/api_client/docs/CocoApi.md#coco_upload_post) | **POST** /coco/upload | Uploads a CoCo set to the system.
|
|
91
90
|
*CompareWorkflowApi* | [**workflow_compare_workflow_id_results_get**](rapidata/api_client/docs/CompareWorkflowApi.md#workflow_compare_workflow_id_results_get) | **GET** /workflow/compare/{workflowId}/results | Get the result overview for a compare workflow.
|
|
91
|
+
*CustomerRapidApi* | [**rapid_demographic_post**](rapidata/api_client/docs/CustomerRapidApi.md#rapid_demographic_post) | **POST** /rapid/demographic | Creates a new Demographic Rapid.
|
|
92
|
+
*CustomerRapidApi* | [**rapid_rapid_id_delete**](rapidata/api_client/docs/CustomerRapidApi.md#rapid_rapid_id_delete) | **DELETE** /rapid/{rapidId} | Deletes a rapid.
|
|
93
|
+
*CustomerRapidApi* | [**rapid_rapid_id_responses_get**](rapidata/api_client/docs/CustomerRapidApi.md#rapid_rapid_id_responses_get) | **GET** /rapid/{rapidId}/responses | Gets all responses for a given rapid.
|
|
94
|
+
*CustomerRapidApi* | [**rapid_rapid_id_unflag_post**](rapidata/api_client/docs/CustomerRapidApi.md#rapid_rapid_id_unflag_post) | **POST** /rapid/{rapidId}/unflag | Unflags a flagged rapid. This will add the rapid back to the active labeling pool and prevent it from being flagged again.
|
|
95
|
+
*CustomerRapidApi* | [**rapid_validation_rapid_id_patch**](rapidata/api_client/docs/CustomerRapidApi.md#rapid_validation_rapid_id_patch) | **PATCH** /rapid/validation/{rapidId} | Updates the validation information of a Rapid.
|
|
96
|
+
*CustomerRapidApi* | [**rapids_flagged_get**](rapidata/api_client/docs/CustomerRapidApi.md#rapids_flagged_get) | **GET** /rapids/flagged | Allows querying all rapids that have been flagged.
|
|
92
97
|
*DatapointApi* | [**datapoint_datapoint_id_delete**](rapidata/api_client/docs/DatapointApi.md#datapoint_datapoint_id_delete) | **DELETE** /datapoint/{datapointId} | Deletes a datapoint by its id.
|
|
93
98
|
*DatapointApi* | [**datapoint_datapoint_id_get**](rapidata/api_client/docs/DatapointApi.md#datapoint_datapoint_id_get) | **GET** /datapoint/{datapointId} | Gets a datapoint by its id.
|
|
94
99
|
*DatapointApi* | [**datapoint_delete_delete**](rapidata/api_client/docs/DatapointApi.md#datapoint_delete_delete) | **DELETE** /datapoint/delete | Delete a datapoint.
|
|
@@ -100,6 +105,7 @@ Class | Method | HTTP request | Description
|
|
|
100
105
|
*DatasetApi* | [**dataset_dataset_id_datapoints_failed_get**](rapidata/api_client/docs/DatasetApi.md#dataset_dataset_id_datapoints_failed_get) | **GET** /dataset/{datasetId}/datapoints/failed | Gets a list of all datapoints that failed to upload.
|
|
101
106
|
*DatasetApi* | [**dataset_dataset_id_datapoints_files_post**](rapidata/api_client/docs/DatasetApi.md#dataset_dataset_id_datapoints_files_post) | **POST** /dataset/{datasetId}/datapoints/files | Creates a single datapoint by uploading files.
|
|
102
107
|
*DatasetApi* | [**dataset_dataset_id_datapoints_get**](rapidata/api_client/docs/DatasetApi.md#dataset_dataset_id_datapoints_get) | **GET** /dataset/{datasetId}/datapoints | Gets all datapoints of a dataset.
|
|
108
|
+
*DatasetApi* | [**dataset_dataset_id_datapoints_post**](rapidata/api_client/docs/DatasetApi.md#dataset_dataset_id_datapoints_post) | **POST** /dataset/{datasetId}/datapoints | Creates a new datapoint from multiple possible sources.
|
|
103
109
|
*DatasetApi* | [**dataset_dataset_id_datapoints_s3_post**](rapidata/api_client/docs/DatasetApi.md#dataset_dataset_id_datapoints_s3_post) | **POST** /dataset/{datasetId}/datapoints/s3 | Uploads files from an S3 bucket to a dataset.
|
|
104
110
|
*DatasetApi* | [**dataset_dataset_id_datapoints_texts_post**](rapidata/api_client/docs/DatasetApi.md#dataset_dataset_id_datapoints_texts_post) | **POST** /dataset/{datasetId}/datapoints/texts | Creates a single datapoint from text sources.
|
|
105
111
|
*DatasetApi* | [**dataset_dataset_id_datapoints_urls_post**](rapidata/api_client/docs/DatasetApi.md#dataset_dataset_id_datapoints_urls_post) | **POST** /dataset/{datasetId}/datapoints/urls | Creates a single datapoint where the assets are fetched from the specified urls.
|
|
@@ -121,7 +127,6 @@ Class | Method | HTTP request | Description
|
|
|
121
127
|
*IdentityApi* | [**identity_referrer_post**](rapidata/api_client/docs/IdentityApi.md#identity_referrer_post) | **POST** /identity/referrer | Sets the referrer for the current customer.
|
|
122
128
|
*IdentityApi* | [**identity_registertemporary_post**](rapidata/api_client/docs/IdentityApi.md#identity_registertemporary_post) | **POST** /identity/registertemporary | Registers and logs in a temporary customer.
|
|
123
129
|
*IdentityApi* | [**identity_temporary_post**](rapidata/api_client/docs/IdentityApi.md#identity_temporary_post) | **POST** /identity/temporary | Registers and logs in a temporary customer.
|
|
124
|
-
*NewsletterApi* | [**newsletter_post**](rapidata/api_client/docs/NewsletterApi.md#newsletter_post) | **POST** /newsletter | Signs a user up to the newsletter.
|
|
125
130
|
*NewsletterApi* | [**newsletter_subscribe_post**](rapidata/api_client/docs/NewsletterApi.md#newsletter_subscribe_post) | **POST** /newsletter/subscribe | Signs a user up to the newsletter.
|
|
126
131
|
*NewsletterApi* | [**newsletter_unsubscribe_post**](rapidata/api_client/docs/NewsletterApi.md#newsletter_unsubscribe_post) | **POST** /newsletter/unsubscribe | Unsubscribes a user from the newsletter.
|
|
127
132
|
*OrderApi* | [**order_approve_post**](rapidata/api_client/docs/OrderApi.md#order_approve_post) | **POST** /order/approve | Approves an order that has been submitted for manual approval.
|
|
@@ -172,18 +177,14 @@ Class | Method | HTTP request | Description
|
|
|
172
177
|
*PipelineApi* | [**pipeline_pipeline_id_get**](rapidata/api_client/docs/PipelineApi.md#pipeline_pipeline_id_get) | **GET** /pipeline/{pipelineId} | Gets a pipeline by its id.
|
|
173
178
|
*PipelineApi* | [**pipeline_pipeline_id_preliminary_download_post**](rapidata/api_client/docs/PipelineApi.md#pipeline_pipeline_id_preliminary_download_post) | **POST** /pipeline/{pipelineId}/preliminary-download | Initiates a preliminary download of the pipeline.
|
|
174
179
|
*PipelineApi* | [**pipeline_preliminary_download_preliminary_download_id_get**](rapidata/api_client/docs/PipelineApi.md#pipeline_preliminary_download_preliminary_download_id_get) | **GET** /pipeline/preliminary-download/{preliminaryDownloadId} | Gets the preliminary download.
|
|
175
|
-
*RapidApi* | [**rapid_demographic_post**](rapidata/api_client/docs/RapidApi.md#rapid_demographic_post) | **POST** /rapid/demographic | Creates a new Demographic Rapid.
|
|
176
|
-
*RapidApi* | [**rapid_rapid_bag_is_valid_get**](rapidata/api_client/docs/RapidApi.md#rapid_rapid_bag_is_valid_get) | **GET** /rapid/rapid-bag/is-valid | Validates that the rapids associated with the current user are active.
|
|
177
|
-
*RapidApi* | [**rapid_rapid_id_delete**](rapidata/api_client/docs/RapidApi.md#rapid_rapid_id_delete) | **DELETE** /rapid/{rapidId} | Deletes a rapid.
|
|
178
|
-
*RapidApi* | [**rapid_rapid_id_report_post**](rapidata/api_client/docs/RapidApi.md#rapid_rapid_id_report_post) | **POST** /rapid/{rapidId}/report | Used to report an issue with a rapid.
|
|
179
|
-
*RapidApi* | [**rapid_rapid_id_responses_get**](rapidata/api_client/docs/RapidApi.md#rapid_rapid_id_responses_get) | **GET** /rapid/{rapidId}/responses | Gets all responses for a given rapid.
|
|
180
|
-
*RapidApi* | [**rapid_report_report_id_get**](rapidata/api_client/docs/RapidApi.md#rapid_report_report_id_get) | **GET** /rapid/report/{reportId} | Inspects a report's dump. Can be used to restore zustand state or anything alike.
|
|
181
|
-
*RapidApi* | [**rapid_response_post**](rapidata/api_client/docs/RapidApi.md#rapid_response_post) | **POST** /rapid/response | Submits a response for a Rapid.
|
|
182
|
-
*RapidApi* | [**rapid_skip_post**](rapidata/api_client/docs/RapidApi.md#rapid_skip_post) | **POST** /rapid/skip | Skips a Rapid for the user.
|
|
183
|
-
*RapidApi* | [**rapid_validation_rapid_id_patch**](rapidata/api_client/docs/RapidApi.md#rapid_validation_rapid_id_patch) | **PATCH** /rapid/validation/{rapidId} | Updates the validation information of a rapid.
|
|
184
180
|
*RapidataIdentityAPIApi* | [**root_get**](rapidata/api_client/docs/RapidataIdentityAPIApi.md#root_get) | **GET** / |
|
|
185
181
|
*SimpleWorkflowApi* | [**workflow_simple_workflow_id_results_get**](rapidata/api_client/docs/SimpleWorkflowApi.md#workflow_simple_workflow_id_results_get) | **GET** /workflow/simple/{workflowId}/results | Get the result overview for a simple workflow.
|
|
186
182
|
*UserInfoApi* | [**connect_userinfo_get**](rapidata/api_client/docs/UserInfoApi.md#connect_userinfo_get) | **GET** /connect/userinfo | Retrieves information about the authenticated user.
|
|
183
|
+
*UserRapidApi* | [**rapid_rapid_bag_is_valid_get**](rapidata/api_client/docs/UserRapidApi.md#rapid_rapid_bag_is_valid_get) | **GET** /rapid/rapid-bag/is-valid | Validates that the rapids associated with the current user are active.
|
|
184
|
+
*UserRapidApi* | [**rapid_rapid_id_report_post**](rapidata/api_client/docs/UserRapidApi.md#rapid_rapid_id_report_post) | **POST** /rapid/{rapidId}/report | Used to report an issue with a rapid.
|
|
185
|
+
*UserRapidApi* | [**rapid_report_report_id_get**](rapidata/api_client/docs/UserRapidApi.md#rapid_report_report_id_get) | **GET** /rapid/report/{reportId} | Inspects a report's dump. Can be used to restore zustand state or anything alike.
|
|
186
|
+
*UserRapidApi* | [**rapid_response_post**](rapidata/api_client/docs/UserRapidApi.md#rapid_response_post) | **POST** /rapid/response | Submits a response for a Rapid.
|
|
187
|
+
*UserRapidApi* | [**rapid_skip_post**](rapidata/api_client/docs/UserRapidApi.md#rapid_skip_post) | **POST** /rapid/skip | Skips a Rapid for the user.
|
|
187
188
|
*ValidationSetApi* | [**validation_addvalidationrapid_post**](rapidata/api_client/docs/ValidationSetApi.md#validation_addvalidationrapid_post) | **POST** /validation/addvalidationrapid | Adds a new validation rapid to the specified validation set.
|
|
188
189
|
*ValidationSetApi* | [**validation_addvalidationtextrapid_post**](rapidata/api_client/docs/ValidationSetApi.md#validation_addvalidationtextrapid_post) | **POST** /validation/addvalidationtextrapid | Adds a new validation rapid to the specified validation set.
|
|
189
190
|
*ValidationSetApi* | [**validation_createvalidationset_post**](rapidata/api_client/docs/ValidationSetApi.md#validation_createvalidationset_post) | **POST** /validation/createvalidationset | Creates a new empty validation set.
|
|
@@ -235,7 +236,6 @@ Class | Method | HTTP request | Description
|
|
|
235
236
|
- [AssetMetadata](rapidata/api_client/docs/AssetMetadata.md)
|
|
236
237
|
- [AssetMetadataAsset](rapidata/api_client/docs/AssetMetadataAsset.md)
|
|
237
238
|
- [AssetMetadataModel](rapidata/api_client/docs/AssetMetadataModel.md)
|
|
238
|
-
- [AssetMetadataModelAsset](rapidata/api_client/docs/AssetMetadataModelAsset.md)
|
|
239
239
|
- [AttachCategoryRapidBlueprint](rapidata/api_client/docs/AttachCategoryRapidBlueprint.md)
|
|
240
240
|
- [AttachCategoryResult](rapidata/api_client/docs/AttachCategoryResult.md)
|
|
241
241
|
- [AttachCategoryTruth](rapidata/api_client/docs/AttachCategoryTruth.md)
|
|
@@ -288,7 +288,6 @@ Class | Method | HTTP request | Description
|
|
|
288
288
|
- [CreateComplexOrderModelPipeline](rapidata/api_client/docs/CreateComplexOrderModelPipeline.md)
|
|
289
289
|
- [CreateComplexOrderResult](rapidata/api_client/docs/CreateComplexOrderResult.md)
|
|
290
290
|
- [CreateDatapointFromFilesModel](rapidata/api_client/docs/CreateDatapointFromFilesModel.md)
|
|
291
|
-
- [CreateDatapointFromFilesModelMetadataInner](rapidata/api_client/docs/CreateDatapointFromFilesModelMetadataInner.md)
|
|
292
291
|
- [CreateDatapointFromTextSourcesModel](rapidata/api_client/docs/CreateDatapointFromTextSourcesModel.md)
|
|
293
292
|
- [CreateDatapointFromUrlsModel](rapidata/api_client/docs/CreateDatapointFromUrlsModel.md)
|
|
294
293
|
- [CreateDatapointResult](rapidata/api_client/docs/CreateDatapointResult.md)
|
|
@@ -310,10 +309,12 @@ Class | Method | HTTP request | Description
|
|
|
310
309
|
- [CreateValidationSetModel](rapidata/api_client/docs/CreateValidationSetModel.md)
|
|
311
310
|
- [CustomUserFilterModel](rapidata/api_client/docs/CustomUserFilterModel.md)
|
|
312
311
|
- [Datapoint](rapidata/api_client/docs/Datapoint.md)
|
|
312
|
+
- [DatapointAsset](rapidata/api_client/docs/DatapointAsset.md)
|
|
313
313
|
- [DatapointMetadataModel](rapidata/api_client/docs/DatapointMetadataModel.md)
|
|
314
314
|
- [DatapointModel](rapidata/api_client/docs/DatapointModel.md)
|
|
315
315
|
- [DatapointState](rapidata/api_client/docs/DatapointState.md)
|
|
316
316
|
- [DatasetArtifactModel](rapidata/api_client/docs/DatasetArtifactModel.md)
|
|
317
|
+
- [DatasetDatasetIdDatapointsPostRequestMetadataInner](rapidata/api_client/docs/DatasetDatasetIdDatapointsPostRequestMetadataInner.md)
|
|
317
318
|
- [DatasetEvaluationStepModel](rapidata/api_client/docs/DatasetEvaluationStepModel.md)
|
|
318
319
|
- [Demographic](rapidata/api_client/docs/Demographic.md)
|
|
319
320
|
- [DemographicMetadataModel](rapidata/api_client/docs/DemographicMetadataModel.md)
|
|
@@ -394,7 +395,9 @@ Class | Method | HTTP request | Description
|
|
|
394
395
|
- [MetadataVisibilities](rapidata/api_client/docs/MetadataVisibilities.md)
|
|
395
396
|
- [MultiAsset](rapidata/api_client/docs/MultiAsset.md)
|
|
396
397
|
- [MultiAssetModel](rapidata/api_client/docs/MultiAssetModel.md)
|
|
398
|
+
- [MultiCompareTruth](rapidata/api_client/docs/MultiCompareTruth.md)
|
|
397
399
|
- [NaiveRefereeConfig](rapidata/api_client/docs/NaiveRefereeConfig.md)
|
|
400
|
+
- [NaiveRefereeInfo](rapidata/api_client/docs/NaiveRefereeInfo.md)
|
|
398
401
|
- [NaiveRefereeModel](rapidata/api_client/docs/NaiveRefereeModel.md)
|
|
399
402
|
- [NamedClassification](rapidata/api_client/docs/NamedClassification.md)
|
|
400
403
|
- [NamedEntityPayload](rapidata/api_client/docs/NamedEntityPayload.md)
|
|
@@ -402,6 +405,7 @@ Class | Method | HTTP request | Description
|
|
|
402
405
|
- [NamedEntityResult](rapidata/api_client/docs/NamedEntityResult.md)
|
|
403
406
|
- [NamedEntityTruth](rapidata/api_client/docs/NamedEntityTruth.md)
|
|
404
407
|
- [NeverEndingRefereeConfig](rapidata/api_client/docs/NeverEndingRefereeConfig.md)
|
|
408
|
+
- [NeverEndingRefereeInfo](rapidata/api_client/docs/NeverEndingRefereeInfo.md)
|
|
405
409
|
- [NewUserFilterModel](rapidata/api_client/docs/NewUserFilterModel.md)
|
|
406
410
|
- [NewsletterModel](rapidata/api_client/docs/NewsletterModel.md)
|
|
407
411
|
- [NotAvailableYetResult](rapidata/api_client/docs/NotAvailableYetResult.md)
|
|
@@ -427,6 +431,7 @@ Class | Method | HTTP request | Description
|
|
|
427
431
|
- [PreliminaryDownloadResult](rapidata/api_client/docs/PreliminaryDownloadResult.md)
|
|
428
432
|
- [PrivateTextMetadataInput](rapidata/api_client/docs/PrivateTextMetadataInput.md)
|
|
429
433
|
- [ProbabilisticAttachCategoryRefereeConfig](rapidata/api_client/docs/ProbabilisticAttachCategoryRefereeConfig.md)
|
|
434
|
+
- [ProbabilisticAttachCategoryRefereeInfo](rapidata/api_client/docs/ProbabilisticAttachCategoryRefereeInfo.md)
|
|
430
435
|
- [PromptAssetMetadataInput](rapidata/api_client/docs/PromptAssetMetadataInput.md)
|
|
431
436
|
- [PromptMetadata](rapidata/api_client/docs/PromptMetadata.md)
|
|
432
437
|
- [PromptMetadataInput](rapidata/api_client/docs/PromptMetadataInput.md)
|
|
@@ -436,6 +441,9 @@ Class | Method | HTTP request | Description
|
|
|
436
441
|
- [QueryModel](rapidata/api_client/docs/QueryModel.md)
|
|
437
442
|
- [QueryWorkflowsModel](rapidata/api_client/docs/QueryWorkflowsModel.md)
|
|
438
443
|
- [RapidIssue](rapidata/api_client/docs/RapidIssue.md)
|
|
444
|
+
- [RapidModel](rapidata/api_client/docs/RapidModel.md)
|
|
445
|
+
- [RapidModelPagedResult](rapidata/api_client/docs/RapidModelPagedResult.md)
|
|
446
|
+
- [RapidModelReferee](rapidata/api_client/docs/RapidModelReferee.md)
|
|
439
447
|
- [RapidResponse](rapidata/api_client/docs/RapidResponse.md)
|
|
440
448
|
- [RapidResponseResult](rapidata/api_client/docs/RapidResponseResult.md)
|
|
441
449
|
- [RapidResultModel](rapidata/api_client/docs/RapidResultModel.md)
|
|
@@ -34,11 +34,6 @@ class MultiAsset(BaseAsset):
|
|
|
34
34
|
if not all(isinstance(asset, type(assets[0])) for asset in assets):
|
|
35
35
|
raise ValueError("All assets must be of the same type.")
|
|
36
36
|
|
|
37
|
-
if isinstance(assets[0], MediaAsset):
|
|
38
|
-
local = [asset.is_local() for asset in cast(Sequence[MediaAsset], assets)]
|
|
39
|
-
if not all(loc == local[0] for loc in local):
|
|
40
|
-
raise ValueError("A datapoint with multiple assets can either have both assets be local paths or both be URLs. not a mix of both.")
|
|
41
|
-
|
|
42
37
|
self.assets = assets
|
|
43
38
|
|
|
44
39
|
def __len__(self) -> int:
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
from .logger import configure_logger, logger
|
|
2
|
-
from .output_manager import managed_print,
|
|
2
|
+
from .output_manager import managed_print, RapidataOutputManager
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
class
|
|
1
|
+
class RapidataOutputManager:
|
|
2
2
|
silent_mode = False
|
|
3
3
|
|
|
4
4
|
@classmethod
|
|
@@ -10,7 +10,7 @@ class OutputManger:
|
|
|
10
10
|
cls.silent_mode = False
|
|
11
11
|
|
|
12
12
|
def managed_print(*args, **kwargs):
|
|
13
|
-
if not
|
|
13
|
+
if not RapidataOutputManager.silent_mode:
|
|
14
14
|
print(*args, **kwargs)
|
|
15
15
|
|
|
16
16
|
|