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
|
@@ -20,12 +20,6 @@ from truefoundry.ml.autogen.client.exceptions import ( # noqa: F401
|
|
|
20
20
|
ApiTypeError,
|
|
21
21
|
ApiValueError,
|
|
22
22
|
)
|
|
23
|
-
from truefoundry.ml.autogen.client.models.add_custom_metrics_to_model_version_request_dto import (
|
|
24
|
-
AddCustomMetricsToModelVersionRequestDto,
|
|
25
|
-
)
|
|
26
|
-
from truefoundry.ml.autogen.client.models.add_features_to_model_version_request_dto import (
|
|
27
|
-
AddFeaturesToModelVersionRequestDto,
|
|
28
|
-
)
|
|
29
23
|
from truefoundry.ml.autogen.client.models.artifact_response_dto import (
|
|
30
24
|
ArtifactResponseDto,
|
|
31
25
|
)
|
|
@@ -189,322 +183,6 @@ class MlfoundryArtifactsApi:
|
|
|
189
183
|
api_client = ApiClient.get_default()
|
|
190
184
|
self.api_client = api_client
|
|
191
185
|
|
|
192
|
-
@validate_arguments
|
|
193
|
-
def add_custom_metrics_to_model_version_post(
|
|
194
|
-
self,
|
|
195
|
-
add_custom_metrics_to_model_version_request_dto: AddCustomMetricsToModelVersionRequestDto,
|
|
196
|
-
**kwargs,
|
|
197
|
-
) -> ModelVersionResponseDto: # noqa: E501
|
|
198
|
-
"""Add Custom Metrics To Model Version # noqa: E501
|
|
199
|
-
|
|
200
|
-
This method makes a synchronous HTTP request by default. To make an
|
|
201
|
-
asynchronous HTTP request, please pass async_req=True
|
|
202
|
-
|
|
203
|
-
>>> thread = api.add_custom_metrics_to_model_version_post(add_custom_metrics_to_model_version_request_dto, async_req=True)
|
|
204
|
-
>>> result = thread.get()
|
|
205
|
-
|
|
206
|
-
:param add_custom_metrics_to_model_version_request_dto: (required)
|
|
207
|
-
:type add_custom_metrics_to_model_version_request_dto: AddCustomMetricsToModelVersionRequestDto
|
|
208
|
-
:param async_req: Whether to execute the request asynchronously.
|
|
209
|
-
:type async_req: bool, optional
|
|
210
|
-
:param _request_timeout: timeout setting for this request.
|
|
211
|
-
If one number provided, it will be total request
|
|
212
|
-
timeout. It can also be a pair (tuple) of
|
|
213
|
-
(connection, read) timeouts.
|
|
214
|
-
:return: Returns the result object.
|
|
215
|
-
If the method is called asynchronously,
|
|
216
|
-
returns the request thread.
|
|
217
|
-
:rtype: ModelVersionResponseDto
|
|
218
|
-
"""
|
|
219
|
-
kwargs["_return_http_data_only"] = True
|
|
220
|
-
if "_preload_content" in kwargs:
|
|
221
|
-
message = "Error! Please call the add_custom_metrics_to_model_version_post_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
|
222
|
-
raise ValueError(message)
|
|
223
|
-
return self.add_custom_metrics_to_model_version_post_with_http_info(
|
|
224
|
-
add_custom_metrics_to_model_version_request_dto, **kwargs
|
|
225
|
-
) # noqa: E501
|
|
226
|
-
|
|
227
|
-
@validate_arguments
|
|
228
|
-
def add_custom_metrics_to_model_version_post_with_http_info(
|
|
229
|
-
self,
|
|
230
|
-
add_custom_metrics_to_model_version_request_dto: AddCustomMetricsToModelVersionRequestDto,
|
|
231
|
-
**kwargs,
|
|
232
|
-
) -> ApiResponse: # noqa: E501
|
|
233
|
-
"""Add Custom Metrics To Model Version # noqa: E501
|
|
234
|
-
|
|
235
|
-
This method makes a synchronous HTTP request by default. To make an
|
|
236
|
-
asynchronous HTTP request, please pass async_req=True
|
|
237
|
-
|
|
238
|
-
>>> thread = api.add_custom_metrics_to_model_version_post_with_http_info(add_custom_metrics_to_model_version_request_dto, async_req=True)
|
|
239
|
-
>>> result = thread.get()
|
|
240
|
-
|
|
241
|
-
:param add_custom_metrics_to_model_version_request_dto: (required)
|
|
242
|
-
:type add_custom_metrics_to_model_version_request_dto: AddCustomMetricsToModelVersionRequestDto
|
|
243
|
-
:param async_req: Whether to execute the request asynchronously.
|
|
244
|
-
:type async_req: bool, optional
|
|
245
|
-
:param _preload_content: if False, the ApiResponse.data will
|
|
246
|
-
be set to none and raw_data will store the
|
|
247
|
-
HTTP response body without reading/decoding.
|
|
248
|
-
Default is True.
|
|
249
|
-
:type _preload_content: bool, optional
|
|
250
|
-
:param _return_http_data_only: response data instead of ApiResponse
|
|
251
|
-
object with status code, headers, etc
|
|
252
|
-
:type _return_http_data_only: bool, optional
|
|
253
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
254
|
-
number provided, it will be total request
|
|
255
|
-
timeout. It can also be a pair (tuple) of
|
|
256
|
-
(connection, read) timeouts.
|
|
257
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
258
|
-
request; this effectively ignores the authentication
|
|
259
|
-
in the spec for a single request.
|
|
260
|
-
:type _request_auth: dict, optional
|
|
261
|
-
:type _content_type: string, optional: force content-type for the request
|
|
262
|
-
:return: Returns the result object.
|
|
263
|
-
If the method is called asynchronously,
|
|
264
|
-
returns the request thread.
|
|
265
|
-
:rtype: tuple(ModelVersionResponseDto, status_code(int), headers(HTTPHeaderDict))
|
|
266
|
-
"""
|
|
267
|
-
|
|
268
|
-
_params = locals()
|
|
269
|
-
|
|
270
|
-
_all_params = ["add_custom_metrics_to_model_version_request_dto"]
|
|
271
|
-
_all_params.extend(
|
|
272
|
-
[
|
|
273
|
-
"async_req",
|
|
274
|
-
"_return_http_data_only",
|
|
275
|
-
"_preload_content",
|
|
276
|
-
"_request_timeout",
|
|
277
|
-
"_request_auth",
|
|
278
|
-
"_content_type",
|
|
279
|
-
"_headers",
|
|
280
|
-
]
|
|
281
|
-
)
|
|
282
|
-
|
|
283
|
-
# validate the arguments
|
|
284
|
-
for _key, _val in _params["kwargs"].items():
|
|
285
|
-
if _key not in _all_params:
|
|
286
|
-
raise ApiTypeError(
|
|
287
|
-
"Got an unexpected keyword argument '%s'"
|
|
288
|
-
" to method add_custom_metrics_to_model_version_post" % _key
|
|
289
|
-
)
|
|
290
|
-
_params[_key] = _val
|
|
291
|
-
del _params["kwargs"]
|
|
292
|
-
|
|
293
|
-
_collection_formats = {}
|
|
294
|
-
|
|
295
|
-
# process the path parameters
|
|
296
|
-
_path_params = {}
|
|
297
|
-
|
|
298
|
-
# process the query parameters
|
|
299
|
-
_query_params = []
|
|
300
|
-
# process the header parameters
|
|
301
|
-
_header_params = dict(_params.get("_headers", {}))
|
|
302
|
-
# process the form parameters
|
|
303
|
-
_form_params = []
|
|
304
|
-
_files = {}
|
|
305
|
-
# process the body parameter
|
|
306
|
-
_body_params = None
|
|
307
|
-
if _params["add_custom_metrics_to_model_version_request_dto"] is not None:
|
|
308
|
-
_body_params = _params["add_custom_metrics_to_model_version_request_dto"]
|
|
309
|
-
|
|
310
|
-
# set the HTTP header `Accept`
|
|
311
|
-
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
312
|
-
["application/json"]
|
|
313
|
-
) # noqa: E501
|
|
314
|
-
|
|
315
|
-
# set the HTTP header `Content-Type`
|
|
316
|
-
_content_types_list = _params.get(
|
|
317
|
-
"_content_type",
|
|
318
|
-
self.api_client.select_header_content_type(["application/json"]),
|
|
319
|
-
)
|
|
320
|
-
if _content_types_list:
|
|
321
|
-
_header_params["Content-Type"] = _content_types_list
|
|
322
|
-
|
|
323
|
-
# authentication setting
|
|
324
|
-
_auth_settings = ["HTTPBearer", "APIKeyCookie"] # noqa: E501
|
|
325
|
-
|
|
326
|
-
_response_types_map = {
|
|
327
|
-
"200": "ModelVersionResponseDto",
|
|
328
|
-
"422": "HTTPValidationError",
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
return self.api_client.call_api(
|
|
332
|
-
"/api/2.0/mlflow/mlfoundry-artifacts/model-versions/custom-metrics/add",
|
|
333
|
-
"POST",
|
|
334
|
-
_path_params,
|
|
335
|
-
_query_params,
|
|
336
|
-
_header_params,
|
|
337
|
-
body=_body_params,
|
|
338
|
-
post_params=_form_params,
|
|
339
|
-
files=_files,
|
|
340
|
-
response_types_map=_response_types_map,
|
|
341
|
-
auth_settings=_auth_settings,
|
|
342
|
-
async_req=_params.get("async_req"),
|
|
343
|
-
_return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501
|
|
344
|
-
_preload_content=_params.get("_preload_content", True),
|
|
345
|
-
_request_timeout=_params.get("_request_timeout"),
|
|
346
|
-
collection_formats=_collection_formats,
|
|
347
|
-
_request_auth=_params.get("_request_auth"),
|
|
348
|
-
)
|
|
349
|
-
|
|
350
|
-
@validate_arguments
|
|
351
|
-
def add_features_to_model_version_post(
|
|
352
|
-
self,
|
|
353
|
-
add_features_to_model_version_request_dto: AddFeaturesToModelVersionRequestDto,
|
|
354
|
-
**kwargs,
|
|
355
|
-
) -> ModelVersionResponseDto: # noqa: E501
|
|
356
|
-
"""Add Features To Model Version # noqa: E501
|
|
357
|
-
|
|
358
|
-
This method makes a synchronous HTTP request by default. To make an
|
|
359
|
-
asynchronous HTTP request, please pass async_req=True
|
|
360
|
-
|
|
361
|
-
>>> thread = api.add_features_to_model_version_post(add_features_to_model_version_request_dto, async_req=True)
|
|
362
|
-
>>> result = thread.get()
|
|
363
|
-
|
|
364
|
-
:param add_features_to_model_version_request_dto: (required)
|
|
365
|
-
:type add_features_to_model_version_request_dto: AddFeaturesToModelVersionRequestDto
|
|
366
|
-
:param async_req: Whether to execute the request asynchronously.
|
|
367
|
-
:type async_req: bool, optional
|
|
368
|
-
:param _request_timeout: timeout setting for this request.
|
|
369
|
-
If one number provided, it will be total request
|
|
370
|
-
timeout. It can also be a pair (tuple) of
|
|
371
|
-
(connection, read) timeouts.
|
|
372
|
-
:return: Returns the result object.
|
|
373
|
-
If the method is called asynchronously,
|
|
374
|
-
returns the request thread.
|
|
375
|
-
:rtype: ModelVersionResponseDto
|
|
376
|
-
"""
|
|
377
|
-
kwargs["_return_http_data_only"] = True
|
|
378
|
-
if "_preload_content" in kwargs:
|
|
379
|
-
message = "Error! Please call the add_features_to_model_version_post_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
|
380
|
-
raise ValueError(message)
|
|
381
|
-
return self.add_features_to_model_version_post_with_http_info(
|
|
382
|
-
add_features_to_model_version_request_dto, **kwargs
|
|
383
|
-
) # noqa: E501
|
|
384
|
-
|
|
385
|
-
@validate_arguments
|
|
386
|
-
def add_features_to_model_version_post_with_http_info(
|
|
387
|
-
self,
|
|
388
|
-
add_features_to_model_version_request_dto: AddFeaturesToModelVersionRequestDto,
|
|
389
|
-
**kwargs,
|
|
390
|
-
) -> ApiResponse: # noqa: E501
|
|
391
|
-
"""Add Features To Model Version # noqa: E501
|
|
392
|
-
|
|
393
|
-
This method makes a synchronous HTTP request by default. To make an
|
|
394
|
-
asynchronous HTTP request, please pass async_req=True
|
|
395
|
-
|
|
396
|
-
>>> thread = api.add_features_to_model_version_post_with_http_info(add_features_to_model_version_request_dto, async_req=True)
|
|
397
|
-
>>> result = thread.get()
|
|
398
|
-
|
|
399
|
-
:param add_features_to_model_version_request_dto: (required)
|
|
400
|
-
:type add_features_to_model_version_request_dto: AddFeaturesToModelVersionRequestDto
|
|
401
|
-
:param async_req: Whether to execute the request asynchronously.
|
|
402
|
-
:type async_req: bool, optional
|
|
403
|
-
:param _preload_content: if False, the ApiResponse.data will
|
|
404
|
-
be set to none and raw_data will store the
|
|
405
|
-
HTTP response body without reading/decoding.
|
|
406
|
-
Default is True.
|
|
407
|
-
:type _preload_content: bool, optional
|
|
408
|
-
:param _return_http_data_only: response data instead of ApiResponse
|
|
409
|
-
object with status code, headers, etc
|
|
410
|
-
:type _return_http_data_only: bool, optional
|
|
411
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
412
|
-
number provided, it will be total request
|
|
413
|
-
timeout. It can also be a pair (tuple) of
|
|
414
|
-
(connection, read) timeouts.
|
|
415
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
416
|
-
request; this effectively ignores the authentication
|
|
417
|
-
in the spec for a single request.
|
|
418
|
-
:type _request_auth: dict, optional
|
|
419
|
-
:type _content_type: string, optional: force content-type for the request
|
|
420
|
-
:return: Returns the result object.
|
|
421
|
-
If the method is called asynchronously,
|
|
422
|
-
returns the request thread.
|
|
423
|
-
:rtype: tuple(ModelVersionResponseDto, status_code(int), headers(HTTPHeaderDict))
|
|
424
|
-
"""
|
|
425
|
-
|
|
426
|
-
_params = locals()
|
|
427
|
-
|
|
428
|
-
_all_params = ["add_features_to_model_version_request_dto"]
|
|
429
|
-
_all_params.extend(
|
|
430
|
-
[
|
|
431
|
-
"async_req",
|
|
432
|
-
"_return_http_data_only",
|
|
433
|
-
"_preload_content",
|
|
434
|
-
"_request_timeout",
|
|
435
|
-
"_request_auth",
|
|
436
|
-
"_content_type",
|
|
437
|
-
"_headers",
|
|
438
|
-
]
|
|
439
|
-
)
|
|
440
|
-
|
|
441
|
-
# validate the arguments
|
|
442
|
-
for _key, _val in _params["kwargs"].items():
|
|
443
|
-
if _key not in _all_params:
|
|
444
|
-
raise ApiTypeError(
|
|
445
|
-
"Got an unexpected keyword argument '%s'"
|
|
446
|
-
" to method add_features_to_model_version_post" % _key
|
|
447
|
-
)
|
|
448
|
-
_params[_key] = _val
|
|
449
|
-
del _params["kwargs"]
|
|
450
|
-
|
|
451
|
-
_collection_formats = {}
|
|
452
|
-
|
|
453
|
-
# process the path parameters
|
|
454
|
-
_path_params = {}
|
|
455
|
-
|
|
456
|
-
# process the query parameters
|
|
457
|
-
_query_params = []
|
|
458
|
-
# process the header parameters
|
|
459
|
-
_header_params = dict(_params.get("_headers", {}))
|
|
460
|
-
# process the form parameters
|
|
461
|
-
_form_params = []
|
|
462
|
-
_files = {}
|
|
463
|
-
# process the body parameter
|
|
464
|
-
_body_params = None
|
|
465
|
-
if _params["add_features_to_model_version_request_dto"] is not None:
|
|
466
|
-
_body_params = _params["add_features_to_model_version_request_dto"]
|
|
467
|
-
|
|
468
|
-
# set the HTTP header `Accept`
|
|
469
|
-
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
470
|
-
["application/json"]
|
|
471
|
-
) # noqa: E501
|
|
472
|
-
|
|
473
|
-
# set the HTTP header `Content-Type`
|
|
474
|
-
_content_types_list = _params.get(
|
|
475
|
-
"_content_type",
|
|
476
|
-
self.api_client.select_header_content_type(["application/json"]),
|
|
477
|
-
)
|
|
478
|
-
if _content_types_list:
|
|
479
|
-
_header_params["Content-Type"] = _content_types_list
|
|
480
|
-
|
|
481
|
-
# authentication setting
|
|
482
|
-
_auth_settings = ["HTTPBearer", "APIKeyCookie"] # noqa: E501
|
|
483
|
-
|
|
484
|
-
_response_types_map = {
|
|
485
|
-
"200": "ModelVersionResponseDto",
|
|
486
|
-
"422": "HTTPValidationError",
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
return self.api_client.call_api(
|
|
490
|
-
"/api/2.0/mlflow/mlfoundry-artifacts/model-versions/features/add",
|
|
491
|
-
"POST",
|
|
492
|
-
_path_params,
|
|
493
|
-
_query_params,
|
|
494
|
-
_header_params,
|
|
495
|
-
body=_body_params,
|
|
496
|
-
post_params=_form_params,
|
|
497
|
-
files=_files,
|
|
498
|
-
response_types_map=_response_types_map,
|
|
499
|
-
auth_settings=_auth_settings,
|
|
500
|
-
async_req=_params.get("async_req"),
|
|
501
|
-
_return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501
|
|
502
|
-
_preload_content=_params.get("_preload_content", True),
|
|
503
|
-
_request_timeout=_params.get("_request_timeout"),
|
|
504
|
-
collection_formats=_collection_formats,
|
|
505
|
-
_request_auth=_params.get("_request_auth"),
|
|
506
|
-
)
|
|
507
|
-
|
|
508
186
|
@validate_arguments
|
|
509
187
|
def authorize_user_for_model_post(
|
|
510
188
|
self,
|
|
@@ -28,6 +28,7 @@ from truefoundry.ml.autogen.client import rest
|
|
|
28
28
|
from truefoundry.ml.autogen.client.api_response import ApiResponse
|
|
29
29
|
from truefoundry.ml.autogen.client.configuration import Configuration
|
|
30
30
|
from truefoundry.ml.autogen.client.exceptions import ApiException, ApiValueError
|
|
31
|
+
from truefoundry.pydantic_v1 import SecretStr
|
|
31
32
|
|
|
32
33
|
|
|
33
34
|
class ApiClient:
|
|
@@ -288,6 +289,7 @@ class ApiClient:
|
|
|
288
289
|
"""Builds a JSON POST object.
|
|
289
290
|
|
|
290
291
|
If obj is None, return None.
|
|
292
|
+
If obj is SecretStr, return obj.get_secret_value()
|
|
291
293
|
If obj is str, int, long, float, bool, return directly.
|
|
292
294
|
If obj is datetime.datetime, datetime.date
|
|
293
295
|
convert to string in iso8601 format.
|
|
@@ -300,6 +302,8 @@ class ApiClient:
|
|
|
300
302
|
"""
|
|
301
303
|
if obj is None:
|
|
302
304
|
return None
|
|
305
|
+
elif isinstance(obj, SecretStr):
|
|
306
|
+
return obj.get_secret_value()
|
|
303
307
|
elif isinstance(obj, self.PRIMITIVE_TYPES):
|
|
304
308
|
return obj
|
|
305
309
|
elif isinstance(obj, list):
|
|
@@ -317,7 +321,10 @@ class ApiClient:
|
|
|
317
321
|
# and attributes which value is not None.
|
|
318
322
|
# Convert attribute name to json key in
|
|
319
323
|
# model definition for request.
|
|
320
|
-
|
|
324
|
+
if hasattr(obj, "to_dict") and callable(obj.to_dict):
|
|
325
|
+
obj_dict = obj.to_dict()
|
|
326
|
+
else:
|
|
327
|
+
obj_dict = obj.__dict__
|
|
321
328
|
|
|
322
329
|
return {
|
|
323
330
|
key: self.sanitize_for_serialization(val) for key, val in obj_dict.items()
|
|
@@ -32,6 +32,9 @@ from truefoundry.ml.autogen.client.models.artifact_response_dto import (
|
|
|
32
32
|
)
|
|
33
33
|
from truefoundry.ml.autogen.client.models.artifact_type import ArtifactType
|
|
34
34
|
from truefoundry.ml.autogen.client.models.artifact_version_dto import ArtifactVersionDto
|
|
35
|
+
from truefoundry.ml.autogen.client.models.artifact_version_manifest import (
|
|
36
|
+
ArtifactVersionManifest,
|
|
37
|
+
)
|
|
35
38
|
from truefoundry.ml.autogen.client.models.artifact_version_response_dto import (
|
|
36
39
|
ArtifactVersionResponseDto,
|
|
37
40
|
)
|
|
@@ -59,6 +62,7 @@ from truefoundry.ml.autogen.client.models.chat_prompt_messages_inner import (
|
|
|
59
62
|
ChatPromptMessagesInner,
|
|
60
63
|
)
|
|
61
64
|
from truefoundry.ml.autogen.client.models.columns_dto import ColumnsDto
|
|
65
|
+
from truefoundry.ml.autogen.client.models.command import Command
|
|
62
66
|
from truefoundry.ml.autogen.client.models.content import Content
|
|
63
67
|
from truefoundry.ml.autogen.client.models.content1 import Content1
|
|
64
68
|
from truefoundry.ml.autogen.client.models.content2 import Content2
|
|
@@ -110,6 +114,9 @@ from truefoundry.ml.autogen.client.models.create_run_request_dto import (
|
|
|
110
114
|
from truefoundry.ml.autogen.client.models.create_run_response_dto import (
|
|
111
115
|
CreateRunResponseDto,
|
|
112
116
|
)
|
|
117
|
+
from truefoundry.ml.autogen.client.models.create_workflow_task_config_request_dto import (
|
|
118
|
+
CreateWorkflowTaskConfigRequestDto,
|
|
119
|
+
)
|
|
113
120
|
from truefoundry.ml.autogen.client.models.dataset_dto import DatasetDto
|
|
114
121
|
from truefoundry.ml.autogen.client.models.dataset_response_dto import DatasetResponseDto
|
|
115
122
|
from truefoundry.ml.autogen.client.models.delete_artifact_versions_request_dto import (
|
|
@@ -136,11 +143,10 @@ from truefoundry.ml.autogen.client.models.experiment_response_dto import (
|
|
|
136
143
|
ExperimentResponseDto,
|
|
137
144
|
)
|
|
138
145
|
from truefoundry.ml.autogen.client.models.experiment_tag_dto import ExperimentTagDto
|
|
139
|
-
from truefoundry.ml.autogen.client.models.
|
|
140
|
-
|
|
146
|
+
from truefoundry.ml.autogen.client.models.external_artifact_source import (
|
|
147
|
+
ExternalArtifactSource,
|
|
141
148
|
)
|
|
142
|
-
from truefoundry.ml.autogen.client.models.
|
|
143
|
-
from truefoundry.ml.autogen.client.models.feature_value_type import FeatureValueType
|
|
149
|
+
from truefoundry.ml.autogen.client.models.fast_ai_framework import FastAIFramework
|
|
144
150
|
from truefoundry.ml.autogen.client.models.file_info_dto import FileInfoDto
|
|
145
151
|
from truefoundry.ml.autogen.client.models.finalize_artifact_version_request_dto import (
|
|
146
152
|
FinalizeArtifactVersionRequestDto,
|
|
@@ -182,14 +188,18 @@ from truefoundry.ml.autogen.client.models.get_signed_urls_for_dataset_write_resp
|
|
|
182
188
|
from truefoundry.ml.autogen.client.models.get_tenant_id_response_dto import (
|
|
183
189
|
GetTenantIdResponseDto,
|
|
184
190
|
)
|
|
191
|
+
from truefoundry.ml.autogen.client.models.gluon_framework import GluonFramework
|
|
192
|
+
from truefoundry.ml.autogen.client.models.h2_o_framework import H2OFramework
|
|
185
193
|
from truefoundry.ml.autogen.client.models.http_validation_error import (
|
|
186
194
|
HTTPValidationError,
|
|
187
195
|
)
|
|
188
196
|
from truefoundry.ml.autogen.client.models.image_content_part import ImageContentPart
|
|
189
197
|
from truefoundry.ml.autogen.client.models.image_url import ImageUrl
|
|
190
198
|
from truefoundry.ml.autogen.client.models.internal_metadata import InternalMetadata
|
|
199
|
+
from truefoundry.ml.autogen.client.models.keras_framework import KerasFramework
|
|
191
200
|
from truefoundry.ml.autogen.client.models.latest_run_log_dto import LatestRunLogDto
|
|
192
201
|
from truefoundry.ml.autogen.client.models.library_name import LibraryName
|
|
202
|
+
from truefoundry.ml.autogen.client.models.light_gbm_framework import LightGBMFramework
|
|
193
203
|
from truefoundry.ml.autogen.client.models.list_artifact_versions_request_dto import (
|
|
194
204
|
ListArtifactVersionsRequestDto,
|
|
195
205
|
)
|
|
@@ -262,6 +272,7 @@ from truefoundry.ml.autogen.client.models.log_metric_request_dto import (
|
|
|
262
272
|
from truefoundry.ml.autogen.client.models.log_param_request_dto import (
|
|
263
273
|
LogParamRequestDto,
|
|
264
274
|
)
|
|
275
|
+
from truefoundry.ml.autogen.client.models.manifest import Manifest
|
|
265
276
|
from truefoundry.ml.autogen.client.models.method import Method
|
|
266
277
|
from truefoundry.ml.autogen.client.models.metric_collection_dto import (
|
|
267
278
|
MetricCollectionDto,
|
|
@@ -271,8 +282,10 @@ from truefoundry.ml.autogen.client.models.mime_type import MimeType
|
|
|
271
282
|
from truefoundry.ml.autogen.client.models.model_configuration import ModelConfiguration
|
|
272
283
|
from truefoundry.ml.autogen.client.models.model_dto import ModelDto
|
|
273
284
|
from truefoundry.ml.autogen.client.models.model_response_dto import ModelResponseDto
|
|
274
|
-
from truefoundry.ml.autogen.client.models.model_schema_dto import ModelSchemaDto
|
|
275
285
|
from truefoundry.ml.autogen.client.models.model_version_dto import ModelVersionDto
|
|
286
|
+
from truefoundry.ml.autogen.client.models.model_version_environment import (
|
|
287
|
+
ModelVersionEnvironment,
|
|
288
|
+
)
|
|
276
289
|
from truefoundry.ml.autogen.client.models.model_version_manifest import (
|
|
277
290
|
ModelVersionManifest,
|
|
278
291
|
)
|
|
@@ -291,10 +304,12 @@ from truefoundry.ml.autogen.client.models.multi_part_upload_storage_provider imp
|
|
|
291
304
|
from truefoundry.ml.autogen.client.models.notify_artifact_version_failure_dto import (
|
|
292
305
|
NotifyArtifactVersionFailureDto,
|
|
293
306
|
)
|
|
307
|
+
from truefoundry.ml.autogen.client.models.onnx_framework import ONNXFramework
|
|
294
308
|
from truefoundry.ml.autogen.client.models.openapi_spec import OpenapiSpec
|
|
309
|
+
from truefoundry.ml.autogen.client.models.paddle_framework import PaddleFramework
|
|
295
310
|
from truefoundry.ml.autogen.client.models.param_dto import ParamDto
|
|
296
311
|
from truefoundry.ml.autogen.client.models.parameters import Parameters
|
|
297
|
-
from truefoundry.ml.autogen.client.models.
|
|
312
|
+
from truefoundry.ml.autogen.client.models.py_torch_framework import PyTorchFramework
|
|
298
313
|
from truefoundry.ml.autogen.client.models.resolve_agent_app_response_dto import (
|
|
299
314
|
ResolveAgentAppResponseDto,
|
|
300
315
|
)
|
|
@@ -314,12 +329,21 @@ from truefoundry.ml.autogen.client.models.search_runs_request_dto import (
|
|
|
314
329
|
from truefoundry.ml.autogen.client.models.search_runs_response_dto import (
|
|
315
330
|
SearchRunsResponseDto,
|
|
316
331
|
)
|
|
332
|
+
from truefoundry.ml.autogen.client.models.serialization_format import (
|
|
333
|
+
SerializationFormat,
|
|
334
|
+
)
|
|
317
335
|
from truefoundry.ml.autogen.client.models.set_experiment_tag_request_dto import (
|
|
318
336
|
SetExperimentTagRequestDto,
|
|
319
337
|
)
|
|
320
338
|
from truefoundry.ml.autogen.client.models.set_tag_request_dto import SetTagRequestDto
|
|
321
339
|
from truefoundry.ml.autogen.client.models.signed_url_dto import SignedURLDto
|
|
340
|
+
from truefoundry.ml.autogen.client.models.sklearn_framework import SklearnFramework
|
|
322
341
|
from truefoundry.ml.autogen.client.models.source import Source
|
|
342
|
+
from truefoundry.ml.autogen.client.models.source1 import Source1
|
|
343
|
+
from truefoundry.ml.autogen.client.models.spa_cy_framework import SpaCyFramework
|
|
344
|
+
from truefoundry.ml.autogen.client.models.stats_models_framework import (
|
|
345
|
+
StatsModelsFramework,
|
|
346
|
+
)
|
|
323
347
|
from truefoundry.ml.autogen.client.models.stop import Stop
|
|
324
348
|
from truefoundry.ml.autogen.client.models.store_run_logs_request_dto import (
|
|
325
349
|
StoreRunLogsRequestDto,
|
|
@@ -327,16 +351,22 @@ from truefoundry.ml.autogen.client.models.store_run_logs_request_dto import (
|
|
|
327
351
|
from truefoundry.ml.autogen.client.models.subject import Subject
|
|
328
352
|
from truefoundry.ml.autogen.client.models.subject_type import SubjectType
|
|
329
353
|
from truefoundry.ml.autogen.client.models.system_message import SystemMessage
|
|
330
|
-
from truefoundry.ml.autogen.client.models.
|
|
331
|
-
|
|
354
|
+
from truefoundry.ml.autogen.client.models.tensor_flow_framework import (
|
|
355
|
+
TensorFlowFramework,
|
|
332
356
|
)
|
|
333
357
|
from truefoundry.ml.autogen.client.models.text import Text
|
|
334
358
|
from truefoundry.ml.autogen.client.models.text_content_part import TextContentPart
|
|
335
359
|
from truefoundry.ml.autogen.client.models.transformers_framework import (
|
|
336
360
|
TransformersFramework,
|
|
337
361
|
)
|
|
338
|
-
from truefoundry.ml.autogen.client.models.
|
|
339
|
-
|
|
362
|
+
from truefoundry.ml.autogen.client.models.trigger_job_run_config_request_dto import (
|
|
363
|
+
TriggerJobRunConfigRequestDto,
|
|
364
|
+
)
|
|
365
|
+
from truefoundry.ml.autogen.client.models.trigger_job_run_config_response_dto import (
|
|
366
|
+
TriggerJobRunConfigResponseDto,
|
|
367
|
+
)
|
|
368
|
+
from truefoundry.ml.autogen.client.models.true_foundry_artifact_source import (
|
|
369
|
+
TrueFoundryArtifactSource,
|
|
340
370
|
)
|
|
341
371
|
from truefoundry.ml.autogen.client.models.update_artifact_version_request_dto import (
|
|
342
372
|
UpdateArtifactVersionRequestDto,
|
|
@@ -356,10 +386,10 @@ from truefoundry.ml.autogen.client.models.update_run_request_dto import (
|
|
|
356
386
|
from truefoundry.ml.autogen.client.models.update_run_response_dto import (
|
|
357
387
|
UpdateRunResponseDto,
|
|
358
388
|
)
|
|
359
|
-
from truefoundry.ml.autogen.client.models.upload_model_source import UploadModelSource
|
|
360
389
|
from truefoundry.ml.autogen.client.models.url import Url
|
|
361
390
|
from truefoundry.ml.autogen.client.models.user_message import UserMessage
|
|
362
391
|
from truefoundry.ml.autogen.client.models.validation_error import ValidationError
|
|
363
392
|
from truefoundry.ml.autogen.client.models.validation_error_loc_inner import (
|
|
364
393
|
ValidationErrorLocInner,
|
|
365
394
|
)
|
|
395
|
+
from truefoundry.ml.autogen.client.models.xg_boost_framework import XGBoostFramework
|
|
@@ -16,8 +16,8 @@ from __future__ import annotations
|
|
|
16
16
|
import json
|
|
17
17
|
import pprint
|
|
18
18
|
import re # noqa: F401
|
|
19
|
+
from typing import Any, Dict, Optional
|
|
19
20
|
|
|
20
|
-
from truefoundry.ml.autogen.client.models.feature_dto import FeatureDto
|
|
21
21
|
from truefoundry.pydantic_v1 import BaseModel, Field, StrictStr, conlist
|
|
22
22
|
|
|
23
23
|
|
|
@@ -27,7 +27,7 @@ class AddFeaturesToModelVersionRequestDto(BaseModel):
|
|
|
27
27
|
"""
|
|
28
28
|
|
|
29
29
|
id: StrictStr = Field(...)
|
|
30
|
-
features: conlist(
|
|
30
|
+
features: Optional[conlist(Dict[str, Any])] = None
|
|
31
31
|
__properties = ["id", "features"]
|
|
32
32
|
|
|
33
33
|
class Config:
|
|
@@ -52,13 +52,6 @@ class AddFeaturesToModelVersionRequestDto(BaseModel):
|
|
|
52
52
|
def to_dict(self):
|
|
53
53
|
"""Returns the dictionary representation of the model using alias"""
|
|
54
54
|
_dict = self.dict(by_alias=True, exclude={}, exclude_none=True)
|
|
55
|
-
# override the default output from truefoundry.pydantic_v1 by calling `to_dict()` of each item in features (list)
|
|
56
|
-
_items = []
|
|
57
|
-
if self.features:
|
|
58
|
-
for _item in self.features:
|
|
59
|
-
if _item:
|
|
60
|
-
_items.append(_item.to_dict())
|
|
61
|
-
_dict["features"] = _items
|
|
62
55
|
return _dict
|
|
63
56
|
|
|
64
57
|
@classmethod
|
|
@@ -71,13 +64,6 @@ class AddFeaturesToModelVersionRequestDto(BaseModel):
|
|
|
71
64
|
return AddFeaturesToModelVersionRequestDto.parse_obj(obj)
|
|
72
65
|
|
|
73
66
|
_obj = AddFeaturesToModelVersionRequestDto.parse_obj(
|
|
74
|
-
{
|
|
75
|
-
"id": obj.get("id"),
|
|
76
|
-
"features": [
|
|
77
|
-
FeatureDto.from_dict(_item) for _item in obj.get("features")
|
|
78
|
-
]
|
|
79
|
-
if obj.get("features") is not None
|
|
80
|
-
else None,
|
|
81
|
-
}
|
|
67
|
+
{"id": obj.get("id"), "features": obj.get("features")}
|
|
82
68
|
)
|
|
83
69
|
return _obj
|
|
@@ -64,7 +64,7 @@ class AgentOpenAPIToolWithFQN(BaseModel):
|
|
|
64
64
|
@validator("type")
|
|
65
65
|
def type_validate_enum(cls, value):
|
|
66
66
|
"""Validates the enum"""
|
|
67
|
-
if value not in ("openapi-tool"):
|
|
67
|
+
if value not in ("openapi-tool",):
|
|
68
68
|
raise ValueError("must be one of enum values ('openapi-tool')")
|
|
69
69
|
return value
|
|
70
70
|
|
|
@@ -26,9 +26,7 @@ from truefoundry.ml.autogen.client.models.artifact_version_status import (
|
|
|
26
26
|
ArtifactVersionStatus,
|
|
27
27
|
)
|
|
28
28
|
from truefoundry.ml.autogen.client.models.internal_metadata import InternalMetadata
|
|
29
|
-
from truefoundry.ml.autogen.client.models.
|
|
30
|
-
ModelVersionManifest,
|
|
31
|
-
)
|
|
29
|
+
from truefoundry.ml.autogen.client.models.manifest import Manifest
|
|
32
30
|
from truefoundry.ml.autogen.client.models.subject import Subject
|
|
33
31
|
from truefoundry.pydantic_v1 import BaseModel, Field, StrictInt, StrictStr
|
|
34
32
|
|
|
@@ -59,7 +57,7 @@ class ArtifactVersionDto(BaseModel):
|
|
|
59
57
|
artifact_name: Optional[StrictStr] = None
|
|
60
58
|
internal_metadata: Optional[InternalMetadata] = None
|
|
61
59
|
artifact_size: Optional[StrictInt] = None
|
|
62
|
-
manifest: Optional[
|
|
60
|
+
manifest: Optional[Manifest] = None
|
|
63
61
|
serialization_format: ArtifactVersionSerializationFormat = Field(...)
|
|
64
62
|
__properties = [
|
|
65
63
|
"id",
|
|
@@ -158,7 +156,7 @@ class ArtifactVersionDto(BaseModel):
|
|
|
158
156
|
if obj.get("internal_metadata") is not None
|
|
159
157
|
else None,
|
|
160
158
|
"artifact_size": obj.get("artifact_size"),
|
|
161
|
-
"manifest":
|
|
159
|
+
"manifest": Manifest.from_dict(obj.get("manifest"))
|
|
162
160
|
if obj.get("manifest") is not None
|
|
163
161
|
else None,
|
|
164
162
|
"serialization_format": obj.get("serialization_format"),
|