truefoundry 0.3.3__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 (224) 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/cli/cli.py +1 -1
  5. truefoundry/deploy/lib/auth/credential_provider.py +2 -12
  6. truefoundry/deploy/lib/clients/servicefoundry_client.py +0 -9
  7. truefoundry/deploy/lib/exceptions.py +1 -6
  8. truefoundry/deploy/lib/session.py +1 -16
  9. truefoundry/langchain/truefoundry_chat.py +1 -1
  10. truefoundry/langchain/truefoundry_embeddings.py +1 -1
  11. truefoundry/langchain/truefoundry_llm.py +1 -1
  12. truefoundry/langchain/utils.py +0 -41
  13. truefoundry/ml/__init__.py +46 -6
  14. truefoundry/ml/artifact/__init__.py +0 -0
  15. truefoundry/ml/artifact/truefoundry_artifact_repo.py +1120 -0
  16. truefoundry/ml/autogen/__init__.py +0 -0
  17. truefoundry/ml/autogen/client/__init__.py +373 -0
  18. truefoundry/ml/autogen/client/api/__init__.py +16 -0
  19. truefoundry/ml/autogen/client/api/auth_api.py +184 -0
  20. truefoundry/ml/autogen/client/api/deprecated_api.py +605 -0
  21. truefoundry/ml/autogen/client/api/experiments_api.py +2109 -0
  22. truefoundry/ml/autogen/client/api/health_api.py +299 -0
  23. truefoundry/ml/autogen/client/api/metrics_api.py +371 -0
  24. truefoundry/ml/autogen/client/api/mlfoundry_artifacts_api.py +7213 -0
  25. truefoundry/ml/autogen/client/api/python_deployment_config_api.py +201 -0
  26. truefoundry/ml/autogen/client/api/run_artifacts_api.py +231 -0
  27. truefoundry/ml/autogen/client/api/runs_api.py +2919 -0
  28. truefoundry/ml/autogen/client/api_client.py +822 -0
  29. truefoundry/ml/autogen/client/api_response.py +30 -0
  30. truefoundry/ml/autogen/client/configuration.py +489 -0
  31. truefoundry/ml/autogen/client/exceptions.py +161 -0
  32. truefoundry/ml/autogen/client/models/__init__.py +344 -0
  33. truefoundry/ml/autogen/client/models/add_custom_metrics_to_model_version_request_dto.py +69 -0
  34. truefoundry/ml/autogen/client/models/add_features_to_model_version_request_dto.py +83 -0
  35. truefoundry/ml/autogen/client/models/agent.py +125 -0
  36. truefoundry/ml/autogen/client/models/agent_app.py +118 -0
  37. truefoundry/ml/autogen/client/models/agent_open_api_tool.py +143 -0
  38. truefoundry/ml/autogen/client/models/agent_open_api_tool_with_fqn.py +144 -0
  39. truefoundry/ml/autogen/client/models/agent_with_fqn.py +127 -0
  40. truefoundry/ml/autogen/client/models/artifact_dto.py +115 -0
  41. truefoundry/ml/autogen/client/models/artifact_response_dto.py +75 -0
  42. truefoundry/ml/autogen/client/models/artifact_type.py +39 -0
  43. truefoundry/ml/autogen/client/models/artifact_version_dto.py +141 -0
  44. truefoundry/ml/autogen/client/models/artifact_version_response_dto.py +77 -0
  45. truefoundry/ml/autogen/client/models/artifact_version_status.py +35 -0
  46. truefoundry/ml/autogen/client/models/assistant_message.py +89 -0
  47. truefoundry/ml/autogen/client/models/authorize_user_for_model_request_dto.py +69 -0
  48. truefoundry/ml/autogen/client/models/authorize_user_for_model_version_request_dto.py +69 -0
  49. truefoundry/ml/autogen/client/models/backfill_default_storage_integration_id_request_dto.py +67 -0
  50. truefoundry/ml/autogen/client/models/blob_storage_reference.py +93 -0
  51. truefoundry/ml/autogen/client/models/body_get_search_runs_get.py +72 -0
  52. truefoundry/ml/autogen/client/models/chat_prompt.py +156 -0
  53. truefoundry/ml/autogen/client/models/chat_prompt_messages_inner.py +171 -0
  54. truefoundry/ml/autogen/client/models/columns_dto.py +73 -0
  55. truefoundry/ml/autogen/client/models/content.py +153 -0
  56. truefoundry/ml/autogen/client/models/content1.py +153 -0
  57. truefoundry/ml/autogen/client/models/content2.py +174 -0
  58. truefoundry/ml/autogen/client/models/content2_any_of_inner.py +150 -0
  59. truefoundry/ml/autogen/client/models/create_artifact_request_dto.py +74 -0
  60. truefoundry/ml/autogen/client/models/create_artifact_response_dto.py +66 -0
  61. truefoundry/ml/autogen/client/models/create_artifact_version_request_dto.py +74 -0
  62. truefoundry/ml/autogen/client/models/create_artifact_version_response_dto.py +66 -0
  63. truefoundry/ml/autogen/client/models/create_dataset_request_dto.py +76 -0
  64. truefoundry/ml/autogen/client/models/create_experiment_request_dto.py +94 -0
  65. truefoundry/ml/autogen/client/models/create_experiment_response_dto.py +67 -0
  66. truefoundry/ml/autogen/client/models/create_model_version_request_dto.py +95 -0
  67. truefoundry/ml/autogen/client/models/create_multi_part_upload_for_dataset_request_dto.py +73 -0
  68. truefoundry/ml/autogen/client/models/create_multi_part_upload_for_dataset_response_dto.py +79 -0
  69. truefoundry/ml/autogen/client/models/create_multi_part_upload_request_dto.py +73 -0
  70. truefoundry/ml/autogen/client/models/create_python_deployment_config_request_dto.py +72 -0
  71. truefoundry/ml/autogen/client/models/create_python_deployment_config_response_dto.py +68 -0
  72. truefoundry/ml/autogen/client/models/create_run_request_dto.py +97 -0
  73. truefoundry/ml/autogen/client/models/create_run_response_dto.py +76 -0
  74. truefoundry/ml/autogen/client/models/dataset_dto.py +112 -0
  75. truefoundry/ml/autogen/client/models/dataset_response_dto.py +75 -0
  76. truefoundry/ml/autogen/client/models/delete_artifact_versions_request_dto.py +65 -0
  77. truefoundry/ml/autogen/client/models/delete_dataset_request_dto.py +74 -0
  78. truefoundry/ml/autogen/client/models/delete_model_version_request_dto.py +65 -0
  79. truefoundry/ml/autogen/client/models/delete_run_request.py +65 -0
  80. truefoundry/ml/autogen/client/models/delete_tag_request_dto.py +68 -0
  81. truefoundry/ml/autogen/client/models/experiment_dto.py +127 -0
  82. truefoundry/ml/autogen/client/models/experiment_id_request_dto.py +67 -0
  83. truefoundry/ml/autogen/client/models/experiment_response_dto.py +75 -0
  84. truefoundry/ml/autogen/client/models/experiment_tag_dto.py +69 -0
  85. truefoundry/ml/autogen/client/models/feature_dto.py +68 -0
  86. truefoundry/ml/autogen/client/models/feature_value_type.py +35 -0
  87. truefoundry/ml/autogen/client/models/file_info_dto.py +76 -0
  88. truefoundry/ml/autogen/client/models/finalize_artifact_version_request_dto.py +101 -0
  89. truefoundry/ml/autogen/client/models/get_experiment_response_dto.py +88 -0
  90. truefoundry/ml/autogen/client/models/get_latest_run_log_response_dto.py +76 -0
  91. truefoundry/ml/autogen/client/models/get_metric_history_response.py +79 -0
  92. truefoundry/ml/autogen/client/models/get_signed_url_for_dataset_write_request_dto.py +68 -0
  93. truefoundry/ml/autogen/client/models/get_signed_urls_for_artifact_version_read_request_dto.py +68 -0
  94. truefoundry/ml/autogen/client/models/get_signed_urls_for_artifact_version_read_response_dto.py +81 -0
  95. truefoundry/ml/autogen/client/models/get_signed_urls_for_artifact_version_write_request_dto.py +69 -0
  96. truefoundry/ml/autogen/client/models/get_signed_urls_for_artifact_version_write_response_dto.py +83 -0
  97. truefoundry/ml/autogen/client/models/get_signed_urls_for_dataset_read_request_dto.py +68 -0
  98. truefoundry/ml/autogen/client/models/get_signed_urls_for_dataset_read_response_dto.py +81 -0
  99. truefoundry/ml/autogen/client/models/get_signed_urls_for_dataset_write_response_dto.py +81 -0
  100. truefoundry/ml/autogen/client/models/get_tenant_id_response_dto.py +74 -0
  101. truefoundry/ml/autogen/client/models/http_validation_error.py +82 -0
  102. truefoundry/ml/autogen/client/models/image_content_part.py +87 -0
  103. truefoundry/ml/autogen/client/models/image_url.py +75 -0
  104. truefoundry/ml/autogen/client/models/internal_metadata.py +180 -0
  105. truefoundry/ml/autogen/client/models/latest_run_log_dto.py +78 -0
  106. truefoundry/ml/autogen/client/models/list_artifact_versions_request_dto.py +107 -0
  107. truefoundry/ml/autogen/client/models/list_artifact_versions_response_dto.py +87 -0
  108. truefoundry/ml/autogen/client/models/list_artifacts_request_dto.py +96 -0
  109. truefoundry/ml/autogen/client/models/list_artifacts_response_dto.py +86 -0
  110. truefoundry/ml/autogen/client/models/list_colums_response_dto.py +75 -0
  111. truefoundry/ml/autogen/client/models/list_datasets_request_dto.py +78 -0
  112. truefoundry/ml/autogen/client/models/list_datasets_response_dto.py +86 -0
  113. truefoundry/ml/autogen/client/models/list_experiments_response_dto.py +86 -0
  114. truefoundry/ml/autogen/client/models/list_files_for_artifact_version_request_dto.py +76 -0
  115. truefoundry/ml/autogen/client/models/list_files_for_artifact_versions_response_dto.py +82 -0
  116. truefoundry/ml/autogen/client/models/list_files_for_dataset_request_dto.py +76 -0
  117. truefoundry/ml/autogen/client/models/list_files_for_dataset_response_dto.py +82 -0
  118. truefoundry/ml/autogen/client/models/list_latest_run_logs_response_dto.py +82 -0
  119. truefoundry/ml/autogen/client/models/list_metric_history_request_dto.py +69 -0
  120. truefoundry/ml/autogen/client/models/list_metric_history_response_dto.py +84 -0
  121. truefoundry/ml/autogen/client/models/list_model_version_response_dto.py +87 -0
  122. truefoundry/ml/autogen/client/models/list_model_versions_request_dto.py +93 -0
  123. truefoundry/ml/autogen/client/models/list_models_request_dto.py +89 -0
  124. truefoundry/ml/autogen/client/models/list_models_response_dto.py +84 -0
  125. truefoundry/ml/autogen/client/models/list_run_artifacts_response_dto.py +84 -0
  126. truefoundry/ml/autogen/client/models/list_run_logs_response_dto.py +82 -0
  127. truefoundry/ml/autogen/client/models/list_seed_experiments_response_dto.py +81 -0
  128. truefoundry/ml/autogen/client/models/log_batch_request_dto.py +106 -0
  129. truefoundry/ml/autogen/client/models/log_metric_request_dto.py +80 -0
  130. truefoundry/ml/autogen/client/models/log_param_request_dto.py +76 -0
  131. truefoundry/ml/autogen/client/models/method.py +37 -0
  132. truefoundry/ml/autogen/client/models/metric_collection_dto.py +82 -0
  133. truefoundry/ml/autogen/client/models/metric_dto.py +76 -0
  134. truefoundry/ml/autogen/client/models/mime_type.py +37 -0
  135. truefoundry/ml/autogen/client/models/model_configuration.py +103 -0
  136. truefoundry/ml/autogen/client/models/model_dto.py +122 -0
  137. truefoundry/ml/autogen/client/models/model_response_dto.py +75 -0
  138. truefoundry/ml/autogen/client/models/model_schema_dto.py +85 -0
  139. truefoundry/ml/autogen/client/models/model_version_dto.py +163 -0
  140. truefoundry/ml/autogen/client/models/model_version_response_dto.py +75 -0
  141. truefoundry/ml/autogen/client/models/multi_part_upload_dto.py +107 -0
  142. truefoundry/ml/autogen/client/models/multi_part_upload_response_dto.py +79 -0
  143. truefoundry/ml/autogen/client/models/multi_part_upload_storage_provider.py +34 -0
  144. truefoundry/ml/autogen/client/models/notify_artifact_version_failure_dto.py +65 -0
  145. truefoundry/ml/autogen/client/models/openapi_spec.py +152 -0
  146. truefoundry/ml/autogen/client/models/param_dto.py +66 -0
  147. truefoundry/ml/autogen/client/models/parameters.py +84 -0
  148. truefoundry/ml/autogen/client/models/prediction_type.py +34 -0
  149. truefoundry/ml/autogen/client/models/resolve_agent_app_response_dto.py +75 -0
  150. truefoundry/ml/autogen/client/models/restore_run_request_dto.py +65 -0
  151. truefoundry/ml/autogen/client/models/run_data_dto.py +104 -0
  152. truefoundry/ml/autogen/client/models/run_dto.py +84 -0
  153. truefoundry/ml/autogen/client/models/run_info_dto.py +105 -0
  154. truefoundry/ml/autogen/client/models/run_log_dto.py +90 -0
  155. truefoundry/ml/autogen/client/models/run_log_input_dto.py +80 -0
  156. truefoundry/ml/autogen/client/models/run_response_dto.py +75 -0
  157. truefoundry/ml/autogen/client/models/run_tag_dto.py +66 -0
  158. truefoundry/ml/autogen/client/models/search_runs_request_dto.py +94 -0
  159. truefoundry/ml/autogen/client/models/search_runs_response_dto.py +84 -0
  160. truefoundry/ml/autogen/client/models/set_experiment_tag_request_dto.py +73 -0
  161. truefoundry/ml/autogen/client/models/set_tag_request_dto.py +76 -0
  162. truefoundry/ml/autogen/client/models/signed_url_dto.py +69 -0
  163. truefoundry/ml/autogen/client/models/stop.py +152 -0
  164. truefoundry/ml/autogen/client/models/store_run_logs_request_dto.py +83 -0
  165. truefoundry/ml/autogen/client/models/system_message.py +89 -0
  166. truefoundry/ml/autogen/client/models/text.py +153 -0
  167. truefoundry/ml/autogen/client/models/text_content_part.py +84 -0
  168. truefoundry/ml/autogen/client/models/update_artifact_version_request_dto.py +74 -0
  169. truefoundry/ml/autogen/client/models/update_dataset_request_dto.py +74 -0
  170. truefoundry/ml/autogen/client/models/update_experiment_request_dto.py +74 -0
  171. truefoundry/ml/autogen/client/models/update_model_version_request_dto.py +93 -0
  172. truefoundry/ml/autogen/client/models/update_run_request_dto.py +78 -0
  173. truefoundry/ml/autogen/client/models/update_run_response_dto.py +76 -0
  174. truefoundry/ml/autogen/client/models/url.py +153 -0
  175. truefoundry/ml/autogen/client/models/user_message.py +89 -0
  176. truefoundry/ml/autogen/client/models/validation_error.py +87 -0
  177. truefoundry/ml/autogen/client/models/validation_error_loc_inner.py +154 -0
  178. truefoundry/ml/autogen/client/rest.py +426 -0
  179. truefoundry/ml/autogen/client_README.md +322 -0
  180. truefoundry/ml/cli/__init__.py +0 -0
  181. truefoundry/ml/cli/cli.py +18 -0
  182. truefoundry/ml/cli/commands/__init__.py +3 -0
  183. truefoundry/ml/cli/commands/download.py +87 -0
  184. truefoundry/ml/constants.py +84 -0
  185. truefoundry/ml/enums.py +70 -0
  186. truefoundry/ml/env_vars.py +13 -0
  187. truefoundry/ml/exceptions.py +8 -0
  188. truefoundry/ml/git_info.py +60 -0
  189. truefoundry/ml/internal_namespace.py +52 -0
  190. truefoundry/ml/log_types/__init__.py +4 -0
  191. truefoundry/ml/log_types/artifacts/artifact.py +427 -0
  192. truefoundry/ml/log_types/artifacts/constants.py +33 -0
  193. truefoundry/ml/log_types/artifacts/dataset.py +383 -0
  194. truefoundry/ml/log_types/artifacts/general_artifact.py +110 -0
  195. truefoundry/ml/log_types/artifacts/model.py +628 -0
  196. truefoundry/ml/log_types/artifacts/model_extras.py +48 -0
  197. truefoundry/ml/log_types/artifacts/utils.py +161 -0
  198. truefoundry/ml/log_types/image/__init__.py +3 -0
  199. truefoundry/ml/log_types/image/constants.py +8 -0
  200. truefoundry/ml/log_types/image/image.py +358 -0
  201. truefoundry/ml/log_types/image/image_normalizer.py +101 -0
  202. truefoundry/ml/log_types/image/types.py +68 -0
  203. truefoundry/ml/log_types/plot.py +281 -0
  204. truefoundry/ml/log_types/pydantic_base.py +10 -0
  205. truefoundry/ml/log_types/utils.py +12 -0
  206. truefoundry/ml/logger.py +17 -0
  207. truefoundry/ml/login.py +241 -0
  208. truefoundry/ml/mlfoundry_api.py +1620 -0
  209. truefoundry/ml/mlfoundry_run.py +1238 -0
  210. truefoundry/ml/run_utils.py +102 -0
  211. truefoundry/ml/services/__init__.py +0 -0
  212. truefoundry/ml/services/auth_service.py +109 -0
  213. truefoundry/ml/services/entities.py +108 -0
  214. truefoundry/ml/services/servicefoundry_service.py +35 -0
  215. truefoundry/ml/services/utils.py +122 -0
  216. truefoundry/ml/session.py +271 -0
  217. truefoundry/ml/validation_utils.py +346 -0
  218. truefoundry/pydantic_v1.py +5 -1
  219. {truefoundry-0.3.3.dist-info → truefoundry-0.4.0.dev0.dist-info}/METADATA +19 -12
  220. truefoundry-0.4.0.dev0.dist-info/RECORD +342 -0
  221. truefoundry-0.3.3.dist-info/RECORD +0 -136
  222. /truefoundry/{python_deploy_codegen.py → deploy/python_deploy_codegen.py} +0 -0
  223. {truefoundry-0.3.3.dist-info → truefoundry-0.4.0.dev0.dist-info}/WHEEL +0 -0
  224. {truefoundry-0.3.3.dist-info → truefoundry-0.4.0.dev0.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,201 @@
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
+ import re # noqa: F401
15
+
16
+ from truefoundry.ml.autogen.client.api_client import ApiClient
17
+ from truefoundry.ml.autogen.client.api_response import ApiResponse
18
+ from truefoundry.ml.autogen.client.exceptions import ( # noqa: F401
19
+ ApiTypeError,
20
+ ApiValueError,
21
+ )
22
+ from truefoundry.ml.autogen.client.models.create_python_deployment_config_request_dto import (
23
+ CreatePythonDeploymentConfigRequestDto,
24
+ )
25
+ from truefoundry.ml.autogen.client.models.create_python_deployment_config_response_dto import (
26
+ CreatePythonDeploymentConfigResponseDto,
27
+ )
28
+ from truefoundry.pydantic_v1 import validate_arguments
29
+
30
+
31
+ class PythonDeploymentConfigApi:
32
+ """NOTE: This class is auto generated by OpenAPI Generator
33
+ Ref: https://openapi-generator.tech
34
+
35
+ Do not edit the class manually.
36
+ """
37
+
38
+ def __init__(self, api_client=None) -> None:
39
+ if api_client is None:
40
+ api_client = ApiClient.get_default()
41
+ self.api_client = api_client
42
+
43
+ @validate_arguments
44
+ def generate_py_development_config_post(
45
+ self,
46
+ create_python_deployment_config_request_dto: CreatePythonDeploymentConfigRequestDto,
47
+ **kwargs,
48
+ ) -> CreatePythonDeploymentConfigResponseDto: # noqa: E501
49
+ """Generate Py Development Config # noqa: E501
50
+
51
+ Generate Python Deployment Config # noqa: E501
52
+ This method makes a synchronous HTTP request by default. To make an
53
+ asynchronous HTTP request, please pass async_req=True
54
+
55
+ >>> thread = api.generate_py_development_config_post(create_python_deployment_config_request_dto, async_req=True)
56
+ >>> result = thread.get()
57
+
58
+ :param create_python_deployment_config_request_dto: (required)
59
+ :type create_python_deployment_config_request_dto: CreatePythonDeploymentConfigRequestDto
60
+ :param async_req: Whether to execute the request asynchronously.
61
+ :type async_req: bool, optional
62
+ :param _request_timeout: timeout setting for this request.
63
+ If one number provided, it will be total request
64
+ timeout. It can also be a pair (tuple) of
65
+ (connection, read) timeouts.
66
+ :return: Returns the result object.
67
+ If the method is called asynchronously,
68
+ returns the request thread.
69
+ :rtype: CreatePythonDeploymentConfigResponseDto
70
+ """
71
+ kwargs["_return_http_data_only"] = True
72
+ if "_preload_content" in kwargs:
73
+ message = "Error! Please call the generate_py_development_config_post_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
74
+ raise ValueError(message)
75
+ return self.generate_py_development_config_post_with_http_info(
76
+ create_python_deployment_config_request_dto, **kwargs
77
+ ) # noqa: E501
78
+
79
+ @validate_arguments
80
+ def generate_py_development_config_post_with_http_info(
81
+ self,
82
+ create_python_deployment_config_request_dto: CreatePythonDeploymentConfigRequestDto,
83
+ **kwargs,
84
+ ) -> ApiResponse: # noqa: E501
85
+ """Generate Py Development Config # noqa: E501
86
+
87
+ Generate Python Deployment Config # noqa: E501
88
+ This method makes a synchronous HTTP request by default. To make an
89
+ asynchronous HTTP request, please pass async_req=True
90
+
91
+ >>> thread = api.generate_py_development_config_post_with_http_info(create_python_deployment_config_request_dto, async_req=True)
92
+ >>> result = thread.get()
93
+
94
+ :param create_python_deployment_config_request_dto: (required)
95
+ :type create_python_deployment_config_request_dto: CreatePythonDeploymentConfigRequestDto
96
+ :param async_req: Whether to execute the request asynchronously.
97
+ :type async_req: bool, optional
98
+ :param _preload_content: if False, the ApiResponse.data will
99
+ be set to none and raw_data will store the
100
+ HTTP response body without reading/decoding.
101
+ Default is True.
102
+ :type _preload_content: bool, optional
103
+ :param _return_http_data_only: response data instead of ApiResponse
104
+ object with status code, headers, etc
105
+ :type _return_http_data_only: bool, optional
106
+ :param _request_timeout: timeout setting for this request. If one
107
+ number provided, it will be total request
108
+ timeout. It can also be a pair (tuple) of
109
+ (connection, read) timeouts.
110
+ :param _request_auth: set to override the auth_settings for an a single
111
+ request; this effectively ignores the authentication
112
+ in the spec for a single request.
113
+ :type _request_auth: dict, optional
114
+ :type _content_type: string, optional: force content-type for the request
115
+ :return: Returns the result object.
116
+ If the method is called asynchronously,
117
+ returns the request thread.
118
+ :rtype: tuple(CreatePythonDeploymentConfigResponseDto, status_code(int), headers(HTTPHeaderDict))
119
+ """
120
+
121
+ _params = locals()
122
+
123
+ _all_params = ["create_python_deployment_config_request_dto"]
124
+ _all_params.extend(
125
+ [
126
+ "async_req",
127
+ "_return_http_data_only",
128
+ "_preload_content",
129
+ "_request_timeout",
130
+ "_request_auth",
131
+ "_content_type",
132
+ "_headers",
133
+ ]
134
+ )
135
+
136
+ # validate the arguments
137
+ for _key, _val in _params["kwargs"].items():
138
+ if _key not in _all_params:
139
+ raise ApiTypeError(
140
+ "Got an unexpected keyword argument '%s'"
141
+ " to method generate_py_development_config_post" % _key
142
+ )
143
+ _params[_key] = _val
144
+ del _params["kwargs"]
145
+
146
+ _collection_formats = {}
147
+
148
+ # process the path parameters
149
+ _path_params = {}
150
+
151
+ # process the query parameters
152
+ _query_params = []
153
+ # process the header parameters
154
+ _header_params = dict(_params.get("_headers", {}))
155
+ # process the form parameters
156
+ _form_params = []
157
+ _files = {}
158
+ # process the body parameter
159
+ _body_params = None
160
+ if _params["create_python_deployment_config_request_dto"] is not None:
161
+ _body_params = _params["create_python_deployment_config_request_dto"]
162
+
163
+ # set the HTTP header `Accept`
164
+ _header_params["Accept"] = self.api_client.select_header_accept(
165
+ ["application/json"]
166
+ ) # noqa: E501
167
+
168
+ # set the HTTP header `Content-Type`
169
+ _content_types_list = _params.get(
170
+ "_content_type",
171
+ self.api_client.select_header_content_type(["application/json"]),
172
+ )
173
+ if _content_types_list:
174
+ _header_params["Content-Type"] = _content_types_list
175
+
176
+ # authentication setting
177
+ _auth_settings = [] # noqa: E501
178
+
179
+ _response_types_map = {
180
+ "200": "CreatePythonDeploymentConfigResponseDto",
181
+ "422": "HTTPValidationError",
182
+ }
183
+
184
+ return self.api_client.call_api(
185
+ "/api/2.0/mlflow/python-deployment-config/generate",
186
+ "POST",
187
+ _path_params,
188
+ _query_params,
189
+ _header_params,
190
+ body=_body_params,
191
+ post_params=_form_params,
192
+ files=_files,
193
+ response_types_map=_response_types_map,
194
+ auth_settings=_auth_settings,
195
+ async_req=_params.get("async_req"),
196
+ _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501
197
+ _preload_content=_params.get("_preload_content", True),
198
+ _request_timeout=_params.get("_request_timeout"),
199
+ collection_formats=_collection_formats,
200
+ _request_auth=_params.get("_request_auth"),
201
+ )
@@ -0,0 +1,231 @@
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
+ import re # noqa: F401
15
+ from typing import Optional
16
+
17
+ from truefoundry.ml.autogen.client.api_client import ApiClient
18
+ from truefoundry.ml.autogen.client.api_response import ApiResponse
19
+ from truefoundry.ml.autogen.client.exceptions import ( # noqa: F401
20
+ ApiTypeError,
21
+ ApiValueError,
22
+ )
23
+ from truefoundry.ml.autogen.client.models.list_run_artifacts_response_dto import (
24
+ ListRunArtifactsResponseDto,
25
+ )
26
+ from truefoundry.pydantic_v1 import (
27
+ StrictInt,
28
+ StrictStr,
29
+ validate_arguments,
30
+ )
31
+
32
+
33
+ class RunArtifactsApi:
34
+ """NOTE: This class is auto generated by OpenAPI Generator
35
+ Ref: https://openapi-generator.tech
36
+
37
+ Do not edit the class manually.
38
+ """
39
+
40
+ def __init__(self, api_client=None) -> None:
41
+ if api_client is None:
42
+ api_client = ApiClient.get_default()
43
+ self.api_client = api_client
44
+
45
+ @validate_arguments
46
+ def list_run_artifacts_get(
47
+ self,
48
+ run_id: Optional[StrictStr] = None,
49
+ run_uuid: Optional[StrictStr] = None,
50
+ path: Optional[StrictStr] = None,
51
+ page_token: Optional[StrictStr] = None,
52
+ max_results: Optional[StrictInt] = None,
53
+ **kwargs,
54
+ ) -> ListRunArtifactsResponseDto: # noqa: E501
55
+ """List Run Artifacts # noqa: E501
56
+
57
+ List legacy run level artifacts (files and directories) # noqa: E501
58
+ This method makes a synchronous HTTP request by default. To make an
59
+ asynchronous HTTP request, please pass async_req=True
60
+
61
+ >>> thread = api.list_run_artifacts_get(run_id, run_uuid, path, page_token, max_results, async_req=True)
62
+ >>> result = thread.get()
63
+
64
+ :param run_id:
65
+ :type run_id: str
66
+ :param run_uuid:
67
+ :type run_uuid: str
68
+ :param path:
69
+ :type path: str
70
+ :param page_token:
71
+ :type page_token: str
72
+ :param max_results:
73
+ :type max_results: int
74
+ :param async_req: Whether to execute the request asynchronously.
75
+ :type async_req: bool, optional
76
+ :param _request_timeout: timeout setting for this request.
77
+ If one number provided, it will be total request
78
+ timeout. It can also be a pair (tuple) of
79
+ (connection, read) timeouts.
80
+ :return: Returns the result object.
81
+ If the method is called asynchronously,
82
+ returns the request thread.
83
+ :rtype: ListRunArtifactsResponseDto
84
+ """
85
+ kwargs["_return_http_data_only"] = True
86
+ if "_preload_content" in kwargs:
87
+ message = "Error! Please call the list_run_artifacts_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
88
+ raise ValueError(message)
89
+ return self.list_run_artifacts_get_with_http_info(
90
+ run_id, run_uuid, path, page_token, max_results, **kwargs
91
+ ) # noqa: E501
92
+
93
+ @validate_arguments
94
+ def list_run_artifacts_get_with_http_info(
95
+ self,
96
+ run_id: Optional[StrictStr] = None,
97
+ run_uuid: Optional[StrictStr] = None,
98
+ path: Optional[StrictStr] = None,
99
+ page_token: Optional[StrictStr] = None,
100
+ max_results: Optional[StrictInt] = None,
101
+ **kwargs,
102
+ ) -> ApiResponse: # noqa: E501
103
+ """List Run Artifacts # noqa: E501
104
+
105
+ List legacy run level artifacts (files and directories) # noqa: E501
106
+ This method makes a synchronous HTTP request by default. To make an
107
+ asynchronous HTTP request, please pass async_req=True
108
+
109
+ >>> thread = api.list_run_artifacts_get_with_http_info(run_id, run_uuid, path, page_token, max_results, async_req=True)
110
+ >>> result = thread.get()
111
+
112
+ :param run_id:
113
+ :type run_id: str
114
+ :param run_uuid:
115
+ :type run_uuid: str
116
+ :param path:
117
+ :type path: str
118
+ :param page_token:
119
+ :type page_token: str
120
+ :param max_results:
121
+ :type max_results: int
122
+ :param async_req: Whether to execute the request asynchronously.
123
+ :type async_req: bool, optional
124
+ :param _preload_content: if False, the ApiResponse.data will
125
+ be set to none and raw_data will store the
126
+ HTTP response body without reading/decoding.
127
+ Default is True.
128
+ :type _preload_content: bool, optional
129
+ :param _return_http_data_only: response data instead of ApiResponse
130
+ object with status code, headers, etc
131
+ :type _return_http_data_only: bool, optional
132
+ :param _request_timeout: timeout setting for this request. If one
133
+ number provided, it will be total request
134
+ timeout. It can also be a pair (tuple) of
135
+ (connection, read) timeouts.
136
+ :param _request_auth: set to override the auth_settings for an a single
137
+ request; this effectively ignores the authentication
138
+ in the spec for a single request.
139
+ :type _request_auth: dict, optional
140
+ :type _content_type: string, optional: force content-type for the request
141
+ :return: Returns the result object.
142
+ If the method is called asynchronously,
143
+ returns the request thread.
144
+ :rtype: tuple(ListRunArtifactsResponseDto, status_code(int), headers(HTTPHeaderDict))
145
+ """
146
+
147
+ _params = locals()
148
+
149
+ _all_params = ["run_id", "run_uuid", "path", "page_token", "max_results"]
150
+ _all_params.extend(
151
+ [
152
+ "async_req",
153
+ "_return_http_data_only",
154
+ "_preload_content",
155
+ "_request_timeout",
156
+ "_request_auth",
157
+ "_content_type",
158
+ "_headers",
159
+ ]
160
+ )
161
+
162
+ # validate the arguments
163
+ for _key, _val in _params["kwargs"].items():
164
+ if _key not in _all_params:
165
+ raise ApiTypeError(
166
+ "Got an unexpected keyword argument '%s'"
167
+ " to method list_run_artifacts_get" % _key
168
+ )
169
+ _params[_key] = _val
170
+ del _params["kwargs"]
171
+
172
+ _collection_formats = {}
173
+
174
+ # process the path parameters
175
+ _path_params = {}
176
+
177
+ # process the query parameters
178
+ _query_params = []
179
+ if _params.get("run_id") is not None: # noqa: E501
180
+ _query_params.append(("run_id", _params["run_id"]))
181
+
182
+ if _params.get("run_uuid") is not None: # noqa: E501
183
+ _query_params.append(("run_uuid", _params["run_uuid"]))
184
+
185
+ if _params.get("path") is not None: # noqa: E501
186
+ _query_params.append(("path", _params["path"]))
187
+
188
+ if _params.get("page_token") is not None: # noqa: E501
189
+ _query_params.append(("page_token", _params["page_token"]))
190
+
191
+ if _params.get("max_results") is not None: # noqa: E501
192
+ _query_params.append(("max_results", _params["max_results"]))
193
+
194
+ # process the header parameters
195
+ _header_params = dict(_params.get("_headers", {}))
196
+ # process the form parameters
197
+ _form_params = []
198
+ _files = {}
199
+ # process the body parameter
200
+ _body_params = None
201
+ # set the HTTP header `Accept`
202
+ _header_params["Accept"] = self.api_client.select_header_accept(
203
+ ["application/json"]
204
+ ) # noqa: E501
205
+
206
+ # authentication setting
207
+ _auth_settings = ["HTTPBearer", "APIKeyCookie"] # noqa: E501
208
+
209
+ _response_types_map = {
210
+ "200": "ListRunArtifactsResponseDto",
211
+ "422": "HTTPValidationError",
212
+ }
213
+
214
+ return self.api_client.call_api(
215
+ "/api/2.0/mlflow/artifacts/list",
216
+ "GET",
217
+ _path_params,
218
+ _query_params,
219
+ _header_params,
220
+ body=_body_params,
221
+ post_params=_form_params,
222
+ files=_files,
223
+ response_types_map=_response_types_map,
224
+ auth_settings=_auth_settings,
225
+ async_req=_params.get("async_req"),
226
+ _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501
227
+ _preload_content=_params.get("_preload_content", True),
228
+ _request_timeout=_params.get("_request_timeout"),
229
+ collection_formats=_collection_formats,
230
+ _request_auth=_params.get("_request_auth"),
231
+ )