truefoundry 0.4.9rc1__py3-none-any.whl → 0.5.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.
- truefoundry/deploy/__init__.py +5 -0
- truefoundry/deploy/builder/builders/tfy_python_buildpack/dockerfile_template.py +2 -2
- truefoundry/deploy/lib/dao/application.py +2 -1
- truefoundry/deploy/v2/lib/patched_models.py +8 -0
- truefoundry/ml/__init__.py +41 -1
- truefoundry/ml/autogen/client/__init__.py +44 -14
- truefoundry/ml/autogen/client/api/__init__.py +3 -3
- truefoundry/ml/autogen/client/api/deprecated_api.py +333 -0
- truefoundry/ml/autogen/client/api/generate_code_snippet_api.py +526 -0
- truefoundry/ml/autogen/client/api/mlfoundry_artifacts_api.py +0 -322
- truefoundry/ml/autogen/client/api_client.py +8 -1
- truefoundry/ml/autogen/client/models/__init__.py +41 -11
- truefoundry/ml/autogen/client/models/add_features_to_model_version_request_dto.py +3 -17
- truefoundry/ml/autogen/client/models/agent.py +1 -1
- truefoundry/ml/autogen/client/models/agent_app.py +1 -1
- truefoundry/ml/autogen/client/models/agent_open_api_tool.py +1 -1
- truefoundry/ml/autogen/client/models/agent_open_api_tool_with_fqn.py +1 -1
- truefoundry/ml/autogen/client/models/agent_with_fqn.py +1 -1
- truefoundry/ml/autogen/client/models/artifact_version_dto.py +3 -5
- truefoundry/ml/autogen/client/models/artifact_version_manifest.py +111 -0
- truefoundry/ml/autogen/client/models/assistant_message.py +1 -1
- truefoundry/ml/autogen/client/models/blob_storage_reference.py +1 -1
- truefoundry/ml/autogen/client/models/chat_prompt.py +1 -1
- truefoundry/ml/autogen/client/models/command.py +152 -0
- truefoundry/ml/autogen/client/models/{feature_dto.py → create_workflow_task_config_request_dto.py} +18 -14
- truefoundry/ml/autogen/client/models/{external_model_source.py → external_artifact_source.py} +12 -11
- truefoundry/ml/autogen/client/models/fast_ai_framework.py +75 -0
- truefoundry/ml/autogen/client/models/finalize_artifact_version_request_dto.py +3 -5
- truefoundry/ml/autogen/client/models/framework.py +250 -14
- truefoundry/ml/autogen/client/models/gluon_framework.py +74 -0
- truefoundry/ml/autogen/client/models/{upload_model_source.py → h2_o_framework.py} +11 -11
- truefoundry/ml/autogen/client/models/image_content_part.py +1 -1
- truefoundry/ml/autogen/client/models/keras_framework.py +74 -0
- truefoundry/ml/autogen/client/models/light_gbm_framework.py +75 -0
- truefoundry/ml/autogen/client/models/manifest.py +154 -0
- truefoundry/ml/autogen/client/models/model_version_dto.py +7 -8
- truefoundry/ml/autogen/client/models/model_version_environment.py +97 -0
- truefoundry/ml/autogen/client/models/model_version_manifest.py +30 -6
- truefoundry/ml/autogen/client/models/onnx_framework.py +74 -0
- truefoundry/ml/autogen/client/models/paddle_framework.py +75 -0
- truefoundry/ml/autogen/client/models/py_torch_framework.py +75 -0
- truefoundry/ml/autogen/client/models/{feature_value_type.py → serialization_format.py} +8 -8
- truefoundry/ml/autogen/client/models/sklearn_framework.py +92 -0
- truefoundry/ml/autogen/client/models/source.py +23 -46
- truefoundry/ml/autogen/client/models/source1.py +154 -0
- truefoundry/ml/autogen/client/models/spa_cy_framework.py +74 -0
- truefoundry/ml/autogen/client/models/stats_models_framework.py +75 -0
- truefoundry/ml/autogen/client/models/system_message.py +1 -1
- truefoundry/ml/autogen/client/models/{tensorflow_framework.py → tensor_flow_framework.py} +11 -10
- truefoundry/ml/autogen/client/models/text_content_part.py +1 -1
- truefoundry/ml/autogen/client/models/transformers_framework.py +10 -4
- truefoundry/ml/autogen/client/models/trigger_job_run_config_request_dto.py +90 -0
- truefoundry/ml/autogen/client/models/trigger_job_run_config_response_dto.py +71 -0
- truefoundry/ml/autogen/client/models/{truefoundry_model_source.py → true_foundry_artifact_source.py} +13 -11
- truefoundry/ml/autogen/client/models/update_artifact_version_request_dto.py +11 -1
- truefoundry/ml/autogen/client/models/update_model_version_request_dto.py +1 -13
- truefoundry/ml/autogen/client/models/user_message.py +1 -1
- truefoundry/ml/autogen/client/models/xg_boost_framework.py +92 -0
- truefoundry/ml/autogen/client_README.md +30 -12
- truefoundry/ml/autogen/entities/artifacts.py +87 -9
- truefoundry/ml/autogen/models/__init__.py +4 -0
- truefoundry/ml/autogen/models/exceptions.py +30 -0
- truefoundry/ml/autogen/models/schema.py +1547 -0
- truefoundry/ml/autogen/models/signature.py +139 -0
- truefoundry/ml/autogen/models/utils.py +699 -0
- truefoundry/ml/log_types/artifacts/artifact.py +131 -63
- truefoundry/ml/log_types/artifacts/general_artifact.py +7 -26
- truefoundry/ml/log_types/artifacts/model.py +195 -197
- truefoundry/ml/mlfoundry_api.py +47 -52
- truefoundry/ml/mlfoundry_run.py +35 -43
- truefoundry/ml/model_framework.py +169 -0
- {truefoundry-0.4.9rc1.dist-info → truefoundry-0.5.0.dist-info}/METADATA +1 -1
- {truefoundry-0.4.9rc1.dist-info → truefoundry-0.5.0.dist-info}/RECORD +75 -53
- truefoundry/ml/autogen/client/api/python_deployment_config_api.py +0 -201
- truefoundry/ml/autogen/client/models/model_schema_dto.py +0 -85
- truefoundry/ml/autogen/client/models/prediction_type.py +0 -34
- {truefoundry-0.4.9rc1.dist-info → truefoundry-0.5.0.dist-info}/WHEEL +0 -0
- {truefoundry-0.4.9rc1.dist-info → truefoundry-0.5.0.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,526 @@
|
|
|
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.ml.autogen.client.models.create_workflow_task_config_request_dto import (
|
|
29
|
+
CreateWorkflowTaskConfigRequestDto,
|
|
30
|
+
)
|
|
31
|
+
from truefoundry.ml.autogen.client.models.trigger_job_run_config_request_dto import (
|
|
32
|
+
TriggerJobRunConfigRequestDto,
|
|
33
|
+
)
|
|
34
|
+
from truefoundry.ml.autogen.client.models.trigger_job_run_config_response_dto import (
|
|
35
|
+
TriggerJobRunConfigResponseDto,
|
|
36
|
+
)
|
|
37
|
+
from truefoundry.pydantic_v1 import validate_arguments
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
class GenerateCodeSnippetApi:
|
|
41
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
42
|
+
Ref: https://openapi-generator.tech
|
|
43
|
+
|
|
44
|
+
Do not edit the class manually.
|
|
45
|
+
"""
|
|
46
|
+
|
|
47
|
+
def __init__(self, api_client=None) -> None:
|
|
48
|
+
if api_client is None:
|
|
49
|
+
api_client = ApiClient.get_default()
|
|
50
|
+
self.api_client = api_client
|
|
51
|
+
|
|
52
|
+
@validate_arguments
|
|
53
|
+
def generate_py_development_config_post(
|
|
54
|
+
self,
|
|
55
|
+
create_python_deployment_config_request_dto: CreatePythonDeploymentConfigRequestDto,
|
|
56
|
+
**kwargs,
|
|
57
|
+
) -> CreatePythonDeploymentConfigResponseDto: # noqa: E501
|
|
58
|
+
"""Generate Py Development Config # noqa: E501
|
|
59
|
+
|
|
60
|
+
Generate Python Deployment Config # noqa: E501
|
|
61
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
62
|
+
asynchronous HTTP request, please pass async_req=True
|
|
63
|
+
|
|
64
|
+
>>> thread = api.generate_py_development_config_post(create_python_deployment_config_request_dto, async_req=True)
|
|
65
|
+
>>> result = thread.get()
|
|
66
|
+
|
|
67
|
+
:param create_python_deployment_config_request_dto: (required)
|
|
68
|
+
:type create_python_deployment_config_request_dto: CreatePythonDeploymentConfigRequestDto
|
|
69
|
+
:param async_req: Whether to execute the request asynchronously.
|
|
70
|
+
:type async_req: bool, optional
|
|
71
|
+
:param _request_timeout: timeout setting for this request.
|
|
72
|
+
If one number provided, it will be total request
|
|
73
|
+
timeout. It can also be a pair (tuple) of
|
|
74
|
+
(connection, read) timeouts.
|
|
75
|
+
:return: Returns the result object.
|
|
76
|
+
If the method is called asynchronously,
|
|
77
|
+
returns the request thread.
|
|
78
|
+
:rtype: CreatePythonDeploymentConfigResponseDto
|
|
79
|
+
"""
|
|
80
|
+
kwargs["_return_http_data_only"] = True
|
|
81
|
+
if "_preload_content" in kwargs:
|
|
82
|
+
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
|
|
83
|
+
raise ValueError(message)
|
|
84
|
+
return self.generate_py_development_config_post_with_http_info(
|
|
85
|
+
create_python_deployment_config_request_dto, **kwargs
|
|
86
|
+
) # noqa: E501
|
|
87
|
+
|
|
88
|
+
@validate_arguments
|
|
89
|
+
def generate_py_development_config_post_with_http_info(
|
|
90
|
+
self,
|
|
91
|
+
create_python_deployment_config_request_dto: CreatePythonDeploymentConfigRequestDto,
|
|
92
|
+
**kwargs,
|
|
93
|
+
) -> ApiResponse: # noqa: E501
|
|
94
|
+
"""Generate Py Development Config # noqa: E501
|
|
95
|
+
|
|
96
|
+
Generate Python Deployment Config # noqa: E501
|
|
97
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
98
|
+
asynchronous HTTP request, please pass async_req=True
|
|
99
|
+
|
|
100
|
+
>>> thread = api.generate_py_development_config_post_with_http_info(create_python_deployment_config_request_dto, async_req=True)
|
|
101
|
+
>>> result = thread.get()
|
|
102
|
+
|
|
103
|
+
:param create_python_deployment_config_request_dto: (required)
|
|
104
|
+
:type create_python_deployment_config_request_dto: CreatePythonDeploymentConfigRequestDto
|
|
105
|
+
:param async_req: Whether to execute the request asynchronously.
|
|
106
|
+
:type async_req: bool, optional
|
|
107
|
+
:param _preload_content: if False, the ApiResponse.data will
|
|
108
|
+
be set to none and raw_data will store the
|
|
109
|
+
HTTP response body without reading/decoding.
|
|
110
|
+
Default is True.
|
|
111
|
+
:type _preload_content: bool, optional
|
|
112
|
+
:param _return_http_data_only: response data instead of ApiResponse
|
|
113
|
+
object with status code, headers, etc
|
|
114
|
+
:type _return_http_data_only: bool, optional
|
|
115
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
116
|
+
number provided, it will be total request
|
|
117
|
+
timeout. It can also be a pair (tuple) of
|
|
118
|
+
(connection, read) timeouts.
|
|
119
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
120
|
+
request; this effectively ignores the authentication
|
|
121
|
+
in the spec for a single request.
|
|
122
|
+
:type _request_auth: dict, optional
|
|
123
|
+
:type _content_type: string, optional: force content-type for the request
|
|
124
|
+
:return: Returns the result object.
|
|
125
|
+
If the method is called asynchronously,
|
|
126
|
+
returns the request thread.
|
|
127
|
+
:rtype: tuple(CreatePythonDeploymentConfigResponseDto, status_code(int), headers(HTTPHeaderDict))
|
|
128
|
+
"""
|
|
129
|
+
|
|
130
|
+
_params = locals()
|
|
131
|
+
|
|
132
|
+
_all_params = ["create_python_deployment_config_request_dto"]
|
|
133
|
+
_all_params.extend(
|
|
134
|
+
[
|
|
135
|
+
"async_req",
|
|
136
|
+
"_return_http_data_only",
|
|
137
|
+
"_preload_content",
|
|
138
|
+
"_request_timeout",
|
|
139
|
+
"_request_auth",
|
|
140
|
+
"_content_type",
|
|
141
|
+
"_headers",
|
|
142
|
+
]
|
|
143
|
+
)
|
|
144
|
+
|
|
145
|
+
# validate the arguments
|
|
146
|
+
for _key, _val in _params["kwargs"].items():
|
|
147
|
+
if _key not in _all_params:
|
|
148
|
+
raise ApiTypeError(
|
|
149
|
+
"Got an unexpected keyword argument '%s'"
|
|
150
|
+
" to method generate_py_development_config_post" % _key
|
|
151
|
+
)
|
|
152
|
+
_params[_key] = _val
|
|
153
|
+
del _params["kwargs"]
|
|
154
|
+
|
|
155
|
+
_collection_formats = {}
|
|
156
|
+
|
|
157
|
+
# process the path parameters
|
|
158
|
+
_path_params = {}
|
|
159
|
+
|
|
160
|
+
# process the query parameters
|
|
161
|
+
_query_params = []
|
|
162
|
+
# process the header parameters
|
|
163
|
+
_header_params = dict(_params.get("_headers", {}))
|
|
164
|
+
# process the form parameters
|
|
165
|
+
_form_params = []
|
|
166
|
+
_files = {}
|
|
167
|
+
# process the body parameter
|
|
168
|
+
_body_params = None
|
|
169
|
+
if _params["create_python_deployment_config_request_dto"] is not None:
|
|
170
|
+
_body_params = _params["create_python_deployment_config_request_dto"]
|
|
171
|
+
|
|
172
|
+
# set the HTTP header `Accept`
|
|
173
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
174
|
+
["application/json"]
|
|
175
|
+
) # noqa: E501
|
|
176
|
+
|
|
177
|
+
# set the HTTP header `Content-Type`
|
|
178
|
+
_content_types_list = _params.get(
|
|
179
|
+
"_content_type",
|
|
180
|
+
self.api_client.select_header_content_type(["application/json"]),
|
|
181
|
+
)
|
|
182
|
+
if _content_types_list:
|
|
183
|
+
_header_params["Content-Type"] = _content_types_list
|
|
184
|
+
|
|
185
|
+
# authentication setting
|
|
186
|
+
_auth_settings = [] # noqa: E501
|
|
187
|
+
|
|
188
|
+
_response_types_map = {
|
|
189
|
+
"200": "CreatePythonDeploymentConfigResponseDto",
|
|
190
|
+
"422": "HTTPValidationError",
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
return self.api_client.call_api(
|
|
194
|
+
"/api/2.0/mlflow/generate-code-snippet/application",
|
|
195
|
+
"POST",
|
|
196
|
+
_path_params,
|
|
197
|
+
_query_params,
|
|
198
|
+
_header_params,
|
|
199
|
+
body=_body_params,
|
|
200
|
+
post_params=_form_params,
|
|
201
|
+
files=_files,
|
|
202
|
+
response_types_map=_response_types_map,
|
|
203
|
+
auth_settings=_auth_settings,
|
|
204
|
+
async_req=_params.get("async_req"),
|
|
205
|
+
_return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501
|
|
206
|
+
_preload_content=_params.get("_preload_content", True),
|
|
207
|
+
_request_timeout=_params.get("_request_timeout"),
|
|
208
|
+
collection_formats=_collection_formats,
|
|
209
|
+
_request_auth=_params.get("_request_auth"),
|
|
210
|
+
)
|
|
211
|
+
|
|
212
|
+
@validate_arguments
|
|
213
|
+
def trigger_job_run_post(
|
|
214
|
+
self,
|
|
215
|
+
trigger_job_run_config_request_dto: TriggerJobRunConfigRequestDto,
|
|
216
|
+
**kwargs,
|
|
217
|
+
) -> TriggerJobRunConfigResponseDto: # noqa: E501
|
|
218
|
+
"""Trigger Job Run # noqa: E501
|
|
219
|
+
|
|
220
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
221
|
+
asynchronous HTTP request, please pass async_req=True
|
|
222
|
+
|
|
223
|
+
>>> thread = api.trigger_job_run_post(trigger_job_run_config_request_dto, async_req=True)
|
|
224
|
+
>>> result = thread.get()
|
|
225
|
+
|
|
226
|
+
:param trigger_job_run_config_request_dto: (required)
|
|
227
|
+
:type trigger_job_run_config_request_dto: TriggerJobRunConfigRequestDto
|
|
228
|
+
:param async_req: Whether to execute the request asynchronously.
|
|
229
|
+
:type async_req: bool, optional
|
|
230
|
+
:param _request_timeout: timeout setting for this request.
|
|
231
|
+
If one number provided, it will be total request
|
|
232
|
+
timeout. It can also be a pair (tuple) of
|
|
233
|
+
(connection, read) timeouts.
|
|
234
|
+
:return: Returns the result object.
|
|
235
|
+
If the method is called asynchronously,
|
|
236
|
+
returns the request thread.
|
|
237
|
+
:rtype: TriggerJobRunConfigResponseDto
|
|
238
|
+
"""
|
|
239
|
+
kwargs["_return_http_data_only"] = True
|
|
240
|
+
if "_preload_content" in kwargs:
|
|
241
|
+
message = "Error! Please call the trigger_job_run_post_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
|
242
|
+
raise ValueError(message)
|
|
243
|
+
return self.trigger_job_run_post_with_http_info(
|
|
244
|
+
trigger_job_run_config_request_dto, **kwargs
|
|
245
|
+
) # noqa: E501
|
|
246
|
+
|
|
247
|
+
@validate_arguments
|
|
248
|
+
def trigger_job_run_post_with_http_info(
|
|
249
|
+
self,
|
|
250
|
+
trigger_job_run_config_request_dto: TriggerJobRunConfigRequestDto,
|
|
251
|
+
**kwargs,
|
|
252
|
+
) -> ApiResponse: # noqa: E501
|
|
253
|
+
"""Trigger Job Run # noqa: E501
|
|
254
|
+
|
|
255
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
256
|
+
asynchronous HTTP request, please pass async_req=True
|
|
257
|
+
|
|
258
|
+
>>> thread = api.trigger_job_run_post_with_http_info(trigger_job_run_config_request_dto, async_req=True)
|
|
259
|
+
>>> result = thread.get()
|
|
260
|
+
|
|
261
|
+
:param trigger_job_run_config_request_dto: (required)
|
|
262
|
+
:type trigger_job_run_config_request_dto: TriggerJobRunConfigRequestDto
|
|
263
|
+
:param async_req: Whether to execute the request asynchronously.
|
|
264
|
+
:type async_req: bool, optional
|
|
265
|
+
:param _preload_content: if False, the ApiResponse.data will
|
|
266
|
+
be set to none and raw_data will store the
|
|
267
|
+
HTTP response body without reading/decoding.
|
|
268
|
+
Default is True.
|
|
269
|
+
:type _preload_content: bool, optional
|
|
270
|
+
:param _return_http_data_only: response data instead of ApiResponse
|
|
271
|
+
object with status code, headers, etc
|
|
272
|
+
:type _return_http_data_only: bool, optional
|
|
273
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
274
|
+
number provided, it will be total request
|
|
275
|
+
timeout. It can also be a pair (tuple) of
|
|
276
|
+
(connection, read) timeouts.
|
|
277
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
278
|
+
request; this effectively ignores the authentication
|
|
279
|
+
in the spec for a single request.
|
|
280
|
+
:type _request_auth: dict, optional
|
|
281
|
+
:type _content_type: string, optional: force content-type for the request
|
|
282
|
+
:return: Returns the result object.
|
|
283
|
+
If the method is called asynchronously,
|
|
284
|
+
returns the request thread.
|
|
285
|
+
:rtype: tuple(TriggerJobRunConfigResponseDto, status_code(int), headers(HTTPHeaderDict))
|
|
286
|
+
"""
|
|
287
|
+
|
|
288
|
+
_params = locals()
|
|
289
|
+
|
|
290
|
+
_all_params = ["trigger_job_run_config_request_dto"]
|
|
291
|
+
_all_params.extend(
|
|
292
|
+
[
|
|
293
|
+
"async_req",
|
|
294
|
+
"_return_http_data_only",
|
|
295
|
+
"_preload_content",
|
|
296
|
+
"_request_timeout",
|
|
297
|
+
"_request_auth",
|
|
298
|
+
"_content_type",
|
|
299
|
+
"_headers",
|
|
300
|
+
]
|
|
301
|
+
)
|
|
302
|
+
|
|
303
|
+
# validate the arguments
|
|
304
|
+
for _key, _val in _params["kwargs"].items():
|
|
305
|
+
if _key not in _all_params:
|
|
306
|
+
raise ApiTypeError(
|
|
307
|
+
"Got an unexpected keyword argument '%s'"
|
|
308
|
+
" to method trigger_job_run_post" % _key
|
|
309
|
+
)
|
|
310
|
+
_params[_key] = _val
|
|
311
|
+
del _params["kwargs"]
|
|
312
|
+
|
|
313
|
+
_collection_formats = {}
|
|
314
|
+
|
|
315
|
+
# process the path parameters
|
|
316
|
+
_path_params = {}
|
|
317
|
+
|
|
318
|
+
# process the query parameters
|
|
319
|
+
_query_params = []
|
|
320
|
+
# process the header parameters
|
|
321
|
+
_header_params = dict(_params.get("_headers", {}))
|
|
322
|
+
# process the form parameters
|
|
323
|
+
_form_params = []
|
|
324
|
+
_files = {}
|
|
325
|
+
# process the body parameter
|
|
326
|
+
_body_params = None
|
|
327
|
+
if _params["trigger_job_run_config_request_dto"] is not None:
|
|
328
|
+
_body_params = _params["trigger_job_run_config_request_dto"]
|
|
329
|
+
|
|
330
|
+
# set the HTTP header `Accept`
|
|
331
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
332
|
+
["application/json"]
|
|
333
|
+
) # noqa: E501
|
|
334
|
+
|
|
335
|
+
# set the HTTP header `Content-Type`
|
|
336
|
+
_content_types_list = _params.get(
|
|
337
|
+
"_content_type",
|
|
338
|
+
self.api_client.select_header_content_type(["application/json"]),
|
|
339
|
+
)
|
|
340
|
+
if _content_types_list:
|
|
341
|
+
_header_params["Content-Type"] = _content_types_list
|
|
342
|
+
|
|
343
|
+
# authentication setting
|
|
344
|
+
_auth_settings = [] # noqa: E501
|
|
345
|
+
|
|
346
|
+
_response_types_map = {
|
|
347
|
+
"200": "TriggerJobRunConfigResponseDto",
|
|
348
|
+
"422": "HTTPValidationError",
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
return self.api_client.call_api(
|
|
352
|
+
"/api/2.0/mlflow/generate-code-snippet/trigger-job-run",
|
|
353
|
+
"POST",
|
|
354
|
+
_path_params,
|
|
355
|
+
_query_params,
|
|
356
|
+
_header_params,
|
|
357
|
+
body=_body_params,
|
|
358
|
+
post_params=_form_params,
|
|
359
|
+
files=_files,
|
|
360
|
+
response_types_map=_response_types_map,
|
|
361
|
+
auth_settings=_auth_settings,
|
|
362
|
+
async_req=_params.get("async_req"),
|
|
363
|
+
_return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501
|
|
364
|
+
_preload_content=_params.get("_preload_content", True),
|
|
365
|
+
_request_timeout=_params.get("_request_timeout"),
|
|
366
|
+
collection_formats=_collection_formats,
|
|
367
|
+
_request_auth=_params.get("_request_auth"),
|
|
368
|
+
)
|
|
369
|
+
|
|
370
|
+
@validate_arguments
|
|
371
|
+
def trigger_workflow_task_config_post(
|
|
372
|
+
self,
|
|
373
|
+
create_workflow_task_config_request_dto: CreateWorkflowTaskConfigRequestDto,
|
|
374
|
+
**kwargs,
|
|
375
|
+
) -> CreatePythonDeploymentConfigResponseDto: # noqa: E501
|
|
376
|
+
"""Trigger Workflow Task Config # noqa: E501
|
|
377
|
+
|
|
378
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
379
|
+
asynchronous HTTP request, please pass async_req=True
|
|
380
|
+
|
|
381
|
+
>>> thread = api.trigger_workflow_task_config_post(create_workflow_task_config_request_dto, async_req=True)
|
|
382
|
+
>>> result = thread.get()
|
|
383
|
+
|
|
384
|
+
:param create_workflow_task_config_request_dto: (required)
|
|
385
|
+
:type create_workflow_task_config_request_dto: CreateWorkflowTaskConfigRequestDto
|
|
386
|
+
:param async_req: Whether to execute the request asynchronously.
|
|
387
|
+
:type async_req: bool, optional
|
|
388
|
+
:param _request_timeout: timeout setting for this request.
|
|
389
|
+
If one number provided, it will be total request
|
|
390
|
+
timeout. It can also be a pair (tuple) of
|
|
391
|
+
(connection, read) timeouts.
|
|
392
|
+
:return: Returns the result object.
|
|
393
|
+
If the method is called asynchronously,
|
|
394
|
+
returns the request thread.
|
|
395
|
+
:rtype: CreatePythonDeploymentConfigResponseDto
|
|
396
|
+
"""
|
|
397
|
+
kwargs["_return_http_data_only"] = True
|
|
398
|
+
if "_preload_content" in kwargs:
|
|
399
|
+
message = "Error! Please call the trigger_workflow_task_config_post_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
|
400
|
+
raise ValueError(message)
|
|
401
|
+
return self.trigger_workflow_task_config_post_with_http_info(
|
|
402
|
+
create_workflow_task_config_request_dto, **kwargs
|
|
403
|
+
) # noqa: E501
|
|
404
|
+
|
|
405
|
+
@validate_arguments
|
|
406
|
+
def trigger_workflow_task_config_post_with_http_info(
|
|
407
|
+
self,
|
|
408
|
+
create_workflow_task_config_request_dto: CreateWorkflowTaskConfigRequestDto,
|
|
409
|
+
**kwargs,
|
|
410
|
+
) -> ApiResponse: # noqa: E501
|
|
411
|
+
"""Trigger Workflow Task Config # noqa: E501
|
|
412
|
+
|
|
413
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
414
|
+
asynchronous HTTP request, please pass async_req=True
|
|
415
|
+
|
|
416
|
+
>>> thread = api.trigger_workflow_task_config_post_with_http_info(create_workflow_task_config_request_dto, async_req=True)
|
|
417
|
+
>>> result = thread.get()
|
|
418
|
+
|
|
419
|
+
:param create_workflow_task_config_request_dto: (required)
|
|
420
|
+
:type create_workflow_task_config_request_dto: CreateWorkflowTaskConfigRequestDto
|
|
421
|
+
:param async_req: Whether to execute the request asynchronously.
|
|
422
|
+
:type async_req: bool, optional
|
|
423
|
+
:param _preload_content: if False, the ApiResponse.data will
|
|
424
|
+
be set to none and raw_data will store the
|
|
425
|
+
HTTP response body without reading/decoding.
|
|
426
|
+
Default is True.
|
|
427
|
+
:type _preload_content: bool, optional
|
|
428
|
+
:param _return_http_data_only: response data instead of ApiResponse
|
|
429
|
+
object with status code, headers, etc
|
|
430
|
+
:type _return_http_data_only: bool, optional
|
|
431
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
432
|
+
number provided, it will be total request
|
|
433
|
+
timeout. It can also be a pair (tuple) of
|
|
434
|
+
(connection, read) timeouts.
|
|
435
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
436
|
+
request; this effectively ignores the authentication
|
|
437
|
+
in the spec for a single request.
|
|
438
|
+
:type _request_auth: dict, optional
|
|
439
|
+
:type _content_type: string, optional: force content-type for the request
|
|
440
|
+
:return: Returns the result object.
|
|
441
|
+
If the method is called asynchronously,
|
|
442
|
+
returns the request thread.
|
|
443
|
+
:rtype: tuple(CreatePythonDeploymentConfigResponseDto, status_code(int), headers(HTTPHeaderDict))
|
|
444
|
+
"""
|
|
445
|
+
|
|
446
|
+
_params = locals()
|
|
447
|
+
|
|
448
|
+
_all_params = ["create_workflow_task_config_request_dto"]
|
|
449
|
+
_all_params.extend(
|
|
450
|
+
[
|
|
451
|
+
"async_req",
|
|
452
|
+
"_return_http_data_only",
|
|
453
|
+
"_preload_content",
|
|
454
|
+
"_request_timeout",
|
|
455
|
+
"_request_auth",
|
|
456
|
+
"_content_type",
|
|
457
|
+
"_headers",
|
|
458
|
+
]
|
|
459
|
+
)
|
|
460
|
+
|
|
461
|
+
# validate the arguments
|
|
462
|
+
for _key, _val in _params["kwargs"].items():
|
|
463
|
+
if _key not in _all_params:
|
|
464
|
+
raise ApiTypeError(
|
|
465
|
+
"Got an unexpected keyword argument '%s'"
|
|
466
|
+
" to method trigger_workflow_task_config_post" % _key
|
|
467
|
+
)
|
|
468
|
+
_params[_key] = _val
|
|
469
|
+
del _params["kwargs"]
|
|
470
|
+
|
|
471
|
+
_collection_formats = {}
|
|
472
|
+
|
|
473
|
+
# process the path parameters
|
|
474
|
+
_path_params = {}
|
|
475
|
+
|
|
476
|
+
# process the query parameters
|
|
477
|
+
_query_params = []
|
|
478
|
+
# process the header parameters
|
|
479
|
+
_header_params = dict(_params.get("_headers", {}))
|
|
480
|
+
# process the form parameters
|
|
481
|
+
_form_params = []
|
|
482
|
+
_files = {}
|
|
483
|
+
# process the body parameter
|
|
484
|
+
_body_params = None
|
|
485
|
+
if _params["create_workflow_task_config_request_dto"] is not None:
|
|
486
|
+
_body_params = _params["create_workflow_task_config_request_dto"]
|
|
487
|
+
|
|
488
|
+
# set the HTTP header `Accept`
|
|
489
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
490
|
+
["application/json"]
|
|
491
|
+
) # noqa: E501
|
|
492
|
+
|
|
493
|
+
# set the HTTP header `Content-Type`
|
|
494
|
+
_content_types_list = _params.get(
|
|
495
|
+
"_content_type",
|
|
496
|
+
self.api_client.select_header_content_type(["application/json"]),
|
|
497
|
+
)
|
|
498
|
+
if _content_types_list:
|
|
499
|
+
_header_params["Content-Type"] = _content_types_list
|
|
500
|
+
|
|
501
|
+
# authentication setting
|
|
502
|
+
_auth_settings = [] # noqa: E501
|
|
503
|
+
|
|
504
|
+
_response_types_map = {
|
|
505
|
+
"200": "CreatePythonDeploymentConfigResponseDto",
|
|
506
|
+
"422": "HTTPValidationError",
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
return self.api_client.call_api(
|
|
510
|
+
"/api/2.0/mlflow/generate-code-snippet/workflow-task-config",
|
|
511
|
+
"POST",
|
|
512
|
+
_path_params,
|
|
513
|
+
_query_params,
|
|
514
|
+
_header_params,
|
|
515
|
+
body=_body_params,
|
|
516
|
+
post_params=_form_params,
|
|
517
|
+
files=_files,
|
|
518
|
+
response_types_map=_response_types_map,
|
|
519
|
+
auth_settings=_auth_settings,
|
|
520
|
+
async_req=_params.get("async_req"),
|
|
521
|
+
_return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501
|
|
522
|
+
_preload_content=_params.get("_preload_content", True),
|
|
523
|
+
_request_timeout=_params.get("_request_timeout"),
|
|
524
|
+
collection_formats=_collection_formats,
|
|
525
|
+
_request_auth=_params.get("_request_auth"),
|
|
526
|
+
)
|