truefoundry 0.3.4rc1__py3-none-any.whl → 0.4.0__py3-none-any.whl

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

Potentially problematic release.


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

Files changed (253) hide show
  1. truefoundry/__init__.py +2 -0
  2. truefoundry/autodeploy/agents/developer.py +1 -1
  3. truefoundry/autodeploy/agents/project_identifier.py +2 -2
  4. truefoundry/autodeploy/agents/tester.py +1 -1
  5. truefoundry/autodeploy/cli.py +1 -1
  6. truefoundry/autodeploy/tools/list_files.py +1 -1
  7. truefoundry/cli/__main__.py +3 -17
  8. truefoundry/common/__init__.py +0 -0
  9. truefoundry/{deploy/lib/auth → common}/auth_service_client.py +50 -40
  10. truefoundry/common/constants.py +12 -0
  11. truefoundry/{deploy/lib/auth → common}/credential_file_manager.py +7 -7
  12. truefoundry/{deploy/lib/auth → common}/credential_provider.py +10 -23
  13. truefoundry/common/entities.py +124 -0
  14. truefoundry/common/exceptions.py +12 -0
  15. truefoundry/common/request_utils.py +84 -0
  16. truefoundry/common/servicefoundry_client.py +91 -0
  17. truefoundry/common/utils.py +56 -0
  18. truefoundry/deploy/auto_gen/models.py +4 -6
  19. truefoundry/deploy/cli/cli.py +3 -1
  20. truefoundry/deploy/cli/commands/apply_command.py +1 -1
  21. truefoundry/deploy/cli/commands/build_command.py +1 -1
  22. truefoundry/deploy/cli/commands/deploy_command.py +1 -1
  23. truefoundry/deploy/cli/commands/login_command.py +2 -2
  24. truefoundry/deploy/cli/commands/patch_application_command.py +1 -1
  25. truefoundry/deploy/cli/commands/patch_command.py +1 -1
  26. truefoundry/deploy/cli/commands/terminate_comand.py +1 -1
  27. truefoundry/deploy/cli/util.py +1 -1
  28. truefoundry/deploy/function_service/remote/remote.py +1 -1
  29. truefoundry/deploy/lib/auth/servicefoundry_session.py +2 -2
  30. truefoundry/deploy/lib/clients/servicefoundry_client.py +120 -159
  31. truefoundry/deploy/lib/const.py +1 -35
  32. truefoundry/deploy/lib/exceptions.py +0 -16
  33. truefoundry/deploy/lib/model/entity.py +1 -112
  34. truefoundry/deploy/lib/session.py +14 -42
  35. truefoundry/deploy/lib/util.py +0 -37
  36. truefoundry/{python_deploy_codegen.py → deploy/python_deploy_codegen.py} +2 -2
  37. truefoundry/deploy/v2/lib/deploy.py +3 -3
  38. truefoundry/deploy/v2/lib/deployable_patched_models.py +1 -1
  39. truefoundry/langchain/truefoundry_chat.py +1 -1
  40. truefoundry/langchain/truefoundry_embeddings.py +1 -1
  41. truefoundry/langchain/truefoundry_llm.py +1 -1
  42. truefoundry/langchain/utils.py +0 -41
  43. truefoundry/ml/__init__.py +37 -6
  44. truefoundry/ml/artifact/__init__.py +0 -0
  45. truefoundry/ml/artifact/truefoundry_artifact_repo.py +1161 -0
  46. truefoundry/ml/autogen/__init__.py +0 -0
  47. truefoundry/ml/autogen/client/__init__.py +370 -0
  48. truefoundry/ml/autogen/client/api/__init__.py +16 -0
  49. truefoundry/ml/autogen/client/api/auth_api.py +184 -0
  50. truefoundry/ml/autogen/client/api/deprecated_api.py +605 -0
  51. truefoundry/ml/autogen/client/api/experiments_api.py +1944 -0
  52. truefoundry/ml/autogen/client/api/health_api.py +299 -0
  53. truefoundry/ml/autogen/client/api/metrics_api.py +371 -0
  54. truefoundry/ml/autogen/client/api/mlfoundry_artifacts_api.py +7213 -0
  55. truefoundry/ml/autogen/client/api/python_deployment_config_api.py +201 -0
  56. truefoundry/ml/autogen/client/api/run_artifacts_api.py +231 -0
  57. truefoundry/ml/autogen/client/api/runs_api.py +2919 -0
  58. truefoundry/ml/autogen/client/api_client.py +822 -0
  59. truefoundry/ml/autogen/client/api_response.py +30 -0
  60. truefoundry/ml/autogen/client/configuration.py +489 -0
  61. truefoundry/ml/autogen/client/exceptions.py +161 -0
  62. truefoundry/ml/autogen/client/models/__init__.py +341 -0
  63. truefoundry/ml/autogen/client/models/add_custom_metrics_to_model_version_request_dto.py +69 -0
  64. truefoundry/ml/autogen/client/models/add_features_to_model_version_request_dto.py +83 -0
  65. truefoundry/ml/autogen/client/models/agent.py +125 -0
  66. truefoundry/ml/autogen/client/models/agent_app.py +118 -0
  67. truefoundry/ml/autogen/client/models/agent_open_api_tool.py +143 -0
  68. truefoundry/ml/autogen/client/models/agent_open_api_tool_with_fqn.py +144 -0
  69. truefoundry/ml/autogen/client/models/agent_with_fqn.py +127 -0
  70. truefoundry/ml/autogen/client/models/artifact_dto.py +115 -0
  71. truefoundry/ml/autogen/client/models/artifact_response_dto.py +75 -0
  72. truefoundry/ml/autogen/client/models/artifact_type.py +39 -0
  73. truefoundry/ml/autogen/client/models/artifact_version_dto.py +141 -0
  74. truefoundry/ml/autogen/client/models/artifact_version_response_dto.py +77 -0
  75. truefoundry/ml/autogen/client/models/artifact_version_status.py +35 -0
  76. truefoundry/ml/autogen/client/models/assistant_message.py +89 -0
  77. truefoundry/ml/autogen/client/models/authorize_user_for_model_request_dto.py +69 -0
  78. truefoundry/ml/autogen/client/models/authorize_user_for_model_version_request_dto.py +69 -0
  79. truefoundry/ml/autogen/client/models/blob_storage_reference.py +93 -0
  80. truefoundry/ml/autogen/client/models/body_get_search_runs_get.py +72 -0
  81. truefoundry/ml/autogen/client/models/chat_prompt.py +156 -0
  82. truefoundry/ml/autogen/client/models/chat_prompt_messages_inner.py +171 -0
  83. truefoundry/ml/autogen/client/models/columns_dto.py +73 -0
  84. truefoundry/ml/autogen/client/models/content.py +153 -0
  85. truefoundry/ml/autogen/client/models/content1.py +153 -0
  86. truefoundry/ml/autogen/client/models/content2.py +174 -0
  87. truefoundry/ml/autogen/client/models/content2_any_of_inner.py +150 -0
  88. truefoundry/ml/autogen/client/models/create_artifact_request_dto.py +74 -0
  89. truefoundry/ml/autogen/client/models/create_artifact_response_dto.py +65 -0
  90. truefoundry/ml/autogen/client/models/create_artifact_version_request_dto.py +74 -0
  91. truefoundry/ml/autogen/client/models/create_artifact_version_response_dto.py +65 -0
  92. truefoundry/ml/autogen/client/models/create_dataset_request_dto.py +76 -0
  93. truefoundry/ml/autogen/client/models/create_experiment_request_dto.py +94 -0
  94. truefoundry/ml/autogen/client/models/create_experiment_response_dto.py +67 -0
  95. truefoundry/ml/autogen/client/models/create_model_version_request_dto.py +95 -0
  96. truefoundry/ml/autogen/client/models/create_multi_part_upload_for_dataset_request_dto.py +73 -0
  97. truefoundry/ml/autogen/client/models/create_multi_part_upload_for_dataset_response_dto.py +79 -0
  98. truefoundry/ml/autogen/client/models/create_multi_part_upload_request_dto.py +73 -0
  99. truefoundry/ml/autogen/client/models/create_python_deployment_config_request_dto.py +72 -0
  100. truefoundry/ml/autogen/client/models/create_python_deployment_config_response_dto.py +67 -0
  101. truefoundry/ml/autogen/client/models/create_run_request_dto.py +97 -0
  102. truefoundry/ml/autogen/client/models/create_run_response_dto.py +75 -0
  103. truefoundry/ml/autogen/client/models/dataset_dto.py +112 -0
  104. truefoundry/ml/autogen/client/models/dataset_response_dto.py +75 -0
  105. truefoundry/ml/autogen/client/models/delete_artifact_versions_request_dto.py +65 -0
  106. truefoundry/ml/autogen/client/models/delete_dataset_request_dto.py +74 -0
  107. truefoundry/ml/autogen/client/models/delete_model_version_request_dto.py +65 -0
  108. truefoundry/ml/autogen/client/models/delete_run_request.py +65 -0
  109. truefoundry/ml/autogen/client/models/delete_tag_request_dto.py +68 -0
  110. truefoundry/ml/autogen/client/models/experiment_dto.py +127 -0
  111. truefoundry/ml/autogen/client/models/experiment_id_request_dto.py +67 -0
  112. truefoundry/ml/autogen/client/models/experiment_response_dto.py +75 -0
  113. truefoundry/ml/autogen/client/models/experiment_tag_dto.py +69 -0
  114. truefoundry/ml/autogen/client/models/feature_dto.py +68 -0
  115. truefoundry/ml/autogen/client/models/feature_value_type.py +35 -0
  116. truefoundry/ml/autogen/client/models/file_info_dto.py +76 -0
  117. truefoundry/ml/autogen/client/models/finalize_artifact_version_request_dto.py +101 -0
  118. truefoundry/ml/autogen/client/models/get_experiment_response_dto.py +88 -0
  119. truefoundry/ml/autogen/client/models/get_latest_run_log_response_dto.py +75 -0
  120. truefoundry/ml/autogen/client/models/get_metric_history_response.py +79 -0
  121. truefoundry/ml/autogen/client/models/get_signed_url_for_dataset_write_request_dto.py +68 -0
  122. truefoundry/ml/autogen/client/models/get_signed_urls_for_artifact_version_read_request_dto.py +68 -0
  123. truefoundry/ml/autogen/client/models/get_signed_urls_for_artifact_version_read_response_dto.py +81 -0
  124. truefoundry/ml/autogen/client/models/get_signed_urls_for_artifact_version_write_request_dto.py +69 -0
  125. truefoundry/ml/autogen/client/models/get_signed_urls_for_artifact_version_write_response_dto.py +83 -0
  126. truefoundry/ml/autogen/client/models/get_signed_urls_for_dataset_read_request_dto.py +68 -0
  127. truefoundry/ml/autogen/client/models/get_signed_urls_for_dataset_read_response_dto.py +81 -0
  128. truefoundry/ml/autogen/client/models/get_signed_urls_for_dataset_write_response_dto.py +81 -0
  129. truefoundry/ml/autogen/client/models/get_tenant_id_response_dto.py +73 -0
  130. truefoundry/ml/autogen/client/models/http_validation_error.py +82 -0
  131. truefoundry/ml/autogen/client/models/image_content_part.py +87 -0
  132. truefoundry/ml/autogen/client/models/image_url.py +75 -0
  133. truefoundry/ml/autogen/client/models/internal_metadata.py +180 -0
  134. truefoundry/ml/autogen/client/models/latest_run_log_dto.py +78 -0
  135. truefoundry/ml/autogen/client/models/list_artifact_versions_request_dto.py +107 -0
  136. truefoundry/ml/autogen/client/models/list_artifact_versions_response_dto.py +87 -0
  137. truefoundry/ml/autogen/client/models/list_artifacts_request_dto.py +96 -0
  138. truefoundry/ml/autogen/client/models/list_artifacts_response_dto.py +86 -0
  139. truefoundry/ml/autogen/client/models/list_colums_response_dto.py +75 -0
  140. truefoundry/ml/autogen/client/models/list_datasets_request_dto.py +78 -0
  141. truefoundry/ml/autogen/client/models/list_datasets_response_dto.py +86 -0
  142. truefoundry/ml/autogen/client/models/list_experiments_response_dto.py +86 -0
  143. truefoundry/ml/autogen/client/models/list_files_for_artifact_version_request_dto.py +76 -0
  144. truefoundry/ml/autogen/client/models/list_files_for_artifact_versions_response_dto.py +82 -0
  145. truefoundry/ml/autogen/client/models/list_files_for_dataset_request_dto.py +76 -0
  146. truefoundry/ml/autogen/client/models/list_files_for_dataset_response_dto.py +82 -0
  147. truefoundry/ml/autogen/client/models/list_latest_run_logs_response_dto.py +82 -0
  148. truefoundry/ml/autogen/client/models/list_metric_history_request_dto.py +69 -0
  149. truefoundry/ml/autogen/client/models/list_metric_history_response_dto.py +84 -0
  150. truefoundry/ml/autogen/client/models/list_model_version_response_dto.py +87 -0
  151. truefoundry/ml/autogen/client/models/list_model_versions_request_dto.py +93 -0
  152. truefoundry/ml/autogen/client/models/list_models_request_dto.py +89 -0
  153. truefoundry/ml/autogen/client/models/list_models_response_dto.py +84 -0
  154. truefoundry/ml/autogen/client/models/list_run_artifacts_response_dto.py +84 -0
  155. truefoundry/ml/autogen/client/models/list_run_logs_response_dto.py +82 -0
  156. truefoundry/ml/autogen/client/models/list_seed_experiments_response_dto.py +81 -0
  157. truefoundry/ml/autogen/client/models/log_batch_request_dto.py +106 -0
  158. truefoundry/ml/autogen/client/models/log_metric_request_dto.py +80 -0
  159. truefoundry/ml/autogen/client/models/log_param_request_dto.py +76 -0
  160. truefoundry/ml/autogen/client/models/method.py +37 -0
  161. truefoundry/ml/autogen/client/models/metric_collection_dto.py +82 -0
  162. truefoundry/ml/autogen/client/models/metric_dto.py +76 -0
  163. truefoundry/ml/autogen/client/models/mime_type.py +37 -0
  164. truefoundry/ml/autogen/client/models/model_configuration.py +103 -0
  165. truefoundry/ml/autogen/client/models/model_dto.py +122 -0
  166. truefoundry/ml/autogen/client/models/model_response_dto.py +75 -0
  167. truefoundry/ml/autogen/client/models/model_schema_dto.py +85 -0
  168. truefoundry/ml/autogen/client/models/model_version_dto.py +170 -0
  169. truefoundry/ml/autogen/client/models/model_version_response_dto.py +75 -0
  170. truefoundry/ml/autogen/client/models/multi_part_upload_dto.py +107 -0
  171. truefoundry/ml/autogen/client/models/multi_part_upload_response_dto.py +79 -0
  172. truefoundry/ml/autogen/client/models/multi_part_upload_storage_provider.py +34 -0
  173. truefoundry/ml/autogen/client/models/notify_artifact_version_failure_dto.py +65 -0
  174. truefoundry/ml/autogen/client/models/openapi_spec.py +152 -0
  175. truefoundry/ml/autogen/client/models/param_dto.py +66 -0
  176. truefoundry/ml/autogen/client/models/parameters.py +84 -0
  177. truefoundry/ml/autogen/client/models/prediction_type.py +34 -0
  178. truefoundry/ml/autogen/client/models/resolve_agent_app_response_dto.py +75 -0
  179. truefoundry/ml/autogen/client/models/restore_run_request_dto.py +65 -0
  180. truefoundry/ml/autogen/client/models/run_data_dto.py +104 -0
  181. truefoundry/ml/autogen/client/models/run_dto.py +84 -0
  182. truefoundry/ml/autogen/client/models/run_info_dto.py +105 -0
  183. truefoundry/ml/autogen/client/models/run_log_dto.py +90 -0
  184. truefoundry/ml/autogen/client/models/run_log_input_dto.py +80 -0
  185. truefoundry/ml/autogen/client/models/run_response_dto.py +75 -0
  186. truefoundry/ml/autogen/client/models/run_tag_dto.py +66 -0
  187. truefoundry/ml/autogen/client/models/search_runs_request_dto.py +94 -0
  188. truefoundry/ml/autogen/client/models/search_runs_response_dto.py +84 -0
  189. truefoundry/ml/autogen/client/models/set_experiment_tag_request_dto.py +73 -0
  190. truefoundry/ml/autogen/client/models/set_tag_request_dto.py +76 -0
  191. truefoundry/ml/autogen/client/models/signed_url_dto.py +69 -0
  192. truefoundry/ml/autogen/client/models/stop.py +152 -0
  193. truefoundry/ml/autogen/client/models/store_run_logs_request_dto.py +83 -0
  194. truefoundry/ml/autogen/client/models/system_message.py +89 -0
  195. truefoundry/ml/autogen/client/models/text.py +153 -0
  196. truefoundry/ml/autogen/client/models/text_content_part.py +84 -0
  197. truefoundry/ml/autogen/client/models/update_artifact_version_request_dto.py +74 -0
  198. truefoundry/ml/autogen/client/models/update_dataset_request_dto.py +74 -0
  199. truefoundry/ml/autogen/client/models/update_experiment_request_dto.py +74 -0
  200. truefoundry/ml/autogen/client/models/update_model_version_request_dto.py +93 -0
  201. truefoundry/ml/autogen/client/models/update_run_request_dto.py +78 -0
  202. truefoundry/ml/autogen/client/models/update_run_response_dto.py +75 -0
  203. truefoundry/ml/autogen/client/models/url.py +153 -0
  204. truefoundry/ml/autogen/client/models/user_message.py +89 -0
  205. truefoundry/ml/autogen/client/models/validation_error.py +87 -0
  206. truefoundry/ml/autogen/client/models/validation_error_loc_inner.py +154 -0
  207. truefoundry/ml/autogen/client/rest.py +426 -0
  208. truefoundry/ml/autogen/client_README.md +320 -0
  209. truefoundry/ml/cli/__init__.py +0 -0
  210. truefoundry/ml/cli/cli.py +18 -0
  211. truefoundry/ml/cli/commands/__init__.py +3 -0
  212. truefoundry/ml/cli/commands/download.py +87 -0
  213. truefoundry/ml/clients/__init__.py +0 -0
  214. truefoundry/ml/clients/entities.py +8 -0
  215. truefoundry/ml/clients/servicefoundry_client.py +45 -0
  216. truefoundry/ml/clients/utils.py +122 -0
  217. truefoundry/ml/constants.py +84 -0
  218. truefoundry/ml/entities.py +62 -0
  219. truefoundry/ml/enums.py +70 -0
  220. truefoundry/ml/env_vars.py +9 -0
  221. truefoundry/ml/exceptions.py +8 -0
  222. truefoundry/ml/git_info.py +60 -0
  223. truefoundry/ml/internal_namespace.py +52 -0
  224. truefoundry/ml/log_types/__init__.py +4 -0
  225. truefoundry/ml/log_types/artifacts/artifact.py +431 -0
  226. truefoundry/ml/log_types/artifacts/constants.py +33 -0
  227. truefoundry/ml/log_types/artifacts/dataset.py +384 -0
  228. truefoundry/ml/log_types/artifacts/general_artifact.py +110 -0
  229. truefoundry/ml/log_types/artifacts/model.py +611 -0
  230. truefoundry/ml/log_types/artifacts/model_extras.py +48 -0
  231. truefoundry/ml/log_types/artifacts/utils.py +161 -0
  232. truefoundry/ml/log_types/image/__init__.py +3 -0
  233. truefoundry/ml/log_types/image/constants.py +8 -0
  234. truefoundry/ml/log_types/image/image.py +357 -0
  235. truefoundry/ml/log_types/image/image_normalizer.py +102 -0
  236. truefoundry/ml/log_types/image/types.py +68 -0
  237. truefoundry/ml/log_types/plot.py +281 -0
  238. truefoundry/ml/log_types/pydantic_base.py +10 -0
  239. truefoundry/ml/log_types/utils.py +12 -0
  240. truefoundry/ml/logger.py +17 -0
  241. truefoundry/ml/mlfoundry_api.py +1575 -0
  242. truefoundry/ml/mlfoundry_run.py +1203 -0
  243. truefoundry/ml/run_utils.py +93 -0
  244. truefoundry/ml/session.py +168 -0
  245. truefoundry/ml/validation_utils.py +346 -0
  246. truefoundry/pydantic_v1.py +8 -1
  247. truefoundry/workflow/__init__.py +16 -1
  248. {truefoundry-0.3.4rc1.dist-info → truefoundry-0.4.0.dist-info}/METADATA +21 -14
  249. truefoundry-0.4.0.dist-info/RECORD +344 -0
  250. truefoundry/deploy/lib/clients/utils.py +0 -41
  251. truefoundry-0.3.4rc1.dist-info/RECORD +0 -136
  252. {truefoundry-0.3.4rc1.dist-info → truefoundry-0.4.0.dist-info}/WHEEL +0 -0
  253. {truefoundry-0.3.4rc1.dist-info → truefoundry-0.4.0.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,320 @@
1
+ # client
2
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
3
+
4
+ The `truefoundry.ml.autogen.client` package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
5
+
6
+ - API version: 0.1.0
7
+ - Package version: 0.1.0
8
+ - Generator version: 7.9.0-SNAPSHOT
9
+ - Build package: org.openapitools.codegen.languages.PythonPydanticV1ClientCodegen
10
+
11
+ ## Requirements.
12
+
13
+ Python 3.7+
14
+
15
+ ## Installation & Usage
16
+
17
+ This python library package is generated without supporting files like setup.py or requirements files
18
+
19
+ To be able to use it, you will need these dependencies in your own package that uses this library:
20
+
21
+ * urllib3 >= 1.25.3
22
+ * python-dateutil
23
+ * pydantic
24
+ * aenum
25
+
26
+ ## Getting Started
27
+
28
+ In your own code, to use this library to connect and interact with client,
29
+ you can run the following:
30
+
31
+ ```python
32
+
33
+ import time
34
+ import truefoundry.ml.autogen.client
35
+ from truefoundry.ml.autogen.client.rest import ApiException
36
+ from pprint import pprint
37
+
38
+ # Defining the host is optional and defaults to http://localhost
39
+ # See configuration.py for a list of all supported configuration parameters.
40
+ configuration = truefoundry.ml.autogen.client.Configuration(
41
+ host = "http://localhost"
42
+ )
43
+
44
+
45
+
46
+ # Enter a context with an instance of the API client
47
+ with truefoundry.ml.autogen.client.ApiClient(configuration) as api_client:
48
+ # Create an instance of the API class
49
+ api_instance = truefoundry.ml.autogen.client.AuthApi(api_client)
50
+ host_name = 'host_name_example' # str |
51
+
52
+ try:
53
+ # Get Tenant Id
54
+ api_response = api_instance.get_tenant_id_get(host_name)
55
+ print("The response of AuthApi->get_tenant_id_get:\n")
56
+ pprint(api_response)
57
+ except ApiException as e:
58
+ print("Exception when calling AuthApi->get_tenant_id_get: %s\n" % e)
59
+
60
+ ```
61
+
62
+ ## Documentation for API Endpoints
63
+
64
+ All URIs are relative to *http://localhost*
65
+
66
+ Class | Method | HTTP request | Description
67
+ ------------ | ------------- | ------------- | -------------
68
+ *AuthApi* | [**get_tenant_id_get**](truefoundry/ml/autogen/client/docs/AuthApi.md#get_tenant_id_get) | **GET** /api/2.0/mlflow/tenant-id | Get Tenant Id
69
+ *DeprecatedApi* | [**get_run_by_name_get**](truefoundry/ml/autogen/client/docs/DeprecatedApi.md#get_run_by_name_get) | **GET** /api/2.0mlflow/runs/get-by-name | Get Run By Name
70
+ *DeprecatedApi* | [**get_search_runs_get**](truefoundry/ml/autogen/client/docs/DeprecatedApi.md#get_search_runs_get) | **GET** /api/2.0/preview/mlflow/runs/search | Get Search Runs
71
+ *DeprecatedApi* | [**get_signed_urls_for_dataset_write_deprecated_get**](truefoundry/ml/autogen/client/docs/DeprecatedApi.md#get_signed_urls_for_dataset_write_deprecated_get) | **GET** /api/2.0/mlflow/mlfoundry-artifacts/datasets/get-signed-urls-for-write | Get Signed Urls For Dataset Write Deprecated
72
+ *ExperimentsApi* | [**create_experiment_post**](truefoundry/ml/autogen/client/docs/ExperimentsApi.md#create_experiment_post) | **POST** /api/2.0/mlflow/experiments/create | Create Experiment
73
+ *ExperimentsApi* | [**delete_experiment_post**](truefoundry/ml/autogen/client/docs/ExperimentsApi.md#delete_experiment_post) | **POST** /api/2.0/mlflow/experiments/delete | Delete Experiment
74
+ *ExperimentsApi* | [**get_experiment_by_name_get**](truefoundry/ml/autogen/client/docs/ExperimentsApi.md#get_experiment_by_name_get) | **GET** /api/2.0/mlflow/experiments/get-by-name | Get Experiment By Name
75
+ *ExperimentsApi* | [**get_experiment_get**](truefoundry/ml/autogen/client/docs/ExperimentsApi.md#get_experiment_get) | **GET** /api/2.0/mlflow/experiments/get | Get Experiment
76
+ *ExperimentsApi* | [**hard_delete_experiment_post**](truefoundry/ml/autogen/client/docs/ExperimentsApi.md#hard_delete_experiment_post) | **POST** /api/2.0/mlflow/experiments/hard-delete | Hard Delete Experiment
77
+ *ExperimentsApi* | [**list_experiment_columns_get**](truefoundry/ml/autogen/client/docs/ExperimentsApi.md#list_experiment_columns_get) | **GET** /api/2.0/mlflow/experiments/columns | List Experiment Columns
78
+ *ExperimentsApi* | [**list_experiments_get**](truefoundry/ml/autogen/client/docs/ExperimentsApi.md#list_experiments_get) | **GET** /api/2.0/mlflow/experiments/list | List Experiments
79
+ *ExperimentsApi* | [**put_privacy_type_put**](truefoundry/ml/autogen/client/docs/ExperimentsApi.md#put_privacy_type_put) | **PUT** /api/2.0/mlflow/experiments/privacy-type | Put Privacy Type
80
+ *ExperimentsApi* | [**restore_experiment_post**](truefoundry/ml/autogen/client/docs/ExperimentsApi.md#restore_experiment_post) | **POST** /api/2.0/mlflow/experiments/restore | Restore Experiment
81
+ *ExperimentsApi* | [**seed_list_experiment_get**](truefoundry/ml/autogen/client/docs/ExperimentsApi.md#seed_list_experiment_get) | **GET** /api/2.0/mlflow/experiments/seed/list | Seed List Experiment
82
+ *ExperimentsApi* | [**set_experiment_tag_post**](truefoundry/ml/autogen/client/docs/ExperimentsApi.md#set_experiment_tag_post) | **POST** /api/2.0/mlflow/experiments/set-experiment-tag | Set Experiment Tag
83
+ *ExperimentsApi* | [**update_experiment_post**](truefoundry/ml/autogen/client/docs/ExperimentsApi.md#update_experiment_post) | **POST** /api/2.0/mlflow/experiments/update | Update Experiment
84
+ *HealthApi* | [**health_get**](truefoundry/ml/autogen/client/docs/HealthApi.md#health_get) | **GET** /health | Health
85
+ *HealthApi* | [**serve_get**](truefoundry/ml/autogen/client/docs/HealthApi.md#serve_get) | **GET** / | Serve
86
+ *MetricsApi* | [**get_metric_history_get**](truefoundry/ml/autogen/client/docs/MetricsApi.md#get_metric_history_get) | **GET** /api/2.0/mlflow/metrics/get-history | Get Metric History
87
+ *MetricsApi* | [**list_metric_history_post**](truefoundry/ml/autogen/client/docs/MetricsApi.md#list_metric_history_post) | **POST** /api/2.0/mlflow/metrics/list-history | List Metric History
88
+ *MlfoundryArtifactsApi* | [**add_custom_metrics_to_model_version_post**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#add_custom_metrics_to_model_version_post) | **POST** /api/2.0/mlflow/mlfoundry-artifacts/model-versions/custom-metrics/add | Add Custom Metrics To Model Version
89
+ *MlfoundryArtifactsApi* | [**add_features_to_model_version_post**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#add_features_to_model_version_post) | **POST** /api/2.0/mlflow/mlfoundry-artifacts/model-versions/features/add | Add Features To Model Version
90
+ *MlfoundryArtifactsApi* | [**authorize_user_for_model_post**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#authorize_user_for_model_post) | **POST** /api/2.0/mlflow/mlfoundry-artifacts/models/authorize | Authorize User For Model
91
+ *MlfoundryArtifactsApi* | [**authorize_user_for_model_version_post**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#authorize_user_for_model_version_post) | **POST** /api/2.0/mlflow/mlfoundry-artifacts/model-versions/authorize | Authorize User For Model Version
92
+ *MlfoundryArtifactsApi* | [**create_artifact_post**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#create_artifact_post) | **POST** /api/2.0/mlflow/mlfoundry-artifacts/artifacts/create | Create Artifact
93
+ *MlfoundryArtifactsApi* | [**create_artifact_version_post**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#create_artifact_version_post) | **POST** /api/2.0/mlflow/mlfoundry-artifacts/artifact-versions/create | Create Artifact Version
94
+ *MlfoundryArtifactsApi* | [**create_dataset_post**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#create_dataset_post) | **POST** /api/2.0/mlflow/mlfoundry-artifacts/datasets/create | Create Dataset
95
+ *MlfoundryArtifactsApi* | [**create_model_version_post**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#create_model_version_post) | **POST** /api/2.0/mlflow/mlfoundry-artifacts/model-versions/create | Create Model Version
96
+ *MlfoundryArtifactsApi* | [**create_multi_part_upload_post**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#create_multi_part_upload_post) | **POST** /api/2.0/mlflow/mlfoundry-artifacts/artifact-versions/multi-part-upload/create | Create Multi Part Upload
97
+ *MlfoundryArtifactsApi* | [**create_multipart_upload_for_dataset_post**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#create_multipart_upload_for_dataset_post) | **POST** /api/2.0/mlflow/mlfoundry-artifacts/datasets/multi-part-upload/create | Create Multipart Upload For Dataset
98
+ *MlfoundryArtifactsApi* | [**delete_artifact_post**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#delete_artifact_post) | **POST** /api/2.0/mlflow/mlfoundry-artifacts/artifact/delete | Delete Artifact
99
+ *MlfoundryArtifactsApi* | [**delete_artifact_version_post**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#delete_artifact_version_post) | **POST** /api/2.0/mlflow/mlfoundry-artifacts/artifact-versions/delete | Delete Artifact Version
100
+ *MlfoundryArtifactsApi* | [**delete_dataset_post**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#delete_dataset_post) | **POST** /api/2.0/mlflow/mlfoundry-artifacts/datasets/delete | Delete Dataset
101
+ *MlfoundryArtifactsApi* | [**delete_model_version_post**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#delete_model_version_post) | **POST** /api/2.0/mlflow/mlfoundry-artifacts/model-versions/delete | Delete Model Version
102
+ *MlfoundryArtifactsApi* | [**finalize_artifact_version_post**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#finalize_artifact_version_post) | **POST** /api/2.0/mlflow/mlfoundry-artifacts/artifact-versions/finalize | Finalize Artifact Version
103
+ *MlfoundryArtifactsApi* | [**get_artifact_by_fqn_get**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#get_artifact_by_fqn_get) | **GET** /api/2.0/mlflow/mlfoundry-artifacts/artifacts/get-by-fqn | Get Artifact By Fqn
104
+ *MlfoundryArtifactsApi* | [**get_artifact_by_id_get**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#get_artifact_by_id_get) | **GET** /api/2.0/mlflow/mlfoundry-artifacts/artifacts/get | Get Artifact By Id
105
+ *MlfoundryArtifactsApi* | [**get_artifact_version_by_fqn_get**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#get_artifact_version_by_fqn_get) | **GET** /api/2.0/mlflow/mlfoundry-artifacts/artifact-versions/get-by-fqn | Get Artifact Version By Fqn
106
+ *MlfoundryArtifactsApi* | [**get_artifact_version_by_id_get**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#get_artifact_version_by_id_get) | **GET** /api/2.0/mlflow/mlfoundry-artifacts/artifact-versions/get | Get Artifact Version By Id
107
+ *MlfoundryArtifactsApi* | [**get_artifact_version_by_name_get**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#get_artifact_version_by_name_get) | **GET** /api/2.0/mlflow/mlfoundry-artifacts/artifact-versions/get-by-name | Get Artifact Version By Name
108
+ *MlfoundryArtifactsApi* | [**get_dataset_by_fqn_get**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#get_dataset_by_fqn_get) | **GET** /api/2.0/mlflow/mlfoundry-artifacts/datasets/get-by-fqn | Get Dataset By Fqn
109
+ *MlfoundryArtifactsApi* | [**get_dataset_get**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#get_dataset_get) | **GET** /api/2.0/mlflow/mlfoundry-artifacts/datasets/get | Get Dataset
110
+ *MlfoundryArtifactsApi* | [**get_model_by_fqn_get**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#get_model_by_fqn_get) | **GET** /api/2.0/mlflow/mlfoundry-artifacts/models/get-by-fqn | Get Model By Fqn
111
+ *MlfoundryArtifactsApi* | [**get_model_by_name_get**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#get_model_by_name_get) | **GET** /api/2.0/mlflow/mlfoundry-artifacts/models/get-by-name | Get Model By Name
112
+ *MlfoundryArtifactsApi* | [**get_model_get**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#get_model_get) | **GET** /api/2.0/mlflow/mlfoundry-artifacts/models/get | Get Model
113
+ *MlfoundryArtifactsApi* | [**get_model_version_by_fqn_get**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#get_model_version_by_fqn_get) | **GET** /api/2.0/mlflow/mlfoundry-artifacts/model-versions/get-by-fqn | Get Model Version By Fqn
114
+ *MlfoundryArtifactsApi* | [**get_model_version_by_name_get**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#get_model_version_by_name_get) | **GET** /api/2.0/mlflow/mlfoundry-artifacts/model-versions/get-by-name | Get Model Version By Name
115
+ *MlfoundryArtifactsApi* | [**get_model_version_get**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#get_model_version_get) | **GET** /api/2.0/mlflow/mlfoundry-artifacts/model-versions/get | Get Model Version
116
+ *MlfoundryArtifactsApi* | [**get_signed_urls_dataset_read_post**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#get_signed_urls_dataset_read_post) | **POST** /api/2.0/mlflow/mlfoundry-artifacts/datasets/get-signed-urls-for-read | Get Signed Urls Dataset Read
117
+ *MlfoundryArtifactsApi* | [**get_signed_urls_for_dataset_write_post**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#get_signed_urls_for_dataset_write_post) | **POST** /api/2.0/mlflow/mlfoundry-artifacts/datasets/get-signed-urls-for-write | Get Signed Urls For Dataset Write
118
+ *MlfoundryArtifactsApi* | [**get_signed_urls_for_read_post**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#get_signed_urls_for_read_post) | **POST** /api/2.0/mlflow/mlfoundry-artifacts/artifact-versions/get-signed-urls-for-read | Get Signed Urls For Read
119
+ *MlfoundryArtifactsApi* | [**get_signed_urls_for_write_post**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#get_signed_urls_for_write_post) | **POST** /api/2.0/mlflow/mlfoundry-artifacts/artifact-versions/get-signed-urls-for-write | Get Signed Urls For Write
120
+ *MlfoundryArtifactsApi* | [**list_artifact_versions_post**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#list_artifact_versions_post) | **POST** /api/2.0/mlflow/mlfoundry-artifacts/artifact-versions/list | List Artifact Versions
121
+ *MlfoundryArtifactsApi* | [**list_artifacts_post**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#list_artifacts_post) | **POST** /api/2.0/mlflow/mlfoundry-artifacts/artifacts/list | List Artifacts
122
+ *MlfoundryArtifactsApi* | [**list_datasets_post**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#list_datasets_post) | **POST** /api/2.0/mlflow/mlfoundry-artifacts/datasets/list | List Datasets
123
+ *MlfoundryArtifactsApi* | [**list_files_for_artifact_version_post**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#list_files_for_artifact_version_post) | **POST** /api/2.0/mlflow/mlfoundry-artifacts/artifact-versions/files/list | List Files For Artifact Version
124
+ *MlfoundryArtifactsApi* | [**list_files_for_dataset_post**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#list_files_for_dataset_post) | **POST** /api/2.0/mlflow/mlfoundry-artifacts/datasets/files/list | List Files For Dataset
125
+ *MlfoundryArtifactsApi* | [**list_model_versions_post**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#list_model_versions_post) | **POST** /api/2.0/mlflow/mlfoundry-artifacts/model-versions/list | List Model Versions
126
+ *MlfoundryArtifactsApi* | [**list_models_post**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#list_models_post) | **POST** /api/2.0/mlflow/mlfoundry-artifacts/models/list | List Models
127
+ *MlfoundryArtifactsApi* | [**notify_failure_post**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#notify_failure_post) | **POST** /api/2.0/mlflow/mlfoundry-artifacts/artifact-versions/notify-failure | Notify Failure
128
+ *MlfoundryArtifactsApi* | [**resolve_agent_get**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#resolve_agent_get) | **GET** /api/2.0/mlflow/mlfoundry-artifacts/agent/resolve | Resolve Agent
129
+ *MlfoundryArtifactsApi* | [**update_artifact_version_post**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#update_artifact_version_post) | **POST** /api/2.0/mlflow/mlfoundry-artifacts/artifact-versions/update | Update Artifact Version
130
+ *MlfoundryArtifactsApi* | [**update_dataset_post**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#update_dataset_post) | **POST** /api/2.0/mlflow/mlfoundry-artifacts/datasets/update | Update Dataset
131
+ *MlfoundryArtifactsApi* | [**update_model_version_post**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#update_model_version_post) | **POST** /api/2.0/mlflow/mlfoundry-artifacts/model-versions/update | Update Model Version
132
+ *PythonDeploymentConfigApi* | [**generate_py_development_config_post**](truefoundry/ml/autogen/client/docs/PythonDeploymentConfigApi.md#generate_py_development_config_post) | **POST** /api/2.0/mlflow/python-deployment-config/generate | Generate Py Development Config
133
+ *RunArtifactsApi* | [**list_run_artifacts_get**](truefoundry/ml/autogen/client/docs/RunArtifactsApi.md#list_run_artifacts_get) | **GET** /api/2.0/mlflow/artifacts/list | List Run Artifacts
134
+ *RunsApi* | [**create_run_post**](truefoundry/ml/autogen/client/docs/RunsApi.md#create_run_post) | **POST** /api/2.0/mlflow/runs/create | Create Run
135
+ *RunsApi* | [**delete_run_post**](truefoundry/ml/autogen/client/docs/RunsApi.md#delete_run_post) | **POST** /api/2.0/mlflow/runs/delete | Delete Run
136
+ *RunsApi* | [**delete_tag_post**](truefoundry/ml/autogen/client/docs/RunsApi.md#delete_tag_post) | **POST** /api/2.0/mlflow/runs/delete-tag | Delete Tag
137
+ *RunsApi* | [**get_run_by_fqn_get**](truefoundry/ml/autogen/client/docs/RunsApi.md#get_run_by_fqn_get) | **GET** /api/2.0/mlflow/runs/get-by-fqn | Get Run By Fqn
138
+ *RunsApi* | [**get_run_by_name_get**](truefoundry/ml/autogen/client/docs/RunsApi.md#get_run_by_name_get) | **GET** /api/2.0/mlflow/runs/get-by-name | Get Run By Name
139
+ *RunsApi* | [**get_run_get**](truefoundry/ml/autogen/client/docs/RunsApi.md#get_run_get) | **GET** /api/2.0/mlflow/runs/get | Get Run
140
+ *RunsApi* | [**hard_delete_run_post**](truefoundry/ml/autogen/client/docs/RunsApi.md#hard_delete_run_post) | **POST** /api/2.0/mlflow/runs/hard-delete | Hard Delete Run
141
+ *RunsApi* | [**latest_run_log_get**](truefoundry/ml/autogen/client/docs/RunsApi.md#latest_run_log_get) | **GET** /api/2.0/mlflow/runs/run-logs/latest-run-log | Latest Run Log
142
+ *RunsApi* | [**list_latest_run_logs_get**](truefoundry/ml/autogen/client/docs/RunsApi.md#list_latest_run_logs_get) | **GET** /api/2.0/mlflow/runs/run-logs/list-latest | List Latest Run Logs
143
+ *RunsApi* | [**list_run_logs_get**](truefoundry/ml/autogen/client/docs/RunsApi.md#list_run_logs_get) | **GET** /api/2.0/mlflow/runs/run-logs/list | List Run Logs
144
+ *RunsApi* | [**log_metric_post**](truefoundry/ml/autogen/client/docs/RunsApi.md#log_metric_post) | **POST** /api/2.0/mlflow/runs/log-metric | Log Metric
145
+ *RunsApi* | [**log_parameter_post**](truefoundry/ml/autogen/client/docs/RunsApi.md#log_parameter_post) | **POST** /api/2.0/mlflow/runs/log-parameter | Log Parameter
146
+ *RunsApi* | [**log_run_batch_post**](truefoundry/ml/autogen/client/docs/RunsApi.md#log_run_batch_post) | **POST** /api/2.0/mlflow/runs/log-batch | Log Run Batch
147
+ *RunsApi* | [**restore_run_post**](truefoundry/ml/autogen/client/docs/RunsApi.md#restore_run_post) | **POST** /api/2.0/mlflow/runs/restore | Restore Run
148
+ *RunsApi* | [**run_logs_post**](truefoundry/ml/autogen/client/docs/RunsApi.md#run_logs_post) | **POST** /api/2.0/mlflow/runs/run-logs | Run Logs
149
+ *RunsApi* | [**search_runs_post**](truefoundry/ml/autogen/client/docs/RunsApi.md#search_runs_post) | **POST** /api/2.0/mlflow/runs/search | Search Runs
150
+ *RunsApi* | [**set_tag_request_post**](truefoundry/ml/autogen/client/docs/RunsApi.md#set_tag_request_post) | **POST** /api/2.0/mlflow/runs/set-tag | Set Tag Request
151
+ *RunsApi* | [**update_run_post**](truefoundry/ml/autogen/client/docs/RunsApi.md#update_run_post) | **POST** /api/2.0/mlflow/runs/update | Update Run
152
+
153
+
154
+ ## Documentation For Models
155
+
156
+ - [AddCustomMetricsToModelVersionRequestDto](truefoundry/ml/autogen/client/docs/AddCustomMetricsToModelVersionRequestDto.md)
157
+ - [AddFeaturesToModelVersionRequestDto](truefoundry/ml/autogen/client/docs/AddFeaturesToModelVersionRequestDto.md)
158
+ - [Agent](truefoundry/ml/autogen/client/docs/Agent.md)
159
+ - [AgentApp](truefoundry/ml/autogen/client/docs/AgentApp.md)
160
+ - [AgentOpenAPITool](truefoundry/ml/autogen/client/docs/AgentOpenAPITool.md)
161
+ - [AgentOpenAPIToolWithFQN](truefoundry/ml/autogen/client/docs/AgentOpenAPIToolWithFQN.md)
162
+ - [AgentWithFQN](truefoundry/ml/autogen/client/docs/AgentWithFQN.md)
163
+ - [ArtifactDto](truefoundry/ml/autogen/client/docs/ArtifactDto.md)
164
+ - [ArtifactResponseDto](truefoundry/ml/autogen/client/docs/ArtifactResponseDto.md)
165
+ - [ArtifactType](truefoundry/ml/autogen/client/docs/ArtifactType.md)
166
+ - [ArtifactVersionDto](truefoundry/ml/autogen/client/docs/ArtifactVersionDto.md)
167
+ - [ArtifactVersionResponseDto](truefoundry/ml/autogen/client/docs/ArtifactVersionResponseDto.md)
168
+ - [ArtifactVersionStatus](truefoundry/ml/autogen/client/docs/ArtifactVersionStatus.md)
169
+ - [AssistantMessage](truefoundry/ml/autogen/client/docs/AssistantMessage.md)
170
+ - [AuthorizeUserForModelRequestDto](truefoundry/ml/autogen/client/docs/AuthorizeUserForModelRequestDto.md)
171
+ - [AuthorizeUserForModelVersionRequestDto](truefoundry/ml/autogen/client/docs/AuthorizeUserForModelVersionRequestDto.md)
172
+ - [BlobStorageReference](truefoundry/ml/autogen/client/docs/BlobStorageReference.md)
173
+ - [BodyGetSearchRunsGet](truefoundry/ml/autogen/client/docs/BodyGetSearchRunsGet.md)
174
+ - [ChatPrompt](truefoundry/ml/autogen/client/docs/ChatPrompt.md)
175
+ - [ChatPromptMessagesInner](truefoundry/ml/autogen/client/docs/ChatPromptMessagesInner.md)
176
+ - [ColumnsDto](truefoundry/ml/autogen/client/docs/ColumnsDto.md)
177
+ - [Content](truefoundry/ml/autogen/client/docs/Content.md)
178
+ - [Content1](truefoundry/ml/autogen/client/docs/Content1.md)
179
+ - [Content2](truefoundry/ml/autogen/client/docs/Content2.md)
180
+ - [Content2AnyOfInner](truefoundry/ml/autogen/client/docs/Content2AnyOfInner.md)
181
+ - [CreateArtifactRequestDto](truefoundry/ml/autogen/client/docs/CreateArtifactRequestDto.md)
182
+ - [CreateArtifactResponseDto](truefoundry/ml/autogen/client/docs/CreateArtifactResponseDto.md)
183
+ - [CreateArtifactVersionRequestDto](truefoundry/ml/autogen/client/docs/CreateArtifactVersionRequestDto.md)
184
+ - [CreateArtifactVersionResponseDto](truefoundry/ml/autogen/client/docs/CreateArtifactVersionResponseDto.md)
185
+ - [CreateDatasetRequestDto](truefoundry/ml/autogen/client/docs/CreateDatasetRequestDto.md)
186
+ - [CreateExperimentRequestDto](truefoundry/ml/autogen/client/docs/CreateExperimentRequestDto.md)
187
+ - [CreateExperimentResponseDto](truefoundry/ml/autogen/client/docs/CreateExperimentResponseDto.md)
188
+ - [CreateModelVersionRequestDto](truefoundry/ml/autogen/client/docs/CreateModelVersionRequestDto.md)
189
+ - [CreateMultiPartUploadForDatasetRequestDto](truefoundry/ml/autogen/client/docs/CreateMultiPartUploadForDatasetRequestDto.md)
190
+ - [CreateMultiPartUploadForDatasetResponseDto](truefoundry/ml/autogen/client/docs/CreateMultiPartUploadForDatasetResponseDto.md)
191
+ - [CreateMultiPartUploadRequestDto](truefoundry/ml/autogen/client/docs/CreateMultiPartUploadRequestDto.md)
192
+ - [CreatePythonDeploymentConfigRequestDto](truefoundry/ml/autogen/client/docs/CreatePythonDeploymentConfigRequestDto.md)
193
+ - [CreatePythonDeploymentConfigResponseDto](truefoundry/ml/autogen/client/docs/CreatePythonDeploymentConfigResponseDto.md)
194
+ - [CreateRunRequestDto](truefoundry/ml/autogen/client/docs/CreateRunRequestDto.md)
195
+ - [CreateRunResponseDto](truefoundry/ml/autogen/client/docs/CreateRunResponseDto.md)
196
+ - [DatasetDto](truefoundry/ml/autogen/client/docs/DatasetDto.md)
197
+ - [DatasetResponseDto](truefoundry/ml/autogen/client/docs/DatasetResponseDto.md)
198
+ - [DeleteArtifactVersionsRequestDto](truefoundry/ml/autogen/client/docs/DeleteArtifactVersionsRequestDto.md)
199
+ - [DeleteDatasetRequestDto](truefoundry/ml/autogen/client/docs/DeleteDatasetRequestDto.md)
200
+ - [DeleteModelVersionRequestDto](truefoundry/ml/autogen/client/docs/DeleteModelVersionRequestDto.md)
201
+ - [DeleteRunRequest](truefoundry/ml/autogen/client/docs/DeleteRunRequest.md)
202
+ - [DeleteTagRequestDto](truefoundry/ml/autogen/client/docs/DeleteTagRequestDto.md)
203
+ - [ExperimentDto](truefoundry/ml/autogen/client/docs/ExperimentDto.md)
204
+ - [ExperimentIdRequestDto](truefoundry/ml/autogen/client/docs/ExperimentIdRequestDto.md)
205
+ - [ExperimentResponseDto](truefoundry/ml/autogen/client/docs/ExperimentResponseDto.md)
206
+ - [ExperimentTagDto](truefoundry/ml/autogen/client/docs/ExperimentTagDto.md)
207
+ - [FeatureDto](truefoundry/ml/autogen/client/docs/FeatureDto.md)
208
+ - [FeatureValueType](truefoundry/ml/autogen/client/docs/FeatureValueType.md)
209
+ - [FileInfoDto](truefoundry/ml/autogen/client/docs/FileInfoDto.md)
210
+ - [FinalizeArtifactVersionRequestDto](truefoundry/ml/autogen/client/docs/FinalizeArtifactVersionRequestDto.md)
211
+ - [GetExperimentResponseDto](truefoundry/ml/autogen/client/docs/GetExperimentResponseDto.md)
212
+ - [GetLatestRunLogResponseDto](truefoundry/ml/autogen/client/docs/GetLatestRunLogResponseDto.md)
213
+ - [GetMetricHistoryResponse](truefoundry/ml/autogen/client/docs/GetMetricHistoryResponse.md)
214
+ - [GetSignedURLForDatasetWriteRequestDto](truefoundry/ml/autogen/client/docs/GetSignedURLForDatasetWriteRequestDto.md)
215
+ - [GetSignedURLsForArtifactVersionReadRequestDto](truefoundry/ml/autogen/client/docs/GetSignedURLsForArtifactVersionReadRequestDto.md)
216
+ - [GetSignedURLsForArtifactVersionReadResponseDto](truefoundry/ml/autogen/client/docs/GetSignedURLsForArtifactVersionReadResponseDto.md)
217
+ - [GetSignedURLsForArtifactVersionWriteRequestDto](truefoundry/ml/autogen/client/docs/GetSignedURLsForArtifactVersionWriteRequestDto.md)
218
+ - [GetSignedURLsForArtifactVersionWriteResponseDto](truefoundry/ml/autogen/client/docs/GetSignedURLsForArtifactVersionWriteResponseDto.md)
219
+ - [GetSignedURLsForDatasetReadRequestDto](truefoundry/ml/autogen/client/docs/GetSignedURLsForDatasetReadRequestDto.md)
220
+ - [GetSignedURLsForDatasetReadResponseDto](truefoundry/ml/autogen/client/docs/GetSignedURLsForDatasetReadResponseDto.md)
221
+ - [GetSignedURLsForDatasetWriteResponseDto](truefoundry/ml/autogen/client/docs/GetSignedURLsForDatasetWriteResponseDto.md)
222
+ - [GetTenantIdResponseDto](truefoundry/ml/autogen/client/docs/GetTenantIdResponseDto.md)
223
+ - [HTTPValidationError](truefoundry/ml/autogen/client/docs/HTTPValidationError.md)
224
+ - [ImageContentPart](truefoundry/ml/autogen/client/docs/ImageContentPart.md)
225
+ - [ImageUrl](truefoundry/ml/autogen/client/docs/ImageUrl.md)
226
+ - [InternalMetadata](truefoundry/ml/autogen/client/docs/InternalMetadata.md)
227
+ - [LatestRunLogDto](truefoundry/ml/autogen/client/docs/LatestRunLogDto.md)
228
+ - [ListArtifactVersionsRequestDto](truefoundry/ml/autogen/client/docs/ListArtifactVersionsRequestDto.md)
229
+ - [ListArtifactVersionsResponseDto](truefoundry/ml/autogen/client/docs/ListArtifactVersionsResponseDto.md)
230
+ - [ListArtifactsRequestDto](truefoundry/ml/autogen/client/docs/ListArtifactsRequestDto.md)
231
+ - [ListArtifactsResponseDto](truefoundry/ml/autogen/client/docs/ListArtifactsResponseDto.md)
232
+ - [ListColumsResponseDto](truefoundry/ml/autogen/client/docs/ListColumsResponseDto.md)
233
+ - [ListDatasetsRequestDto](truefoundry/ml/autogen/client/docs/ListDatasetsRequestDto.md)
234
+ - [ListDatasetsResponseDto](truefoundry/ml/autogen/client/docs/ListDatasetsResponseDto.md)
235
+ - [ListExperimentsResponseDto](truefoundry/ml/autogen/client/docs/ListExperimentsResponseDto.md)
236
+ - [ListFilesForArtifactVersionRequestDto](truefoundry/ml/autogen/client/docs/ListFilesForArtifactVersionRequestDto.md)
237
+ - [ListFilesForArtifactVersionsResponseDto](truefoundry/ml/autogen/client/docs/ListFilesForArtifactVersionsResponseDto.md)
238
+ - [ListFilesForDatasetRequestDto](truefoundry/ml/autogen/client/docs/ListFilesForDatasetRequestDto.md)
239
+ - [ListFilesForDatasetResponseDto](truefoundry/ml/autogen/client/docs/ListFilesForDatasetResponseDto.md)
240
+ - [ListLatestRunLogsResponseDto](truefoundry/ml/autogen/client/docs/ListLatestRunLogsResponseDto.md)
241
+ - [ListMetricHistoryRequestDto](truefoundry/ml/autogen/client/docs/ListMetricHistoryRequestDto.md)
242
+ - [ListMetricHistoryResponseDto](truefoundry/ml/autogen/client/docs/ListMetricHistoryResponseDto.md)
243
+ - [ListModelVersionResponseDto](truefoundry/ml/autogen/client/docs/ListModelVersionResponseDto.md)
244
+ - [ListModelVersionsRequestDto](truefoundry/ml/autogen/client/docs/ListModelVersionsRequestDto.md)
245
+ - [ListModelsRequestDto](truefoundry/ml/autogen/client/docs/ListModelsRequestDto.md)
246
+ - [ListModelsResponseDto](truefoundry/ml/autogen/client/docs/ListModelsResponseDto.md)
247
+ - [ListRunArtifactsResponseDto](truefoundry/ml/autogen/client/docs/ListRunArtifactsResponseDto.md)
248
+ - [ListRunLogsResponseDto](truefoundry/ml/autogen/client/docs/ListRunLogsResponseDto.md)
249
+ - [ListSeedExperimentsResponseDto](truefoundry/ml/autogen/client/docs/ListSeedExperimentsResponseDto.md)
250
+ - [LogBatchRequestDto](truefoundry/ml/autogen/client/docs/LogBatchRequestDto.md)
251
+ - [LogMetricRequestDto](truefoundry/ml/autogen/client/docs/LogMetricRequestDto.md)
252
+ - [LogParamRequestDto](truefoundry/ml/autogen/client/docs/LogParamRequestDto.md)
253
+ - [Method](truefoundry/ml/autogen/client/docs/Method.md)
254
+ - [MetricCollectionDto](truefoundry/ml/autogen/client/docs/MetricCollectionDto.md)
255
+ - [MetricDto](truefoundry/ml/autogen/client/docs/MetricDto.md)
256
+ - [MimeType](truefoundry/ml/autogen/client/docs/MimeType.md)
257
+ - [ModelConfiguration](truefoundry/ml/autogen/client/docs/ModelConfiguration.md)
258
+ - [ModelDto](truefoundry/ml/autogen/client/docs/ModelDto.md)
259
+ - [ModelResponseDto](truefoundry/ml/autogen/client/docs/ModelResponseDto.md)
260
+ - [ModelSchemaDto](truefoundry/ml/autogen/client/docs/ModelSchemaDto.md)
261
+ - [ModelVersionDto](truefoundry/ml/autogen/client/docs/ModelVersionDto.md)
262
+ - [ModelVersionResponseDto](truefoundry/ml/autogen/client/docs/ModelVersionResponseDto.md)
263
+ - [MultiPartUploadDto](truefoundry/ml/autogen/client/docs/MultiPartUploadDto.md)
264
+ - [MultiPartUploadResponseDto](truefoundry/ml/autogen/client/docs/MultiPartUploadResponseDto.md)
265
+ - [MultiPartUploadStorageProvider](truefoundry/ml/autogen/client/docs/MultiPartUploadStorageProvider.md)
266
+ - [NotifyArtifactVersionFailureDto](truefoundry/ml/autogen/client/docs/NotifyArtifactVersionFailureDto.md)
267
+ - [OpenapiSpec](truefoundry/ml/autogen/client/docs/OpenapiSpec.md)
268
+ - [ParamDto](truefoundry/ml/autogen/client/docs/ParamDto.md)
269
+ - [Parameters](truefoundry/ml/autogen/client/docs/Parameters.md)
270
+ - [PredictionType](truefoundry/ml/autogen/client/docs/PredictionType.md)
271
+ - [ResolveAgentAppResponseDto](truefoundry/ml/autogen/client/docs/ResolveAgentAppResponseDto.md)
272
+ - [RestoreRunRequestDto](truefoundry/ml/autogen/client/docs/RestoreRunRequestDto.md)
273
+ - [RunDataDto](truefoundry/ml/autogen/client/docs/RunDataDto.md)
274
+ - [RunDto](truefoundry/ml/autogen/client/docs/RunDto.md)
275
+ - [RunInfoDto](truefoundry/ml/autogen/client/docs/RunInfoDto.md)
276
+ - [RunLogDto](truefoundry/ml/autogen/client/docs/RunLogDto.md)
277
+ - [RunLogInputDto](truefoundry/ml/autogen/client/docs/RunLogInputDto.md)
278
+ - [RunResponseDto](truefoundry/ml/autogen/client/docs/RunResponseDto.md)
279
+ - [RunTagDto](truefoundry/ml/autogen/client/docs/RunTagDto.md)
280
+ - [SearchRunsRequestDto](truefoundry/ml/autogen/client/docs/SearchRunsRequestDto.md)
281
+ - [SearchRunsResponseDto](truefoundry/ml/autogen/client/docs/SearchRunsResponseDto.md)
282
+ - [SetExperimentTagRequestDto](truefoundry/ml/autogen/client/docs/SetExperimentTagRequestDto.md)
283
+ - [SetTagRequestDto](truefoundry/ml/autogen/client/docs/SetTagRequestDto.md)
284
+ - [SignedURLDto](truefoundry/ml/autogen/client/docs/SignedURLDto.md)
285
+ - [Stop](truefoundry/ml/autogen/client/docs/Stop.md)
286
+ - [StoreRunLogsRequestDto](truefoundry/ml/autogen/client/docs/StoreRunLogsRequestDto.md)
287
+ - [SystemMessage](truefoundry/ml/autogen/client/docs/SystemMessage.md)
288
+ - [Text](truefoundry/ml/autogen/client/docs/Text.md)
289
+ - [TextContentPart](truefoundry/ml/autogen/client/docs/TextContentPart.md)
290
+ - [UpdateArtifactVersionRequestDto](truefoundry/ml/autogen/client/docs/UpdateArtifactVersionRequestDto.md)
291
+ - [UpdateDatasetRequestDto](truefoundry/ml/autogen/client/docs/UpdateDatasetRequestDto.md)
292
+ - [UpdateExperimentRequestDto](truefoundry/ml/autogen/client/docs/UpdateExperimentRequestDto.md)
293
+ - [UpdateModelVersionRequestDto](truefoundry/ml/autogen/client/docs/UpdateModelVersionRequestDto.md)
294
+ - [UpdateRunRequestDto](truefoundry/ml/autogen/client/docs/UpdateRunRequestDto.md)
295
+ - [UpdateRunResponseDto](truefoundry/ml/autogen/client/docs/UpdateRunResponseDto.md)
296
+ - [Url](truefoundry/ml/autogen/client/docs/Url.md)
297
+ - [UserMessage](truefoundry/ml/autogen/client/docs/UserMessage.md)
298
+ - [ValidationError](truefoundry/ml/autogen/client/docs/ValidationError.md)
299
+ - [ValidationErrorLocInner](truefoundry/ml/autogen/client/docs/ValidationErrorLocInner.md)
300
+
301
+
302
+ <a id="documentation-for-authorization"></a>
303
+ ## Documentation For Authorization
304
+
305
+
306
+ Authentication schemes defined for the API:
307
+ <a id="HTTPBearer"></a>
308
+ ### HTTPBearer
309
+
310
+ - **Type**: Bearer authentication
311
+
312
+ <a id="APIKeyCookie"></a>
313
+ ### APIKeyCookie
314
+
315
+ - **Type**: API key
316
+ - **API key parameter name**: accessToken
317
+ - **Location**:
318
+
319
+
320
+ ## Author
File without changes
@@ -0,0 +1,18 @@
1
+ import rich_click as click
2
+
3
+ from truefoundry.ml.cli.commands import download
4
+
5
+ click.rich_click.USE_RICH_MARKUP = True
6
+
7
+
8
+ @click.group()
9
+ def ml():
10
+ """
11
+ TrueFoundry ML CLI
12
+ """
13
+ pass
14
+
15
+
16
+ def get_ml_cli():
17
+ ml.add_command(download)
18
+ return ml
@@ -0,0 +1,3 @@
1
+ from truefoundry.ml.cli.commands.download import download
2
+
3
+ __all__ = ["download"]
@@ -0,0 +1,87 @@
1
+ from typing import Optional
2
+
3
+ import click
4
+
5
+ from truefoundry.ml import get_client
6
+
7
+
8
+ @click.group(help="Download files of artifact/model logged with Mlfoundry")
9
+ def download(): ...
10
+
11
+
12
+ @download.command(short_help="Download files of logged model")
13
+ @click.option(
14
+ "--fqn",
15
+ required=True,
16
+ type=str,
17
+ help="fqn of the model version",
18
+ )
19
+ @click.option(
20
+ "--path",
21
+ type=click.Path(file_okay=False, dir_okay=True, exists=True),
22
+ default="./",
23
+ show_default=True,
24
+ help="path where the model files will be downloaded",
25
+ )
26
+ @click.option(
27
+ "--overwrite",
28
+ is_flag=True,
29
+ default=False,
30
+ help="flag to overwrite any existing files in the `path` directory",
31
+ )
32
+ @click.option(
33
+ "--progress/--no-progress",
34
+ is_flag=True,
35
+ show_default=True,
36
+ default=None,
37
+ help="If to show progress bar when downloading contents",
38
+ )
39
+ def model(fqn: str, path: str, overwrite: bool, progress: Optional[bool] = None):
40
+ """
41
+ Download the files of logged model.\n
42
+ """
43
+ client = get_client()
44
+ model_version = client.get_model_version_by_fqn(fqn=fqn)
45
+ download_path = model_version.download(
46
+ path=path, overwrite=overwrite, progress=progress
47
+ )
48
+ print(f"Downloaded model files to {download_path}")
49
+
50
+
51
+ @download.command(short_help="Download files of logged artifact")
52
+ @click.option(
53
+ "--fqn",
54
+ required=True,
55
+ type=str,
56
+ help="fqn of the artifact version",
57
+ )
58
+ @click.option(
59
+ "--path",
60
+ type=click.Path(file_okay=False, dir_okay=True, exists=True),
61
+ default="./",
62
+ show_default=True,
63
+ help="path where the artifact files will be downloaded",
64
+ )
65
+ @click.option(
66
+ "--overwrite",
67
+ is_flag=True,
68
+ default=False,
69
+ help="flag to overwrite any existing files in the `path` directory",
70
+ )
71
+ @click.option(
72
+ "--progress/--no-progress",
73
+ is_flag=True,
74
+ show_default=True,
75
+ default=None,
76
+ help="If to show progress bar when downloading contents",
77
+ )
78
+ def artifact(fqn: str, path: str, overwrite: bool, progress: Optional[bool] = None):
79
+ """
80
+ Download the files of logged artifact.\n
81
+ """
82
+ client = get_client()
83
+ artifact_version = client.get_artifact_version_by_fqn(fqn=fqn)
84
+ download_path = artifact_version.download(
85
+ path=path, overwrite=overwrite, progress=progress
86
+ )
87
+ print(f"Downloaded artifact files to {download_path}")
File without changes
@@ -0,0 +1,8 @@
1
+ from typing import Optional
2
+
3
+ from truefoundry.pydantic_v1 import BaseModel
4
+
5
+
6
+ class HostCreds(BaseModel):
7
+ host: str
8
+ token: Optional[str] = None
@@ -0,0 +1,45 @@
1
+ from typing import Optional
2
+
3
+ from truefoundry.common.constants import (
4
+ SERVICEFOUNDRY_CLIENT_MAX_RETRIES,
5
+ VERSION_PREFIX,
6
+ )
7
+ from truefoundry.common.servicefoundry_client import (
8
+ ServiceFoundryServiceClient as BaseServiceFoundryServiceClient,
9
+ )
10
+ from truefoundry.ml.clients.entities import (
11
+ HostCreds,
12
+ )
13
+ from truefoundry.ml.clients.utils import http_request_safe
14
+ from truefoundry.ml.exceptions import MlFoundryException
15
+ from truefoundry.ml.run_utils import append_servicefoundry_path_to_tracking_uri
16
+
17
+
18
+ class ServiceFoundryServiceClient(BaseServiceFoundryServiceClient):
19
+ def __init__(self, tracking_uri: str, token: Optional[str] = None):
20
+ super().__init__(base_url=tracking_uri)
21
+ self.host_creds = HostCreds(
22
+ host=append_servicefoundry_path_to_tracking_uri(tracking_uri), token=token
23
+ )
24
+
25
+ def get_integration_from_id(self, integration_id: str):
26
+ integration_id = integration_id or ""
27
+ response = http_request_safe(
28
+ host_creds=self.host_creds,
29
+ endpoint=f"{VERSION_PREFIX}/provider-accounts/provider-integrations",
30
+ params={"id": integration_id, "type": "blob-storage"},
31
+ method="get",
32
+ timeout=3,
33
+ max_retries=SERVICEFOUNDRY_CLIENT_MAX_RETRIES,
34
+ )
35
+ data = response.json()
36
+ if (
37
+ data.get("providerIntegrations")
38
+ and len(data["providerIntegrations"]) > 0
39
+ and data["providerIntegrations"][0]
40
+ ):
41
+ return data["providerIntegrations"][0]
42
+ else:
43
+ raise MlFoundryException(
44
+ f"Invalid storage integration id: {integration_id}"
45
+ )
@@ -0,0 +1,122 @@
1
+ import json
2
+ from contextlib import contextmanager
3
+ from typing import Any, Optional
4
+ from urllib.parse import urljoin
5
+
6
+ import requests
7
+
8
+ from truefoundry.common.request_utils import requests_retry_session
9
+ from truefoundry.ml.clients.entities import HostCreds
10
+ from truefoundry.ml.exceptions import MlFoundryException
11
+
12
+
13
+ # TODO: This will be moved later to truefoundry.common.request_utils
14
+ def _make_url(host: str, endpoint: str) -> str:
15
+ if endpoint.startswith("/"):
16
+ raise ValueError("`endpoint` must not start with a leading slash (/)")
17
+ return urljoin(host, endpoint)
18
+
19
+
20
+ def _http_request(
21
+ *, method: str, url: str, token: Optional[str] = None, session=requests, **kwargs
22
+ ) -> requests.Response:
23
+ headers = kwargs.pop("headers", {}) or {}
24
+ if token is not None:
25
+ headers["Authorization"] = f"Bearer {token}"
26
+ return session.request(method=method, url=url, **kwargs)
27
+
28
+
29
+ def http_request(
30
+ *, method: str, host_creds: HostCreds, endpoint: str, session=requests, **kwargs
31
+ ) -> requests.Response:
32
+ url = _make_url(host=host_creds.host, endpoint=endpoint)
33
+ return _http_request(
34
+ method=method, url=url, token=host_creds.token, session=session, **kwargs
35
+ )
36
+
37
+
38
+ def http_request_safe(
39
+ *, method: str, host_creds: HostCreds, endpoint: str, session=requests, **kwargs
40
+ ) -> Any:
41
+ url = _make_url(host=host_creds.host, endpoint=endpoint)
42
+ try:
43
+ response = _http_request(
44
+ method=method, url=url, token=host_creds.token, session=session, **kwargs
45
+ )
46
+ response.raise_for_status()
47
+ try:
48
+ return response.json()
49
+ except json.JSONDecodeError as je:
50
+ raise MlFoundryException(
51
+ f"Failed to parse response as json. Response: {response.text}"
52
+ ) from je
53
+ except requests.exceptions.ConnectionError as ce:
54
+ raise MlFoundryException("Failed to connect to TrueFoundry") from ce
55
+ except requests.exceptions.Timeout as te:
56
+ raise MlFoundryException(f"Request to {url} timed out") from te
57
+ except requests.exceptions.HTTPError as he:
58
+ raise MlFoundryException(
59
+ f"Request to {url} with status code {he.response.status_code}. Response: {he.response.text}",
60
+ status_code=he.response.status_code,
61
+ ) from he
62
+ except Exception as e:
63
+ raise MlFoundryException(
64
+ f"Request to {url} failed with an unknown error"
65
+ ) from e
66
+
67
+
68
+ @contextmanager
69
+ def cloud_storage_http_request(
70
+ *,
71
+ method,
72
+ url,
73
+ session=None,
74
+ timeout=None,
75
+ **kwargs,
76
+ ):
77
+ """
78
+ Performs an HTTP PUT/GET request using Python's `requests` module with automatic retry.
79
+ """
80
+ session = session or requests_retry_session(retries=5, backoff_factor=0.5)
81
+ kwargs["headers"] = kwargs.get("headers", {}) or {}
82
+ if "blob.core.windows.net" in url:
83
+ kwargs["headers"].update({"x-ms-blob-type": "BlockBlob"})
84
+ if method.lower() not in ("put", "get"):
85
+ raise ValueError(f"Illegal http method: {method}")
86
+ try:
87
+ yield _http_request(
88
+ method=method, url=url, session=session, timeout=timeout, **kwargs
89
+ )
90
+ except Exception as e:
91
+ raise MlFoundryException(
92
+ f"API request failed with exception {str(e)}"
93
+ ) from None
94
+
95
+
96
+ def augmented_raise_for_status(response):
97
+ try:
98
+ response.raise_for_status()
99
+ except requests.exceptions.HTTPError as he:
100
+ raise MlFoundryException(
101
+ f"Request with status code {he.response.status_code}. Response: {he.response.text}",
102
+ status_code=he.response.status_code,
103
+ ) from he
104
+
105
+
106
+ def download_file_using_http_uri(http_uri, download_path, chunk_size=100_000_000):
107
+ """
108
+ Downloads a file specified using the `http_uri` to a local `download_path`. This function
109
+ uses a `chunk_size` to ensure an OOM error is not raised a large file is downloaded.
110
+
111
+ Note : This function is meant to download files using presigned urls from various cloud
112
+ providers.
113
+ """
114
+ with cloud_storage_http_request(
115
+ method="get", url=http_uri, stream=True
116
+ ) as response:
117
+ augmented_raise_for_status(response)
118
+ with open(download_path, "wb") as output_file:
119
+ for chunk in response.iter_content(chunk_size=chunk_size):
120
+ if not chunk:
121
+ break
122
+ output_file.write(chunk)