rapidata 2.38.0__py3-none-any.whl → 2.39.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 +1 -1
- rapidata/api_client/__init__.py +4 -5
- rapidata/api_client/api/benchmark_api.py +289 -3
- rapidata/api_client/api/leaderboard_api.py +35 -1
- rapidata/api_client/api/participant_api.py +289 -3
- rapidata/api_client/api/validation_set_api.py +119 -400
- rapidata/api_client/models/__init__.py +4 -5
- rapidata/api_client/models/ab_test_selection_a_inner.py +1 -1
- rapidata/api_client/models/compare_workflow_model1.py +1 -8
- rapidata/api_client/models/conditional_validation_selection.py +4 -9
- rapidata/api_client/models/confidence_interval.py +98 -0
- rapidata/api_client/models/create_simple_pipeline_model_pipeline_steps_inner.py +8 -22
- rapidata/api_client/models/get_standing_by_id_result.py +7 -2
- rapidata/api_client/models/get_validation_set_by_id_result.py +4 -2
- rapidata/api_client/models/simple_workflow_model1.py +1 -8
- rapidata/api_client/models/standing_by_leaderboard.py +10 -4
- rapidata/api_client/models/update_benchmark_model.py +87 -0
- rapidata/api_client/models/update_participant_model.py +87 -0
- rapidata/api_client/models/update_validation_set_model.py +93 -0
- rapidata/api_client/models/validation_chance.py +20 -3
- rapidata/api_client/models/validation_set_model.py +5 -42
- rapidata/api_client_README.md +7 -7
- rapidata/rapidata_client/benchmark/rapidata_benchmark.py +53 -22
- rapidata/rapidata_client/benchmark/rapidata_benchmark_manager.py +60 -23
- rapidata/rapidata_client/config/logging_config.py +1 -1
- rapidata/rapidata_client/config/order_config.py +1 -1
- rapidata/rapidata_client/config/rapidata_config.py +1 -1
- rapidata/rapidata_client/config/upload_config.py +1 -1
- rapidata/rapidata_client/datapoints/assets/__init__.py +1 -0
- rapidata/rapidata_client/datapoints/assets/_base_asset.py +2 -0
- rapidata/rapidata_client/datapoints/assets/_text_asset.py +2 -2
- rapidata/rapidata_client/datapoints/assets/data_type_enum.py +1 -1
- rapidata/rapidata_client/datapoints/metadata/_media_asset_metadata.py +9 -8
- rapidata/rapidata_client/datapoints/metadata/_prompt_metadata.py +1 -2
- rapidata/rapidata_client/filter/models/age_group.py +4 -4
- rapidata/rapidata_client/filter/models/gender.py +4 -2
- rapidata/rapidata_client/filter/rapidata_filters.py +12 -9
- rapidata/rapidata_client/referee/__init__.py +1 -1
- rapidata/rapidata_client/referee/_base_referee.py +3 -1
- rapidata/rapidata_client/referee/_early_stopping_referee.py +2 -2
- rapidata/rapidata_client/selection/ab_test_selection.py +7 -3
- rapidata/rapidata_client/selection/capped_selection.py +2 -2
- rapidata/rapidata_client/selection/conditional_validation_selection.py +12 -6
- rapidata/rapidata_client/selection/demographic_selection.py +9 -6
- rapidata/rapidata_client/selection/rapidata_selections.py +11 -8
- rapidata/rapidata_client/selection/shuffling_selection.py +5 -5
- rapidata/rapidata_client/selection/validation_selection.py +9 -5
- rapidata/rapidata_client/settings/allow_neither_both.py +1 -0
- rapidata/rapidata_client/settings/custom_setting.py +3 -2
- rapidata/rapidata_client/settings/models/translation_behaviour_options.py +3 -2
- rapidata/rapidata_client/settings/no_shuffle.py +4 -2
- rapidata/rapidata_client/settings/play_video_until_the_end.py +7 -4
- rapidata/rapidata_client/settings/rapidata_settings.py +4 -3
- rapidata/rapidata_client/settings/translation_behaviour.py +7 -5
- rapidata/rapidata_client/validation/rapidata_validation_set.py +7 -5
- rapidata/rapidata_client/validation/rapids/box.py +3 -1
- rapidata/rapidata_client/validation/rapids/rapids_manager.py +174 -141
- rapidata/rapidata_client/workflow/__init__.py +1 -1
- rapidata/service/__init__.py +1 -1
- rapidata/service/local_file_service.py +9 -8
- {rapidata-2.38.0.dist-info → rapidata-2.39.0.dist-info}/METADATA +1 -1
- {rapidata-2.38.0.dist-info → rapidata-2.39.0.dist-info}/RECORD +64 -60
- {rapidata-2.38.0.dist-info → rapidata-2.39.0.dist-info}/LICENSE +0 -0
- {rapidata-2.38.0.dist-info → rapidata-2.39.0.dist-info}/WHEEL +0 -0
|
@@ -55,7 +55,6 @@ from rapidata.api_client.models.campaign_user_filter_model import CampaignUserFi
|
|
|
55
55
|
from rapidata.api_client.models.capped_selection import CappedSelection
|
|
56
56
|
from rapidata.api_client.models.change_boost_model import ChangeBoostModel
|
|
57
57
|
from rapidata.api_client.models.classification_metadata import ClassificationMetadata
|
|
58
|
-
from rapidata.api_client.models.classification_metadata_filter_config import ClassificationMetadataFilterConfig
|
|
59
58
|
from rapidata.api_client.models.classification_metadata_model import ClassificationMetadataModel
|
|
60
59
|
from rapidata.api_client.models.classify_payload import ClassifyPayload
|
|
61
60
|
from rapidata.api_client.models.client_model import ClientModel
|
|
@@ -80,8 +79,8 @@ from rapidata.api_client.models.compare_workflow_model1_referee import CompareWo
|
|
|
80
79
|
from rapidata.api_client.models.compare_workflow_model_pair_maker_config import CompareWorkflowModelPairMakerConfig
|
|
81
80
|
from rapidata.api_client.models.comparison_operator import ComparisonOperator
|
|
82
81
|
from rapidata.api_client.models.conditional_validation_selection import ConditionalValidationSelection
|
|
82
|
+
from rapidata.api_client.models.confidence_interval import ConfidenceInterval
|
|
83
83
|
from rapidata.api_client.models.coordinate import Coordinate
|
|
84
|
-
from rapidata.api_client.models.count_classification_metadata_filter_config import CountClassificationMetadataFilterConfig
|
|
85
84
|
from rapidata.api_client.models.count_metadata import CountMetadata
|
|
86
85
|
from rapidata.api_client.models.count_metadata_model import CountMetadataModel
|
|
87
86
|
from rapidata.api_client.models.country_filter import CountryFilter
|
|
@@ -225,7 +224,6 @@ from rapidata.api_client.models.locate_payload import LocatePayload
|
|
|
225
224
|
from rapidata.api_client.models.locate_rapid_blueprint import LocateRapidBlueprint
|
|
226
225
|
from rapidata.api_client.models.locate_result import LocateResult
|
|
227
226
|
from rapidata.api_client.models.location_metadata import LocationMetadata
|
|
228
|
-
from rapidata.api_client.models.location_metadata_exists_filter_config import LocationMetadataExistsFilterConfig
|
|
229
227
|
from rapidata.api_client.models.location_metadata_model import LocationMetadataModel
|
|
230
228
|
from rapidata.api_client.models.logic_operator import LogicOperator
|
|
231
229
|
from rapidata.api_client.models.multi_asset import MultiAsset
|
|
@@ -375,6 +373,7 @@ from rapidata.api_client.models.transcription_word import TranscriptionWord
|
|
|
375
373
|
from rapidata.api_client.models.translated_prompt_metadata_model import TranslatedPromptMetadataModel
|
|
376
374
|
from rapidata.api_client.models.translated_string import TranslatedString
|
|
377
375
|
from rapidata.api_client.models.unlock_order_result import UnlockOrderResult
|
|
376
|
+
from rapidata.api_client.models.update_benchmark_model import UpdateBenchmarkModel
|
|
378
377
|
from rapidata.api_client.models.update_benchmark_name_model import UpdateBenchmarkNameModel
|
|
379
378
|
from rapidata.api_client.models.update_dataset_name_model import UpdateDatasetNameModel
|
|
380
379
|
from rapidata.api_client.models.update_dimensions_model import UpdateDimensionsModel
|
|
@@ -382,11 +381,13 @@ from rapidata.api_client.models.update_leaderboard_model import UpdateLeaderboar
|
|
|
382
381
|
from rapidata.api_client.models.update_leaderboard_name_model import UpdateLeaderboardNameModel
|
|
383
382
|
from rapidata.api_client.models.update_leaderboard_response_config_model import UpdateLeaderboardResponseConfigModel
|
|
384
383
|
from rapidata.api_client.models.update_order_name_model import UpdateOrderNameModel
|
|
384
|
+
from rapidata.api_client.models.update_participant_model import UpdateParticipantModel
|
|
385
385
|
from rapidata.api_client.models.update_participant_name_model import UpdateParticipantNameModel
|
|
386
386
|
from rapidata.api_client.models.update_prompt_tags_model import UpdatePromptTagsModel
|
|
387
387
|
from rapidata.api_client.models.update_should_alert_model import UpdateShouldAlertModel
|
|
388
388
|
from rapidata.api_client.models.update_validation_rapid_model import UpdateValidationRapidModel
|
|
389
389
|
from rapidata.api_client.models.update_validation_rapid_model_truth import UpdateValidationRapidModelTruth
|
|
390
|
+
from rapidata.api_client.models.update_validation_set_model import UpdateValidationSetModel
|
|
390
391
|
from rapidata.api_client.models.upload_coco_result import UploadCocoResult
|
|
391
392
|
from rapidata.api_client.models.upload_from_s3_result import UploadFromS3Result
|
|
392
393
|
from rapidata.api_client.models.url_asset_input import UrlAssetInput
|
|
@@ -407,7 +408,5 @@ from rapidata.api_client.models.workflow_artifact_model import WorkflowArtifactM
|
|
|
407
408
|
from rapidata.api_client.models.workflow_config_artifact_model import WorkflowConfigArtifactModel
|
|
408
409
|
from rapidata.api_client.models.workflow_config_artifact_model_workflow_config import WorkflowConfigArtifactModelWorkflowConfig
|
|
409
410
|
from rapidata.api_client.models.workflow_labeling_step_model import WorkflowLabelingStepModel
|
|
410
|
-
from rapidata.api_client.models.workflow_split_model import WorkflowSplitModel
|
|
411
|
-
from rapidata.api_client.models.workflow_split_model_filter_configs_inner import WorkflowSplitModelFilterConfigsInner
|
|
412
411
|
from rapidata.api_client.models.workflow_state import WorkflowState
|
|
413
412
|
from rapidata.api_client.models.zip_entry_file_wrapper import ZipEntryFileWrapper
|
|
@@ -17,7 +17,6 @@ import json
|
|
|
17
17
|
import pprint
|
|
18
18
|
from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
|
|
19
19
|
from typing import Any, List, Optional
|
|
20
|
-
from rapidata.api_client.models.conditional_validation_selection import ConditionalValidationSelection
|
|
21
20
|
from rapidata.api_client.models.demographic_selection import DemographicSelection
|
|
22
21
|
from rapidata.api_client.models.effort_capped_selection import EffortCappedSelection
|
|
23
22
|
from rapidata.api_client.models.labeling_selection import LabelingSelection
|
|
@@ -234,6 +233,7 @@ class AbTestSelectionAInner(BaseModel):
|
|
|
234
233
|
|
|
235
234
|
from rapidata.api_client.models.ab_test_selection import AbTestSelection
|
|
236
235
|
from rapidata.api_client.models.capped_selection import CappedSelection
|
|
236
|
+
from rapidata.api_client.models.conditional_validation_selection import ConditionalValidationSelection
|
|
237
237
|
from rapidata.api_client.models.shuffling_selection import ShufflingSelection
|
|
238
238
|
# TODO: Rewrite to not use raise_errors
|
|
239
239
|
AbTestSelectionAInner.model_rebuild(raise_errors=False)
|
|
@@ -31,7 +31,6 @@ class CompareWorkflowModel1(BaseModel):
|
|
|
31
31
|
""" # noqa: E501
|
|
32
32
|
t: StrictStr = Field(description="Discriminator value for CompareWorkflowModel", alias="_t")
|
|
33
33
|
id: StrictStr
|
|
34
|
-
dataset_id: Optional[StrictStr] = Field(default=None, alias="datasetId")
|
|
35
34
|
referee: CompareWorkflowModel1Referee
|
|
36
35
|
pair_maker_information: CompareWorkflowModel1PairMakerInformation = Field(alias="pairMakerInformation")
|
|
37
36
|
state: StrictStr
|
|
@@ -39,7 +38,7 @@ class CompareWorkflowModel1(BaseModel):
|
|
|
39
38
|
name: StrictStr
|
|
40
39
|
owner_mail: Optional[StrictStr] = Field(default=None, alias="ownerMail")
|
|
41
40
|
elo_config: EloConfig = Field(alias="eloConfig")
|
|
42
|
-
__properties: ClassVar[List[str]] = ["_t", "id", "
|
|
41
|
+
__properties: ClassVar[List[str]] = ["_t", "id", "referee", "pairMakerInformation", "state", "criteria", "name", "ownerMail", "eloConfig"]
|
|
43
42
|
|
|
44
43
|
@field_validator('t')
|
|
45
44
|
def t_validate_enum(cls, value):
|
|
@@ -96,11 +95,6 @@ class CompareWorkflowModel1(BaseModel):
|
|
|
96
95
|
# override the default output from pydantic by calling `to_dict()` of elo_config
|
|
97
96
|
if self.elo_config:
|
|
98
97
|
_dict['eloConfig'] = self.elo_config.to_dict()
|
|
99
|
-
# set to None if dataset_id (nullable) is None
|
|
100
|
-
# and model_fields_set contains the field
|
|
101
|
-
if self.dataset_id is None and "dataset_id" in self.model_fields_set:
|
|
102
|
-
_dict['datasetId'] = None
|
|
103
|
-
|
|
104
98
|
# set to None if owner_mail (nullable) is None
|
|
105
99
|
# and model_fields_set contains the field
|
|
106
100
|
if self.owner_mail is None and "owner_mail" in self.model_fields_set:
|
|
@@ -120,7 +114,6 @@ class CompareWorkflowModel1(BaseModel):
|
|
|
120
114
|
_obj = cls.model_validate({
|
|
121
115
|
"_t": obj.get("_t") if obj.get("_t") is not None else 'CompareWorkflowModel',
|
|
122
116
|
"id": obj.get("id"),
|
|
123
|
-
"datasetId": obj.get("datasetId"),
|
|
124
117
|
"referee": CompareWorkflowModel1Referee.from_dict(obj["referee"]) if obj.get("referee") is not None else None,
|
|
125
118
|
"pairMakerInformation": CompareWorkflowModel1PairMakerInformation.from_dict(obj["pairMakerInformation"]) if obj.get("pairMakerInformation") is not None else None,
|
|
126
119
|
"state": obj.get("state"),
|
|
@@ -19,7 +19,6 @@ import json
|
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
-
from rapidata.api_client.models.validation_chance import ValidationChance
|
|
23
22
|
from typing import Optional, Set
|
|
24
23
|
from typing_extensions import Self
|
|
25
24
|
|
|
@@ -30,9 +29,8 @@ class ConditionalValidationSelection(BaseModel):
|
|
|
30
29
|
t: StrictStr = Field(description="Discriminator value for ConditionalValidationSelection", alias="_t")
|
|
31
30
|
validation_set_id: StrictStr = Field(alias="validationSetId")
|
|
32
31
|
validation_chances: List[ValidationChance] = Field(alias="validationChances")
|
|
33
|
-
dimension: Optional[StrictStr] = None
|
|
34
32
|
dimensions: Optional[List[StrictStr]] = None
|
|
35
|
-
__properties: ClassVar[List[str]] = ["_t", "validationSetId", "validationChances", "
|
|
33
|
+
__properties: ClassVar[List[str]] = ["_t", "validationSetId", "validationChances", "dimensions"]
|
|
36
34
|
|
|
37
35
|
@field_validator('t')
|
|
38
36
|
def t_validate_enum(cls, value):
|
|
@@ -87,11 +85,6 @@ class ConditionalValidationSelection(BaseModel):
|
|
|
87
85
|
if _item_validation_chances:
|
|
88
86
|
_items.append(_item_validation_chances.to_dict())
|
|
89
87
|
_dict['validationChances'] = _items
|
|
90
|
-
# set to None if dimension (nullable) is None
|
|
91
|
-
# and model_fields_set contains the field
|
|
92
|
-
if self.dimension is None and "dimension" in self.model_fields_set:
|
|
93
|
-
_dict['dimension'] = None
|
|
94
|
-
|
|
95
88
|
return _dict
|
|
96
89
|
|
|
97
90
|
@classmethod
|
|
@@ -107,9 +100,11 @@ class ConditionalValidationSelection(BaseModel):
|
|
|
107
100
|
"_t": obj.get("_t") if obj.get("_t") is not None else 'ConditionalValidationSelection',
|
|
108
101
|
"validationSetId": obj.get("validationSetId"),
|
|
109
102
|
"validationChances": [ValidationChance.from_dict(_item) for _item in obj["validationChances"]] if obj.get("validationChances") is not None else None,
|
|
110
|
-
"dimension": obj.get("dimension"),
|
|
111
103
|
"dimensions": obj.get("dimensions")
|
|
112
104
|
})
|
|
113
105
|
return _obj
|
|
114
106
|
|
|
107
|
+
from rapidata.api_client.models.validation_chance import ValidationChance
|
|
108
|
+
# TODO: Rewrite to not use raise_errors
|
|
109
|
+
ConditionalValidationSelection.model_rebuild(raise_errors=False)
|
|
115
110
|
|
|
@@ -0,0 +1,98 @@
|
|
|
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, StrictFloat, StrictInt, StrictStr, field_validator
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Union
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class ConfidenceInterval(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
ConfidenceInterval
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
t: StrictStr = Field(description="Discriminator value for ConfidenceInterval", alias="_t")
|
|
30
|
+
lower_offset: Union[StrictFloat, StrictInt] = Field(alias="lowerOffset")
|
|
31
|
+
upper_offset: Union[StrictFloat, StrictInt] = Field(alias="upperOffset")
|
|
32
|
+
__properties: ClassVar[List[str]] = ["_t", "lowerOffset", "upperOffset"]
|
|
33
|
+
|
|
34
|
+
@field_validator('t')
|
|
35
|
+
def t_validate_enum(cls, value):
|
|
36
|
+
"""Validates the enum"""
|
|
37
|
+
if value not in set(['ConfidenceInterval']):
|
|
38
|
+
raise ValueError("must be one of enum values ('ConfidenceInterval')")
|
|
39
|
+
return value
|
|
40
|
+
|
|
41
|
+
model_config = ConfigDict(
|
|
42
|
+
populate_by_name=True,
|
|
43
|
+
validate_assignment=True,
|
|
44
|
+
protected_namespaces=(),
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def to_str(self) -> str:
|
|
49
|
+
"""Returns the string representation of the model using alias"""
|
|
50
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
51
|
+
|
|
52
|
+
def to_json(self) -> str:
|
|
53
|
+
"""Returns the JSON representation of the model using alias"""
|
|
54
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
55
|
+
return json.dumps(self.to_dict())
|
|
56
|
+
|
|
57
|
+
@classmethod
|
|
58
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
59
|
+
"""Create an instance of ConfidenceInterval from a JSON string"""
|
|
60
|
+
return cls.from_dict(json.loads(json_str))
|
|
61
|
+
|
|
62
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
63
|
+
"""Return the dictionary representation of the model using alias.
|
|
64
|
+
|
|
65
|
+
This has the following differences from calling pydantic's
|
|
66
|
+
`self.model_dump(by_alias=True)`:
|
|
67
|
+
|
|
68
|
+
* `None` is only added to the output dict for nullable fields that
|
|
69
|
+
were set at model initialization. Other fields with value `None`
|
|
70
|
+
are ignored.
|
|
71
|
+
"""
|
|
72
|
+
excluded_fields: Set[str] = set([
|
|
73
|
+
])
|
|
74
|
+
|
|
75
|
+
_dict = self.model_dump(
|
|
76
|
+
by_alias=True,
|
|
77
|
+
exclude=excluded_fields,
|
|
78
|
+
exclude_none=True,
|
|
79
|
+
)
|
|
80
|
+
return _dict
|
|
81
|
+
|
|
82
|
+
@classmethod
|
|
83
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
84
|
+
"""Create an instance of ConfidenceInterval from a dict"""
|
|
85
|
+
if obj is None:
|
|
86
|
+
return None
|
|
87
|
+
|
|
88
|
+
if not isinstance(obj, dict):
|
|
89
|
+
return cls.model_validate(obj)
|
|
90
|
+
|
|
91
|
+
_obj = cls.model_validate({
|
|
92
|
+
"_t": obj.get("_t") if obj.get("_t") is not None else 'ConfidenceInterval',
|
|
93
|
+
"lowerOffset": obj.get("lowerOffset"),
|
|
94
|
+
"upperOffset": obj.get("upperOffset")
|
|
95
|
+
})
|
|
96
|
+
return _obj
|
|
97
|
+
|
|
98
|
+
|
|
@@ -21,12 +21,11 @@ from rapidata.api_client.models.dataset_evaluation_step_model import DatasetEval
|
|
|
21
21
|
from rapidata.api_client.models.send_completion_mail_step_model import SendCompletionMailStepModel
|
|
22
22
|
from rapidata.api_client.models.workflow_aggregation_step_model import WorkflowAggregationStepModel
|
|
23
23
|
from rapidata.api_client.models.workflow_labeling_step_model import WorkflowLabelingStepModel
|
|
24
|
-
from rapidata.api_client.models.workflow_split_model import WorkflowSplitModel
|
|
25
24
|
from pydantic import StrictStr, Field
|
|
26
25
|
from typing import Union, List, Set, Optional, Dict
|
|
27
26
|
from typing_extensions import Literal, Self
|
|
28
27
|
|
|
29
|
-
CREATESIMPLEPIPELINEMODELPIPELINESTEPSINNER_ONE_OF_SCHEMAS = ["DatasetEvaluationStepModel", "SendCompletionMailStepModel", "WorkflowAggregationStepModel", "WorkflowLabelingStepModel"
|
|
28
|
+
CREATESIMPLEPIPELINEMODELPIPELINESTEPSINNER_ONE_OF_SCHEMAS = ["DatasetEvaluationStepModel", "SendCompletionMailStepModel", "WorkflowAggregationStepModel", "WorkflowLabelingStepModel"]
|
|
30
29
|
|
|
31
30
|
class CreateSimplePipelineModelPipelineStepsInner(BaseModel):
|
|
32
31
|
"""
|
|
@@ -40,10 +39,8 @@ class CreateSimplePipelineModelPipelineStepsInner(BaseModel):
|
|
|
40
39
|
oneof_schema_3_validator: Optional[WorkflowAggregationStepModel] = None
|
|
41
40
|
# data type: WorkflowLabelingStepModel
|
|
42
41
|
oneof_schema_4_validator: Optional[WorkflowLabelingStepModel] = None
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
actual_instance: Optional[Union[DatasetEvaluationStepModel, SendCompletionMailStepModel, WorkflowAggregationStepModel, WorkflowLabelingStepModel, WorkflowSplitModel]] = None
|
|
46
|
-
one_of_schemas: Set[str] = { "DatasetEvaluationStepModel", "SendCompletionMailStepModel", "WorkflowAggregationStepModel", "WorkflowLabelingStepModel", "WorkflowSplitModel" }
|
|
42
|
+
actual_instance: Optional[Union[DatasetEvaluationStepModel, SendCompletionMailStepModel, WorkflowAggregationStepModel, WorkflowLabelingStepModel]] = None
|
|
43
|
+
one_of_schemas: Set[str] = { "DatasetEvaluationStepModel", "SendCompletionMailStepModel", "WorkflowAggregationStepModel", "WorkflowLabelingStepModel" }
|
|
47
44
|
|
|
48
45
|
model_config = ConfigDict(
|
|
49
46
|
validate_assignment=True,
|
|
@@ -89,17 +86,12 @@ class CreateSimplePipelineModelPipelineStepsInner(BaseModel):
|
|
|
89
86
|
error_messages.append(f"Error! Input type `{type(v)}` is not `WorkflowLabelingStepModel`")
|
|
90
87
|
else:
|
|
91
88
|
match += 1
|
|
92
|
-
# validate data type: WorkflowSplitModel
|
|
93
|
-
if not isinstance(v, WorkflowSplitModel):
|
|
94
|
-
error_messages.append(f"Error! Input type `{type(v)}` is not `WorkflowSplitModel`")
|
|
95
|
-
else:
|
|
96
|
-
match += 1
|
|
97
89
|
if match > 1:
|
|
98
90
|
# more than 1 match
|
|
99
|
-
raise ValueError("Multiple matches found when setting `actual_instance` in CreateSimplePipelineModelPipelineStepsInner with oneOf schemas: DatasetEvaluationStepModel, SendCompletionMailStepModel, WorkflowAggregationStepModel, WorkflowLabelingStepModel
|
|
91
|
+
raise ValueError("Multiple matches found when setting `actual_instance` in CreateSimplePipelineModelPipelineStepsInner with oneOf schemas: DatasetEvaluationStepModel, SendCompletionMailStepModel, WorkflowAggregationStepModel, WorkflowLabelingStepModel. Details: " + ", ".join(error_messages))
|
|
100
92
|
elif match == 0:
|
|
101
93
|
# no match
|
|
102
|
-
raise ValueError("No match found when setting `actual_instance` in CreateSimplePipelineModelPipelineStepsInner with oneOf schemas: DatasetEvaluationStepModel, SendCompletionMailStepModel, WorkflowAggregationStepModel, WorkflowLabelingStepModel
|
|
94
|
+
raise ValueError("No match found when setting `actual_instance` in CreateSimplePipelineModelPipelineStepsInner with oneOf schemas: DatasetEvaluationStepModel, SendCompletionMailStepModel, WorkflowAggregationStepModel, WorkflowLabelingStepModel. Details: " + ", ".join(error_messages))
|
|
103
95
|
else:
|
|
104
96
|
return v
|
|
105
97
|
|
|
@@ -138,19 +130,13 @@ class CreateSimplePipelineModelPipelineStepsInner(BaseModel):
|
|
|
138
130
|
match += 1
|
|
139
131
|
except (ValidationError, ValueError) as e:
|
|
140
132
|
error_messages.append(str(e))
|
|
141
|
-
# deserialize data into WorkflowSplitModel
|
|
142
|
-
try:
|
|
143
|
-
instance.actual_instance = WorkflowSplitModel.from_json(json_str)
|
|
144
|
-
match += 1
|
|
145
|
-
except (ValidationError, ValueError) as e:
|
|
146
|
-
error_messages.append(str(e))
|
|
147
133
|
|
|
148
134
|
if match > 1:
|
|
149
135
|
# more than 1 match
|
|
150
|
-
raise ValueError("Multiple matches found when deserializing the JSON string into CreateSimplePipelineModelPipelineStepsInner with oneOf schemas: DatasetEvaluationStepModel, SendCompletionMailStepModel, WorkflowAggregationStepModel, WorkflowLabelingStepModel
|
|
136
|
+
raise ValueError("Multiple matches found when deserializing the JSON string into CreateSimplePipelineModelPipelineStepsInner with oneOf schemas: DatasetEvaluationStepModel, SendCompletionMailStepModel, WorkflowAggregationStepModel, WorkflowLabelingStepModel. Details: " + ", ".join(error_messages))
|
|
151
137
|
elif match == 0:
|
|
152
138
|
# no match
|
|
153
|
-
raise ValueError("No match found when deserializing the JSON string into CreateSimplePipelineModelPipelineStepsInner with oneOf schemas: DatasetEvaluationStepModel, SendCompletionMailStepModel, WorkflowAggregationStepModel, WorkflowLabelingStepModel
|
|
139
|
+
raise ValueError("No match found when deserializing the JSON string into CreateSimplePipelineModelPipelineStepsInner with oneOf schemas: DatasetEvaluationStepModel, SendCompletionMailStepModel, WorkflowAggregationStepModel, WorkflowLabelingStepModel. Details: " + ", ".join(error_messages))
|
|
154
140
|
else:
|
|
155
141
|
return instance
|
|
156
142
|
|
|
@@ -164,7 +150,7 @@ class CreateSimplePipelineModelPipelineStepsInner(BaseModel):
|
|
|
164
150
|
else:
|
|
165
151
|
return json.dumps(self.actual_instance)
|
|
166
152
|
|
|
167
|
-
def to_dict(self) -> Optional[Union[Dict[str, Any], DatasetEvaluationStepModel, SendCompletionMailStepModel, WorkflowAggregationStepModel, WorkflowLabelingStepModel
|
|
153
|
+
def to_dict(self) -> Optional[Union[Dict[str, Any], DatasetEvaluationStepModel, SendCompletionMailStepModel, WorkflowAggregationStepModel, WorkflowLabelingStepModel]]:
|
|
168
154
|
"""Returns the dict representation of the actual instance"""
|
|
169
155
|
if self.actual_instance is None:
|
|
170
156
|
return None
|
|
@@ -18,7 +18,7 @@ import re # noqa: F401
|
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
|
21
|
-
from typing import Any, ClassVar, Dict, List
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
22
|
from rapidata.api_client.models.standing_status import StandingStatus
|
|
23
23
|
from typing import Optional, Set
|
|
24
24
|
from typing_extensions import Self
|
|
@@ -30,7 +30,7 @@ class GetStandingByIdResult(BaseModel):
|
|
|
30
30
|
id: StrictStr
|
|
31
31
|
name: StrictStr
|
|
32
32
|
benchmark_id: StrictStr = Field(alias="benchmarkId")
|
|
33
|
-
dataset_id: StrictStr = Field(alias="datasetId")
|
|
33
|
+
dataset_id: Optional[StrictStr] = Field(default=None, alias="datasetId")
|
|
34
34
|
status: StandingStatus
|
|
35
35
|
is_disabled: StrictBool = Field(alias="isDisabled")
|
|
36
36
|
__properties: ClassVar[List[str]] = ["id", "name", "benchmarkId", "datasetId", "status", "isDisabled"]
|
|
@@ -74,6 +74,11 @@ class GetStandingByIdResult(BaseModel):
|
|
|
74
74
|
exclude=excluded_fields,
|
|
75
75
|
exclude_none=True,
|
|
76
76
|
)
|
|
77
|
+
# set to None if dataset_id (nullable) is None
|
|
78
|
+
# and model_fields_set contains the field
|
|
79
|
+
if self.dataset_id is None and "dataset_id" in self.model_fields_set:
|
|
80
|
+
_dict['datasetId'] = None
|
|
81
|
+
|
|
77
82
|
return _dict
|
|
78
83
|
|
|
79
84
|
@classmethod
|
|
@@ -18,7 +18,7 @@ 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, StrictBool, StrictStr
|
|
22
22
|
from typing import Any, ClassVar, Dict, List
|
|
23
23
|
from typing import Optional, Set
|
|
24
24
|
from typing_extensions import Self
|
|
@@ -29,9 +29,10 @@ class GetValidationSetByIdResult(BaseModel):
|
|
|
29
29
|
""" # noqa: E501
|
|
30
30
|
id: StrictStr
|
|
31
31
|
name: StrictStr
|
|
32
|
+
is_public: StrictBool = Field(alias="isPublic")
|
|
32
33
|
owner_mail: StrictStr = Field(alias="ownerMail")
|
|
33
34
|
created_at: datetime = Field(alias="createdAt")
|
|
34
|
-
__properties: ClassVar[List[str]] = ["id", "name", "ownerMail", "createdAt"]
|
|
35
|
+
__properties: ClassVar[List[str]] = ["id", "name", "isPublic", "ownerMail", "createdAt"]
|
|
35
36
|
|
|
36
37
|
model_config = ConfigDict(
|
|
37
38
|
populate_by_name=True,
|
|
@@ -86,6 +87,7 @@ class GetValidationSetByIdResult(BaseModel):
|
|
|
86
87
|
_obj = cls.model_validate({
|
|
87
88
|
"id": obj.get("id"),
|
|
88
89
|
"name": obj.get("name"),
|
|
90
|
+
"isPublic": obj.get("isPublic"),
|
|
89
91
|
"ownerMail": obj.get("ownerMail"),
|
|
90
92
|
"createdAt": obj.get("createdAt")
|
|
91
93
|
})
|
|
@@ -30,13 +30,12 @@ class SimpleWorkflowModel1(BaseModel):
|
|
|
30
30
|
""" # noqa: E501
|
|
31
31
|
t: StrictStr = Field(description="Discriminator value for SimpleWorkflowModel", alias="_t")
|
|
32
32
|
id: StrictStr
|
|
33
|
-
dataset_id: Optional[StrictStr] = Field(default=None, alias="datasetId")
|
|
34
33
|
state: StrictStr
|
|
35
34
|
blueprint: ValidationSetZipPostRequestBlueprint
|
|
36
35
|
referee: CompareWorkflowModel1Referee
|
|
37
36
|
name: StrictStr
|
|
38
37
|
owner_mail: Optional[StrictStr] = Field(default=None, alias="ownerMail")
|
|
39
|
-
__properties: ClassVar[List[str]] = ["_t", "id", "
|
|
38
|
+
__properties: ClassVar[List[str]] = ["_t", "id", "state", "blueprint", "referee", "name", "ownerMail"]
|
|
40
39
|
|
|
41
40
|
@field_validator('t')
|
|
42
41
|
def t_validate_enum(cls, value):
|
|
@@ -90,11 +89,6 @@ class SimpleWorkflowModel1(BaseModel):
|
|
|
90
89
|
# override the default output from pydantic by calling `to_dict()` of referee
|
|
91
90
|
if self.referee:
|
|
92
91
|
_dict['referee'] = self.referee.to_dict()
|
|
93
|
-
# set to None if dataset_id (nullable) is None
|
|
94
|
-
# and model_fields_set contains the field
|
|
95
|
-
if self.dataset_id is None and "dataset_id" in self.model_fields_set:
|
|
96
|
-
_dict['datasetId'] = None
|
|
97
|
-
|
|
98
92
|
# set to None if owner_mail (nullable) is None
|
|
99
93
|
# and model_fields_set contains the field
|
|
100
94
|
if self.owner_mail is None and "owner_mail" in self.model_fields_set:
|
|
@@ -114,7 +108,6 @@ class SimpleWorkflowModel1(BaseModel):
|
|
|
114
108
|
_obj = cls.model_validate({
|
|
115
109
|
"_t": obj.get("_t") if obj.get("_t") is not None else 'SimpleWorkflowModel',
|
|
116
110
|
"id": obj.get("id"),
|
|
117
|
-
"datasetId": obj.get("datasetId"),
|
|
118
111
|
"state": obj.get("state"),
|
|
119
112
|
"blueprint": ValidationSetZipPostRequestBlueprint.from_dict(obj["blueprint"]) if obj.get("blueprint") is not None else None,
|
|
120
113
|
"referee": CompareWorkflowModel1Referee.from_dict(obj["referee"]) if obj.get("referee") is not None else None,
|
|
@@ -19,6 +19,7 @@ import json
|
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
22
|
+
from rapidata.api_client.models.confidence_interval import ConfidenceInterval
|
|
22
23
|
from rapidata.api_client.models.standing_status import StandingStatus
|
|
23
24
|
from typing import Optional, Set
|
|
24
25
|
from typing_extensions import Self
|
|
@@ -33,10 +34,11 @@ class StandingByLeaderboard(BaseModel):
|
|
|
33
34
|
dataset_id: Optional[StrictStr] = Field(default=None, alias="datasetId")
|
|
34
35
|
status: StandingStatus
|
|
35
36
|
score: Optional[Union[StrictFloat, StrictInt]] = None
|
|
36
|
-
wins: StrictInt
|
|
37
|
-
total_matches: StrictInt = Field(alias="totalMatches")
|
|
37
|
+
wins: Union[StrictFloat, StrictInt]
|
|
38
|
+
total_matches: Union[StrictFloat, StrictInt] = Field(alias="totalMatches")
|
|
38
39
|
is_disabled: StrictBool = Field(alias="isDisabled")
|
|
39
|
-
|
|
40
|
+
confidence_interval: Optional[ConfidenceInterval] = Field(default=None, alias="confidenceInterval")
|
|
41
|
+
__properties: ClassVar[List[str]] = ["id", "name", "leaderboardId", "datasetId", "status", "score", "wins", "totalMatches", "isDisabled", "confidenceInterval"]
|
|
40
42
|
|
|
41
43
|
model_config = ConfigDict(
|
|
42
44
|
populate_by_name=True,
|
|
@@ -77,6 +79,9 @@ class StandingByLeaderboard(BaseModel):
|
|
|
77
79
|
exclude=excluded_fields,
|
|
78
80
|
exclude_none=True,
|
|
79
81
|
)
|
|
82
|
+
# override the default output from pydantic by calling `to_dict()` of confidence_interval
|
|
83
|
+
if self.confidence_interval:
|
|
84
|
+
_dict['confidenceInterval'] = self.confidence_interval.to_dict()
|
|
80
85
|
# set to None if score (nullable) is None
|
|
81
86
|
# and model_fields_set contains the field
|
|
82
87
|
if self.score is None and "score" in self.model_fields_set:
|
|
@@ -102,7 +107,8 @@ class StandingByLeaderboard(BaseModel):
|
|
|
102
107
|
"score": obj.get("score"),
|
|
103
108
|
"wins": obj.get("wins"),
|
|
104
109
|
"totalMatches": obj.get("totalMatches"),
|
|
105
|
-
"isDisabled": obj.get("isDisabled")
|
|
110
|
+
"isDisabled": obj.get("isDisabled"),
|
|
111
|
+
"confidenceInterval": ConfidenceInterval.from_dict(obj["confidenceInterval"]) if obj.get("confidenceInterval") is not None else None
|
|
106
112
|
})
|
|
107
113
|
return _obj
|
|
108
114
|
|
|
@@ -0,0 +1,87 @@
|
|
|
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, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class UpdateBenchmarkModel(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
The model used to update a benchmark.
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
name: Optional[StrictStr] = None
|
|
30
|
+
__properties: ClassVar[List[str]] = ["name"]
|
|
31
|
+
|
|
32
|
+
model_config = ConfigDict(
|
|
33
|
+
populate_by_name=True,
|
|
34
|
+
validate_assignment=True,
|
|
35
|
+
protected_namespaces=(),
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def to_str(self) -> str:
|
|
40
|
+
"""Returns the string representation of the model using alias"""
|
|
41
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
42
|
+
|
|
43
|
+
def to_json(self) -> str:
|
|
44
|
+
"""Returns the JSON representation of the model using alias"""
|
|
45
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
46
|
+
return json.dumps(self.to_dict())
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
50
|
+
"""Create an instance of UpdateBenchmarkModel from a JSON string"""
|
|
51
|
+
return cls.from_dict(json.loads(json_str))
|
|
52
|
+
|
|
53
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
54
|
+
"""Return the dictionary representation of the model using alias.
|
|
55
|
+
|
|
56
|
+
This has the following differences from calling pydantic's
|
|
57
|
+
`self.model_dump(by_alias=True)`:
|
|
58
|
+
|
|
59
|
+
* `None` is only added to the output dict for nullable fields that
|
|
60
|
+
were set at model initialization. Other fields with value `None`
|
|
61
|
+
are ignored.
|
|
62
|
+
"""
|
|
63
|
+
excluded_fields: Set[str] = set([
|
|
64
|
+
])
|
|
65
|
+
|
|
66
|
+
_dict = self.model_dump(
|
|
67
|
+
by_alias=True,
|
|
68
|
+
exclude=excluded_fields,
|
|
69
|
+
exclude_none=True,
|
|
70
|
+
)
|
|
71
|
+
return _dict
|
|
72
|
+
|
|
73
|
+
@classmethod
|
|
74
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
75
|
+
"""Create an instance of UpdateBenchmarkModel from a dict"""
|
|
76
|
+
if obj is None:
|
|
77
|
+
return None
|
|
78
|
+
|
|
79
|
+
if not isinstance(obj, dict):
|
|
80
|
+
return cls.model_validate(obj)
|
|
81
|
+
|
|
82
|
+
_obj = cls.model_validate({
|
|
83
|
+
"name": obj.get("name")
|
|
84
|
+
})
|
|
85
|
+
return _obj
|
|
86
|
+
|
|
87
|
+
|
|
@@ -0,0 +1,87 @@
|
|
|
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, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class UpdateParticipantModel(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
The model used to update a participant.
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
name: Optional[StrictStr] = None
|
|
30
|
+
__properties: ClassVar[List[str]] = ["name"]
|
|
31
|
+
|
|
32
|
+
model_config = ConfigDict(
|
|
33
|
+
populate_by_name=True,
|
|
34
|
+
validate_assignment=True,
|
|
35
|
+
protected_namespaces=(),
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def to_str(self) -> str:
|
|
40
|
+
"""Returns the string representation of the model using alias"""
|
|
41
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
42
|
+
|
|
43
|
+
def to_json(self) -> str:
|
|
44
|
+
"""Returns the JSON representation of the model using alias"""
|
|
45
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
46
|
+
return json.dumps(self.to_dict())
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
50
|
+
"""Create an instance of UpdateParticipantModel from a JSON string"""
|
|
51
|
+
return cls.from_dict(json.loads(json_str))
|
|
52
|
+
|
|
53
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
54
|
+
"""Return the dictionary representation of the model using alias.
|
|
55
|
+
|
|
56
|
+
This has the following differences from calling pydantic's
|
|
57
|
+
`self.model_dump(by_alias=True)`:
|
|
58
|
+
|
|
59
|
+
* `None` is only added to the output dict for nullable fields that
|
|
60
|
+
were set at model initialization. Other fields with value `None`
|
|
61
|
+
are ignored.
|
|
62
|
+
"""
|
|
63
|
+
excluded_fields: Set[str] = set([
|
|
64
|
+
])
|
|
65
|
+
|
|
66
|
+
_dict = self.model_dump(
|
|
67
|
+
by_alias=True,
|
|
68
|
+
exclude=excluded_fields,
|
|
69
|
+
exclude_none=True,
|
|
70
|
+
)
|
|
71
|
+
return _dict
|
|
72
|
+
|
|
73
|
+
@classmethod
|
|
74
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
75
|
+
"""Create an instance of UpdateParticipantModel from a dict"""
|
|
76
|
+
if obj is None:
|
|
77
|
+
return None
|
|
78
|
+
|
|
79
|
+
if not isinstance(obj, dict):
|
|
80
|
+
return cls.model_validate(obj)
|
|
81
|
+
|
|
82
|
+
_obj = cls.model_validate({
|
|
83
|
+
"name": obj.get("name")
|
|
84
|
+
})
|
|
85
|
+
return _obj
|
|
86
|
+
|
|
87
|
+
|