scorable 1.6.4__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 scorable might be problematic. Click here for more details.

Files changed (228) hide show
  1. root/__about__.py +4 -0
  2. root/__init__.py +17 -0
  3. root/client.py +207 -0
  4. root/datasets.py +231 -0
  5. root/execution_logs.py +162 -0
  6. root/generated/__init__.py +0 -0
  7. root/generated/openapi_aclient/__init__.py +1 -0
  8. root/generated/openapi_aclient/api/__init__.py +1 -0
  9. root/generated/openapi_aclient/api/datasets_api.py +1274 -0
  10. root/generated/openapi_aclient/api/evaluators_api.py +3641 -0
  11. root/generated/openapi_aclient/api/execution_logs_api.py +751 -0
  12. root/generated/openapi_aclient/api/judges_api.py +3794 -0
  13. root/generated/openapi_aclient/api/models_api.py +1473 -0
  14. root/generated/openapi_aclient/api/objectives_api.py +1767 -0
  15. root/generated/openapi_aclient/api_client.py +662 -0
  16. root/generated/openapi_aclient/api_response.py +22 -0
  17. root/generated/openapi_aclient/configuration.py +470 -0
  18. root/generated/openapi_aclient/exceptions.py +197 -0
  19. root/generated/openapi_aclient/models/__init__.py +122 -0
  20. root/generated/openapi_aclient/models/data_set_create.py +118 -0
  21. root/generated/openapi_aclient/models/data_set_create_request.py +105 -0
  22. root/generated/openapi_aclient/models/data_set_list.py +129 -0
  23. root/generated/openapi_aclient/models/data_set_type.py +36 -0
  24. root/generated/openapi_aclient/models/dataset_range_request.py +93 -0
  25. root/generated/openapi_aclient/models/evaluator.py +273 -0
  26. root/generated/openapi_aclient/models/evaluator_calibration_output.py +101 -0
  27. root/generated/openapi_aclient/models/evaluator_calibration_result.py +134 -0
  28. root/generated/openapi_aclient/models/evaluator_demonstrations.py +107 -0
  29. root/generated/openapi_aclient/models/evaluator_demonstrations_request.py +107 -0
  30. root/generated/openapi_aclient/models/evaluator_execution_function_parameter_property_request.py +86 -0
  31. root/generated/openapi_aclient/models/evaluator_execution_function_parameter_request.py +109 -0
  32. root/generated/openapi_aclient/models/evaluator_execution_function_parameter_type_enum.py +35 -0
  33. root/generated/openapi_aclient/models/evaluator_execution_function_request.py +99 -0
  34. root/generated/openapi_aclient/models/evaluator_execution_functions_request.py +98 -0
  35. root/generated/openapi_aclient/models/evaluator_execution_functions_type_enum.py +35 -0
  36. root/generated/openapi_aclient/models/evaluator_execution_request.py +134 -0
  37. root/generated/openapi_aclient/models/evaluator_execution_result.py +114 -0
  38. root/generated/openapi_aclient/models/evaluator_inputs_value.py +100 -0
  39. root/generated/openapi_aclient/models/evaluator_inputs_value_items.py +89 -0
  40. root/generated/openapi_aclient/models/evaluator_list_output.py +198 -0
  41. root/generated/openapi_aclient/models/evaluator_reference.py +90 -0
  42. root/generated/openapi_aclient/models/evaluator_reference_request.py +90 -0
  43. root/generated/openapi_aclient/models/evaluator_request.py +194 -0
  44. root/generated/openapi_aclient/models/evaluator_result.py +110 -0
  45. root/generated/openapi_aclient/models/execution_log_details.py +291 -0
  46. root/generated/openapi_aclient/models/execution_log_details_evaluation_context.py +83 -0
  47. root/generated/openapi_aclient/models/execution_log_details_evaluator_latencies_inner.py +83 -0
  48. root/generated/openapi_aclient/models/execution_log_list.py +217 -0
  49. root/generated/openapi_aclient/models/execution_log_list_evaluation_context.py +83 -0
  50. root/generated/openapi_aclient/models/generation_model_params_request.py +93 -0
  51. root/generated/openapi_aclient/models/id.py +87 -0
  52. root/generated/openapi_aclient/models/input_variable.py +121 -0
  53. root/generated/openapi_aclient/models/input_variable_request.py +82 -0
  54. root/generated/openapi_aclient/models/judge.py +178 -0
  55. root/generated/openapi_aclient/models/judge_execution_request.py +114 -0
  56. root/generated/openapi_aclient/models/judge_execution_response.py +97 -0
  57. root/generated/openapi_aclient/models/judge_files_inner.py +84 -0
  58. root/generated/openapi_aclient/models/judge_generator_request.py +142 -0
  59. root/generated/openapi_aclient/models/judge_generator_response.py +88 -0
  60. root/generated/openapi_aclient/models/judge_invite_request.py +87 -0
  61. root/generated/openapi_aclient/models/judge_list.py +156 -0
  62. root/generated/openapi_aclient/models/judge_rectifier_request_request.py +114 -0
  63. root/generated/openapi_aclient/models/judge_rectifier_response.py +121 -0
  64. root/generated/openapi_aclient/models/judge_request.py +108 -0
  65. root/generated/openapi_aclient/models/model.py +126 -0
  66. root/generated/openapi_aclient/models/model_list.py +115 -0
  67. root/generated/openapi_aclient/models/model_params.py +89 -0
  68. root/generated/openapi_aclient/models/model_params_request.py +89 -0
  69. root/generated/openapi_aclient/models/model_request.py +118 -0
  70. root/generated/openapi_aclient/models/nested_evaluator.py +110 -0
  71. root/generated/openapi_aclient/models/nested_evaluator_objective.py +87 -0
  72. root/generated/openapi_aclient/models/nested_evaluator_request.py +92 -0
  73. root/generated/openapi_aclient/models/nested_objective_evaluator.py +105 -0
  74. root/generated/openapi_aclient/models/nested_objective_evaluator_request.py +92 -0
  75. root/generated/openapi_aclient/models/nested_objective_list.py +111 -0
  76. root/generated/openapi_aclient/models/nested_user_details.py +88 -0
  77. root/generated/openapi_aclient/models/nested_user_details_request.py +82 -0
  78. root/generated/openapi_aclient/models/nested_vector_objective.py +88 -0
  79. root/generated/openapi_aclient/models/nested_vector_objective_request.py +82 -0
  80. root/generated/openapi_aclient/models/objective.py +157 -0
  81. root/generated/openapi_aclient/models/objective_list.py +128 -0
  82. root/generated/openapi_aclient/models/objective_request.py +113 -0
  83. root/generated/openapi_aclient/models/objective_validator.py +100 -0
  84. root/generated/openapi_aclient/models/objective_validator_request.py +90 -0
  85. root/generated/openapi_aclient/models/paginated_data_set_list_list.py +111 -0
  86. root/generated/openapi_aclient/models/paginated_evaluator_list.py +111 -0
  87. root/generated/openapi_aclient/models/paginated_evaluator_list_output_list.py +111 -0
  88. root/generated/openapi_aclient/models/paginated_execution_log_list_list.py +111 -0
  89. root/generated/openapi_aclient/models/paginated_judge_list_list.py +111 -0
  90. root/generated/openapi_aclient/models/paginated_model_list_list.py +111 -0
  91. root/generated/openapi_aclient/models/paginated_objective_list.py +111 -0
  92. root/generated/openapi_aclient/models/paginated_objective_list_list.py +111 -0
  93. root/generated/openapi_aclient/models/patched_evaluator_request.py +194 -0
  94. root/generated/openapi_aclient/models/patched_judge_request.py +110 -0
  95. root/generated/openapi_aclient/models/patched_model_request.py +118 -0
  96. root/generated/openapi_aclient/models/patched_objective_request.py +113 -0
  97. root/generated/openapi_aclient/models/provider.py +99 -0
  98. root/generated/openapi_aclient/models/reference_variable.py +123 -0
  99. root/generated/openapi_aclient/models/reference_variable_request.py +83 -0
  100. root/generated/openapi_aclient/models/skill_execution_validator_result.py +130 -0
  101. root/generated/openapi_aclient/models/skill_test_data_request.py +107 -0
  102. root/generated/openapi_aclient/models/skill_test_data_request_dataset_range.py +93 -0
  103. root/generated/openapi_aclient/models/skill_test_input_request.py +171 -0
  104. root/generated/openapi_aclient/models/skill_type_enum.py +36 -0
  105. root/generated/openapi_aclient/models/status_change.py +84 -0
  106. root/generated/openapi_aclient/models/status_change_request.py +84 -0
  107. root/generated/openapi_aclient/models/status_change_status_enum.py +36 -0
  108. root/generated/openapi_aclient/models/status_enum.py +38 -0
  109. root/generated/openapi_aclient/models/validation_result_status.py +36 -0
  110. root/generated/openapi_aclient/models/visibility_enum.py +38 -0
  111. root/generated/openapi_aclient/rest.py +166 -0
  112. root/generated/openapi_aclient_README.md +239 -0
  113. root/generated/openapi_client/__init__.py +1 -0
  114. root/generated/openapi_client/api/__init__.py +1 -0
  115. root/generated/openapi_client/api/datasets_api.py +1274 -0
  116. root/generated/openapi_client/api/evaluators_api.py +3641 -0
  117. root/generated/openapi_client/api/execution_logs_api.py +751 -0
  118. root/generated/openapi_client/api/judges_api.py +3794 -0
  119. root/generated/openapi_client/api/models_api.py +1473 -0
  120. root/generated/openapi_client/api/objectives_api.py +1767 -0
  121. root/generated/openapi_client/api_client.py +659 -0
  122. root/generated/openapi_client/api_response.py +22 -0
  123. root/generated/openapi_client/configuration.py +474 -0
  124. root/generated/openapi_client/exceptions.py +197 -0
  125. root/generated/openapi_client/models/__init__.py +120 -0
  126. root/generated/openapi_client/models/data_set_create.py +118 -0
  127. root/generated/openapi_client/models/data_set_create_request.py +105 -0
  128. root/generated/openapi_client/models/data_set_list.py +129 -0
  129. root/generated/openapi_client/models/data_set_type.py +36 -0
  130. root/generated/openapi_client/models/dataset_range_request.py +93 -0
  131. root/generated/openapi_client/models/evaluator.py +273 -0
  132. root/generated/openapi_client/models/evaluator_calibration_output.py +101 -0
  133. root/generated/openapi_client/models/evaluator_calibration_result.py +134 -0
  134. root/generated/openapi_client/models/evaluator_demonstrations.py +107 -0
  135. root/generated/openapi_client/models/evaluator_demonstrations_request.py +107 -0
  136. root/generated/openapi_client/models/evaluator_execution_function_parameter_property_request.py +86 -0
  137. root/generated/openapi_client/models/evaluator_execution_function_parameter_request.py +109 -0
  138. root/generated/openapi_client/models/evaluator_execution_function_parameter_type_enum.py +35 -0
  139. root/generated/openapi_client/models/evaluator_execution_function_request.py +99 -0
  140. root/generated/openapi_client/models/evaluator_execution_functions_request.py +98 -0
  141. root/generated/openapi_client/models/evaluator_execution_functions_type_enum.py +35 -0
  142. root/generated/openapi_client/models/evaluator_execution_request.py +134 -0
  143. root/generated/openapi_client/models/evaluator_execution_result.py +114 -0
  144. root/generated/openapi_client/models/evaluator_inputs_value.py +100 -0
  145. root/generated/openapi_client/models/evaluator_inputs_value_items.py +89 -0
  146. root/generated/openapi_client/models/evaluator_list_output.py +198 -0
  147. root/generated/openapi_client/models/evaluator_reference.py +90 -0
  148. root/generated/openapi_client/models/evaluator_reference_request.py +90 -0
  149. root/generated/openapi_client/models/evaluator_request.py +194 -0
  150. root/generated/openapi_client/models/evaluator_result.py +110 -0
  151. root/generated/openapi_client/models/execution_log_details.py +291 -0
  152. root/generated/openapi_client/models/execution_log_details_evaluation_context.py +83 -0
  153. root/generated/openapi_client/models/execution_log_details_evaluator_latencies_inner.py +83 -0
  154. root/generated/openapi_client/models/execution_log_list.py +215 -0
  155. root/generated/openapi_client/models/execution_log_list_evaluation_context.py +83 -0
  156. root/generated/openapi_client/models/generation_model_params_request.py +93 -0
  157. root/generated/openapi_client/models/id.py +87 -0
  158. root/generated/openapi_client/models/input_variable.py +121 -0
  159. root/generated/openapi_client/models/input_variable_request.py +82 -0
  160. root/generated/openapi_client/models/judge.py +178 -0
  161. root/generated/openapi_client/models/judge_execution_request.py +114 -0
  162. root/generated/openapi_client/models/judge_execution_response.py +97 -0
  163. root/generated/openapi_client/models/judge_files_inner.py +84 -0
  164. root/generated/openapi_client/models/judge_generator_request.py +142 -0
  165. root/generated/openapi_client/models/judge_generator_response.py +88 -0
  166. root/generated/openapi_client/models/judge_invite_request.py +87 -0
  167. root/generated/openapi_client/models/judge_list.py +156 -0
  168. root/generated/openapi_client/models/judge_rectifier_request_request.py +114 -0
  169. root/generated/openapi_client/models/judge_rectifier_response.py +121 -0
  170. root/generated/openapi_client/models/judge_request.py +108 -0
  171. root/generated/openapi_client/models/model.py +126 -0
  172. root/generated/openapi_client/models/model_list.py +115 -0
  173. root/generated/openapi_client/models/model_params.py +89 -0
  174. root/generated/openapi_client/models/model_params_request.py +89 -0
  175. root/generated/openapi_client/models/model_request.py +118 -0
  176. root/generated/openapi_client/models/nested_evaluator.py +110 -0
  177. root/generated/openapi_client/models/nested_evaluator_objective.py +87 -0
  178. root/generated/openapi_client/models/nested_evaluator_request.py +92 -0
  179. root/generated/openapi_client/models/nested_objective_evaluator.py +105 -0
  180. root/generated/openapi_client/models/nested_objective_evaluator_request.py +92 -0
  181. root/generated/openapi_client/models/nested_objective_list.py +111 -0
  182. root/generated/openapi_client/models/nested_user_details.py +88 -0
  183. root/generated/openapi_client/models/nested_user_details_request.py +82 -0
  184. root/generated/openapi_client/models/nested_vector_objective.py +88 -0
  185. root/generated/openapi_client/models/nested_vector_objective_request.py +82 -0
  186. root/generated/openapi_client/models/objective.py +157 -0
  187. root/generated/openapi_client/models/objective_list.py +128 -0
  188. root/generated/openapi_client/models/objective_request.py +113 -0
  189. root/generated/openapi_client/models/objective_validator.py +100 -0
  190. root/generated/openapi_client/models/objective_validator_request.py +90 -0
  191. root/generated/openapi_client/models/paginated_data_set_list_list.py +111 -0
  192. root/generated/openapi_client/models/paginated_evaluator_list.py +111 -0
  193. root/generated/openapi_client/models/paginated_evaluator_list_output_list.py +111 -0
  194. root/generated/openapi_client/models/paginated_execution_log_list_list.py +111 -0
  195. root/generated/openapi_client/models/paginated_judge_list_list.py +111 -0
  196. root/generated/openapi_client/models/paginated_model_list_list.py +111 -0
  197. root/generated/openapi_client/models/paginated_objective_list.py +111 -0
  198. root/generated/openapi_client/models/paginated_objective_list_list.py +111 -0
  199. root/generated/openapi_client/models/patched_evaluator_request.py +194 -0
  200. root/generated/openapi_client/models/patched_judge_request.py +110 -0
  201. root/generated/openapi_client/models/patched_model_request.py +118 -0
  202. root/generated/openapi_client/models/patched_objective_request.py +113 -0
  203. root/generated/openapi_client/models/provider.py +99 -0
  204. root/generated/openapi_client/models/reference_variable.py +123 -0
  205. root/generated/openapi_client/models/reference_variable_request.py +83 -0
  206. root/generated/openapi_client/models/skill_execution_validator_result.py +130 -0
  207. root/generated/openapi_client/models/skill_test_data_request.py +107 -0
  208. root/generated/openapi_client/models/skill_test_data_request_dataset_range.py +93 -0
  209. root/generated/openapi_client/models/skill_test_input_request.py +171 -0
  210. root/generated/openapi_client/models/skill_type_enum.py +36 -0
  211. root/generated/openapi_client/models/status_change.py +84 -0
  212. root/generated/openapi_client/models/status_change_request.py +84 -0
  213. root/generated/openapi_client/models/status_change_status_enum.py +36 -0
  214. root/generated/openapi_client/models/status_enum.py +38 -0
  215. root/generated/openapi_client/models/validation_result_status.py +36 -0
  216. root/generated/openapi_client/models/visibility_enum.py +38 -0
  217. root/generated/openapi_client/rest.py +203 -0
  218. root/generated/openapi_client_README.md +238 -0
  219. root/judges.py +681 -0
  220. root/models.py +197 -0
  221. root/objectives.py +343 -0
  222. root/py.typed +0 -0
  223. root/skills.py +1707 -0
  224. root/utils.py +90 -0
  225. scorable-1.6.4.dist-info/METADATA +395 -0
  226. scorable-1.6.4.dist-info/RECORD +228 -0
  227. scorable-1.6.4.dist-info/WHEEL +4 -0
  228. scorable-1.6.4.dist-info/licenses/LICENSE +202 -0
@@ -0,0 +1,99 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Root Signals API
5
+
6
+ Root Signals JSON API provides a way to access Root Signals using provisioned API token
7
+
8
+ The version of the OpenAPI document: 1.0.0 (latest)
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ from __future__ import annotations
15
+
16
+ import json
17
+ import pprint
18
+ import re # noqa: F401
19
+ from typing import Any, ClassVar, Dict, List, Optional, Set
20
+
21
+ from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr
22
+ from typing_extensions import Self
23
+
24
+
25
+ class Provider(BaseModel):
26
+ """
27
+ Provider
28
+ """ # noqa: E501
29
+
30
+ id: StrictStr
31
+ name: StrictStr
32
+ logo_light: Optional[StrictStr] = None
33
+ logo_dark: Optional[StrictStr] = None
34
+ is_gdpr_compliant: Optional[StrictBool] = None
35
+ __properties: ClassVar[List[str]] = ["id", "name", "logo_light", "logo_dark", "is_gdpr_compliant"]
36
+
37
+ model_config = ConfigDict(
38
+ populate_by_name=True,
39
+ validate_assignment=True,
40
+ protected_namespaces=(),
41
+ )
42
+
43
+ def to_str(self) -> str:
44
+ """Returns the string representation of the model using alias"""
45
+ return pprint.pformat(self.model_dump(by_alias=True))
46
+
47
+ def to_json(self) -> str:
48
+ """Returns the JSON representation of the model using alias"""
49
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
50
+ return json.dumps(self.to_dict())
51
+
52
+ @classmethod
53
+ def from_json(cls, json_str: str) -> Optional[Self]:
54
+ """Create an instance of Provider from a JSON string"""
55
+ return cls.from_dict(json.loads(json_str))
56
+
57
+ def to_dict(self) -> Dict[str, Any]:
58
+ """Return the dictionary representation of the model using alias.
59
+
60
+ This has the following differences from calling pydantic's
61
+ `self.model_dump(by_alias=True)`:
62
+
63
+ * `None` is only added to the output dict for nullable fields that
64
+ were set at model initialization. Other fields with value `None`
65
+ are ignored.
66
+ * OpenAPI `readOnly` fields are excluded.
67
+ """
68
+ excluded_fields: Set[str] = set(
69
+ [
70
+ "id",
71
+ ]
72
+ )
73
+
74
+ _dict = self.model_dump(
75
+ by_alias=True,
76
+ exclude=excluded_fields,
77
+ exclude_none=True,
78
+ )
79
+ return _dict
80
+
81
+ @classmethod
82
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
83
+ """Create an instance of Provider from a dict"""
84
+ if obj is None:
85
+ return None
86
+
87
+ if not isinstance(obj, dict):
88
+ return cls.model_validate(obj)
89
+
90
+ _obj = cls.model_validate(
91
+ {
92
+ "id": obj.get("id"),
93
+ "name": obj.get("name"),
94
+ "logo_light": obj.get("logo_light"),
95
+ "logo_dark": obj.get("logo_dark"),
96
+ "is_gdpr_compliant": obj.get("is_gdpr_compliant"),
97
+ }
98
+ )
99
+ return _obj
@@ -0,0 +1,123 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Root Signals API
5
+
6
+ Root Signals JSON API provides a way to access Root Signals using provisioned API token
7
+
8
+ The version of the OpenAPI document: 1.0.0 (latest)
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ from __future__ import annotations
15
+
16
+ import json
17
+ import pprint
18
+ import re # noqa: F401
19
+ from datetime import datetime
20
+ from typing import Any, ClassVar, Dict, List, Optional, Set
21
+
22
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
23
+ from typing_extensions import Annotated, Self
24
+
25
+
26
+ class ReferenceVariable(BaseModel):
27
+ """
28
+ ReferenceVariable
29
+ """ # noqa: E501
30
+
31
+ id: StrictStr
32
+ dataset: StrictStr
33
+ created_at: Optional[datetime]
34
+ updated_at: Optional[datetime]
35
+ name: Annotated[str, Field(strict=True, max_length=1000)]
36
+ skill: Optional[StrictStr]
37
+ __properties: ClassVar[List[str]] = ["id", "dataset", "created_at", "updated_at", "name", "skill"]
38
+
39
+ model_config = ConfigDict(
40
+ populate_by_name=True,
41
+ validate_assignment=True,
42
+ protected_namespaces=(),
43
+ )
44
+
45
+ def to_str(self) -> str:
46
+ """Returns the string representation of the model using alias"""
47
+ return pprint.pformat(self.model_dump(by_alias=True))
48
+
49
+ def to_json(self) -> str:
50
+ """Returns the JSON representation of the model using alias"""
51
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
52
+ return json.dumps(self.to_dict())
53
+
54
+ @classmethod
55
+ def from_json(cls, json_str: str) -> Optional[Self]:
56
+ """Create an instance of ReferenceVariable from a JSON string"""
57
+ return cls.from_dict(json.loads(json_str))
58
+
59
+ def to_dict(self) -> Dict[str, Any]:
60
+ """Return the dictionary representation of the model using alias.
61
+
62
+ This has the following differences from calling pydantic's
63
+ `self.model_dump(by_alias=True)`:
64
+
65
+ * `None` is only added to the output dict for nullable fields that
66
+ were set at model initialization. Other fields with value `None`
67
+ are ignored.
68
+ * OpenAPI `readOnly` fields are excluded.
69
+ * OpenAPI `readOnly` fields are excluded.
70
+ * OpenAPI `readOnly` fields are excluded.
71
+ * OpenAPI `readOnly` fields are excluded.
72
+ """
73
+ excluded_fields: Set[str] = set(
74
+ [
75
+ "id",
76
+ "created_at",
77
+ "updated_at",
78
+ "skill",
79
+ ]
80
+ )
81
+
82
+ _dict = self.model_dump(
83
+ by_alias=True,
84
+ exclude=excluded_fields,
85
+ exclude_none=True,
86
+ )
87
+ # set to None if created_at (nullable) is None
88
+ # and model_fields_set contains the field
89
+ if self.created_at is None and "created_at" in self.model_fields_set:
90
+ _dict["created_at"] = None
91
+
92
+ # set to None if updated_at (nullable) is None
93
+ # and model_fields_set contains the field
94
+ if self.updated_at is None and "updated_at" in self.model_fields_set:
95
+ _dict["updated_at"] = None
96
+
97
+ # set to None if skill (nullable) is None
98
+ # and model_fields_set contains the field
99
+ if self.skill is None and "skill" in self.model_fields_set:
100
+ _dict["skill"] = None
101
+
102
+ return _dict
103
+
104
+ @classmethod
105
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
106
+ """Create an instance of ReferenceVariable from a dict"""
107
+ if obj is None:
108
+ return None
109
+
110
+ if not isinstance(obj, dict):
111
+ return cls.model_validate(obj)
112
+
113
+ _obj = cls.model_validate(
114
+ {
115
+ "id": obj.get("id"),
116
+ "dataset": obj.get("dataset"),
117
+ "created_at": obj.get("created_at"),
118
+ "updated_at": obj.get("updated_at"),
119
+ "name": obj.get("name"),
120
+ "skill": obj.get("skill"),
121
+ }
122
+ )
123
+ return _obj
@@ -0,0 +1,83 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Root Signals API
5
+
6
+ Root Signals JSON API provides a way to access Root Signals using provisioned API token
7
+
8
+ The version of the OpenAPI document: 1.0.0 (latest)
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ from __future__ import annotations
15
+
16
+ import json
17
+ import pprint
18
+ import re # noqa: F401
19
+ from typing import Any, ClassVar, Dict, List, Optional, Set
20
+
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
22
+ from typing_extensions import Annotated, Self
23
+
24
+
25
+ class ReferenceVariableRequest(BaseModel):
26
+ """
27
+ ReferenceVariableRequest
28
+ """ # noqa: E501
29
+
30
+ dataset: StrictStr
31
+ name: Annotated[str, Field(min_length=1, strict=True, max_length=1000)]
32
+ __properties: ClassVar[List[str]] = ["dataset", "name"]
33
+
34
+ model_config = ConfigDict(
35
+ populate_by_name=True,
36
+ validate_assignment=True,
37
+ protected_namespaces=(),
38
+ )
39
+
40
+ def to_str(self) -> str:
41
+ """Returns the string representation of the model using alias"""
42
+ return pprint.pformat(self.model_dump(by_alias=True))
43
+
44
+ def to_json(self) -> str:
45
+ """Returns the JSON representation of the model using alias"""
46
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
47
+ return json.dumps(self.to_dict())
48
+
49
+ @classmethod
50
+ def from_json(cls, json_str: str) -> Optional[Self]:
51
+ """Create an instance of ReferenceVariableRequest from a JSON string"""
52
+ return cls.from_dict(json.loads(json_str))
53
+
54
+ def to_dict(self) -> Dict[str, Any]:
55
+ """Return the dictionary representation of the model using alias.
56
+
57
+ This has the following differences from calling pydantic's
58
+ `self.model_dump(by_alias=True)`:
59
+
60
+ * `None` is only added to the output dict for nullable fields that
61
+ were set at model initialization. Other fields with value `None`
62
+ are ignored.
63
+ """
64
+ excluded_fields: Set[str] = set([])
65
+
66
+ _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 ReferenceVariableRequest 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({"dataset": obj.get("dataset"), "name": obj.get("name")})
83
+ return _obj
@@ -0,0 +1,130 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Root Signals API
5
+
6
+ Root Signals JSON API provides a way to access Root Signals using provisioned API token
7
+
8
+ The version of the OpenAPI document: 1.0.0 (latest)
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ from __future__ import annotations
15
+
16
+ import json
17
+ import pprint
18
+ import re # noqa: F401
19
+ from typing import Any, ClassVar, Dict, List, Optional, Set, Union
20
+
21
+ from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr
22
+ from typing_extensions import Self
23
+
24
+ from root.generated.openapi_aclient.models.validation_result_status import ValidationResultStatus
25
+
26
+
27
+ class SkillExecutionValidatorResult(BaseModel):
28
+ """
29
+ SkillExecutionValidatorResult
30
+ """ # noqa: E501
31
+
32
+ evaluator_id: Optional[StrictStr]
33
+ evaluator_name: StrictStr
34
+ result: Optional[Union[StrictFloat, StrictInt]]
35
+ threshold: Union[StrictFloat, StrictInt]
36
+ status: ValidationResultStatus
37
+ justification: StrictStr
38
+ __properties: ClassVar[List[str]] = [
39
+ "evaluator_id",
40
+ "evaluator_name",
41
+ "result",
42
+ "threshold",
43
+ "status",
44
+ "justification",
45
+ ]
46
+
47
+ model_config = ConfigDict(
48
+ populate_by_name=True,
49
+ validate_assignment=True,
50
+ protected_namespaces=(),
51
+ )
52
+
53
+ def to_str(self) -> str:
54
+ """Returns the string representation of the model using alias"""
55
+ return pprint.pformat(self.model_dump(by_alias=True))
56
+
57
+ def to_json(self) -> str:
58
+ """Returns the JSON representation of the model using alias"""
59
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
60
+ return json.dumps(self.to_dict())
61
+
62
+ @classmethod
63
+ def from_json(cls, json_str: str) -> Optional[Self]:
64
+ """Create an instance of SkillExecutionValidatorResult from a JSON string"""
65
+ return cls.from_dict(json.loads(json_str))
66
+
67
+ def to_dict(self) -> Dict[str, Any]:
68
+ """Return the dictionary representation of the model using alias.
69
+
70
+ This has the following differences from calling pydantic's
71
+ `self.model_dump(by_alias=True)`:
72
+
73
+ * `None` is only added to the output dict for nullable fields that
74
+ were set at model initialization. Other fields with value `None`
75
+ are ignored.
76
+ * OpenAPI `readOnly` fields are excluded.
77
+ * OpenAPI `readOnly` fields are excluded.
78
+ * OpenAPI `readOnly` fields are excluded.
79
+ * OpenAPI `readOnly` fields are excluded.
80
+ * OpenAPI `readOnly` fields are excluded.
81
+ * OpenAPI `readOnly` fields are excluded.
82
+ """
83
+ excluded_fields: Set[str] = set(
84
+ [
85
+ "evaluator_id",
86
+ "evaluator_name",
87
+ "result",
88
+ "threshold",
89
+ "status",
90
+ "justification",
91
+ ]
92
+ )
93
+
94
+ _dict = self.model_dump(
95
+ by_alias=True,
96
+ exclude=excluded_fields,
97
+ exclude_none=True,
98
+ )
99
+ # set to None if evaluator_id (nullable) is None
100
+ # and model_fields_set contains the field
101
+ if self.evaluator_id is None and "evaluator_id" in self.model_fields_set:
102
+ _dict["evaluator_id"] = None
103
+
104
+ # set to None if result (nullable) is None
105
+ # and model_fields_set contains the field
106
+ if self.result is None and "result" in self.model_fields_set:
107
+ _dict["result"] = None
108
+
109
+ return _dict
110
+
111
+ @classmethod
112
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
113
+ """Create an instance of SkillExecutionValidatorResult from a dict"""
114
+ if obj is None:
115
+ return None
116
+
117
+ if not isinstance(obj, dict):
118
+ return cls.model_validate(obj)
119
+
120
+ _obj = cls.model_validate(
121
+ {
122
+ "evaluator_id": obj.get("evaluator_id"),
123
+ "evaluator_name": obj.get("evaluator_name"),
124
+ "result": obj.get("result"),
125
+ "threshold": obj.get("threshold"),
126
+ "status": obj.get("status"),
127
+ "justification": obj.get("justification"),
128
+ }
129
+ )
130
+ return _obj
@@ -0,0 +1,107 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Root Signals API
5
+
6
+ Root Signals JSON API provides a way to access Root Signals using provisioned API token
7
+
8
+ The version of the OpenAPI document: 1.0.0 (latest)
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ from __future__ import annotations
15
+
16
+ import json
17
+ import pprint
18
+ import re # noqa: F401
19
+ from typing import Any, ClassVar, Dict, List, Optional, Set
20
+
21
+ from pydantic import BaseModel, ConfigDict, Field
22
+ from typing_extensions import Annotated, Self
23
+
24
+ from root.generated.openapi_aclient.models.skill_test_data_request_dataset_range import SkillTestDataRequestDatasetRange
25
+
26
+
27
+ class SkillTestDataRequest(BaseModel):
28
+ """
29
+ SkillTestDataRequest
30
+ """ # noqa: E501
31
+
32
+ test_data: Optional[List[List[Annotated[str, Field(min_length=1, strict=True)]]]] = None
33
+ test_dataset_id: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None
34
+ dataset_range: Optional[SkillTestDataRequestDatasetRange] = None
35
+ __properties: ClassVar[List[str]] = ["test_data", "test_dataset_id", "dataset_range"]
36
+
37
+ model_config = ConfigDict(
38
+ populate_by_name=True,
39
+ validate_assignment=True,
40
+ protected_namespaces=(),
41
+ )
42
+
43
+ def to_str(self) -> str:
44
+ """Returns the string representation of the model using alias"""
45
+ return pprint.pformat(self.model_dump(by_alias=True))
46
+
47
+ def to_json(self) -> str:
48
+ """Returns the JSON representation of the model using alias"""
49
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
50
+ return json.dumps(self.to_dict())
51
+
52
+ @classmethod
53
+ def from_json(cls, json_str: str) -> Optional[Self]:
54
+ """Create an instance of SkillTestDataRequest from a JSON string"""
55
+ return cls.from_dict(json.loads(json_str))
56
+
57
+ def to_dict(self) -> Dict[str, Any]:
58
+ """Return the dictionary representation of the model using alias.
59
+
60
+ This has the following differences from calling pydantic's
61
+ `self.model_dump(by_alias=True)`:
62
+
63
+ * `None` is only added to the output dict for nullable fields that
64
+ were set at model initialization. Other fields with value `None`
65
+ are ignored.
66
+ """
67
+ excluded_fields: Set[str] = set([])
68
+
69
+ _dict = self.model_dump(
70
+ by_alias=True,
71
+ exclude=excluded_fields,
72
+ exclude_none=True,
73
+ )
74
+ # override the default output from pydantic by calling `to_dict()` of dataset_range
75
+ if self.dataset_range:
76
+ _dict["dataset_range"] = self.dataset_range.to_dict()
77
+ # set to None if test_data (nullable) is None
78
+ # and model_fields_set contains the field
79
+ if self.test_data is None and "test_data" in self.model_fields_set:
80
+ _dict["test_data"] = None
81
+
82
+ # set to None if dataset_range (nullable) is None
83
+ # and model_fields_set contains the field
84
+ if self.dataset_range is None and "dataset_range" in self.model_fields_set:
85
+ _dict["dataset_range"] = None
86
+
87
+ return _dict
88
+
89
+ @classmethod
90
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
91
+ """Create an instance of SkillTestDataRequest from a dict"""
92
+ if obj is None:
93
+ return None
94
+
95
+ if not isinstance(obj, dict):
96
+ return cls.model_validate(obj)
97
+
98
+ _obj = cls.model_validate(
99
+ {
100
+ "test_data": obj.get("test_data"),
101
+ "test_dataset_id": obj.get("test_dataset_id"),
102
+ "dataset_range": SkillTestDataRequestDatasetRange.from_dict(obj["dataset_range"])
103
+ if obj.get("dataset_range") is not None
104
+ else None,
105
+ }
106
+ )
107
+ return _obj
@@ -0,0 +1,93 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Root Signals API
5
+
6
+ Root Signals JSON API provides a way to access Root Signals using provisioned API token
7
+
8
+ The version of the OpenAPI document: 1.0.0 (latest)
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ from __future__ import annotations
15
+
16
+ import json
17
+ import pprint
18
+ import re # noqa: F401
19
+ from typing import Any, ClassVar, Dict, List, Optional, Set
20
+
21
+ from pydantic import BaseModel, ConfigDict, Field
22
+ from typing_extensions import Annotated, Self
23
+
24
+
25
+ class SkillTestDataRequestDatasetRange(BaseModel):
26
+ """
27
+ Specifies the range of dataset rows to use
28
+ """ # noqa: E501
29
+
30
+ start: Optional[Annotated[int, Field(strict=True, ge=0)]]
31
+ end: Optional[Annotated[int, Field(strict=True, ge=0)]]
32
+ __properties: ClassVar[List[str]] = ["start", "end"]
33
+
34
+ model_config = ConfigDict(
35
+ populate_by_name=True,
36
+ validate_assignment=True,
37
+ protected_namespaces=(),
38
+ )
39
+
40
+ def to_str(self) -> str:
41
+ """Returns the string representation of the model using alias"""
42
+ return pprint.pformat(self.model_dump(by_alias=True))
43
+
44
+ def to_json(self) -> str:
45
+ """Returns the JSON representation of the model using alias"""
46
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
47
+ return json.dumps(self.to_dict())
48
+
49
+ @classmethod
50
+ def from_json(cls, json_str: str) -> Optional[Self]:
51
+ """Create an instance of SkillTestDataRequestDatasetRange from a JSON string"""
52
+ return cls.from_dict(json.loads(json_str))
53
+
54
+ def to_dict(self) -> Dict[str, Any]:
55
+ """Return the dictionary representation of the model using alias.
56
+
57
+ This has the following differences from calling pydantic's
58
+ `self.model_dump(by_alias=True)`:
59
+
60
+ * `None` is only added to the output dict for nullable fields that
61
+ were set at model initialization. Other fields with value `None`
62
+ are ignored.
63
+ """
64
+ excluded_fields: Set[str] = set([])
65
+
66
+ _dict = self.model_dump(
67
+ by_alias=True,
68
+ exclude=excluded_fields,
69
+ exclude_none=True,
70
+ )
71
+ # set to None if start (nullable) is None
72
+ # and model_fields_set contains the field
73
+ if self.start is None and "start" in self.model_fields_set:
74
+ _dict["start"] = None
75
+
76
+ # set to None if end (nullable) is None
77
+ # and model_fields_set contains the field
78
+ if self.end is None and "end" in self.model_fields_set:
79
+ _dict["end"] = None
80
+
81
+ return _dict
82
+
83
+ @classmethod
84
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
85
+ """Create an instance of SkillTestDataRequestDatasetRange from a dict"""
86
+ if obj is None:
87
+ return None
88
+
89
+ if not isinstance(obj, dict):
90
+ return cls.model_validate(obj)
91
+
92
+ _obj = cls.model_validate({"start": obj.get("start"), "end": obj.get("end")})
93
+ return _obj