truefoundry 0.3.2__py3-none-any.whl → 0.4.0.dev0__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 truefoundry might be problematic. Click here for more details.

Files changed (225) hide show
  1. truefoundry/cli/__main__.py +3 -17
  2. truefoundry/common/__init__.py +0 -0
  3. truefoundry/common/request_utils.py +56 -0
  4. truefoundry/deploy/auto_gen/models.py +29 -1
  5. truefoundry/deploy/cli/cli.py +1 -1
  6. truefoundry/deploy/lib/auth/credential_provider.py +2 -12
  7. truefoundry/deploy/lib/clients/servicefoundry_client.py +0 -9
  8. truefoundry/deploy/lib/exceptions.py +1 -6
  9. truefoundry/deploy/lib/session.py +1 -16
  10. truefoundry/{python_deploy_codegen.py → deploy/python_deploy_codegen.py} +1 -0
  11. truefoundry/langchain/truefoundry_chat.py +1 -1
  12. truefoundry/langchain/truefoundry_embeddings.py +1 -1
  13. truefoundry/langchain/truefoundry_llm.py +1 -1
  14. truefoundry/langchain/utils.py +0 -41
  15. truefoundry/ml/__init__.py +46 -6
  16. truefoundry/ml/artifact/__init__.py +0 -0
  17. truefoundry/ml/artifact/truefoundry_artifact_repo.py +1120 -0
  18. truefoundry/ml/autogen/__init__.py +0 -0
  19. truefoundry/ml/autogen/client/__init__.py +373 -0
  20. truefoundry/ml/autogen/client/api/__init__.py +16 -0
  21. truefoundry/ml/autogen/client/api/auth_api.py +184 -0
  22. truefoundry/ml/autogen/client/api/deprecated_api.py +605 -0
  23. truefoundry/ml/autogen/client/api/experiments_api.py +2109 -0
  24. truefoundry/ml/autogen/client/api/health_api.py +299 -0
  25. truefoundry/ml/autogen/client/api/metrics_api.py +371 -0
  26. truefoundry/ml/autogen/client/api/mlfoundry_artifacts_api.py +7213 -0
  27. truefoundry/ml/autogen/client/api/python_deployment_config_api.py +201 -0
  28. truefoundry/ml/autogen/client/api/run_artifacts_api.py +231 -0
  29. truefoundry/ml/autogen/client/api/runs_api.py +2919 -0
  30. truefoundry/ml/autogen/client/api_client.py +822 -0
  31. truefoundry/ml/autogen/client/api_response.py +30 -0
  32. truefoundry/ml/autogen/client/configuration.py +489 -0
  33. truefoundry/ml/autogen/client/exceptions.py +161 -0
  34. truefoundry/ml/autogen/client/models/__init__.py +344 -0
  35. truefoundry/ml/autogen/client/models/add_custom_metrics_to_model_version_request_dto.py +69 -0
  36. truefoundry/ml/autogen/client/models/add_features_to_model_version_request_dto.py +83 -0
  37. truefoundry/ml/autogen/client/models/agent.py +125 -0
  38. truefoundry/ml/autogen/client/models/agent_app.py +118 -0
  39. truefoundry/ml/autogen/client/models/agent_open_api_tool.py +143 -0
  40. truefoundry/ml/autogen/client/models/agent_open_api_tool_with_fqn.py +144 -0
  41. truefoundry/ml/autogen/client/models/agent_with_fqn.py +127 -0
  42. truefoundry/ml/autogen/client/models/artifact_dto.py +115 -0
  43. truefoundry/ml/autogen/client/models/artifact_response_dto.py +75 -0
  44. truefoundry/ml/autogen/client/models/artifact_type.py +39 -0
  45. truefoundry/ml/autogen/client/models/artifact_version_dto.py +141 -0
  46. truefoundry/ml/autogen/client/models/artifact_version_response_dto.py +77 -0
  47. truefoundry/ml/autogen/client/models/artifact_version_status.py +35 -0
  48. truefoundry/ml/autogen/client/models/assistant_message.py +89 -0
  49. truefoundry/ml/autogen/client/models/authorize_user_for_model_request_dto.py +69 -0
  50. truefoundry/ml/autogen/client/models/authorize_user_for_model_version_request_dto.py +69 -0
  51. truefoundry/ml/autogen/client/models/backfill_default_storage_integration_id_request_dto.py +67 -0
  52. truefoundry/ml/autogen/client/models/blob_storage_reference.py +93 -0
  53. truefoundry/ml/autogen/client/models/body_get_search_runs_get.py +72 -0
  54. truefoundry/ml/autogen/client/models/chat_prompt.py +156 -0
  55. truefoundry/ml/autogen/client/models/chat_prompt_messages_inner.py +171 -0
  56. truefoundry/ml/autogen/client/models/columns_dto.py +73 -0
  57. truefoundry/ml/autogen/client/models/content.py +153 -0
  58. truefoundry/ml/autogen/client/models/content1.py +153 -0
  59. truefoundry/ml/autogen/client/models/content2.py +174 -0
  60. truefoundry/ml/autogen/client/models/content2_any_of_inner.py +150 -0
  61. truefoundry/ml/autogen/client/models/create_artifact_request_dto.py +74 -0
  62. truefoundry/ml/autogen/client/models/create_artifact_response_dto.py +66 -0
  63. truefoundry/ml/autogen/client/models/create_artifact_version_request_dto.py +74 -0
  64. truefoundry/ml/autogen/client/models/create_artifact_version_response_dto.py +66 -0
  65. truefoundry/ml/autogen/client/models/create_dataset_request_dto.py +76 -0
  66. truefoundry/ml/autogen/client/models/create_experiment_request_dto.py +94 -0
  67. truefoundry/ml/autogen/client/models/create_experiment_response_dto.py +67 -0
  68. truefoundry/ml/autogen/client/models/create_model_version_request_dto.py +95 -0
  69. truefoundry/ml/autogen/client/models/create_multi_part_upload_for_dataset_request_dto.py +73 -0
  70. truefoundry/ml/autogen/client/models/create_multi_part_upload_for_dataset_response_dto.py +79 -0
  71. truefoundry/ml/autogen/client/models/create_multi_part_upload_request_dto.py +73 -0
  72. truefoundry/ml/autogen/client/models/create_python_deployment_config_request_dto.py +72 -0
  73. truefoundry/ml/autogen/client/models/create_python_deployment_config_response_dto.py +68 -0
  74. truefoundry/ml/autogen/client/models/create_run_request_dto.py +97 -0
  75. truefoundry/ml/autogen/client/models/create_run_response_dto.py +76 -0
  76. truefoundry/ml/autogen/client/models/dataset_dto.py +112 -0
  77. truefoundry/ml/autogen/client/models/dataset_response_dto.py +75 -0
  78. truefoundry/ml/autogen/client/models/delete_artifact_versions_request_dto.py +65 -0
  79. truefoundry/ml/autogen/client/models/delete_dataset_request_dto.py +74 -0
  80. truefoundry/ml/autogen/client/models/delete_model_version_request_dto.py +65 -0
  81. truefoundry/ml/autogen/client/models/delete_run_request.py +65 -0
  82. truefoundry/ml/autogen/client/models/delete_tag_request_dto.py +68 -0
  83. truefoundry/ml/autogen/client/models/experiment_dto.py +127 -0
  84. truefoundry/ml/autogen/client/models/experiment_id_request_dto.py +67 -0
  85. truefoundry/ml/autogen/client/models/experiment_response_dto.py +75 -0
  86. truefoundry/ml/autogen/client/models/experiment_tag_dto.py +69 -0
  87. truefoundry/ml/autogen/client/models/feature_dto.py +68 -0
  88. truefoundry/ml/autogen/client/models/feature_value_type.py +35 -0
  89. truefoundry/ml/autogen/client/models/file_info_dto.py +76 -0
  90. truefoundry/ml/autogen/client/models/finalize_artifact_version_request_dto.py +101 -0
  91. truefoundry/ml/autogen/client/models/get_experiment_response_dto.py +88 -0
  92. truefoundry/ml/autogen/client/models/get_latest_run_log_response_dto.py +76 -0
  93. truefoundry/ml/autogen/client/models/get_metric_history_response.py +79 -0
  94. truefoundry/ml/autogen/client/models/get_signed_url_for_dataset_write_request_dto.py +68 -0
  95. truefoundry/ml/autogen/client/models/get_signed_urls_for_artifact_version_read_request_dto.py +68 -0
  96. truefoundry/ml/autogen/client/models/get_signed_urls_for_artifact_version_read_response_dto.py +81 -0
  97. truefoundry/ml/autogen/client/models/get_signed_urls_for_artifact_version_write_request_dto.py +69 -0
  98. truefoundry/ml/autogen/client/models/get_signed_urls_for_artifact_version_write_response_dto.py +83 -0
  99. truefoundry/ml/autogen/client/models/get_signed_urls_for_dataset_read_request_dto.py +68 -0
  100. truefoundry/ml/autogen/client/models/get_signed_urls_for_dataset_read_response_dto.py +81 -0
  101. truefoundry/ml/autogen/client/models/get_signed_urls_for_dataset_write_response_dto.py +81 -0
  102. truefoundry/ml/autogen/client/models/get_tenant_id_response_dto.py +74 -0
  103. truefoundry/ml/autogen/client/models/http_validation_error.py +82 -0
  104. truefoundry/ml/autogen/client/models/image_content_part.py +87 -0
  105. truefoundry/ml/autogen/client/models/image_url.py +75 -0
  106. truefoundry/ml/autogen/client/models/internal_metadata.py +180 -0
  107. truefoundry/ml/autogen/client/models/latest_run_log_dto.py +78 -0
  108. truefoundry/ml/autogen/client/models/list_artifact_versions_request_dto.py +107 -0
  109. truefoundry/ml/autogen/client/models/list_artifact_versions_response_dto.py +87 -0
  110. truefoundry/ml/autogen/client/models/list_artifacts_request_dto.py +96 -0
  111. truefoundry/ml/autogen/client/models/list_artifacts_response_dto.py +86 -0
  112. truefoundry/ml/autogen/client/models/list_colums_response_dto.py +75 -0
  113. truefoundry/ml/autogen/client/models/list_datasets_request_dto.py +78 -0
  114. truefoundry/ml/autogen/client/models/list_datasets_response_dto.py +86 -0
  115. truefoundry/ml/autogen/client/models/list_experiments_response_dto.py +86 -0
  116. truefoundry/ml/autogen/client/models/list_files_for_artifact_version_request_dto.py +76 -0
  117. truefoundry/ml/autogen/client/models/list_files_for_artifact_versions_response_dto.py +82 -0
  118. truefoundry/ml/autogen/client/models/list_files_for_dataset_request_dto.py +76 -0
  119. truefoundry/ml/autogen/client/models/list_files_for_dataset_response_dto.py +82 -0
  120. truefoundry/ml/autogen/client/models/list_latest_run_logs_response_dto.py +82 -0
  121. truefoundry/ml/autogen/client/models/list_metric_history_request_dto.py +69 -0
  122. truefoundry/ml/autogen/client/models/list_metric_history_response_dto.py +84 -0
  123. truefoundry/ml/autogen/client/models/list_model_version_response_dto.py +87 -0
  124. truefoundry/ml/autogen/client/models/list_model_versions_request_dto.py +93 -0
  125. truefoundry/ml/autogen/client/models/list_models_request_dto.py +89 -0
  126. truefoundry/ml/autogen/client/models/list_models_response_dto.py +84 -0
  127. truefoundry/ml/autogen/client/models/list_run_artifacts_response_dto.py +84 -0
  128. truefoundry/ml/autogen/client/models/list_run_logs_response_dto.py +82 -0
  129. truefoundry/ml/autogen/client/models/list_seed_experiments_response_dto.py +81 -0
  130. truefoundry/ml/autogen/client/models/log_batch_request_dto.py +106 -0
  131. truefoundry/ml/autogen/client/models/log_metric_request_dto.py +80 -0
  132. truefoundry/ml/autogen/client/models/log_param_request_dto.py +76 -0
  133. truefoundry/ml/autogen/client/models/method.py +37 -0
  134. truefoundry/ml/autogen/client/models/metric_collection_dto.py +82 -0
  135. truefoundry/ml/autogen/client/models/metric_dto.py +76 -0
  136. truefoundry/ml/autogen/client/models/mime_type.py +37 -0
  137. truefoundry/ml/autogen/client/models/model_configuration.py +103 -0
  138. truefoundry/ml/autogen/client/models/model_dto.py +122 -0
  139. truefoundry/ml/autogen/client/models/model_response_dto.py +75 -0
  140. truefoundry/ml/autogen/client/models/model_schema_dto.py +85 -0
  141. truefoundry/ml/autogen/client/models/model_version_dto.py +163 -0
  142. truefoundry/ml/autogen/client/models/model_version_response_dto.py +75 -0
  143. truefoundry/ml/autogen/client/models/multi_part_upload_dto.py +107 -0
  144. truefoundry/ml/autogen/client/models/multi_part_upload_response_dto.py +79 -0
  145. truefoundry/ml/autogen/client/models/multi_part_upload_storage_provider.py +34 -0
  146. truefoundry/ml/autogen/client/models/notify_artifact_version_failure_dto.py +65 -0
  147. truefoundry/ml/autogen/client/models/openapi_spec.py +152 -0
  148. truefoundry/ml/autogen/client/models/param_dto.py +66 -0
  149. truefoundry/ml/autogen/client/models/parameters.py +84 -0
  150. truefoundry/ml/autogen/client/models/prediction_type.py +34 -0
  151. truefoundry/ml/autogen/client/models/resolve_agent_app_response_dto.py +75 -0
  152. truefoundry/ml/autogen/client/models/restore_run_request_dto.py +65 -0
  153. truefoundry/ml/autogen/client/models/run_data_dto.py +104 -0
  154. truefoundry/ml/autogen/client/models/run_dto.py +84 -0
  155. truefoundry/ml/autogen/client/models/run_info_dto.py +105 -0
  156. truefoundry/ml/autogen/client/models/run_log_dto.py +90 -0
  157. truefoundry/ml/autogen/client/models/run_log_input_dto.py +80 -0
  158. truefoundry/ml/autogen/client/models/run_response_dto.py +75 -0
  159. truefoundry/ml/autogen/client/models/run_tag_dto.py +66 -0
  160. truefoundry/ml/autogen/client/models/search_runs_request_dto.py +94 -0
  161. truefoundry/ml/autogen/client/models/search_runs_response_dto.py +84 -0
  162. truefoundry/ml/autogen/client/models/set_experiment_tag_request_dto.py +73 -0
  163. truefoundry/ml/autogen/client/models/set_tag_request_dto.py +76 -0
  164. truefoundry/ml/autogen/client/models/signed_url_dto.py +69 -0
  165. truefoundry/ml/autogen/client/models/stop.py +152 -0
  166. truefoundry/ml/autogen/client/models/store_run_logs_request_dto.py +83 -0
  167. truefoundry/ml/autogen/client/models/system_message.py +89 -0
  168. truefoundry/ml/autogen/client/models/text.py +153 -0
  169. truefoundry/ml/autogen/client/models/text_content_part.py +84 -0
  170. truefoundry/ml/autogen/client/models/update_artifact_version_request_dto.py +74 -0
  171. truefoundry/ml/autogen/client/models/update_dataset_request_dto.py +74 -0
  172. truefoundry/ml/autogen/client/models/update_experiment_request_dto.py +74 -0
  173. truefoundry/ml/autogen/client/models/update_model_version_request_dto.py +93 -0
  174. truefoundry/ml/autogen/client/models/update_run_request_dto.py +78 -0
  175. truefoundry/ml/autogen/client/models/update_run_response_dto.py +76 -0
  176. truefoundry/ml/autogen/client/models/url.py +153 -0
  177. truefoundry/ml/autogen/client/models/user_message.py +89 -0
  178. truefoundry/ml/autogen/client/models/validation_error.py +87 -0
  179. truefoundry/ml/autogen/client/models/validation_error_loc_inner.py +154 -0
  180. truefoundry/ml/autogen/client/rest.py +426 -0
  181. truefoundry/ml/autogen/client_README.md +322 -0
  182. truefoundry/ml/cli/__init__.py +0 -0
  183. truefoundry/ml/cli/cli.py +18 -0
  184. truefoundry/ml/cli/commands/__init__.py +3 -0
  185. truefoundry/ml/cli/commands/download.py +87 -0
  186. truefoundry/ml/constants.py +84 -0
  187. truefoundry/ml/enums.py +70 -0
  188. truefoundry/ml/env_vars.py +13 -0
  189. truefoundry/ml/exceptions.py +8 -0
  190. truefoundry/ml/git_info.py +60 -0
  191. truefoundry/ml/internal_namespace.py +52 -0
  192. truefoundry/ml/log_types/__init__.py +4 -0
  193. truefoundry/ml/log_types/artifacts/artifact.py +427 -0
  194. truefoundry/ml/log_types/artifacts/constants.py +33 -0
  195. truefoundry/ml/log_types/artifacts/dataset.py +383 -0
  196. truefoundry/ml/log_types/artifacts/general_artifact.py +110 -0
  197. truefoundry/ml/log_types/artifacts/model.py +628 -0
  198. truefoundry/ml/log_types/artifacts/model_extras.py +48 -0
  199. truefoundry/ml/log_types/artifacts/utils.py +161 -0
  200. truefoundry/ml/log_types/image/__init__.py +3 -0
  201. truefoundry/ml/log_types/image/constants.py +8 -0
  202. truefoundry/ml/log_types/image/image.py +358 -0
  203. truefoundry/ml/log_types/image/image_normalizer.py +101 -0
  204. truefoundry/ml/log_types/image/types.py +68 -0
  205. truefoundry/ml/log_types/plot.py +281 -0
  206. truefoundry/ml/log_types/pydantic_base.py +10 -0
  207. truefoundry/ml/log_types/utils.py +12 -0
  208. truefoundry/ml/logger.py +17 -0
  209. truefoundry/ml/login.py +241 -0
  210. truefoundry/ml/mlfoundry_api.py +1620 -0
  211. truefoundry/ml/mlfoundry_run.py +1238 -0
  212. truefoundry/ml/run_utils.py +102 -0
  213. truefoundry/ml/services/__init__.py +0 -0
  214. truefoundry/ml/services/auth_service.py +109 -0
  215. truefoundry/ml/services/entities.py +108 -0
  216. truefoundry/ml/services/servicefoundry_service.py +35 -0
  217. truefoundry/ml/services/utils.py +122 -0
  218. truefoundry/ml/session.py +271 -0
  219. truefoundry/ml/validation_utils.py +346 -0
  220. truefoundry/pydantic_v1.py +5 -1
  221. {truefoundry-0.3.2.dist-info → truefoundry-0.4.0.dev0.dist-info}/METADATA +19 -12
  222. truefoundry-0.4.0.dev0.dist-info/RECORD +342 -0
  223. truefoundry-0.3.2.dist-info/RECORD +0 -136
  224. {truefoundry-0.3.2.dist-info → truefoundry-0.4.0.dev0.dist-info}/WHEEL +0 -0
  225. {truefoundry-0.3.2.dist-info → truefoundry-0.4.0.dev0.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,74 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ FastAPI
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 0.1.0
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 Optional
20
+
21
+ from truefoundry.pydantic_v1 import BaseModel, Field, StrictBool, StrictStr
22
+
23
+
24
+ class DeleteDatasetRequestDto(BaseModel):
25
+ """
26
+ DeleteDatasetRequestDto
27
+ """
28
+
29
+ id: StrictStr = Field(...)
30
+ delete_contents: Optional[StrictBool] = False
31
+ __properties = ["id", "delete_contents"]
32
+
33
+ class Config:
34
+ """Pydantic configuration"""
35
+
36
+ allow_population_by_field_name = True
37
+ validate_assignment = True
38
+
39
+ def to_str(self) -> str:
40
+ """Returns the string representation of the model using alias"""
41
+ return pprint.pformat(self.dict(by_alias=True))
42
+
43
+ def to_json(self) -> str:
44
+ """Returns the JSON representation of the model using alias"""
45
+ return json.dumps(self.to_dict())
46
+
47
+ @classmethod
48
+ def from_json(cls, json_str: str) -> DeleteDatasetRequestDto:
49
+ """Create an instance of DeleteDatasetRequestDto from a JSON string"""
50
+ return cls.from_dict(json.loads(json_str))
51
+
52
+ def to_dict(self):
53
+ """Returns the dictionary representation of the model using alias"""
54
+ _dict = self.dict(by_alias=True, exclude={}, exclude_none=True)
55
+ return _dict
56
+
57
+ @classmethod
58
+ def from_dict(cls, obj: dict) -> DeleteDatasetRequestDto:
59
+ """Create an instance of DeleteDatasetRequestDto from a dict"""
60
+ if obj is None:
61
+ return None
62
+
63
+ if not isinstance(obj, dict):
64
+ return DeleteDatasetRequestDto.parse_obj(obj)
65
+
66
+ _obj = DeleteDatasetRequestDto.parse_obj(
67
+ {
68
+ "id": obj.get("id"),
69
+ "delete_contents": obj.get("delete_contents")
70
+ if obj.get("delete_contents") is not None
71
+ else False,
72
+ }
73
+ )
74
+ return _obj
@@ -0,0 +1,65 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ FastAPI
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 0.1.0
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
+
20
+ from truefoundry.pydantic_v1 import BaseModel, Field, StrictStr
21
+
22
+
23
+ class DeleteModelVersionRequestDto(BaseModel):
24
+ """
25
+ DeleteModelVersionRequestDto
26
+ """
27
+
28
+ id: StrictStr = Field(...)
29
+ __properties = ["id"]
30
+
31
+ class Config:
32
+ """Pydantic configuration"""
33
+
34
+ allow_population_by_field_name = True
35
+ validate_assignment = True
36
+
37
+ def to_str(self) -> str:
38
+ """Returns the string representation of the model using alias"""
39
+ return pprint.pformat(self.dict(by_alias=True))
40
+
41
+ def to_json(self) -> str:
42
+ """Returns the JSON representation of the model using alias"""
43
+ return json.dumps(self.to_dict())
44
+
45
+ @classmethod
46
+ def from_json(cls, json_str: str) -> DeleteModelVersionRequestDto:
47
+ """Create an instance of DeleteModelVersionRequestDto from a JSON string"""
48
+ return cls.from_dict(json.loads(json_str))
49
+
50
+ def to_dict(self):
51
+ """Returns the dictionary representation of the model using alias"""
52
+ _dict = self.dict(by_alias=True, exclude={}, exclude_none=True)
53
+ return _dict
54
+
55
+ @classmethod
56
+ def from_dict(cls, obj: dict) -> DeleteModelVersionRequestDto:
57
+ """Create an instance of DeleteModelVersionRequestDto from a dict"""
58
+ if obj is None:
59
+ return None
60
+
61
+ if not isinstance(obj, dict):
62
+ return DeleteModelVersionRequestDto.parse_obj(obj)
63
+
64
+ _obj = DeleteModelVersionRequestDto.parse_obj({"id": obj.get("id")})
65
+ return _obj
@@ -0,0 +1,65 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ FastAPI
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 0.1.0
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
+
20
+ from truefoundry.pydantic_v1 import BaseModel, Field, StrictStr
21
+
22
+
23
+ class DeleteRunRequest(BaseModel):
24
+ """
25
+ DeleteRunRequest
26
+ """
27
+
28
+ run_id: StrictStr = Field(...)
29
+ __properties = ["run_id"]
30
+
31
+ class Config:
32
+ """Pydantic configuration"""
33
+
34
+ allow_population_by_field_name = True
35
+ validate_assignment = True
36
+
37
+ def to_str(self) -> str:
38
+ """Returns the string representation of the model using alias"""
39
+ return pprint.pformat(self.dict(by_alias=True))
40
+
41
+ def to_json(self) -> str:
42
+ """Returns the JSON representation of the model using alias"""
43
+ return json.dumps(self.to_dict())
44
+
45
+ @classmethod
46
+ def from_json(cls, json_str: str) -> DeleteRunRequest:
47
+ """Create an instance of DeleteRunRequest from a JSON string"""
48
+ return cls.from_dict(json.loads(json_str))
49
+
50
+ def to_dict(self):
51
+ """Returns the dictionary representation of the model using alias"""
52
+ _dict = self.dict(by_alias=True, exclude={}, exclude_none=True)
53
+ return _dict
54
+
55
+ @classmethod
56
+ def from_dict(cls, obj: dict) -> DeleteRunRequest:
57
+ """Create an instance of DeleteRunRequest from a dict"""
58
+ if obj is None:
59
+ return None
60
+
61
+ if not isinstance(obj, dict):
62
+ return DeleteRunRequest.parse_obj(obj)
63
+
64
+ _obj = DeleteRunRequest.parse_obj({"run_id": obj.get("run_id")})
65
+ return _obj
@@ -0,0 +1,68 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ FastAPI
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 0.1.0
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
+
20
+ from truefoundry.pydantic_v1 import BaseModel, Field, StrictStr
21
+
22
+
23
+ class DeleteTagRequestDto(BaseModel):
24
+ """
25
+ DeleteTagRequestDto
26
+ """
27
+
28
+ run_id: StrictStr = Field(...)
29
+ key: StrictStr = Field(...)
30
+ __properties = ["run_id", "key"]
31
+
32
+ class Config:
33
+ """Pydantic configuration"""
34
+
35
+ allow_population_by_field_name = True
36
+ validate_assignment = True
37
+
38
+ def to_str(self) -> str:
39
+ """Returns the string representation of the model using alias"""
40
+ return pprint.pformat(self.dict(by_alias=True))
41
+
42
+ def to_json(self) -> str:
43
+ """Returns the JSON representation of the model using alias"""
44
+ return json.dumps(self.to_dict())
45
+
46
+ @classmethod
47
+ def from_json(cls, json_str: str) -> DeleteTagRequestDto:
48
+ """Create an instance of DeleteTagRequestDto from a JSON string"""
49
+ return cls.from_dict(json.loads(json_str))
50
+
51
+ def to_dict(self):
52
+ """Returns the dictionary representation of the model using alias"""
53
+ _dict = self.dict(by_alias=True, exclude={}, exclude_none=True)
54
+ return _dict
55
+
56
+ @classmethod
57
+ def from_dict(cls, obj: dict) -> DeleteTagRequestDto:
58
+ """Create an instance of DeleteTagRequestDto from a dict"""
59
+ if obj is None:
60
+ return None
61
+
62
+ if not isinstance(obj, dict):
63
+ return DeleteTagRequestDto.parse_obj(obj)
64
+
65
+ _obj = DeleteTagRequestDto.parse_obj(
66
+ {"run_id": obj.get("run_id"), "key": obj.get("key")}
67
+ )
68
+ return _obj
@@ -0,0 +1,127 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ FastAPI
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 0.1.0
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, Dict, Optional
20
+
21
+ from truefoundry.ml.autogen.client.models.experiment_tag_dto import ExperimentTagDto
22
+ from truefoundry.pydantic_v1 import BaseModel, StrictInt, StrictStr, conlist
23
+
24
+
25
+ class ExperimentDto(BaseModel):
26
+ """
27
+ ExperimentDto
28
+ """
29
+
30
+ experiment_id: Optional[StrictStr] = None
31
+ name: Optional[StrictStr] = None
32
+ artifact_location: Optional[StrictStr] = None
33
+ lifecycle_stage: Optional[StrictStr] = None
34
+ tags: Optional[conlist(ExperimentTagDto)] = None
35
+ creator_user_id: Optional[StrictStr] = None
36
+ num_runs: Optional[StrictInt] = None
37
+ num_user_collaborators: Optional[StrictInt] = None
38
+ description: Optional[StrictStr] = None
39
+ privacy_type: Optional[StrictStr] = None
40
+ created_at: Optional[StrictInt] = None
41
+ tenant_name: Optional[StrictStr] = None
42
+ total_models_count: Optional[StrictInt] = None
43
+ total_artifacts_count: Optional[StrictInt] = None
44
+ storage_integration_id: Optional[StrictStr] = None
45
+ manifest: Optional[Dict[str, Any]] = None
46
+ __properties = [
47
+ "experiment_id",
48
+ "name",
49
+ "artifact_location",
50
+ "lifecycle_stage",
51
+ "tags",
52
+ "creator_user_id",
53
+ "num_runs",
54
+ "num_user_collaborators",
55
+ "description",
56
+ "privacy_type",
57
+ "created_at",
58
+ "tenant_name",
59
+ "total_models_count",
60
+ "total_artifacts_count",
61
+ "storage_integration_id",
62
+ "manifest",
63
+ ]
64
+
65
+ class Config:
66
+ """Pydantic configuration"""
67
+
68
+ allow_population_by_field_name = True
69
+ validate_assignment = True
70
+
71
+ def to_str(self) -> str:
72
+ """Returns the string representation of the model using alias"""
73
+ return pprint.pformat(self.dict(by_alias=True))
74
+
75
+ def to_json(self) -> str:
76
+ """Returns the JSON representation of the model using alias"""
77
+ return json.dumps(self.to_dict())
78
+
79
+ @classmethod
80
+ def from_json(cls, json_str: str) -> ExperimentDto:
81
+ """Create an instance of ExperimentDto from a JSON string"""
82
+ return cls.from_dict(json.loads(json_str))
83
+
84
+ def to_dict(self):
85
+ """Returns the dictionary representation of the model using alias"""
86
+ _dict = self.dict(by_alias=True, exclude={}, exclude_none=True)
87
+ # override the default output from truefoundry.pydantic_v1 by calling `to_dict()` of each item in tags (list)
88
+ _items = []
89
+ if self.tags:
90
+ for _item in self.tags:
91
+ if _item:
92
+ _items.append(_item.to_dict())
93
+ _dict["tags"] = _items
94
+ return _dict
95
+
96
+ @classmethod
97
+ def from_dict(cls, obj: dict) -> ExperimentDto:
98
+ """Create an instance of ExperimentDto from a dict"""
99
+ if obj is None:
100
+ return None
101
+
102
+ if not isinstance(obj, dict):
103
+ return ExperimentDto.parse_obj(obj)
104
+
105
+ _obj = ExperimentDto.parse_obj(
106
+ {
107
+ "experiment_id": obj.get("experiment_id"),
108
+ "name": obj.get("name"),
109
+ "artifact_location": obj.get("artifact_location"),
110
+ "lifecycle_stage": obj.get("lifecycle_stage"),
111
+ "tags": [ExperimentTagDto.from_dict(_item) for _item in obj.get("tags")]
112
+ if obj.get("tags") is not None
113
+ else None,
114
+ "creator_user_id": obj.get("creator_user_id"),
115
+ "num_runs": obj.get("num_runs"),
116
+ "num_user_collaborators": obj.get("num_user_collaborators"),
117
+ "description": obj.get("description"),
118
+ "privacy_type": obj.get("privacy_type"),
119
+ "created_at": obj.get("created_at"),
120
+ "tenant_name": obj.get("tenant_name"),
121
+ "total_models_count": obj.get("total_models_count"),
122
+ "total_artifacts_count": obj.get("total_artifacts_count"),
123
+ "storage_integration_id": obj.get("storage_integration_id"),
124
+ "manifest": obj.get("manifest"),
125
+ }
126
+ )
127
+ return _obj
@@ -0,0 +1,67 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ FastAPI
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 0.1.0
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
+
20
+ from truefoundry.pydantic_v1 import BaseModel, Field, StrictStr
21
+
22
+
23
+ class ExperimentIdRequestDto(BaseModel):
24
+ """
25
+ ExperimentIdRequestDto
26
+ """
27
+
28
+ experiment_id: StrictStr = Field(...)
29
+ __properties = ["experiment_id"]
30
+
31
+ class Config:
32
+ """Pydantic configuration"""
33
+
34
+ allow_population_by_field_name = True
35
+ validate_assignment = True
36
+
37
+ def to_str(self) -> str:
38
+ """Returns the string representation of the model using alias"""
39
+ return pprint.pformat(self.dict(by_alias=True))
40
+
41
+ def to_json(self) -> str:
42
+ """Returns the JSON representation of the model using alias"""
43
+ return json.dumps(self.to_dict())
44
+
45
+ @classmethod
46
+ def from_json(cls, json_str: str) -> ExperimentIdRequestDto:
47
+ """Create an instance of ExperimentIdRequestDto from a JSON string"""
48
+ return cls.from_dict(json.loads(json_str))
49
+
50
+ def to_dict(self):
51
+ """Returns the dictionary representation of the model using alias"""
52
+ _dict = self.dict(by_alias=True, exclude={}, exclude_none=True)
53
+ return _dict
54
+
55
+ @classmethod
56
+ def from_dict(cls, obj: dict) -> ExperimentIdRequestDto:
57
+ """Create an instance of ExperimentIdRequestDto from a dict"""
58
+ if obj is None:
59
+ return None
60
+
61
+ if not isinstance(obj, dict):
62
+ return ExperimentIdRequestDto.parse_obj(obj)
63
+
64
+ _obj = ExperimentIdRequestDto.parse_obj(
65
+ {"experiment_id": obj.get("experiment_id")}
66
+ )
67
+ return _obj
@@ -0,0 +1,75 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ FastAPI
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 0.1.0
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
+
20
+ from truefoundry.ml.autogen.client.models.experiment_dto import ExperimentDto
21
+ from truefoundry.pydantic_v1 import BaseModel, Field
22
+
23
+
24
+ class ExperimentResponseDto(BaseModel):
25
+ """
26
+ ExperimentResponseDto
27
+ """
28
+
29
+ experiment: ExperimentDto = Field(...)
30
+ __properties = ["experiment"]
31
+
32
+ class Config:
33
+ """Pydantic configuration"""
34
+
35
+ allow_population_by_field_name = True
36
+ validate_assignment = True
37
+
38
+ def to_str(self) -> str:
39
+ """Returns the string representation of the model using alias"""
40
+ return pprint.pformat(self.dict(by_alias=True))
41
+
42
+ def to_json(self) -> str:
43
+ """Returns the JSON representation of the model using alias"""
44
+ return json.dumps(self.to_dict())
45
+
46
+ @classmethod
47
+ def from_json(cls, json_str: str) -> ExperimentResponseDto:
48
+ """Create an instance of ExperimentResponseDto from a JSON string"""
49
+ return cls.from_dict(json.loads(json_str))
50
+
51
+ def to_dict(self):
52
+ """Returns the dictionary representation of the model using alias"""
53
+ _dict = self.dict(by_alias=True, exclude={}, exclude_none=True)
54
+ # override the default output from truefoundry.pydantic_v1 by calling `to_dict()` of experiment
55
+ if self.experiment:
56
+ _dict["experiment"] = self.experiment.to_dict()
57
+ return _dict
58
+
59
+ @classmethod
60
+ def from_dict(cls, obj: dict) -> ExperimentResponseDto:
61
+ """Create an instance of ExperimentResponseDto from a dict"""
62
+ if obj is None:
63
+ return None
64
+
65
+ if not isinstance(obj, dict):
66
+ return ExperimentResponseDto.parse_obj(obj)
67
+
68
+ _obj = ExperimentResponseDto.parse_obj(
69
+ {
70
+ "experiment": ExperimentDto.from_dict(obj.get("experiment"))
71
+ if obj.get("experiment") is not None
72
+ else None
73
+ }
74
+ )
75
+ return _obj
@@ -0,0 +1,69 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ FastAPI
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 0.1.0
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 Optional
20
+
21
+ from truefoundry.pydantic_v1 import BaseModel, StrictStr
22
+
23
+
24
+ class ExperimentTagDto(BaseModel):
25
+ """
26
+ ExperimentTagDto
27
+ """
28
+
29
+ key: Optional[StrictStr] = None
30
+ value: Optional[StrictStr] = None
31
+ __properties = ["key", "value"]
32
+
33
+ class Config:
34
+ """Pydantic configuration"""
35
+
36
+ allow_population_by_field_name = True
37
+ validate_assignment = True
38
+
39
+ def to_str(self) -> str:
40
+ """Returns the string representation of the model using alias"""
41
+ return pprint.pformat(self.dict(by_alias=True))
42
+
43
+ def to_json(self) -> str:
44
+ """Returns the JSON representation of the model using alias"""
45
+ return json.dumps(self.to_dict())
46
+
47
+ @classmethod
48
+ def from_json(cls, json_str: str) -> ExperimentTagDto:
49
+ """Create an instance of ExperimentTagDto from a JSON string"""
50
+ return cls.from_dict(json.loads(json_str))
51
+
52
+ def to_dict(self):
53
+ """Returns the dictionary representation of the model using alias"""
54
+ _dict = self.dict(by_alias=True, exclude={}, exclude_none=True)
55
+ return _dict
56
+
57
+ @classmethod
58
+ def from_dict(cls, obj: dict) -> ExperimentTagDto:
59
+ """Create an instance of ExperimentTagDto from a dict"""
60
+ if obj is None:
61
+ return None
62
+
63
+ if not isinstance(obj, dict):
64
+ return ExperimentTagDto.parse_obj(obj)
65
+
66
+ _obj = ExperimentTagDto.parse_obj(
67
+ {"key": obj.get("key"), "value": obj.get("value")}
68
+ )
69
+ return _obj
@@ -0,0 +1,68 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ FastAPI
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 0.1.0
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 Optional
20
+
21
+ from truefoundry.ml.autogen.client.models.feature_value_type import FeatureValueType
22
+ from truefoundry.pydantic_v1 import BaseModel, StrictStr
23
+
24
+
25
+ class FeatureDto(BaseModel):
26
+ """
27
+ FeatureDto
28
+ """
29
+
30
+ name: Optional[StrictStr] = None
31
+ type: Optional[FeatureValueType] = None
32
+ __properties = ["name", "type"]
33
+
34
+ class Config:
35
+ """Pydantic configuration"""
36
+
37
+ allow_population_by_field_name = True
38
+ validate_assignment = True
39
+
40
+ def to_str(self) -> str:
41
+ """Returns the string representation of the model using alias"""
42
+ return pprint.pformat(self.dict(by_alias=True))
43
+
44
+ def to_json(self) -> str:
45
+ """Returns the JSON representation of the model using alias"""
46
+ return json.dumps(self.to_dict())
47
+
48
+ @classmethod
49
+ def from_json(cls, json_str: str) -> FeatureDto:
50
+ """Create an instance of FeatureDto from a JSON string"""
51
+ return cls.from_dict(json.loads(json_str))
52
+
53
+ def to_dict(self):
54
+ """Returns the dictionary representation of the model using alias"""
55
+ _dict = self.dict(by_alias=True, exclude={}, exclude_none=True)
56
+ return _dict
57
+
58
+ @classmethod
59
+ def from_dict(cls, obj: dict) -> FeatureDto:
60
+ """Create an instance of FeatureDto from a dict"""
61
+ if obj is None:
62
+ return None
63
+
64
+ if not isinstance(obj, dict):
65
+ return FeatureDto.parse_obj(obj)
66
+
67
+ _obj = FeatureDto.parse_obj({"name": obj.get("name"), "type": obj.get("type")})
68
+ return _obj