rapidata 2.36.1__py3-none-any.whl → 2.36.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of rapidata might be problematic. Click here for more details.
- rapidata/__init__.py +2 -2
- rapidata/api_client/__init__.py +2 -4
- rapidata/api_client/api/validation_set_api.py +54 -31
- rapidata/api_client/models/__init__.py +2 -4
- rapidata/api_client/models/add_validation_rapid_model.py +17 -2
- rapidata/api_client/models/asset_metadata.py +9 -1
- rapidata/api_client/models/boost_query_result.py +5 -17
- rapidata/api_client/models/campaign_query_result.py +3 -9
- rapidata/api_client/models/classification_metadata.py +12 -1
- rapidata/api_client/models/compare_workflow_config.py +22 -12
- rapidata/api_client/models/compare_workflow_config_model.py +12 -2
- rapidata/api_client/models/compare_workflow_model.py +12 -2
- rapidata/api_client/models/count_metadata.py +12 -1
- rapidata/api_client/models/create_demographic_rapid_model.py +18 -3
- rapidata/api_client/models/create_order_model.py +6 -48
- rapidata/api_client/models/effort_capped_selection.py +2 -11
- rapidata/api_client/models/evaluation_workflow_config.py +13 -3
- rapidata/api_client/models/evaluation_workflow_model.py +13 -3
- rapidata/api_client/models/file_type_metadata.py +11 -6
- rapidata/api_client/models/file_type_metadata_model.py +2 -8
- rapidata/api_client/models/filter.py +5 -23
- rapidata/api_client/models/get_datapoint_by_id_result.py +3 -9
- rapidata/api_client/models/get_rapid_responses_result.py +3 -9
- rapidata/api_client/models/get_recommended_validation_set_result.py +95 -0
- rapidata/api_client/models/get_standing_by_id_result.py +3 -9
- rapidata/api_client/models/get_validation_rapids_result.py +3 -9
- rapidata/api_client/models/get_workflow_progress_result.py +3 -9
- rapidata/api_client/models/get_workflow_results_result.py +3 -9
- rapidata/api_client/models/image_dimension_metadata.py +12 -1
- rapidata/api_client/models/labeling_selection.py +2 -11
- rapidata/api_client/models/location_metadata.py +12 -1
- rapidata/api_client/models/order_model.py +3 -9
- rapidata/api_client/models/original_filename_metadata.py +12 -1
- rapidata/api_client/models/participant_by_benchmark.py +3 -9
- rapidata/api_client/models/prompt_metadata.py +12 -1
- rapidata/api_client/models/rapid_model.py +3 -9
- rapidata/api_client/models/report_model.py +3 -9
- rapidata/api_client/models/response_count_filter.py +2 -8
- rapidata/api_client/models/response_count_user_filter_model.py +2 -8
- rapidata/api_client/models/root_filter.py +3 -12
- rapidata/api_client/models/runs_by_leaderboard_result.py +3 -9
- rapidata/api_client/models/simple_workflow_config.py +13 -3
- rapidata/api_client/models/simple_workflow_config_model.py +11 -3
- rapidata/api_client/models/simple_workflow_model.py +13 -3
- rapidata/api_client/models/sort_criterion.py +3 -9
- rapidata/api_client/models/source_url_metadata.py +12 -1
- rapidata/api_client/models/standing_by_leaderboard.py +3 -9
- rapidata/api_client/models/streams_metadata.py +12 -1
- rapidata/api_client/models/text_metadata.py +12 -1
- rapidata/api_client/models/transcription_metadata.py +9 -1
- rapidata/api_client/models/update_should_alert_model.py +1 -1
- rapidata/api_client/models/validation_set_model.py +12 -24
- rapidata/api_client/models/video_duration_metadata.py +12 -1
- rapidata/api_client/models/workflow_aggregation_step_model.py +3 -12
- rapidata/api_client_README.md +2 -4
- rapidata/rapidata_client/__init__.py +1 -1
- rapidata/rapidata_client/benchmark/participant/_participant.py +5 -5
- rapidata/rapidata_client/benchmark/rapidata_benchmark.py +2 -1
- rapidata/rapidata_client/benchmark/rapidata_benchmark_manager.py +10 -2
- rapidata/rapidata_client/config/__init__.py +1 -1
- rapidata/rapidata_client/config/rapidata_config.py +31 -0
- rapidata/rapidata_client/datapoints/__init__.py +10 -2
- rapidata/rapidata_client/datapoints/{datapoint.py → _datapoint.py} +105 -17
- rapidata/rapidata_client/datapoints/assets/_media_asset.py +80 -68
- rapidata/rapidata_client/datapoints/assets/_sessions.py +3 -3
- rapidata/rapidata_client/datapoints/assets/constants.py +7 -0
- rapidata/rapidata_client/exceptions/failed_upload_exception.py +42 -13
- rapidata/rapidata_client/filter/response_count_filter.py +16 -11
- rapidata/rapidata_client/order/_rapidata_dataset.py +8 -8
- rapidata/rapidata_client/order/_rapidata_order_builder.py +87 -8
- rapidata/rapidata_client/order/rapidata_order_manager.py +18 -4
- rapidata/rapidata_client/rapidata_client.py +6 -0
- rapidata/rapidata_client/selection/__init__.py +1 -1
- rapidata/rapidata_client/selection/effort_selection.py +18 -7
- rapidata/rapidata_client/selection/labeling_selection.py +19 -7
- rapidata/rapidata_client/selection/{retrieval_modes.py → rapidata_retrieval_modes.py} +7 -4
- rapidata/rapidata_client/validation/rapidata_validation_set.py +26 -1
- rapidata/rapidata_client/validation/rapids/rapids.py +46 -19
- rapidata/rapidata_client/validation/validation_set_manager.py +41 -4
- rapidata/rapidata_client/workflow/_base_workflow.py +27 -0
- rapidata/rapidata_client/workflow/_classify_workflow.py +25 -9
- rapidata/rapidata_client/workflow/_compare_workflow.py +11 -0
- rapidata/rapidata_client/workflow/_draw_workflow.py +15 -7
- rapidata/rapidata_client/workflow/_evaluation_workflow.py +8 -1
- rapidata/rapidata_client/workflow/_free_text_workflow.py +11 -0
- rapidata/rapidata_client/workflow/_locate_workflow.py +15 -7
- rapidata/rapidata_client/workflow/_ranking_workflow.py +39 -15
- rapidata/rapidata_client/workflow/_select_words_workflow.py +41 -7
- rapidata/rapidata_client/workflow/_timestamp_workflow.py +17 -8
- rapidata/service/openapi_service.py +1 -1
- {rapidata-2.36.1.dist-info → rapidata-2.36.2.dist-info}/METADATA +1 -1
- {rapidata-2.36.1.dist-info → rapidata-2.36.2.dist-info}/RECORD +94 -92
- rapidata/rapidata_client/config/config.py +0 -33
- {rapidata-2.36.1.dist-info → rapidata-2.36.2.dist-info}/LICENSE +0 -0
- {rapidata-2.36.1.dist-info → rapidata-2.36.2.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,95 @@
|
|
|
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
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from rapidata.api_client.models.validation_set_model import ValidationSetModel
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class GetRecommendedValidationSetResult(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
GetRecommendedValidationSetResult
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
validation_sets: List[ValidationSetModel] = Field(alias="validationSets")
|
|
31
|
+
__properties: ClassVar[List[str]] = ["validationSets"]
|
|
32
|
+
|
|
33
|
+
model_config = ConfigDict(
|
|
34
|
+
populate_by_name=True,
|
|
35
|
+
validate_assignment=True,
|
|
36
|
+
protected_namespaces=(),
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def to_str(self) -> str:
|
|
41
|
+
"""Returns the string representation of the model using alias"""
|
|
42
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
43
|
+
|
|
44
|
+
def to_json(self) -> str:
|
|
45
|
+
"""Returns the JSON representation of the model using alias"""
|
|
46
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
47
|
+
return json.dumps(self.to_dict())
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
+
"""Create an instance of GetRecommendedValidationSetResult from a JSON string"""
|
|
52
|
+
return cls.from_dict(json.loads(json_str))
|
|
53
|
+
|
|
54
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
55
|
+
"""Return the dictionary representation of the model using alias.
|
|
56
|
+
|
|
57
|
+
This has the following differences from calling pydantic's
|
|
58
|
+
`self.model_dump(by_alias=True)`:
|
|
59
|
+
|
|
60
|
+
* `None` is only added to the output dict for nullable fields that
|
|
61
|
+
were set at model initialization. Other fields with value `None`
|
|
62
|
+
are ignored.
|
|
63
|
+
"""
|
|
64
|
+
excluded_fields: Set[str] = set([
|
|
65
|
+
])
|
|
66
|
+
|
|
67
|
+
_dict = self.model_dump(
|
|
68
|
+
by_alias=True,
|
|
69
|
+
exclude=excluded_fields,
|
|
70
|
+
exclude_none=True,
|
|
71
|
+
)
|
|
72
|
+
# override the default output from pydantic by calling `to_dict()` of each item in validation_sets (list)
|
|
73
|
+
_items = []
|
|
74
|
+
if self.validation_sets:
|
|
75
|
+
for _item_validation_sets in self.validation_sets:
|
|
76
|
+
if _item_validation_sets:
|
|
77
|
+
_items.append(_item_validation_sets.to_dict())
|
|
78
|
+
_dict['validationSets'] = _items
|
|
79
|
+
return _dict
|
|
80
|
+
|
|
81
|
+
@classmethod
|
|
82
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
83
|
+
"""Create an instance of GetRecommendedValidationSetResult from a dict"""
|
|
84
|
+
if obj is None:
|
|
85
|
+
return None
|
|
86
|
+
|
|
87
|
+
if not isinstance(obj, dict):
|
|
88
|
+
return cls.model_validate(obj)
|
|
89
|
+
|
|
90
|
+
_obj = cls.model_validate({
|
|
91
|
+
"validationSets": [ValidationSetModel.from_dict(_item) for _item in obj["validationSets"]] if obj.get("validationSets") is not None else None
|
|
92
|
+
})
|
|
93
|
+
return _obj
|
|
94
|
+
|
|
95
|
+
|
|
@@ -17,8 +17,9 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
|
21
21
|
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from rapidata.api_client.models.standing_status import StandingStatus
|
|
22
23
|
from typing import Optional, Set
|
|
23
24
|
from typing_extensions import Self
|
|
24
25
|
|
|
@@ -30,17 +31,10 @@ class GetStandingByIdResult(BaseModel):
|
|
|
30
31
|
name: StrictStr
|
|
31
32
|
benchmark_id: StrictStr = Field(alias="benchmarkId")
|
|
32
33
|
dataset_id: StrictStr = Field(alias="datasetId")
|
|
33
|
-
status:
|
|
34
|
+
status: StandingStatus
|
|
34
35
|
is_disabled: StrictBool = Field(alias="isDisabled")
|
|
35
36
|
__properties: ClassVar[List[str]] = ["id", "name", "benchmarkId", "datasetId", "status", "isDisabled"]
|
|
36
37
|
|
|
37
|
-
@field_validator('status')
|
|
38
|
-
def status_validate_enum(cls, value):
|
|
39
|
-
"""Validates the enum"""
|
|
40
|
-
if value not in set(['Created', 'Active', 'Idle']):
|
|
41
|
-
raise ValueError("must be one of enum values ('Created', 'Active', 'Idle')")
|
|
42
|
-
return value
|
|
43
|
-
|
|
44
38
|
model_config = ConfigDict(
|
|
45
39
|
populate_by_name=True,
|
|
46
40
|
validate_assignment=True,
|
|
@@ -17,12 +17,13 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
|
|
21
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
|
|
25
25
|
from rapidata.api_client.models.get_validation_rapids_result_truth import GetValidationRapidsResultTruth
|
|
26
|
+
from rapidata.api_client.models.rapid_state import RapidState
|
|
26
27
|
from typing import Optional, Set
|
|
27
28
|
from typing_extensions import Self
|
|
28
29
|
|
|
@@ -40,16 +41,9 @@ class GetValidationRapidsResult(BaseModel):
|
|
|
40
41
|
invalid_validation_count: StrictInt = Field(alias="invalidValidationCount")
|
|
41
42
|
explanation: Optional[StrictStr] = None
|
|
42
43
|
random_correct_probability: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="randomCorrectProbability")
|
|
43
|
-
state:
|
|
44
|
+
state: RapidState
|
|
44
45
|
__properties: ClassVar[List[str]] = ["id", "type", "asset", "truth", "payload", "metadata", "correctValidationCount", "invalidValidationCount", "explanation", "randomCorrectProbability", "state"]
|
|
45
46
|
|
|
46
|
-
@field_validator('state')
|
|
47
|
-
def state_validate_enum(cls, value):
|
|
48
|
-
"""Validates the enum"""
|
|
49
|
-
if value not in set(['Labeling', 'Paused', 'Incomplete', 'Flagged', 'Done', 'None']):
|
|
50
|
-
raise ValueError("must be one of enum values ('Labeling', 'Paused', 'Incomplete', 'Flagged', 'Done', 'None')")
|
|
51
|
-
return value
|
|
52
|
-
|
|
53
47
|
model_config = ConfigDict(
|
|
54
48
|
populate_by_name=True,
|
|
55
49
|
validate_assignment=True,
|
|
@@ -17,8 +17,9 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Union
|
|
22
|
+
from rapidata.api_client.models.workflow_state import WorkflowState
|
|
22
23
|
from typing import Optional, Set
|
|
23
24
|
from typing_extensions import Self
|
|
24
25
|
|
|
@@ -29,16 +30,9 @@ class GetWorkflowProgressResult(BaseModel):
|
|
|
29
30
|
completion_percentage: Union[StrictFloat, StrictInt] = Field(alias="completionPercentage")
|
|
30
31
|
total: StrictInt
|
|
31
32
|
completed: StrictInt
|
|
32
|
-
state:
|
|
33
|
+
state: WorkflowState
|
|
33
34
|
__properties: ClassVar[List[str]] = ["completionPercentage", "total", "completed", "state"]
|
|
34
35
|
|
|
35
|
-
@field_validator('state')
|
|
36
|
-
def state_validate_enum(cls, value):
|
|
37
|
-
"""Validates the enum"""
|
|
38
|
-
if value not in set(['Created', 'Started', 'Labeling', 'Paused', 'Done', 'Failed']):
|
|
39
|
-
raise ValueError("must be one of enum values ('Created', 'Started', 'Labeling', 'Paused', 'Done', 'Failed')")
|
|
40
|
-
return value
|
|
41
|
-
|
|
42
36
|
model_config = ConfigDict(
|
|
43
37
|
populate_by_name=True,
|
|
44
38
|
validate_assignment=True,
|
|
@@ -17,11 +17,12 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
21
|
from typing import Any, ClassVar, Dict, List
|
|
22
22
|
from rapidata.api_client.models.datapoint_asset import DatapointAsset
|
|
23
23
|
from rapidata.api_client.models.get_validation_rapids_result_payload import GetValidationRapidsResultPayload
|
|
24
24
|
from rapidata.api_client.models.rapid_response import RapidResponse
|
|
25
|
+
from rapidata.api_client.models.rapid_state import RapidState
|
|
25
26
|
from typing import Optional, Set
|
|
26
27
|
from typing_extensions import Self
|
|
27
28
|
|
|
@@ -33,16 +34,9 @@ class GetWorkflowResultsResult(BaseModel):
|
|
|
33
34
|
payload: GetValidationRapidsResultPayload
|
|
34
35
|
asset: DatapointAsset
|
|
35
36
|
responses: List[RapidResponse]
|
|
36
|
-
state:
|
|
37
|
+
state: RapidState
|
|
37
38
|
__properties: ClassVar[List[str]] = ["rapidId", "payload", "asset", "responses", "state"]
|
|
38
39
|
|
|
39
|
-
@field_validator('state')
|
|
40
|
-
def state_validate_enum(cls, value):
|
|
41
|
-
"""Validates the enum"""
|
|
42
|
-
if value not in set(['Labeling', 'Paused', 'Incomplete', 'Flagged', 'Done', 'None']):
|
|
43
|
-
raise ValueError("must be one of enum values ('Labeling', 'Paused', 'Incomplete', 'Flagged', 'Done', 'None')")
|
|
44
|
-
return value
|
|
45
|
-
|
|
46
40
|
model_config = ConfigDict(
|
|
47
41
|
populate_by_name=True,
|
|
48
42
|
validate_assignment=True,
|
|
@@ -29,7 +29,7 @@ class ImageDimensionMetadata(BaseModel):
|
|
|
29
29
|
t: StrictStr = Field(description="Discriminator value for ImageDimensionMetadata", alias="_t")
|
|
30
30
|
height: Optional[StrictInt] = None
|
|
31
31
|
width: Optional[StrictInt] = None
|
|
32
|
-
visibilities: Optional[StrictStr] = None
|
|
32
|
+
visibilities: Optional[List[StrictStr]] = None
|
|
33
33
|
__properties: ClassVar[List[str]] = ["_t", "height", "width", "visibilities"]
|
|
34
34
|
|
|
35
35
|
@field_validator('t')
|
|
@@ -39,6 +39,17 @@ class ImageDimensionMetadata(BaseModel):
|
|
|
39
39
|
raise ValueError("must be one of enum values ('ImageDimensionMetadata')")
|
|
40
40
|
return value
|
|
41
41
|
|
|
42
|
+
@field_validator('visibilities')
|
|
43
|
+
def visibilities_validate_enum(cls, value):
|
|
44
|
+
"""Validates the enum"""
|
|
45
|
+
if value is None:
|
|
46
|
+
return value
|
|
47
|
+
|
|
48
|
+
for i in value:
|
|
49
|
+
if i not in set(['None', 'Users', 'Customers', 'Admins', 'Dashboard', 'All']):
|
|
50
|
+
raise ValueError("each list item must be one of ('None', 'Users', 'Customers', 'Admins', 'Dashboard', 'All')")
|
|
51
|
+
return value
|
|
52
|
+
|
|
42
53
|
model_config = ConfigDict(
|
|
43
54
|
populate_by_name=True,
|
|
44
55
|
validate_assignment=True,
|
|
@@ -19,6 +19,7 @@ import json
|
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from rapidata.api_client.models.retrieval_mode import RetrievalMode
|
|
22
23
|
from typing import Optional, Set
|
|
23
24
|
from typing_extensions import Self
|
|
24
25
|
|
|
@@ -28,7 +29,7 @@ class LabelingSelection(BaseModel):
|
|
|
28
29
|
""" # noqa: E501
|
|
29
30
|
t: StrictStr = Field(description="Discriminator value for LabelingSelection", alias="_t")
|
|
30
31
|
amount: StrictInt
|
|
31
|
-
retrieval_mode: Optional[
|
|
32
|
+
retrieval_mode: Optional[RetrievalMode] = Field(default=None, alias="retrievalMode")
|
|
32
33
|
max_iterations: Optional[StrictInt] = Field(default=None, alias="maxIterations")
|
|
33
34
|
__properties: ClassVar[List[str]] = ["_t", "amount", "retrievalMode", "maxIterations"]
|
|
34
35
|
|
|
@@ -39,16 +40,6 @@ class LabelingSelection(BaseModel):
|
|
|
39
40
|
raise ValueError("must be one of enum values ('LabelingSelection')")
|
|
40
41
|
return value
|
|
41
42
|
|
|
42
|
-
@field_validator('retrieval_mode')
|
|
43
|
-
def retrieval_mode_validate_enum(cls, value):
|
|
44
|
-
"""Validates the enum"""
|
|
45
|
-
if value is None:
|
|
46
|
-
return value
|
|
47
|
-
|
|
48
|
-
if value not in set(['Random', 'Shuffled', 'Sequential']):
|
|
49
|
-
raise ValueError("must be one of enum values ('Random', 'Shuffled', 'Sequential')")
|
|
50
|
-
return value
|
|
51
|
-
|
|
52
43
|
model_config = ConfigDict(
|
|
53
44
|
populate_by_name=True,
|
|
54
45
|
validate_assignment=True,
|
|
@@ -29,7 +29,7 @@ class LocationMetadata(BaseModel):
|
|
|
29
29
|
t: StrictStr = Field(description="Discriminator value for LocationMetadata", alias="_t")
|
|
30
30
|
x: Union[StrictFloat, StrictInt]
|
|
31
31
|
y: Union[StrictFloat, StrictInt]
|
|
32
|
-
visibilities: Optional[StrictStr] = None
|
|
32
|
+
visibilities: Optional[List[StrictStr]] = None
|
|
33
33
|
__properties: ClassVar[List[str]] = ["_t", "x", "y", "visibilities"]
|
|
34
34
|
|
|
35
35
|
@field_validator('t')
|
|
@@ -39,6 +39,17 @@ class LocationMetadata(BaseModel):
|
|
|
39
39
|
raise ValueError("must be one of enum values ('LocationMetadata')")
|
|
40
40
|
return value
|
|
41
41
|
|
|
42
|
+
@field_validator('visibilities')
|
|
43
|
+
def visibilities_validate_enum(cls, value):
|
|
44
|
+
"""Validates the enum"""
|
|
45
|
+
if value is None:
|
|
46
|
+
return value
|
|
47
|
+
|
|
48
|
+
for i in value:
|
|
49
|
+
if i not in set(['None', 'Users', 'Customers', 'Admins', 'Dashboard', 'All']):
|
|
50
|
+
raise ValueError("each list item must be one of ('None', 'Users', 'Customers', 'Admins', 'Dashboard', 'All')")
|
|
51
|
+
return value
|
|
52
|
+
|
|
42
53
|
model_config = ConfigDict(
|
|
43
54
|
populate_by_name=True,
|
|
44
55
|
validate_assignment=True,
|
|
@@ -18,8 +18,9 @@ import re # noqa: F401
|
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
20
|
from datetime import datetime
|
|
21
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from rapidata.api_client.models.order_state import OrderState
|
|
23
24
|
from typing import Optional, Set
|
|
24
25
|
from typing_extensions import Self
|
|
25
26
|
|
|
@@ -31,18 +32,11 @@ class OrderModel(BaseModel):
|
|
|
31
32
|
pipeline_id: StrictStr = Field(alias="pipelineId")
|
|
32
33
|
order_date: Optional[datetime] = Field(default=None, alias="orderDate")
|
|
33
34
|
customer_mail: StrictStr = Field(alias="customerMail")
|
|
34
|
-
state:
|
|
35
|
+
state: OrderState
|
|
35
36
|
order_name: StrictStr = Field(alias="orderName")
|
|
36
37
|
is_public: StrictBool = Field(alias="isPublic")
|
|
37
38
|
__properties: ClassVar[List[str]] = ["id", "pipelineId", "orderDate", "customerMail", "state", "orderName", "isPublic"]
|
|
38
39
|
|
|
39
|
-
@field_validator('state')
|
|
40
|
-
def state_validate_enum(cls, value):
|
|
41
|
-
"""Validates the enum"""
|
|
42
|
-
if value not in set(['Created', 'Preview', 'Submitted', 'ManualReview', 'Processing', 'Paused', 'Completed', 'Cancelled', 'Failed']):
|
|
43
|
-
raise ValueError("must be one of enum values ('Created', 'Preview', 'Submitted', 'ManualReview', 'Processing', 'Paused', 'Completed', 'Cancelled', 'Failed')")
|
|
44
|
-
return value
|
|
45
|
-
|
|
46
40
|
model_config = ConfigDict(
|
|
47
41
|
populate_by_name=True,
|
|
48
42
|
validate_assignment=True,
|
|
@@ -28,7 +28,7 @@ class OriginalFilenameMetadata(BaseModel):
|
|
|
28
28
|
""" # noqa: E501
|
|
29
29
|
t: StrictStr = Field(description="Discriminator value for OriginalFilenameMetadata", alias="_t")
|
|
30
30
|
original_filename: StrictStr = Field(alias="originalFilename")
|
|
31
|
-
visibilities: Optional[StrictStr] = None
|
|
31
|
+
visibilities: Optional[List[StrictStr]] = None
|
|
32
32
|
__properties: ClassVar[List[str]] = ["_t", "originalFilename", "visibilities"]
|
|
33
33
|
|
|
34
34
|
@field_validator('t')
|
|
@@ -38,6 +38,17 @@ class OriginalFilenameMetadata(BaseModel):
|
|
|
38
38
|
raise ValueError("must be one of enum values ('OriginalFilenameMetadata')")
|
|
39
39
|
return value
|
|
40
40
|
|
|
41
|
+
@field_validator('visibilities')
|
|
42
|
+
def visibilities_validate_enum(cls, value):
|
|
43
|
+
"""Validates the enum"""
|
|
44
|
+
if value is None:
|
|
45
|
+
return value
|
|
46
|
+
|
|
47
|
+
for i in value:
|
|
48
|
+
if i not in set(['None', 'Users', 'Customers', 'Admins', 'Dashboard', 'All']):
|
|
49
|
+
raise ValueError("each list item must be one of ('None', 'Users', 'Customers', 'Admins', 'Dashboard', 'All')")
|
|
50
|
+
return value
|
|
51
|
+
|
|
41
52
|
model_config = ConfigDict(
|
|
42
53
|
populate_by_name=True,
|
|
43
54
|
validate_assignment=True,
|
|
@@ -17,8 +17,9 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
21
|
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from rapidata.api_client.models.participant_status import ParticipantStatus
|
|
22
23
|
from typing import Optional, Set
|
|
23
24
|
from typing_extensions import Self
|
|
24
25
|
|
|
@@ -30,16 +31,9 @@ class ParticipantByBenchmark(BaseModel):
|
|
|
30
31
|
name: StrictStr
|
|
31
32
|
benchmark_id: StrictStr = Field(alias="benchmarkId")
|
|
32
33
|
dataset_id: StrictStr = Field(alias="datasetId")
|
|
33
|
-
status:
|
|
34
|
+
status: ParticipantStatus
|
|
34
35
|
__properties: ClassVar[List[str]] = ["id", "name", "benchmarkId", "datasetId", "status"]
|
|
35
36
|
|
|
36
|
-
@field_validator('status')
|
|
37
|
-
def status_validate_enum(cls, value):
|
|
38
|
-
"""Validates the enum"""
|
|
39
|
-
if value not in set(['Created', 'Submitted', 'Disabled']):
|
|
40
|
-
raise ValueError("must be one of enum values ('Created', 'Submitted', 'Disabled')")
|
|
41
|
-
return value
|
|
42
|
-
|
|
43
37
|
model_config = ConfigDict(
|
|
44
38
|
populate_by_name=True,
|
|
45
39
|
validate_assignment=True,
|
|
@@ -28,7 +28,7 @@ class PromptMetadata(BaseModel):
|
|
|
28
28
|
""" # noqa: E501
|
|
29
29
|
t: StrictStr = Field(description="Discriminator value for PromptMetadata", alias="_t")
|
|
30
30
|
prompt: StrictStr
|
|
31
|
-
visibilities: Optional[StrictStr] = None
|
|
31
|
+
visibilities: Optional[List[StrictStr]] = None
|
|
32
32
|
__properties: ClassVar[List[str]] = ["_t", "prompt", "visibilities"]
|
|
33
33
|
|
|
34
34
|
@field_validator('t')
|
|
@@ -38,6 +38,17 @@ class PromptMetadata(BaseModel):
|
|
|
38
38
|
raise ValueError("must be one of enum values ('PromptMetadata')")
|
|
39
39
|
return value
|
|
40
40
|
|
|
41
|
+
@field_validator('visibilities')
|
|
42
|
+
def visibilities_validate_enum(cls, value):
|
|
43
|
+
"""Validates the enum"""
|
|
44
|
+
if value is None:
|
|
45
|
+
return value
|
|
46
|
+
|
|
47
|
+
for i in value:
|
|
48
|
+
if i not in set(['None', 'Users', 'Customers', 'Admins', 'Dashboard', 'All']):
|
|
49
|
+
raise ValueError("each list item must be one of ('None', 'Users', 'Customers', 'Admins', 'Dashboard', 'All')")
|
|
50
|
+
return value
|
|
51
|
+
|
|
41
52
|
model_config = ConfigDict(
|
|
42
53
|
populate_by_name=True,
|
|
43
54
|
validate_assignment=True,
|
|
@@ -18,13 +18,14 @@ import re # noqa: F401
|
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
20
|
from datetime import datetime
|
|
21
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr
|
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
23
23
|
from rapidata.api_client.models.datapoint_asset import DatapointAsset
|
|
24
24
|
from rapidata.api_client.models.file_asset_model_metadata_value import FileAssetModelMetadataValue
|
|
25
25
|
from rapidata.api_client.models.get_validation_rapids_result_payload import GetValidationRapidsResultPayload
|
|
26
26
|
from rapidata.api_client.models.get_validation_rapids_result_truth import GetValidationRapidsResultTruth
|
|
27
27
|
from rapidata.api_client.models.rapid_model_referee import RapidModelReferee
|
|
28
|
+
from rapidata.api_client.models.rapid_state import RapidState
|
|
28
29
|
from typing import Optional, Set
|
|
29
30
|
from typing_extensions import Self
|
|
30
31
|
|
|
@@ -37,7 +38,7 @@ class RapidModel(BaseModel):
|
|
|
37
38
|
referee: RapidModelReferee
|
|
38
39
|
asset: DatapointAsset
|
|
39
40
|
metadata: Dict[str, FileAssetModelMetadataValue]
|
|
40
|
-
state:
|
|
41
|
+
state: RapidState
|
|
41
42
|
has_responses: StrictBool = Field(alias="hasResponses")
|
|
42
43
|
should_accept_incorrect: StrictBool = Field(alias="shouldAcceptIncorrect")
|
|
43
44
|
truth: Optional[GetValidationRapidsResultTruth] = None
|
|
@@ -47,13 +48,6 @@ class RapidModel(BaseModel):
|
|
|
47
48
|
completed_at: Optional[datetime] = Field(default=None, alias="completedAt")
|
|
48
49
|
__properties: ClassVar[List[str]] = ["id", "payload", "referee", "asset", "metadata", "state", "hasResponses", "shouldAcceptIncorrect", "truth", "explanation", "randomCorrectProbability", "key", "completedAt"]
|
|
49
50
|
|
|
50
|
-
@field_validator('state')
|
|
51
|
-
def state_validate_enum(cls, value):
|
|
52
|
-
"""Validates the enum"""
|
|
53
|
-
if value not in set(['Labeling', 'Paused', 'Incomplete', 'Flagged', 'Done', 'None']):
|
|
54
|
-
raise ValueError("must be one of enum values ('Labeling', 'Paused', 'Incomplete', 'Flagged', 'Done', 'None')")
|
|
55
|
-
return value
|
|
56
|
-
|
|
57
51
|
model_config = ConfigDict(
|
|
58
52
|
populate_by_name=True,
|
|
59
53
|
validate_assignment=True,
|
|
@@ -17,8 +17,9 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from rapidata.api_client.models.rapid_issue import RapidIssue
|
|
22
23
|
from typing import Optional, Set
|
|
23
24
|
from typing_extensions import Self
|
|
24
25
|
|
|
@@ -26,19 +27,12 @@ class ReportModel(BaseModel):
|
|
|
26
27
|
"""
|
|
27
28
|
The model for reporting an issue with a rapid.
|
|
28
29
|
""" # noqa: E501
|
|
29
|
-
issue:
|
|
30
|
+
issue: RapidIssue
|
|
30
31
|
message: Optional[StrictStr] = Field(default=None, description="An optional message typed by the user.")
|
|
31
32
|
dump: Optional[StrictStr] = Field(default=None, description="A dump, that the frontend defines and can read again.")
|
|
32
33
|
source: Optional[StrictStr] = Field(default=None, description="An optional identifier where the report originated from.")
|
|
33
34
|
__properties: ClassVar[List[str]] = ["issue", "message", "dump", "source"]
|
|
34
35
|
|
|
35
|
-
@field_validator('issue')
|
|
36
|
-
def issue_validate_enum(cls, value):
|
|
37
|
-
"""Validates the enum"""
|
|
38
|
-
if value not in set(['Other', 'CannotSubmit', 'NoAsset', 'Inappropriate', 'NoCorrectOption', 'WrongLanguage', 'DoNotUnderstand', 'DoNotCare', 'NotSeeOptionsOrMediaDidntLoad', 'MyAnswerIsCorrect']):
|
|
39
|
-
raise ValueError("must be one of enum values ('Other', 'CannotSubmit', 'NoAsset', 'Inappropriate', 'NoCorrectOption', 'WrongLanguage', 'DoNotUnderstand', 'DoNotCare', 'NotSeeOptionsOrMediaDidntLoad', 'MyAnswerIsCorrect')")
|
|
40
|
-
return value
|
|
41
|
-
|
|
42
36
|
model_config = ConfigDict(
|
|
43
37
|
populate_by_name=True,
|
|
44
38
|
validate_assignment=True,
|
|
@@ -19,6 +19,7 @@ import json
|
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from rapidata.api_client.models.comparison_operator import ComparisonOperator
|
|
22
23
|
from typing import Optional, Set
|
|
23
24
|
from typing_extensions import Self
|
|
24
25
|
|
|
@@ -29,7 +30,7 @@ class ResponseCountFilter(BaseModel):
|
|
|
29
30
|
t: StrictStr = Field(description="Discriminator value for ResponseCountFilter", alias="_t")
|
|
30
31
|
response_count: StrictInt = Field(alias="responseCount")
|
|
31
32
|
dimension: StrictStr
|
|
32
|
-
operator:
|
|
33
|
+
operator: ComparisonOperator
|
|
33
34
|
execution_order: Optional[StrictInt] = Field(default=None, alias="executionOrder")
|
|
34
35
|
__properties: ClassVar[List[str]] = ["_t", "responseCount", "dimension", "operator", "executionOrder"]
|
|
35
36
|
|
|
@@ -40,13 +41,6 @@ class ResponseCountFilter(BaseModel):
|
|
|
40
41
|
raise ValueError("must be one of enum values ('ResponseCountFilter')")
|
|
41
42
|
return value
|
|
42
43
|
|
|
43
|
-
@field_validator('operator')
|
|
44
|
-
def operator_validate_enum(cls, value):
|
|
45
|
-
"""Validates the enum"""
|
|
46
|
-
if value not in set(['Equal', 'NotEqual', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual']):
|
|
47
|
-
raise ValueError("must be one of enum values ('Equal', 'NotEqual', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual')")
|
|
48
|
-
return value
|
|
49
|
-
|
|
50
44
|
model_config = ConfigDict(
|
|
51
45
|
populate_by_name=True,
|
|
52
46
|
validate_assignment=True,
|
|
@@ -19,6 +19,7 @@ import json
|
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
|
|
21
21
|
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from rapidata.api_client.models.comparison_operator import ComparisonOperator
|
|
22
23
|
from typing import Optional, Set
|
|
23
24
|
from typing_extensions import Self
|
|
24
25
|
|
|
@@ -29,7 +30,7 @@ class ResponseCountUserFilterModel(BaseModel):
|
|
|
29
30
|
t: StrictStr = Field(description="Discriminator value for ResponseCountFilter", alias="_t")
|
|
30
31
|
response_count: StrictInt = Field(alias="responseCount")
|
|
31
32
|
dimension: StrictStr
|
|
32
|
-
operator:
|
|
33
|
+
operator: ComparisonOperator
|
|
33
34
|
__properties: ClassVar[List[str]] = ["_t", "responseCount", "dimension", "operator"]
|
|
34
35
|
|
|
35
36
|
@field_validator('t')
|
|
@@ -39,13 +40,6 @@ class ResponseCountUserFilterModel(BaseModel):
|
|
|
39
40
|
raise ValueError("must be one of enum values ('ResponseCountFilter')")
|
|
40
41
|
return value
|
|
41
42
|
|
|
42
|
-
@field_validator('operator')
|
|
43
|
-
def operator_validate_enum(cls, value):
|
|
44
|
-
"""Validates the enum"""
|
|
45
|
-
if value not in set(['Equal', 'NotEqual', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual']):
|
|
46
|
-
raise ValueError("must be one of enum values ('Equal', 'NotEqual', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual')")
|
|
47
|
-
return value
|
|
48
|
-
|
|
49
43
|
model_config = ConfigDict(
|
|
50
44
|
populate_by_name=True,
|
|
51
45
|
validate_assignment=True,
|
|
@@ -17,9 +17,10 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
from pydantic import BaseModel, ConfigDict
|
|
20
|
+
from pydantic import BaseModel, ConfigDict
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
22
|
from rapidata.api_client.models.filter import Filter
|
|
23
|
+
from rapidata.api_client.models.logic_operator import LogicOperator
|
|
23
24
|
from typing import Optional, Set
|
|
24
25
|
from typing_extensions import Self
|
|
25
26
|
|
|
@@ -28,19 +29,9 @@ class RootFilter(BaseModel):
|
|
|
28
29
|
RootFilter
|
|
29
30
|
""" # noqa: E501
|
|
30
31
|
filters: Optional[List[Filter]] = None
|
|
31
|
-
logic: Optional[
|
|
32
|
+
logic: Optional[LogicOperator] = None
|
|
32
33
|
__properties: ClassVar[List[str]] = ["filters", "logic"]
|
|
33
34
|
|
|
34
|
-
@field_validator('logic')
|
|
35
|
-
def logic_validate_enum(cls, value):
|
|
36
|
-
"""Validates the enum"""
|
|
37
|
-
if value is None:
|
|
38
|
-
return value
|
|
39
|
-
|
|
40
|
-
if value not in set(['And', 'Or', 'Not']):
|
|
41
|
-
raise ValueError("must be one of enum values ('And', 'Or', 'Not')")
|
|
42
|
-
return value
|
|
43
|
-
|
|
44
35
|
model_config = ConfigDict(
|
|
45
36
|
populate_by_name=True,
|
|
46
37
|
validate_assignment=True,
|
|
@@ -18,8 +18,9 @@ import re # noqa: F401
|
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
20
|
from datetime import datetime
|
|
21
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from rapidata.api_client.models.run_status import RunStatus
|
|
23
24
|
from typing import Optional, Set
|
|
24
25
|
from typing_extensions import Self
|
|
25
26
|
|
|
@@ -29,19 +30,12 @@ class RunsByLeaderboardResult(BaseModel):
|
|
|
29
30
|
""" # noqa: E501
|
|
30
31
|
id: StrictStr
|
|
31
32
|
name: StrictStr
|
|
32
|
-
status:
|
|
33
|
+
status: RunStatus
|
|
33
34
|
created_at: datetime = Field(alias="createdAt")
|
|
34
35
|
owner_mail: StrictStr = Field(alias="ownerMail")
|
|
35
36
|
order_id: Optional[StrictStr] = Field(default=None, alias="orderId")
|
|
36
37
|
__properties: ClassVar[List[str]] = ["id", "name", "status", "createdAt", "ownerMail", "orderId"]
|
|
37
38
|
|
|
38
|
-
@field_validator('status')
|
|
39
|
-
def status_validate_enum(cls, value):
|
|
40
|
-
"""Validates the enum"""
|
|
41
|
-
if value not in set(['Queued', 'Running', 'Completed', 'Failed']):
|
|
42
|
-
raise ValueError("must be one of enum values ('Queued', 'Running', 'Completed', 'Failed')")
|
|
43
|
-
return value
|
|
44
|
-
|
|
45
39
|
model_config = ConfigDict(
|
|
46
40
|
populate_by_name=True,
|
|
47
41
|
validate_assignment=True,
|