rapidata 2.15.0__py3-none-any.whl → 2.17.0__py3-none-any.whl

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

Potentially problematic release.


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

Files changed (77) hide show
  1. rapidata/__init__.py +1 -0
  2. rapidata/api_client/__init__.py +17 -7
  3. rapidata/api_client/api/__init__.py +2 -1
  4. rapidata/api_client/api/campaign_api.py +554 -30
  5. rapidata/api_client/api/client_api.py +295 -23
  6. rapidata/api_client/api/coco_api.py +594 -8
  7. rapidata/api_client/api/compare_workflow_api.py +23 -23
  8. rapidata/api_client/api/datapoint_api.py +548 -26
  9. rapidata/api_client/api/dataset_api.py +2198 -186
  10. rapidata/api_client/api/feedback_api.py +306 -0
  11. rapidata/api_client/api/identity_api.py +1143 -78
  12. rapidata/api_client/api/newsletter_api.py +299 -11
  13. rapidata/api_client/api/order_api.py +5367 -565
  14. rapidata/api_client/api/pipeline_api.py +249 -510
  15. rapidata/api_client/api/rapid_api.py +1930 -254
  16. rapidata/api_client/api/simple_workflow_api.py +23 -23
  17. rapidata/api_client/api/validation_set_api.py +5259 -0
  18. rapidata/api_client/api/workflow_api.py +932 -137
  19. rapidata/api_client/models/__init__.py +15 -6
  20. rapidata/api_client/models/ab_test_selection_a_inner.py +24 -10
  21. rapidata/api_client/models/add_campaign_model.py +1 -1
  22. rapidata/api_client/models/add_user_response_result.py +106 -0
  23. rapidata/api_client/models/add_user_response_result_validation_truth.py +258 -0
  24. rapidata/api_client/models/add_validation_rapid_model.py +3 -3
  25. rapidata/api_client/models/add_validation_text_rapid_model.py +3 -3
  26. rapidata/api_client/models/are_rapids_active_result.py +87 -0
  27. rapidata/api_client/models/compare_workflow_config_model.py +1 -1
  28. rapidata/api_client/models/compare_workflow_model.py +4 -4
  29. rapidata/api_client/models/create_datapoint_from_files_model.py +102 -0
  30. rapidata/api_client/models/create_datapoint_from_files_model_metadata_inner.py +168 -0
  31. rapidata/api_client/models/create_datapoint_from_text_sources_model.py +109 -0
  32. rapidata/api_client/models/create_datapoint_from_urls_model.py +5 -5
  33. rapidata/api_client/models/create_datapoints_from_s3_bucket_model.py +124 -0
  34. rapidata/api_client/models/create_order_model.py +1 -1
  35. rapidata/api_client/models/create_rapid_result.py +87 -0
  36. rapidata/api_client/models/create_validation_set_model.py +87 -0
  37. rapidata/api_client/models/datapoint_metadata_model.py +3 -3
  38. rapidata/api_client/models/early_stopping_referee_model.py +1 -1
  39. rapidata/api_client/models/elo_config_model.py +2 -2
  40. rapidata/api_client/models/evaluation_workflow_model.py +2 -2
  41. rapidata/api_client/models/get_validation_rapids_query.py +123 -0
  42. rapidata/api_client/models/get_validation_rapids_query_paged_result.py +105 -0
  43. rapidata/api_client/models/online_pair_maker_config_model.py +1 -1
  44. rapidata/api_client/models/pipeline_id_workflow_artifact_id_put_request.py +140 -0
  45. rapidata/api_client/models/query_validation_rapids_result.py +3 -3
  46. rapidata/api_client/models/rapid_issue.py +4 -0
  47. rapidata/api_client/models/report_model.py +4 -4
  48. rapidata/api_client/models/shuffling_selection.py +106 -0
  49. rapidata/api_client/models/simple_workflow_config_model.py +1 -1
  50. rapidata/api_client/models/simple_workflow_config_model_blueprint.py +1 -1
  51. rapidata/api_client/models/simple_workflow_model.py +1 -1
  52. rapidata/api_client/models/simple_workflow_model_blueprint.py +1 -1
  53. rapidata/api_client/models/update_campaign_model.py +1 -1
  54. rapidata/api_client/models/update_dataset_name_model.py +87 -0
  55. rapidata/api_client/models/update_order_name_model.py +87 -0
  56. rapidata/api_client/models/upload_text_sources_to_dataset_model.py +3 -3
  57. rapidata/api_client/models/user_score_user_filter_model.py +9 -2
  58. rapidata/api_client_README.md +153 -88
  59. rapidata/rapidata_client/__init__.py +1 -0
  60. rapidata/rapidata_client/demographic/demographic_manager.py +1 -1
  61. rapidata/rapidata_client/filter/user_score_filter.py +4 -1
  62. rapidata/rapidata_client/order/_rapidata_dataset.py +10 -11
  63. rapidata/rapidata_client/order/_rapidata_order_builder.py +1 -1
  64. rapidata/rapidata_client/order/rapidata_order.py +5 -5
  65. rapidata/rapidata_client/order/rapidata_order_manager.py +1 -1
  66. rapidata/rapidata_client/order/rapidata_results.py +1 -1
  67. rapidata/rapidata_client/selection/__init__.py +1 -0
  68. rapidata/rapidata_client/selection/rapidata_selections.py +4 -1
  69. rapidata/rapidata_client/selection/shuffling_selection.py +36 -0
  70. rapidata/rapidata_client/validation/rapidata_validation_set.py +11 -0
  71. rapidata/rapidata_client/validation/rapids/rapids.py +3 -5
  72. rapidata/rapidata_client/validation/validation_set_manager.py +36 -21
  73. rapidata/rapidata_client/workflow/_ranking_workflow.py +2 -2
  74. {rapidata-2.15.0.dist-info → rapidata-2.17.0.dist-info}/METADATA +1 -1
  75. {rapidata-2.15.0.dist-info → rapidata-2.17.0.dist-info}/RECORD +77 -59
  76. {rapidata-2.15.0.dist-info → rapidata-2.17.0.dist-info}/LICENSE +0 -0
  77. {rapidata-2.15.0.dist-info → rapidata-2.17.0.dist-info}/WHEEL +0 -0
@@ -32,6 +32,10 @@ class RapidIssue(str, Enum):
32
32
  INAPPROPRIATE = 'Inappropriate'
33
33
  NOCORRECTOPTION = 'NoCorrectOption'
34
34
  WRONGLANGUAGE = 'WrongLanguage'
35
+ DONOTUNDERSTAND = 'DoNotUnderstand'
36
+ DONOTCARE = 'DoNotCare'
37
+ NOTSEEOPTIONSORMEDIADIDNTLOAD = 'NotSeeOptionsOrMediaDidntLoad'
38
+ MYANSWERISCORRECT = 'MyAnswerIsCorrect'
35
39
 
36
40
  @classmethod
37
41
  def from_json(cls, json_str: str) -> Self:
@@ -26,17 +26,17 @@ class ReportModel(BaseModel):
26
26
  """
27
27
  The model for reporting an issue with a rapid.
28
28
  """ # noqa: E501
29
- rapid_id: StrictStr = Field(description="The rapid an issue was encountered with", alias="rapidId")
29
+ rapid_id: Optional[StrictStr] = Field(default=None, description="The rapid an issue was encountered with.", alias="rapidId")
30
30
  issue: StrictStr
31
31
  message: Optional[StrictStr] = Field(default=None, description="An optional message typed by the user.")
32
- dump: Optional[StrictStr] = Field(default=None, description="A dump, that the frontend defines and can read again")
32
+ dump: Optional[StrictStr] = Field(default=None, description="A dump, that the frontend defines and can read again.")
33
33
  __properties: ClassVar[List[str]] = ["rapidId", "issue", "message", "dump"]
34
34
 
35
35
  @field_validator('issue')
36
36
  def issue_validate_enum(cls, value):
37
37
  """Validates the enum"""
38
- if value not in set(['Other', 'CannotSubmit', 'NoAsset', 'Inappropriate', 'NoCorrectOption', 'WrongLanguage']):
39
- raise ValueError("must be one of enum values ('Other', 'CannotSubmit', 'NoAsset', 'Inappropriate', 'NoCorrectOption', 'WrongLanguage')")
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
40
  return value
41
41
 
42
42
  model_config = ConfigDict(
@@ -0,0 +1,106 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Rapidata.Dataset
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: v1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
21
+ from typing import Any, ClassVar, Dict, List
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class ShufflingSelection(BaseModel):
26
+ """
27
+ ShufflingSelection
28
+ """ # noqa: E501
29
+ t: StrictStr = Field(description="Discriminator value for ShufflingSelection", alias="_t")
30
+ selections: List[AbTestSelectionAInner]
31
+ __properties: ClassVar[List[str]] = ["_t", "selections"]
32
+
33
+ @field_validator('t')
34
+ def t_validate_enum(cls, value):
35
+ """Validates the enum"""
36
+ if value not in set(['ShufflingSelection']):
37
+ raise ValueError("must be one of enum values ('ShufflingSelection')")
38
+ return value
39
+
40
+ model_config = ConfigDict(
41
+ populate_by_name=True,
42
+ validate_assignment=True,
43
+ protected_namespaces=(),
44
+ )
45
+
46
+
47
+ def to_str(self) -> str:
48
+ """Returns the string representation of the model using alias"""
49
+ return pprint.pformat(self.model_dump(by_alias=True))
50
+
51
+ def to_json(self) -> str:
52
+ """Returns the JSON representation of the model using alias"""
53
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
54
+ return json.dumps(self.to_dict())
55
+
56
+ @classmethod
57
+ def from_json(cls, json_str: str) -> Optional[Self]:
58
+ """Create an instance of ShufflingSelection from a JSON string"""
59
+ return cls.from_dict(json.loads(json_str))
60
+
61
+ def to_dict(self) -> Dict[str, Any]:
62
+ """Return the dictionary representation of the model using alias.
63
+
64
+ This has the following differences from calling pydantic's
65
+ `self.model_dump(by_alias=True)`:
66
+
67
+ * `None` is only added to the output dict for nullable fields that
68
+ were set at model initialization. Other fields with value `None`
69
+ are ignored.
70
+ """
71
+ excluded_fields: Set[str] = set([
72
+ ])
73
+
74
+ _dict = self.model_dump(
75
+ by_alias=True,
76
+ exclude=excluded_fields,
77
+ exclude_none=True,
78
+ )
79
+ # override the default output from pydantic by calling `to_dict()` of each item in selections (list)
80
+ _items = []
81
+ if self.selections:
82
+ for _item_selections in self.selections:
83
+ if _item_selections:
84
+ _items.append(_item_selections.to_dict())
85
+ _dict['selections'] = _items
86
+ return _dict
87
+
88
+ @classmethod
89
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
90
+ """Create an instance of ShufflingSelection from a dict"""
91
+ if obj is None:
92
+ return None
93
+
94
+ if not isinstance(obj, dict):
95
+ return cls.model_validate(obj)
96
+
97
+ _obj = cls.model_validate({
98
+ "_t": obj.get("_t") if obj.get("_t") is not None else 'ShufflingSelection',
99
+ "selections": [AbTestSelectionAInner.from_dict(_item) for _item in obj["selections"]] if obj.get("selections") is not None else None
100
+ })
101
+ return _obj
102
+
103
+ from rapidata.api_client.models.ab_test_selection_a_inner import AbTestSelectionAInner
104
+ # TODO: Rewrite to not use raise_errors
105
+ ShufflingSelection.model_rebuild(raise_errors=False)
106
+
@@ -26,7 +26,7 @@ from typing_extensions import Self
26
26
 
27
27
  class SimpleWorkflowConfigModel(BaseModel):
28
28
  """
29
- The configuration for a simple workflow. A simple workflow creates a rapid for each datapoint in its dataset. It is considered complete when all rapids have been completed.
29
+ The configuration for a simple workflow. A simple workflow creates a rapid for each datapoint in its dataset. It is considered complete when all rapids have been completed.
30
30
  """ # noqa: E501
31
31
  t: StrictStr = Field(description="Discriminator value for SimpleWorkflowConfig", alias="_t")
32
32
  referee: CompareWorkflowModel1Referee
@@ -35,7 +35,7 @@ SIMPLEWORKFLOWCONFIGMODELBLUEPRINT_ONE_OF_SCHEMAS = ["AttachCategoryRapidBluepri
35
35
 
36
36
  class SimpleWorkflowConfigModelBlueprint(BaseModel):
37
37
  """
38
- The blueprint to use when creating rapids for this workflow. The blueprint determines what kind of rapids will be created and what data they will contain.
38
+ The blueprint to use when creating rapids for this workflow. The blueprint determines what kind of rapids will be created and what data they will contain.
39
39
  """
40
40
  # data type: TranscriptionRapidBlueprint
41
41
  oneof_schema_1_validator: Optional[TranscriptionRapidBlueprint] = None
@@ -25,7 +25,7 @@ from typing_extensions import Self
25
25
 
26
26
  class SimpleWorkflowModel(BaseModel):
27
27
  """
28
- If the SimpleWorkflow is chosen, each datapoint uploaded will correspond to a single task to be solved. This is the most commonly chosen workflow.
28
+ If the SimpleWorkflow is chosen, each datapoint uploaded will correspond to a single task to be solved. This is the most commonly chosen workflow.
29
29
  """ # noqa: E501
30
30
  t: StrictStr = Field(description="Discriminator value for SimpleWorkflow", alias="_t")
31
31
  blueprint: SimpleWorkflowModelBlueprint
@@ -35,7 +35,7 @@ SIMPLEWORKFLOWMODELBLUEPRINT_ONE_OF_SCHEMAS = ["AttachCategoryRapidBlueprint", "
35
35
 
36
36
  class SimpleWorkflowModelBlueprint(BaseModel):
37
37
  """
38
- The blueprint is used to create the tasks that will be shown to the users. They contain the common information across all tasks. For example, the tasks question.
38
+ The blueprint is used to create the tasks that will be shown to the users. They contain the common information across all tasks. For example, the tasks question.
39
39
  """
40
40
  # data type: TranscriptionRapidBlueprint
41
41
  oneof_schema_1_validator: Optional[TranscriptionRapidBlueprint] = None
@@ -26,7 +26,7 @@ class UpdateCampaignModel(BaseModel):
26
26
  """
27
27
  The model containing the new configuration for a campaign.
28
28
  """ # noqa: E501
29
- priority: Optional[StrictInt] = Field(default=None, description="A value above 0 indicating how much the campaign should be prioritized. The higher the value the more weight it will be given during campaign selection.")
29
+ priority: Optional[StrictInt] = Field(default=None, description="A value above 0 indicating how much the campaign should be prioritized. The higher the value the more weight it will be given during campaign selection.")
30
30
  feature_flags: Optional[Dict[str, StrictStr]] = Field(default=None, description="The feature flags to assign this campaign.", alias="featureFlags")
31
31
  __properties: ClassVar[List[str]] = ["priority", "featureFlags"]
32
32
 
@@ -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, Field, StrictStr
21
+ from typing import Any, ClassVar, Dict, List
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class UpdateDatasetNameModel(BaseModel):
26
+ """
27
+ The body request for updating the name of a dataset.
28
+ """ # noqa: E501
29
+ name: StrictStr = Field(description="The new name of the dataset.")
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 UpdateDatasetNameModel 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 UpdateDatasetNameModel 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, Field, StrictStr
21
+ from typing import Any, ClassVar, Dict, List
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class UpdateOrderNameModel(BaseModel):
26
+ """
27
+ The model for updating the name of an order.
28
+ """ # noqa: E501
29
+ name: StrictStr = Field(description="The new name of the order")
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 UpdateOrderNameModel 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 UpdateOrderNameModel 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
+
@@ -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.create_datapoint_from_urls_model_metadata_inner import CreateDatapointFromUrlsModelMetadataInner
22
+ from rapidata.api_client.models.create_datapoint_from_files_model_metadata_inner import CreateDatapointFromFilesModelMetadataInner
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[CreateDatapointFromUrlsModelMetadataInner]] = Field(default=None, description="Additional metadata to attach to the datapoint. Most commonly used to add a prompt to the datapoint using the Rapidata.Shared.Assets.Abstraction.Models.Metadata.Input.PromptMetadataInput.")
33
+ metadata: Optional[List[CreateDatapointFromFilesModelMetadataInner]] = 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": [CreateDatapointFromUrlsModelMetadataInner.from_dict(_item) for _item in obj["metadata"]] if obj.get("metadata") is not None else None
107
+ "metadata": [CreateDatapointFromFilesModelMetadataInner.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
 
@@ -29,7 +29,8 @@ class UserScoreUserFilterModel(BaseModel):
29
29
  t: StrictStr = Field(description="Discriminator value for UserScoreFilter", alias="_t")
30
30
  lowerbound: Optional[Union[StrictFloat, StrictInt]] = None
31
31
  upperbound: Optional[Union[StrictFloat, StrictInt]] = None
32
- __properties: ClassVar[List[str]] = ["_t", "lowerbound", "upperbound"]
32
+ dimension: Optional[StrictStr] = None
33
+ __properties: ClassVar[List[str]] = ["_t", "lowerbound", "upperbound", "dimension"]
33
34
 
34
35
  @field_validator('t')
35
36
  def t_validate_enum(cls, value):
@@ -77,6 +78,11 @@ class UserScoreUserFilterModel(BaseModel):
77
78
  exclude=excluded_fields,
78
79
  exclude_none=True,
79
80
  )
81
+ # set to None if dimension (nullable) is None
82
+ # and model_fields_set contains the field
83
+ if self.dimension is None and "dimension" in self.model_fields_set:
84
+ _dict['dimension'] = None
85
+
80
86
  return _dict
81
87
 
82
88
  @classmethod
@@ -91,7 +97,8 @@ class UserScoreUserFilterModel(BaseModel):
91
97
  _obj = cls.model_validate({
92
98
  "_t": obj.get("_t") if obj.get("_t") is not None else 'UserScoreFilter',
93
99
  "lowerbound": obj.get("lowerbound"),
94
- "upperbound": obj.get("upperbound")
100
+ "upperbound": obj.get("upperbound"),
101
+ "dimension": obj.get("dimension")
95
102
  })
96
103
  return _obj
97
104