rapidata 2.42.0__py3-none-any.whl → 2.42.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.

Files changed (35) hide show
  1. rapidata/__init__.py +1 -1
  2. rapidata/api_client/__init__.py +8 -1
  3. rapidata/api_client/api/__init__.py +1 -0
  4. rapidata/api_client/api/grouped_ranking_workflow_api.py +318 -0
  5. rapidata/api_client/models/__init__.py +7 -1
  6. rapidata/api_client/models/asset_metadata.py +2 -8
  7. rapidata/api_client/models/create_datapoint_model.py +10 -3
  8. rapidata/api_client/models/create_order_model_workflow.py +23 -9
  9. rapidata/api_client/models/file_asset.py +1 -3
  10. rapidata/api_client/models/file_asset_metadata_value.py +1 -3
  11. rapidata/api_client/models/get_grouped_ranking_workflow_results_model.py +106 -0
  12. rapidata/api_client/models/get_grouped_ranking_workflow_results_result.py +97 -0
  13. rapidata/api_client/models/get_grouped_ranking_workflow_results_result_paged_result.py +105 -0
  14. rapidata/api_client/models/get_workflow_by_id_result_workflow.py +23 -9
  15. rapidata/api_client/models/grouped_ranking_workflow_config.py +143 -0
  16. rapidata/api_client/models/grouped_ranking_workflow_model.py +135 -0
  17. rapidata/api_client/models/grouped_ranking_workflow_model1.py +121 -0
  18. rapidata/api_client/models/multi_asset.py +4 -4
  19. rapidata/api_client/models/multi_asset_assets_inner.py +170 -0
  20. rapidata/api_client/models/null_asset.py +1 -3
  21. rapidata/api_client/models/text_asset.py +1 -3
  22. rapidata/api_client/models/workflow_config_artifact_model_workflow_config.py +23 -9
  23. rapidata/api_client_README.md +8 -1
  24. rapidata/rapidata_client/benchmark/participant/_participant.py +1 -2
  25. rapidata/rapidata_client/order/dataset/_rapidata_dataset.py +1 -3
  26. rapidata/rapidata_client/order/rapidata_order.py +16 -16
  27. rapidata/rapidata_client/order/rapidata_order_manager.py +3 -11
  28. rapidata/rapidata_client/validation/rapids/rapids.py +2 -2
  29. rapidata/rapidata_client/validation/validation_set_manager.py +19 -7
  30. rapidata/rapidata_client/workflow/_base_workflow.py +3 -0
  31. rapidata/rapidata_client/workflow/_ranking_workflow.py +42 -3
  32. {rapidata-2.42.0.dist-info → rapidata-2.42.2.dist-info}/METADATA +1 -1
  33. {rapidata-2.42.0.dist-info → rapidata-2.42.2.dist-info}/RECORD +35 -27
  34. {rapidata-2.42.0.dist-info → rapidata-2.42.2.dist-info}/WHEEL +0 -0
  35. {rapidata-2.42.0.dist-info → rapidata-2.42.2.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,121 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Rapidata.Dataset
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: v1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from rapidata.api_client.models.compare_workflow_model1_referee import CompareWorkflowModel1Referee
23
+ from rapidata.api_client.models.elo_config import EloConfig
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class GroupedRankingWorkflowModel1(BaseModel):
28
+ """
29
+ GroupedRankingWorkflowModel1
30
+ """ # noqa: E501
31
+ t: StrictStr = Field(description="Discriminator value for GroupedRankingWorkflowModel", alias="_t")
32
+ id: StrictStr
33
+ referee: CompareWorkflowModel1Referee
34
+ state: StrictStr
35
+ criteria: StrictStr
36
+ name: StrictStr
37
+ owner_mail: Optional[StrictStr] = Field(default=None, alias="ownerMail")
38
+ elo_config: EloConfig = Field(alias="eloConfig")
39
+ __properties: ClassVar[List[str]] = ["_t", "id", "referee", "state", "criteria", "name", "ownerMail", "eloConfig"]
40
+
41
+ @field_validator('t')
42
+ def t_validate_enum(cls, value):
43
+ """Validates the enum"""
44
+ if value not in set(['GroupedRankingWorkflowModel']):
45
+ raise ValueError("must be one of enum values ('GroupedRankingWorkflowModel')")
46
+ return value
47
+
48
+ model_config = ConfigDict(
49
+ populate_by_name=True,
50
+ validate_assignment=True,
51
+ protected_namespaces=(),
52
+ )
53
+
54
+
55
+ def to_str(self) -> str:
56
+ """Returns the string representation of the model using alias"""
57
+ return pprint.pformat(self.model_dump(by_alias=True))
58
+
59
+ def to_json(self) -> str:
60
+ """Returns the JSON representation of the model using alias"""
61
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
62
+ return json.dumps(self.to_dict())
63
+
64
+ @classmethod
65
+ def from_json(cls, json_str: str) -> Optional[Self]:
66
+ """Create an instance of GroupedRankingWorkflowModel1 from a JSON string"""
67
+ return cls.from_dict(json.loads(json_str))
68
+
69
+ def to_dict(self) -> Dict[str, Any]:
70
+ """Return the dictionary representation of the model using alias.
71
+
72
+ This has the following differences from calling pydantic's
73
+ `self.model_dump(by_alias=True)`:
74
+
75
+ * `None` is only added to the output dict for nullable fields that
76
+ were set at model initialization. Other fields with value `None`
77
+ are ignored.
78
+ """
79
+ excluded_fields: Set[str] = set([
80
+ ])
81
+
82
+ _dict = self.model_dump(
83
+ by_alias=True,
84
+ exclude=excluded_fields,
85
+ exclude_none=True,
86
+ )
87
+ # override the default output from pydantic by calling `to_dict()` of referee
88
+ if self.referee:
89
+ _dict['referee'] = self.referee.to_dict()
90
+ # override the default output from pydantic by calling `to_dict()` of elo_config
91
+ if self.elo_config:
92
+ _dict['eloConfig'] = self.elo_config.to_dict()
93
+ # set to None if owner_mail (nullable) is None
94
+ # and model_fields_set contains the field
95
+ if self.owner_mail is None and "owner_mail" in self.model_fields_set:
96
+ _dict['ownerMail'] = None
97
+
98
+ return _dict
99
+
100
+ @classmethod
101
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
102
+ """Create an instance of GroupedRankingWorkflowModel1 from a dict"""
103
+ if obj is None:
104
+ return None
105
+
106
+ if not isinstance(obj, dict):
107
+ return cls.model_validate(obj)
108
+
109
+ _obj = cls.model_validate({
110
+ "_t": obj.get("_t") if obj.get("_t") is not None else 'GroupedRankingWorkflowModel',
111
+ "id": obj.get("id"),
112
+ "referee": CompareWorkflowModel1Referee.from_dict(obj["referee"]) if obj.get("referee") is not None else None,
113
+ "state": obj.get("state"),
114
+ "criteria": obj.get("criteria"),
115
+ "name": obj.get("name"),
116
+ "ownerMail": obj.get("ownerMail"),
117
+ "eloConfig": EloConfig.from_dict(obj["eloConfig"]) if obj.get("eloConfig") is not None else None
118
+ })
119
+ return _obj
120
+
121
+
@@ -19,6 +19,7 @@ import json
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
21
21
  from typing import Any, ClassVar, Dict, List, Optional
22
+ from rapidata.api_client.models.file_asset_metadata_value import FileAssetMetadataValue
22
23
  from typing import Optional, Set
23
24
  from typing_extensions import Self
24
25
 
@@ -27,7 +28,7 @@ class MultiAsset(BaseModel):
27
28
  MultiAsset
28
29
  """ # noqa: E501
29
30
  t: StrictStr = Field(description="Discriminator value for MultiAsset", alias="_t")
30
- assets: List[AssetMetadataAsset]
31
+ assets: List[MultiAssetAssetsInner]
31
32
  metadata: Optional[Dict[str, FileAssetMetadataValue]] = None
32
33
  __properties: ClassVar[List[str]] = ["_t", "assets", "metadata"]
33
34
 
@@ -104,7 +105,7 @@ class MultiAsset(BaseModel):
104
105
 
105
106
  _obj = cls.model_validate({
106
107
  "_t": obj.get("_t") if obj.get("_t") is not None else 'MultiAsset',
107
- "assets": [AssetMetadataAsset.from_dict(_item) for _item in obj["assets"]] if obj.get("assets") is not None else None,
108
+ "assets": [MultiAssetAssetsInner.from_dict(_item) for _item in obj["assets"]] if obj.get("assets") is not None else None,
108
109
  "metadata": dict(
109
110
  (_k, FileAssetMetadataValue.from_dict(_v))
110
111
  for _k, _v in obj["metadata"].items()
@@ -114,8 +115,7 @@ class MultiAsset(BaseModel):
114
115
  })
115
116
  return _obj
116
117
 
117
- from rapidata.api_client.models.asset_metadata_asset import AssetMetadataAsset
118
- from rapidata.api_client.models.file_asset_metadata_value import FileAssetMetadataValue
118
+ from rapidata.api_client.models.multi_asset_assets_inner import MultiAssetAssetsInner
119
119
  # TODO: Rewrite to not use raise_errors
120
120
  MultiAsset.model_rebuild(raise_errors=False)
121
121
 
@@ -0,0 +1,170 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Rapidata.Dataset
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: v1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import json
17
+ import pprint
18
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
19
+ from typing import Any, List, Optional
20
+ from rapidata.api_client.models.file_asset import FileAsset
21
+ from rapidata.api_client.models.null_asset import NullAsset
22
+ from rapidata.api_client.models.text_asset import TextAsset
23
+ from pydantic import StrictStr, Field
24
+ from typing import Union, List, Set, Optional, Dict
25
+ from typing_extensions import Literal, Self
26
+
27
+ MULTIASSETASSETSINNER_ONE_OF_SCHEMAS = ["FileAsset", "MultiAsset", "NullAsset", "TextAsset"]
28
+
29
+ class MultiAssetAssetsInner(BaseModel):
30
+ """
31
+ MultiAssetAssetsInner
32
+ """
33
+ # data type: FileAsset
34
+ oneof_schema_1_validator: Optional[FileAsset] = None
35
+ # data type: MultiAsset
36
+ oneof_schema_2_validator: Optional[MultiAsset] = None
37
+ # data type: NullAsset
38
+ oneof_schema_3_validator: Optional[NullAsset] = None
39
+ # data type: TextAsset
40
+ oneof_schema_4_validator: Optional[TextAsset] = None
41
+ actual_instance: Optional[Union[FileAsset, MultiAsset, NullAsset, TextAsset]] = None
42
+ one_of_schemas: Set[str] = { "FileAsset", "MultiAsset", "NullAsset", "TextAsset" }
43
+
44
+ model_config = ConfigDict(
45
+ validate_assignment=True,
46
+ protected_namespaces=(),
47
+ )
48
+
49
+
50
+ discriminator_value_class_map: Dict[str, str] = {
51
+ }
52
+
53
+ def __init__(self, *args, **kwargs) -> None:
54
+ if args:
55
+ if len(args) > 1:
56
+ raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
57
+ if kwargs:
58
+ raise ValueError("If a position argument is used, keyword arguments cannot be used.")
59
+ super().__init__(actual_instance=args[0])
60
+ else:
61
+ super().__init__(**kwargs)
62
+
63
+ @field_validator('actual_instance')
64
+ def actual_instance_must_validate_oneof(cls, v):
65
+ instance = MultiAssetAssetsInner.model_construct()
66
+ error_messages = []
67
+ match = 0
68
+ # validate data type: FileAsset
69
+ if not isinstance(v, FileAsset):
70
+ error_messages.append(f"Error! Input type `{type(v)}` is not `FileAsset`")
71
+ else:
72
+ match += 1
73
+ # validate data type: MultiAsset
74
+ if not isinstance(v, MultiAsset):
75
+ error_messages.append(f"Error! Input type `{type(v)}` is not `MultiAsset`")
76
+ else:
77
+ match += 1
78
+ # validate data type: NullAsset
79
+ if not isinstance(v, NullAsset):
80
+ error_messages.append(f"Error! Input type `{type(v)}` is not `NullAsset`")
81
+ else:
82
+ match += 1
83
+ # validate data type: TextAsset
84
+ if not isinstance(v, TextAsset):
85
+ error_messages.append(f"Error! Input type `{type(v)}` is not `TextAsset`")
86
+ else:
87
+ match += 1
88
+ if match > 1:
89
+ # more than 1 match
90
+ raise ValueError("Multiple matches found when setting `actual_instance` in MultiAssetAssetsInner with oneOf schemas: FileAsset, MultiAsset, NullAsset, TextAsset. Details: " + ", ".join(error_messages))
91
+ elif match == 0:
92
+ # no match
93
+ raise ValueError("No match found when setting `actual_instance` in MultiAssetAssetsInner with oneOf schemas: FileAsset, MultiAsset, NullAsset, TextAsset. Details: " + ", ".join(error_messages))
94
+ else:
95
+ return v
96
+
97
+ @classmethod
98
+ def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
99
+ return cls.from_json(json.dumps(obj))
100
+
101
+ @classmethod
102
+ def from_json(cls, json_str: str) -> Self:
103
+ """Returns the object represented by the json string"""
104
+ instance = cls.model_construct()
105
+ error_messages = []
106
+ match = 0
107
+
108
+ # deserialize data into FileAsset
109
+ try:
110
+ instance.actual_instance = FileAsset.from_json(json_str)
111
+ match += 1
112
+ except (ValidationError, ValueError) as e:
113
+ error_messages.append(str(e))
114
+ # deserialize data into MultiAsset
115
+ try:
116
+ instance.actual_instance = MultiAsset.from_json(json_str)
117
+ match += 1
118
+ except (ValidationError, ValueError) as e:
119
+ error_messages.append(str(e))
120
+ # deserialize data into NullAsset
121
+ try:
122
+ instance.actual_instance = NullAsset.from_json(json_str)
123
+ match += 1
124
+ except (ValidationError, ValueError) as e:
125
+ error_messages.append(str(e))
126
+ # deserialize data into TextAsset
127
+ try:
128
+ instance.actual_instance = TextAsset.from_json(json_str)
129
+ match += 1
130
+ except (ValidationError, ValueError) as e:
131
+ error_messages.append(str(e))
132
+
133
+ if match > 1:
134
+ # more than 1 match
135
+ raise ValueError("Multiple matches found when deserializing the JSON string into MultiAssetAssetsInner with oneOf schemas: FileAsset, MultiAsset, NullAsset, TextAsset. Details: " + ", ".join(error_messages))
136
+ elif match == 0:
137
+ # no match
138
+ raise ValueError("No match found when deserializing the JSON string into MultiAssetAssetsInner with oneOf schemas: FileAsset, MultiAsset, NullAsset, TextAsset. Details: " + ", ".join(error_messages))
139
+ else:
140
+ return instance
141
+
142
+ def to_json(self) -> str:
143
+ """Returns the JSON representation of the actual instance"""
144
+ if self.actual_instance is None:
145
+ return "null"
146
+
147
+ if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
148
+ return self.actual_instance.to_json()
149
+ else:
150
+ return json.dumps(self.actual_instance)
151
+
152
+ def to_dict(self) -> Optional[Union[Dict[str, Any], FileAsset, MultiAsset, NullAsset, TextAsset]]:
153
+ """Returns the dict representation of the actual instance"""
154
+ if self.actual_instance is None:
155
+ return None
156
+
157
+ if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
158
+ return self.actual_instance.to_dict()
159
+ else:
160
+ # primitive type
161
+ return self.actual_instance
162
+
163
+ def to_str(self) -> str:
164
+ """Returns the string representation of the actual instance"""
165
+ return pprint.pformat(self.model_dump())
166
+
167
+ from rapidata.api_client.models.multi_asset import MultiAsset
168
+ # TODO: Rewrite to not use raise_errors
169
+ MultiAssetAssetsInner.model_rebuild(raise_errors=False)
170
+
@@ -19,6 +19,7 @@ import json
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
21
21
  from typing import Any, ClassVar, Dict, List, Optional
22
+ from rapidata.api_client.models.file_asset_metadata_value import FileAssetMetadataValue
22
23
  from typing import Optional, Set
23
24
  from typing_extensions import Self
24
25
 
@@ -105,7 +106,4 @@ class NullAsset(BaseModel):
105
106
  })
106
107
  return _obj
107
108
 
108
- from rapidata.api_client.models.file_asset_metadata_value import FileAssetMetadataValue
109
- # TODO: Rewrite to not use raise_errors
110
- NullAsset.model_rebuild(raise_errors=False)
111
109
 
@@ -19,6 +19,7 @@ import json
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
21
21
  from typing import Any, ClassVar, Dict, List, Optional
22
+ from rapidata.api_client.models.file_asset_metadata_value import FileAssetMetadataValue
22
23
  from typing import Optional, Set
23
24
  from typing_extensions import Self
24
25
 
@@ -107,7 +108,4 @@ class TextAsset(BaseModel):
107
108
  })
108
109
  return _obj
109
110
 
110
- from rapidata.api_client.models.file_asset_metadata_value import FileAssetMetadataValue
111
- # TODO: Rewrite to not use raise_errors
112
- TextAsset.model_rebuild(raise_errors=False)
113
111
 
@@ -19,12 +19,13 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, f
19
19
  from typing import Any, List, Optional
20
20
  from rapidata.api_client.models.compare_workflow_config import CompareWorkflowConfig
21
21
  from rapidata.api_client.models.evaluation_workflow_config import EvaluationWorkflowConfig
22
+ from rapidata.api_client.models.grouped_ranking_workflow_config import GroupedRankingWorkflowConfig
22
23
  from rapidata.api_client.models.simple_workflow_config import SimpleWorkflowConfig
23
24
  from pydantic import StrictStr, Field
24
25
  from typing import Union, List, Set, Optional, Dict
25
26
  from typing_extensions import Literal, Self
26
27
 
27
- WORKFLOWCONFIGARTIFACTMODELWORKFLOWCONFIG_ONE_OF_SCHEMAS = ["CompareWorkflowConfig", "EvaluationWorkflowConfig", "SimpleWorkflowConfig"]
28
+ WORKFLOWCONFIGARTIFACTMODELWORKFLOWCONFIG_ONE_OF_SCHEMAS = ["CompareWorkflowConfig", "EvaluationWorkflowConfig", "GroupedRankingWorkflowConfig", "SimpleWorkflowConfig"]
28
29
 
29
30
  class WorkflowConfigArtifactModelWorkflowConfig(BaseModel):
30
31
  """
@@ -34,10 +35,12 @@ class WorkflowConfigArtifactModelWorkflowConfig(BaseModel):
34
35
  oneof_schema_1_validator: Optional[CompareWorkflowConfig] = None
35
36
  # data type: EvaluationWorkflowConfig
36
37
  oneof_schema_2_validator: Optional[EvaluationWorkflowConfig] = None
38
+ # data type: GroupedRankingWorkflowConfig
39
+ oneof_schema_3_validator: Optional[GroupedRankingWorkflowConfig] = None
37
40
  # data type: SimpleWorkflowConfig
38
- oneof_schema_3_validator: Optional[SimpleWorkflowConfig] = None
39
- actual_instance: Optional[Union[CompareWorkflowConfig, EvaluationWorkflowConfig, SimpleWorkflowConfig]] = None
40
- one_of_schemas: Set[str] = { "CompareWorkflowConfig", "EvaluationWorkflowConfig", "SimpleWorkflowConfig" }
41
+ oneof_schema_4_validator: Optional[SimpleWorkflowConfig] = None
42
+ actual_instance: Optional[Union[CompareWorkflowConfig, EvaluationWorkflowConfig, GroupedRankingWorkflowConfig, SimpleWorkflowConfig]] = None
43
+ one_of_schemas: Set[str] = { "CompareWorkflowConfig", "EvaluationWorkflowConfig", "GroupedRankingWorkflowConfig", "SimpleWorkflowConfig" }
41
44
 
42
45
  model_config = ConfigDict(
43
46
  validate_assignment=True,
@@ -73,6 +76,11 @@ class WorkflowConfigArtifactModelWorkflowConfig(BaseModel):
73
76
  error_messages.append(f"Error! Input type `{type(v)}` is not `EvaluationWorkflowConfig`")
74
77
  else:
75
78
  match += 1
79
+ # validate data type: GroupedRankingWorkflowConfig
80
+ if not isinstance(v, GroupedRankingWorkflowConfig):
81
+ error_messages.append(f"Error! Input type `{type(v)}` is not `GroupedRankingWorkflowConfig`")
82
+ else:
83
+ match += 1
76
84
  # validate data type: SimpleWorkflowConfig
77
85
  if not isinstance(v, SimpleWorkflowConfig):
78
86
  error_messages.append(f"Error! Input type `{type(v)}` is not `SimpleWorkflowConfig`")
@@ -80,10 +88,10 @@ class WorkflowConfigArtifactModelWorkflowConfig(BaseModel):
80
88
  match += 1
81
89
  if match > 1:
82
90
  # more than 1 match
83
- raise ValueError("Multiple matches found when setting `actual_instance` in WorkflowConfigArtifactModelWorkflowConfig with oneOf schemas: CompareWorkflowConfig, EvaluationWorkflowConfig, SimpleWorkflowConfig. Details: " + ", ".join(error_messages))
91
+ raise ValueError("Multiple matches found when setting `actual_instance` in WorkflowConfigArtifactModelWorkflowConfig with oneOf schemas: CompareWorkflowConfig, EvaluationWorkflowConfig, GroupedRankingWorkflowConfig, SimpleWorkflowConfig. Details: " + ", ".join(error_messages))
84
92
  elif match == 0:
85
93
  # no match
86
- raise ValueError("No match found when setting `actual_instance` in WorkflowConfigArtifactModelWorkflowConfig with oneOf schemas: CompareWorkflowConfig, EvaluationWorkflowConfig, SimpleWorkflowConfig. Details: " + ", ".join(error_messages))
94
+ raise ValueError("No match found when setting `actual_instance` in WorkflowConfigArtifactModelWorkflowConfig with oneOf schemas: CompareWorkflowConfig, EvaluationWorkflowConfig, GroupedRankingWorkflowConfig, SimpleWorkflowConfig. Details: " + ", ".join(error_messages))
87
95
  else:
88
96
  return v
89
97
 
@@ -110,6 +118,12 @@ class WorkflowConfigArtifactModelWorkflowConfig(BaseModel):
110
118
  match += 1
111
119
  except (ValidationError, ValueError) as e:
112
120
  error_messages.append(str(e))
121
+ # deserialize data into GroupedRankingWorkflowConfig
122
+ try:
123
+ instance.actual_instance = GroupedRankingWorkflowConfig.from_json(json_str)
124
+ match += 1
125
+ except (ValidationError, ValueError) as e:
126
+ error_messages.append(str(e))
113
127
  # deserialize data into SimpleWorkflowConfig
114
128
  try:
115
129
  instance.actual_instance = SimpleWorkflowConfig.from_json(json_str)
@@ -119,10 +133,10 @@ class WorkflowConfigArtifactModelWorkflowConfig(BaseModel):
119
133
 
120
134
  if match > 1:
121
135
  # more than 1 match
122
- raise ValueError("Multiple matches found when deserializing the JSON string into WorkflowConfigArtifactModelWorkflowConfig with oneOf schemas: CompareWorkflowConfig, EvaluationWorkflowConfig, SimpleWorkflowConfig. Details: " + ", ".join(error_messages))
136
+ raise ValueError("Multiple matches found when deserializing the JSON string into WorkflowConfigArtifactModelWorkflowConfig with oneOf schemas: CompareWorkflowConfig, EvaluationWorkflowConfig, GroupedRankingWorkflowConfig, SimpleWorkflowConfig. Details: " + ", ".join(error_messages))
123
137
  elif match == 0:
124
138
  # no match
125
- raise ValueError("No match found when deserializing the JSON string into WorkflowConfigArtifactModelWorkflowConfig with oneOf schemas: CompareWorkflowConfig, EvaluationWorkflowConfig, SimpleWorkflowConfig. Details: " + ", ".join(error_messages))
139
+ raise ValueError("No match found when deserializing the JSON string into WorkflowConfigArtifactModelWorkflowConfig with oneOf schemas: CompareWorkflowConfig, EvaluationWorkflowConfig, GroupedRankingWorkflowConfig, SimpleWorkflowConfig. Details: " + ", ".join(error_messages))
126
140
  else:
127
141
  return instance
128
142
 
@@ -136,7 +150,7 @@ class WorkflowConfigArtifactModelWorkflowConfig(BaseModel):
136
150
  else:
137
151
  return json.dumps(self.actual_instance)
138
152
 
139
- def to_dict(self) -> Optional[Union[Dict[str, Any], CompareWorkflowConfig, EvaluationWorkflowConfig, SimpleWorkflowConfig]]:
153
+ def to_dict(self) -> Optional[Union[Dict[str, Any], CompareWorkflowConfig, EvaluationWorkflowConfig, GroupedRankingWorkflowConfig, SimpleWorkflowConfig]]:
140
154
  """Returns the dict representation of the actual instance"""
141
155
  if self.actual_instance is None:
142
156
  return None
@@ -128,6 +128,7 @@ Class | Method | HTTP request | Description
128
128
  *DatasetApi* | [**dataset_dataset_id_progress_get**](rapidata/api_client/docs/DatasetApi.md#dataset_dataset_id_progress_get) | **GET** /dataset/{datasetId}/progress | Gets the upload progress of a dataset.
129
129
  *EvaluationWorkflowApi* | [**workflow_evaluation_workflow_id_results_get**](rapidata/api_client/docs/EvaluationWorkflowApi.md#workflow_evaluation_workflow_id_results_get) | **GET** /workflow/evaluation/{workflowId}/results | Get the results for an evaluation workflow.
130
130
  *FeedbackApi* | [**feedback_post**](rapidata/api_client/docs/FeedbackApi.md#feedback_post) | **POST** /feedback | Submits feedback about our services.
131
+ *GroupedRankingWorkflowApi* | [**workflow_grouped_ranking_workflow_id_results_get**](rapidata/api_client/docs/GroupedRankingWorkflowApi.md#workflow_grouped_ranking_workflow_id_results_get) | **GET** /workflow/grouped-ranking/{workflowId}/results | Get the result overview for a multi compare workflow.
131
132
  *IdentityApi* | [**identity_bridge_token_get**](rapidata/api_client/docs/IdentityApi.md#identity_bridge_token_get) | **GET** /identity/bridge-token | Tries to read the bridge token keys for a given read key. The read key is used to retrieve the authentication result written by the write key.
132
133
  *IdentityApi* | [**identity_bridge_token_post**](rapidata/api_client/docs/IdentityApi.md#identity_bridge_token_post) | **POST** /identity/bridge-token | Creates a pair of read and write keys for a client. The write key is used to store the authentication result. The read key is used to retrieve the authentication result.
133
134
  *IdentityApi* | [**identity_google_one_tap_post**](rapidata/api_client/docs/IdentityApi.md#identity_google_one_tap_post) | **POST** /identity/google-one-tap | Signs in a user using a token received from Google One Tap.
@@ -228,7 +229,6 @@ Class | Method | HTTP request | Description
228
229
  - [AndUserFilterModelFiltersInner](rapidata/api_client/docs/AndUserFilterModelFiltersInner.md)
229
230
  - [AreRapidsActiveResult](rapidata/api_client/docs/AreRapidsActiveResult.md)
230
231
  - [AssetMetadata](rapidata/api_client/docs/AssetMetadata.md)
231
- - [AssetMetadataAsset](rapidata/api_client/docs/AssetMetadataAsset.md)
232
232
  - [AssetMetadataModel](rapidata/api_client/docs/AssetMetadataModel.md)
233
233
  - [AttachCategoryRapidBlueprint](rapidata/api_client/docs/AttachCategoryRapidBlueprint.md)
234
234
  - [AttachCategoryResult](rapidata/api_client/docs/AttachCategoryResult.md)
@@ -378,6 +378,9 @@ Class | Method | HTTP request | Description
378
378
  - [GetDatasetProgressResult](rapidata/api_client/docs/GetDatasetProgressResult.md)
379
379
  - [GetEvaluationWorkflowResultsModel](rapidata/api_client/docs/GetEvaluationWorkflowResultsModel.md)
380
380
  - [GetFailedDatapointsResult](rapidata/api_client/docs/GetFailedDatapointsResult.md)
381
+ - [GetGroupedRankingWorkflowResultsModel](rapidata/api_client/docs/GetGroupedRankingWorkflowResultsModel.md)
382
+ - [GetGroupedRankingWorkflowResultsResult](rapidata/api_client/docs/GetGroupedRankingWorkflowResultsResult.md)
383
+ - [GetGroupedRankingWorkflowResultsResultPagedResult](rapidata/api_client/docs/GetGroupedRankingWorkflowResultsResultPagedResult.md)
381
384
  - [GetLeaderboardByIdResult](rapidata/api_client/docs/GetLeaderboardByIdResult.md)
382
385
  - [GetOrderByIdResult](rapidata/api_client/docs/GetOrderByIdResult.md)
383
386
  - [GetParticipantByIdResult](rapidata/api_client/docs/GetParticipantByIdResult.md)
@@ -403,6 +406,9 @@ Class | Method | HTTP request | Description
403
406
  - [GetWorkflowResultsResult](rapidata/api_client/docs/GetWorkflowResultsResult.md)
404
407
  - [GetWorkflowResultsResultPagedResult](rapidata/api_client/docs/GetWorkflowResultsResultPagedResult.md)
405
408
  - [GoogleOneTapLoginModel](rapidata/api_client/docs/GoogleOneTapLoginModel.md)
409
+ - [GroupedRankingWorkflowConfig](rapidata/api_client/docs/GroupedRankingWorkflowConfig.md)
410
+ - [GroupedRankingWorkflowModel](rapidata/api_client/docs/GroupedRankingWorkflowModel.md)
411
+ - [GroupedRankingWorkflowModel1](rapidata/api_client/docs/GroupedRankingWorkflowModel1.md)
406
412
  - [IWorkflowModelPagedResult](rapidata/api_client/docs/IWorkflowModelPagedResult.md)
407
413
  - [ImageDimensionMetadata](rapidata/api_client/docs/ImageDimensionMetadata.md)
408
414
  - [ImageDimensionMetadataModel](rapidata/api_client/docs/ImageDimensionMetadataModel.md)
@@ -431,6 +437,7 @@ Class | Method | HTTP request | Description
431
437
  - [LocationMetadataModel](rapidata/api_client/docs/LocationMetadataModel.md)
432
438
  - [LogicOperator](rapidata/api_client/docs/LogicOperator.md)
433
439
  - [MultiAsset](rapidata/api_client/docs/MultiAsset.md)
440
+ - [MultiAssetAssetsInner](rapidata/api_client/docs/MultiAssetAssetsInner.md)
434
441
  - [MultiAssetInput](rapidata/api_client/docs/MultiAssetInput.md)
435
442
  - [MultiAssetInputAssetsInner](rapidata/api_client/docs/MultiAssetInputAssetsInner.md)
436
443
  - [MultiAssetModel](rapidata/api_client/docs/MultiAssetModel.md)
@@ -130,11 +130,10 @@ class BenchmarkParticipant:
130
130
  successful_id, failed_id = future.result()
131
131
  if successful_id:
132
132
  successful_uploads.append(successful_id)
133
+ pbar.update(1)
133
134
  if failed_id:
134
135
  failed_uploads.append(failed_id)
135
136
  except Exception as e:
136
137
  logger.error(f"Future execution failed: {str(e)}")
137
138
 
138
- pbar.update(1)
139
-
140
139
  return successful_uploads, failed_uploads
@@ -87,9 +87,7 @@ class RapidataDataset:
87
87
  chunk_successful, chunk_failed = future.result()
88
88
  successful_uploads.extend(chunk_successful)
89
89
  failed_uploads.extend(chunk_failed)
90
- progress_bar.update(
91
- len(chunk_successful) + len(chunk_failed)
92
- )
90
+ progress_bar.update(len(chunk_successful))
93
91
  except Exception as e:
94
92
  logger.error("Future execution failed: %s", str(e))
95
93
 
@@ -53,14 +53,14 @@ class RapidataOrder:
53
53
  self.id = order_id
54
54
  self.name = name
55
55
  self.__created_at: datetime | None = None
56
- self.__openapi_service = openapi_service
56
+ self._openapi_service = openapi_service
57
57
  self.__workflow_id: str = ""
58
58
  self.__campaign_id: str = ""
59
59
  self.__pipeline_id: str = ""
60
60
  self._max_retries = 10
61
61
  self._retry_delay = 2
62
62
  self.order_details_page = (
63
- f"https://app.{self.__openapi_service.environment}/order/detail/{self.id}"
63
+ f"https://app.{self._openapi_service.environment}/order/detail/{self.id}"
64
64
  )
65
65
  logger.debug("RapidataOrder initialized")
66
66
 
@@ -68,7 +68,7 @@ class RapidataOrder:
68
68
  def created_at(self) -> datetime:
69
69
  """Returns the creation date of the order."""
70
70
  if not self.__created_at:
71
- self.__created_at = self.__openapi_service.order_api.order_order_id_get(
71
+ self.__created_at = self._openapi_service.order_api.order_order_id_get(
72
72
  self.id
73
73
  ).order_date
74
74
  return self.__created_at
@@ -77,7 +77,7 @@ class RapidataOrder:
77
77
  """Runs the order to start collecting responses."""
78
78
  with tracer.start_as_current_span("RapidataOrder.run"):
79
79
  logger.info("Starting order '%s'", self)
80
- self.__openapi_service.order_api.order_order_id_submit_post(
80
+ self._openapi_service.order_api.order_order_id_submit_post(
81
81
  self.id, SubmitOrderModel(ignoreFailedDatapoints=True)
82
82
  )
83
83
  logger.debug("Order '%s' has been started.", self)
@@ -90,7 +90,7 @@ class RapidataOrder:
90
90
  """Pauses the order."""
91
91
  with tracer.start_as_current_span("RapidataOrder.pause"):
92
92
  logger.info("Pausing order '%s'", self)
93
- self.__openapi_service.order_api.order_order_id_pause_post(self.id)
93
+ self._openapi_service.order_api.order_order_id_pause_post(self.id)
94
94
  logger.debug("Order '%s' has been paused.", self)
95
95
  managed_print(f"Order '{self}' has been paused.")
96
96
 
@@ -98,7 +98,7 @@ class RapidataOrder:
98
98
  """Unpauses/resumes the order."""
99
99
  with tracer.start_as_current_span("RapidataOrder.unpause"):
100
100
  logger.info("Unpausing order '%s'", self)
101
- self.__openapi_service.order_api.order_order_id_resume_post(self.id)
101
+ self._openapi_service.order_api.order_order_id_resume_post(self.id)
102
102
  logger.debug("Order '%s' has been unpaused.", self)
103
103
  managed_print(f"Order '{self}' has been unpaused.")
104
104
 
@@ -106,7 +106,7 @@ class RapidataOrder:
106
106
  """Deletes the order."""
107
107
  with tracer.start_as_current_span("RapidataOrder.delete"):
108
108
  logger.info("Deleting order '%s'", self)
109
- self.__openapi_service.order_api.order_order_id_delete(self.id)
109
+ self._openapi_service.order_api.order_order_id_delete(self.id)
110
110
  logger.debug("Order '%s' has been deleted.", self)
111
111
  managed_print(f"Order '{self}' has been deleted.")
112
112
 
@@ -125,7 +125,7 @@ class RapidataOrder:
125
125
  Failed: The order has failed.
126
126
  """
127
127
  with tracer.start_as_current_span("RapidataOrder.get_status"):
128
- return self.__openapi_service.order_api.order_order_id_get(self.id).state
128
+ return self._openapi_service.order_api.order_order_id_get(self.id).state
129
129
 
130
130
  def display_progress_bar(self, refresh_rate: int = 5) -> None:
131
131
  """
@@ -180,7 +180,7 @@ class RapidataOrder:
180
180
  try:
181
181
  with suppress_rapidata_error_logging():
182
182
  workflow_id = self.__get_workflow_id()
183
- progress = self.__openapi_service.workflow_api.workflow_workflow_id_progress_get(
183
+ progress = self._openapi_service.workflow_api.workflow_workflow_id_progress_get(
184
184
  workflow_id
185
185
  )
186
186
  break
@@ -223,7 +223,7 @@ class RapidataOrder:
223
223
  try:
224
224
  return RapidataResults(
225
225
  json.loads(
226
- self.__openapi_service.order_api.order_order_id_download_results_get(
226
+ self._openapi_service.order_api.order_order_id_download_results_get(
227
227
  order_id=self.id
228
228
  )
229
229
  )
@@ -260,13 +260,13 @@ class RapidataOrder:
260
260
  logger.info("Opening order preview in browser...")
261
261
  if self.get_status() == OrderState.CREATED:
262
262
  logger.info("Order is still in state created. Setting it to preview.")
263
- self.__openapi_service.order_api.order_order_id_preview_post(
263
+ self._openapi_service.order_api.order_order_id_preview_post(
264
264
  self.id, PreviewOrderModel(ignoreFailedDatapoints=True)
265
265
  )
266
266
  logger.info("Order is now in preview state.")
267
267
 
268
268
  campaign_id = self.__get_campaign_id()
269
- auth_url = f"https://app.{self.__openapi_service.environment}/order/detail/{self.id}/preview?campaignId={campaign_id}"
269
+ auth_url = f"https://app.{self._openapi_service.environment}/order/detail/{self.id}/preview?campaignId={campaign_id}"
270
270
  could_open_browser = webbrowser.open(auth_url)
271
271
  if not could_open_browser:
272
272
  encoded_url = urllib.parse.quote(auth_url, safe="%/:=&?~#+!$,;'@()*[]")
@@ -282,7 +282,7 @@ class RapidataOrder:
282
282
  for _ in range(self._max_retries):
283
283
  try:
284
284
  self.__pipeline_id = (
285
- self.__openapi_service.order_api.order_order_id_get(
285
+ self._openapi_service.order_api.order_order_id_get(
286
286
  self.id
287
287
  ).pipeline_id
288
288
  )
@@ -312,7 +312,7 @@ class RapidataOrder:
312
312
  pipeline_id = self.__get_pipeline_id()
313
313
  for _ in range(self._max_retries):
314
314
  try:
315
- pipeline = self.__openapi_service.pipeline_api.pipeline_pipeline_id_get(
315
+ pipeline = self._openapi_service.pipeline_api.pipeline_pipeline_id_get(
316
316
  pipeline_id
317
317
  )
318
318
  self.__workflow_id = cast(
@@ -332,14 +332,14 @@ class RapidataOrder:
332
332
  """Internal method to fetch preliminary results."""
333
333
  try:
334
334
  pipeline_id = self.__get_pipeline_id()
335
- download_id = self.__openapi_service.pipeline_api.pipeline_pipeline_id_preliminary_download_post(
335
+ download_id = self._openapi_service.pipeline_api.pipeline_pipeline_id_preliminary_download_post(
336
336
  pipeline_id, PreliminaryDownloadModel(sendEmail=False)
337
337
  ).download_id
338
338
 
339
339
  elapsed = 0
340
340
  timeout = 60
341
341
  while elapsed < timeout:
342
- preliminary_results = self.__openapi_service.pipeline_api.pipeline_preliminary_download_preliminary_download_id_get(
342
+ preliminary_results = self._openapi_service.pipeline_api.pipeline_preliminary_download_preliminary_download_id_get(
343
343
  preliminary_download_id=download_id
344
344
  )
345
345
  if preliminary_results: