truefoundry 0.5.0rc7__py3-none-any.whl → 0.5.1__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/common/auth_service_client.py +2 -2
- truefoundry/common/constants.py +9 -0
- truefoundry/common/utils.py +81 -1
- truefoundry/deploy/__init__.py +5 -0
- truefoundry/deploy/builder/builders/tfy_notebook_buildpack/__init__.py +4 -2
- truefoundry/deploy/builder/builders/tfy_python_buildpack/__init__.py +7 -5
- truefoundry/deploy/builder/builders/tfy_python_buildpack/dockerfile_template.py +87 -28
- truefoundry/deploy/builder/constants.py +8 -0
- truefoundry/deploy/builder/utils.py +9 -4
- truefoundry/deploy/cli/cli.py +2 -0
- truefoundry/deploy/cli/commands/__init__.py +1 -0
- truefoundry/deploy/cli/commands/deploy_init_command.py +22 -0
- truefoundry/deploy/lib/dao/application.py +2 -1
- truefoundry/deploy/v2/lib/patched_models.py +8 -0
- truefoundry/ml/__init__.py +25 -16
- truefoundry/ml/autogen/client/__init__.py +21 -3
- truefoundry/ml/autogen/client/api/mlfoundry_artifacts_api.py +325 -0
- truefoundry/ml/autogen/client/models/__init__.py +21 -3
- truefoundry/ml/autogen/client/models/artifact_version_manifest.py +2 -2
- truefoundry/ml/autogen/client/models/export_deployment_files_request_dto.py +82 -0
- truefoundry/ml/autogen/client/models/infer_method_name.py +34 -0
- truefoundry/ml/autogen/client/models/model_server.py +34 -0
- truefoundry/ml/autogen/client/models/model_version_environment.py +1 -1
- truefoundry/ml/autogen/client/models/model_version_manifest.py +2 -8
- truefoundry/ml/autogen/client/models/sklearn_framework.py +15 -5
- truefoundry/ml/autogen/client/models/sklearn_model_schema.py +82 -0
- truefoundry/ml/autogen/client/models/{serialization_format.py → sklearn_serialization_format.py} +5 -5
- truefoundry/ml/autogen/client/models/transformers_framework.py +2 -2
- truefoundry/ml/autogen/client/models/validate_external_storage_root_request_dto.py +71 -0
- truefoundry/ml/autogen/client/models/validate_external_storage_root_response_dto.py +69 -0
- truefoundry/ml/autogen/client/models/xg_boost_framework.py +17 -5
- truefoundry/ml/autogen/client/models/xg_boost_model_schema.py +88 -0
- truefoundry/ml/autogen/client/models/xg_boost_serialization_format.py +36 -0
- truefoundry/ml/autogen/client_README.md +11 -1
- truefoundry/ml/autogen/entities/artifacts.py +95 -39
- truefoundry/ml/autogen/models/signature.py +6 -3
- truefoundry/ml/autogen/models/utils.py +12 -7
- truefoundry/ml/cli/commands/model_init.py +97 -0
- truefoundry/ml/cli/utils.py +34 -0
- truefoundry/ml/log_types/artifacts/model.py +50 -38
- truefoundry/ml/log_types/artifacts/utils.py +38 -2
- truefoundry/ml/mlfoundry_api.py +74 -80
- truefoundry/ml/mlfoundry_run.py +0 -32
- truefoundry/ml/model_framework.py +372 -3
- truefoundry/ml/validation_utils.py +2 -0
- {truefoundry-0.5.0rc7.dist-info → truefoundry-0.5.1.dist-info}/METADATA +1 -5
- {truefoundry-0.5.0rc7.dist-info → truefoundry-0.5.1.dist-info}/RECORD +49 -56
- truefoundry/deploy/function_service/__init__.py +0 -3
- truefoundry/deploy/function_service/__main__.py +0 -27
- truefoundry/deploy/function_service/app.py +0 -92
- truefoundry/deploy/function_service/build.py +0 -45
- truefoundry/deploy/function_service/remote/__init__.py +0 -6
- truefoundry/deploy/function_service/remote/context.py +0 -3
- truefoundry/deploy/function_service/remote/method.py +0 -67
- truefoundry/deploy/function_service/remote/remote.py +0 -144
- truefoundry/deploy/function_service/route.py +0 -137
- truefoundry/deploy/function_service/service.py +0 -113
- truefoundry/deploy/function_service/utils.py +0 -53
- truefoundry/langchain/__init__.py +0 -12
- truefoundry/langchain/deprecated.py +0 -302
- truefoundry/langchain/truefoundry_chat.py +0 -130
- truefoundry/langchain/truefoundry_embeddings.py +0 -171
- truefoundry/langchain/truefoundry_llm.py +0 -106
- truefoundry/langchain/utils.py +0 -44
- truefoundry/ml/log_types/artifacts/model_extras.py +0 -48
- {truefoundry-0.5.0rc7.dist-info → truefoundry-0.5.1.dist-info}/WHEEL +0 -0
- {truefoundry-0.5.0rc7.dist-info → truefoundry-0.5.1.dist-info}/entry_points.txt +0 -0
|
@@ -172,6 +172,9 @@ from truefoundry.ml.autogen.client.models.experiment_response_dto import (
|
|
|
172
172
|
ExperimentResponseDto,
|
|
173
173
|
)
|
|
174
174
|
from truefoundry.ml.autogen.client.models.experiment_tag_dto import ExperimentTagDto
|
|
175
|
+
from truefoundry.ml.autogen.client.models.export_deployment_files_request_dto import (
|
|
176
|
+
ExportDeploymentFilesRequestDto,
|
|
177
|
+
)
|
|
175
178
|
from truefoundry.ml.autogen.client.models.external_artifact_source import (
|
|
176
179
|
ExternalArtifactSource,
|
|
177
180
|
)
|
|
@@ -224,6 +227,7 @@ from truefoundry.ml.autogen.client.models.http_validation_error import (
|
|
|
224
227
|
)
|
|
225
228
|
from truefoundry.ml.autogen.client.models.image_content_part import ImageContentPart
|
|
226
229
|
from truefoundry.ml.autogen.client.models.image_url import ImageUrl
|
|
230
|
+
from truefoundry.ml.autogen.client.models.infer_method_name import InferMethodName
|
|
227
231
|
from truefoundry.ml.autogen.client.models.internal_metadata import InternalMetadata
|
|
228
232
|
from truefoundry.ml.autogen.client.models.keras_framework import KerasFramework
|
|
229
233
|
from truefoundry.ml.autogen.client.models.latest_run_log_dto import LatestRunLogDto
|
|
@@ -311,6 +315,7 @@ from truefoundry.ml.autogen.client.models.mime_type import MimeType
|
|
|
311
315
|
from truefoundry.ml.autogen.client.models.model_configuration import ModelConfiguration
|
|
312
316
|
from truefoundry.ml.autogen.client.models.model_dto import ModelDto
|
|
313
317
|
from truefoundry.ml.autogen.client.models.model_response_dto import ModelResponseDto
|
|
318
|
+
from truefoundry.ml.autogen.client.models.model_server import ModelServer
|
|
314
319
|
from truefoundry.ml.autogen.client.models.model_version_dto import ModelVersionDto
|
|
315
320
|
from truefoundry.ml.autogen.client.models.model_version_environment import (
|
|
316
321
|
ModelVersionEnvironment,
|
|
@@ -358,15 +363,16 @@ from truefoundry.ml.autogen.client.models.search_runs_request_dto import (
|
|
|
358
363
|
from truefoundry.ml.autogen.client.models.search_runs_response_dto import (
|
|
359
364
|
SearchRunsResponseDto,
|
|
360
365
|
)
|
|
361
|
-
from truefoundry.ml.autogen.client.models.serialization_format import (
|
|
362
|
-
SerializationFormat,
|
|
363
|
-
)
|
|
364
366
|
from truefoundry.ml.autogen.client.models.set_experiment_tag_request_dto import (
|
|
365
367
|
SetExperimentTagRequestDto,
|
|
366
368
|
)
|
|
367
369
|
from truefoundry.ml.autogen.client.models.set_tag_request_dto import SetTagRequestDto
|
|
368
370
|
from truefoundry.ml.autogen.client.models.signed_url_dto import SignedURLDto
|
|
369
371
|
from truefoundry.ml.autogen.client.models.sklearn_framework import SklearnFramework
|
|
372
|
+
from truefoundry.ml.autogen.client.models.sklearn_model_schema import SklearnModelSchema
|
|
373
|
+
from truefoundry.ml.autogen.client.models.sklearn_serialization_format import (
|
|
374
|
+
SklearnSerializationFormat,
|
|
375
|
+
)
|
|
370
376
|
from truefoundry.ml.autogen.client.models.source import Source
|
|
371
377
|
from truefoundry.ml.autogen.client.models.source1 import Source1
|
|
372
378
|
from truefoundry.ml.autogen.client.models.spa_cy_framework import SpaCyFramework
|
|
@@ -417,8 +423,20 @@ from truefoundry.ml.autogen.client.models.update_run_response_dto import (
|
|
|
417
423
|
)
|
|
418
424
|
from truefoundry.ml.autogen.client.models.url import Url
|
|
419
425
|
from truefoundry.ml.autogen.client.models.user_message import UserMessage
|
|
426
|
+
from truefoundry.ml.autogen.client.models.validate_external_storage_root_request_dto import (
|
|
427
|
+
ValidateExternalStorageRootRequestDto,
|
|
428
|
+
)
|
|
429
|
+
from truefoundry.ml.autogen.client.models.validate_external_storage_root_response_dto import (
|
|
430
|
+
ValidateExternalStorageRootResponseDto,
|
|
431
|
+
)
|
|
420
432
|
from truefoundry.ml.autogen.client.models.validation_error import ValidationError
|
|
421
433
|
from truefoundry.ml.autogen.client.models.validation_error_loc_inner import (
|
|
422
434
|
ValidationErrorLocInner,
|
|
423
435
|
)
|
|
424
436
|
from truefoundry.ml.autogen.client.models.xg_boost_framework import XGBoostFramework
|
|
437
|
+
from truefoundry.ml.autogen.client.models.xg_boost_model_schema import (
|
|
438
|
+
XGBoostModelSchema,
|
|
439
|
+
)
|
|
440
|
+
from truefoundry.ml.autogen.client.models.xg_boost_serialization_format import (
|
|
441
|
+
XGBoostSerializationFormat,
|
|
442
|
+
)
|
|
@@ -73,6 +73,9 @@ from truefoundry.ml.autogen.client.models.delete_files_for_dataset_request_dto i
|
|
|
73
73
|
from truefoundry.ml.autogen.client.models.delete_model_version_request_dto import (
|
|
74
74
|
DeleteModelVersionRequestDto,
|
|
75
75
|
)
|
|
76
|
+
from truefoundry.ml.autogen.client.models.export_deployment_files_request_dto import (
|
|
77
|
+
ExportDeploymentFilesRequestDto,
|
|
78
|
+
)
|
|
76
79
|
from truefoundry.ml.autogen.client.models.finalize_artifact_version_request_dto import (
|
|
77
80
|
FinalizeArtifactVersionRequestDto,
|
|
78
81
|
)
|
|
@@ -164,6 +167,12 @@ from truefoundry.ml.autogen.client.models.update_dataset_request_dto import (
|
|
|
164
167
|
from truefoundry.ml.autogen.client.models.update_model_version_request_dto import (
|
|
165
168
|
UpdateModelVersionRequestDto,
|
|
166
169
|
)
|
|
170
|
+
from truefoundry.ml.autogen.client.models.validate_external_storage_root_request_dto import (
|
|
171
|
+
ValidateExternalStorageRootRequestDto,
|
|
172
|
+
)
|
|
173
|
+
from truefoundry.ml.autogen.client.models.validate_external_storage_root_response_dto import (
|
|
174
|
+
ValidateExternalStorageRootResponseDto,
|
|
175
|
+
)
|
|
167
176
|
from truefoundry.pydantic_v1 import (
|
|
168
177
|
StrictInt,
|
|
169
178
|
StrictStr,
|
|
@@ -2277,6 +2286,164 @@ class MlfoundryArtifactsApi:
|
|
|
2277
2286
|
_request_auth=_params.get("_request_auth"),
|
|
2278
2287
|
)
|
|
2279
2288
|
|
|
2289
|
+
@validate_arguments
|
|
2290
|
+
def export_deployment_files_by_fqn_post(
|
|
2291
|
+
self,
|
|
2292
|
+
export_deployment_files_request_dto: ExportDeploymentFilesRequestDto,
|
|
2293
|
+
**kwargs,
|
|
2294
|
+
) -> object: # noqa: E501
|
|
2295
|
+
"""Export Deployment Files By Fqn # noqa: E501
|
|
2296
|
+
|
|
2297
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
2298
|
+
asynchronous HTTP request, please pass async_req=True
|
|
2299
|
+
|
|
2300
|
+
>>> thread = api.export_deployment_files_by_fqn_post(export_deployment_files_request_dto, async_req=True)
|
|
2301
|
+
>>> result = thread.get()
|
|
2302
|
+
|
|
2303
|
+
:param export_deployment_files_request_dto: (required)
|
|
2304
|
+
:type export_deployment_files_request_dto: ExportDeploymentFilesRequestDto
|
|
2305
|
+
:param async_req: Whether to execute the request asynchronously.
|
|
2306
|
+
:type async_req: bool, optional
|
|
2307
|
+
:param _request_timeout: timeout setting for this request.
|
|
2308
|
+
If one number provided, it will be total request
|
|
2309
|
+
timeout. It can also be a pair (tuple) of
|
|
2310
|
+
(connection, read) timeouts.
|
|
2311
|
+
:return: Returns the result object.
|
|
2312
|
+
If the method is called asynchronously,
|
|
2313
|
+
returns the request thread.
|
|
2314
|
+
:rtype: object
|
|
2315
|
+
"""
|
|
2316
|
+
kwargs["_return_http_data_only"] = True
|
|
2317
|
+
if "_preload_content" in kwargs:
|
|
2318
|
+
message = "Error! Please call the export_deployment_files_by_fqn_post_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
|
2319
|
+
raise ValueError(message)
|
|
2320
|
+
return self.export_deployment_files_by_fqn_post_with_http_info(
|
|
2321
|
+
export_deployment_files_request_dto, **kwargs
|
|
2322
|
+
) # noqa: E501
|
|
2323
|
+
|
|
2324
|
+
@validate_arguments
|
|
2325
|
+
def export_deployment_files_by_fqn_post_with_http_info(
|
|
2326
|
+
self,
|
|
2327
|
+
export_deployment_files_request_dto: ExportDeploymentFilesRequestDto,
|
|
2328
|
+
**kwargs,
|
|
2329
|
+
) -> ApiResponse: # noqa: E501
|
|
2330
|
+
"""Export Deployment Files By Fqn # noqa: E501
|
|
2331
|
+
|
|
2332
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
2333
|
+
asynchronous HTTP request, please pass async_req=True
|
|
2334
|
+
|
|
2335
|
+
>>> thread = api.export_deployment_files_by_fqn_post_with_http_info(export_deployment_files_request_dto, async_req=True)
|
|
2336
|
+
>>> result = thread.get()
|
|
2337
|
+
|
|
2338
|
+
:param export_deployment_files_request_dto: (required)
|
|
2339
|
+
:type export_deployment_files_request_dto: ExportDeploymentFilesRequestDto
|
|
2340
|
+
:param async_req: Whether to execute the request asynchronously.
|
|
2341
|
+
:type async_req: bool, optional
|
|
2342
|
+
:param _preload_content: if False, the ApiResponse.data will
|
|
2343
|
+
be set to none and raw_data will store the
|
|
2344
|
+
HTTP response body without reading/decoding.
|
|
2345
|
+
Default is True.
|
|
2346
|
+
:type _preload_content: bool, optional
|
|
2347
|
+
:param _return_http_data_only: response data instead of ApiResponse
|
|
2348
|
+
object with status code, headers, etc
|
|
2349
|
+
:type _return_http_data_only: bool, optional
|
|
2350
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2351
|
+
number provided, it will be total request
|
|
2352
|
+
timeout. It can also be a pair (tuple) of
|
|
2353
|
+
(connection, read) timeouts.
|
|
2354
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2355
|
+
request; this effectively ignores the authentication
|
|
2356
|
+
in the spec for a single request.
|
|
2357
|
+
:type _request_auth: dict, optional
|
|
2358
|
+
:type _content_type: string, optional: force content-type for the request
|
|
2359
|
+
:return: Returns the result object.
|
|
2360
|
+
If the method is called asynchronously,
|
|
2361
|
+
returns the request thread.
|
|
2362
|
+
:rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
|
|
2363
|
+
"""
|
|
2364
|
+
|
|
2365
|
+
_params = locals()
|
|
2366
|
+
|
|
2367
|
+
_all_params = ["export_deployment_files_request_dto"]
|
|
2368
|
+
_all_params.extend(
|
|
2369
|
+
[
|
|
2370
|
+
"async_req",
|
|
2371
|
+
"_return_http_data_only",
|
|
2372
|
+
"_preload_content",
|
|
2373
|
+
"_request_timeout",
|
|
2374
|
+
"_request_auth",
|
|
2375
|
+
"_content_type",
|
|
2376
|
+
"_headers",
|
|
2377
|
+
]
|
|
2378
|
+
)
|
|
2379
|
+
|
|
2380
|
+
# validate the arguments
|
|
2381
|
+
for _key, _val in _params["kwargs"].items():
|
|
2382
|
+
if _key not in _all_params:
|
|
2383
|
+
raise ApiTypeError(
|
|
2384
|
+
"Got an unexpected keyword argument '%s'"
|
|
2385
|
+
" to method export_deployment_files_by_fqn_post" % _key
|
|
2386
|
+
)
|
|
2387
|
+
_params[_key] = _val
|
|
2388
|
+
del _params["kwargs"]
|
|
2389
|
+
|
|
2390
|
+
_collection_formats = {}
|
|
2391
|
+
|
|
2392
|
+
# process the path parameters
|
|
2393
|
+
_path_params = {}
|
|
2394
|
+
|
|
2395
|
+
# process the query parameters
|
|
2396
|
+
_query_params = []
|
|
2397
|
+
# process the header parameters
|
|
2398
|
+
_header_params = dict(_params.get("_headers", {}))
|
|
2399
|
+
# process the form parameters
|
|
2400
|
+
_form_params = []
|
|
2401
|
+
_files = {}
|
|
2402
|
+
# process the body parameter
|
|
2403
|
+
_body_params = None
|
|
2404
|
+
if _params["export_deployment_files_request_dto"] is not None:
|
|
2405
|
+
_body_params = _params["export_deployment_files_request_dto"]
|
|
2406
|
+
|
|
2407
|
+
# set the HTTP header `Accept`
|
|
2408
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
2409
|
+
["application/json", "application/zip"]
|
|
2410
|
+
) # noqa: E501
|
|
2411
|
+
|
|
2412
|
+
# set the HTTP header `Content-Type`
|
|
2413
|
+
_content_types_list = _params.get(
|
|
2414
|
+
"_content_type",
|
|
2415
|
+
self.api_client.select_header_content_type(["application/json"]),
|
|
2416
|
+
)
|
|
2417
|
+
if _content_types_list:
|
|
2418
|
+
_header_params["Content-Type"] = _content_types_list
|
|
2419
|
+
|
|
2420
|
+
# authentication setting
|
|
2421
|
+
_auth_settings = ["HTTPBearer", "APIKeyCookie"] # noqa: E501
|
|
2422
|
+
|
|
2423
|
+
_response_types_map = {
|
|
2424
|
+
"200": "object",
|
|
2425
|
+
"422": "HTTPValidationError",
|
|
2426
|
+
}
|
|
2427
|
+
|
|
2428
|
+
return self.api_client.call_api(
|
|
2429
|
+
"/api/2.0/mlflow/mlfoundry-artifacts/model-versions/export-deployment-files-by-fqn",
|
|
2430
|
+
"POST",
|
|
2431
|
+
_path_params,
|
|
2432
|
+
_query_params,
|
|
2433
|
+
_header_params,
|
|
2434
|
+
body=_body_params,
|
|
2435
|
+
post_params=_form_params,
|
|
2436
|
+
files=_files,
|
|
2437
|
+
response_types_map=_response_types_map,
|
|
2438
|
+
auth_settings=_auth_settings,
|
|
2439
|
+
async_req=_params.get("async_req"),
|
|
2440
|
+
_return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501
|
|
2441
|
+
_preload_content=_params.get("_preload_content", True),
|
|
2442
|
+
_request_timeout=_params.get("_request_timeout"),
|
|
2443
|
+
collection_formats=_collection_formats,
|
|
2444
|
+
_request_auth=_params.get("_request_auth"),
|
|
2445
|
+
)
|
|
2446
|
+
|
|
2280
2447
|
@validate_arguments
|
|
2281
2448
|
def finalize_artifact_version_post(
|
|
2282
2449
|
self,
|
|
@@ -7054,3 +7221,161 @@ class MlfoundryArtifactsApi:
|
|
|
7054
7221
|
collection_formats=_collection_formats,
|
|
7055
7222
|
_request_auth=_params.get("_request_auth"),
|
|
7056
7223
|
)
|
|
7224
|
+
|
|
7225
|
+
@validate_arguments
|
|
7226
|
+
def validate_external_storage_root_path_post(
|
|
7227
|
+
self,
|
|
7228
|
+
validate_external_storage_root_request_dto: ValidateExternalStorageRootRequestDto,
|
|
7229
|
+
**kwargs,
|
|
7230
|
+
) -> ValidateExternalStorageRootResponseDto: # noqa: E501
|
|
7231
|
+
"""Validate External Storage Root Path # noqa: E501
|
|
7232
|
+
|
|
7233
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
7234
|
+
asynchronous HTTP request, please pass async_req=True
|
|
7235
|
+
|
|
7236
|
+
>>> thread = api.validate_external_storage_root_path_post(validate_external_storage_root_request_dto, async_req=True)
|
|
7237
|
+
>>> result = thread.get()
|
|
7238
|
+
|
|
7239
|
+
:param validate_external_storage_root_request_dto: (required)
|
|
7240
|
+
:type validate_external_storage_root_request_dto: ValidateExternalStorageRootRequestDto
|
|
7241
|
+
:param async_req: Whether to execute the request asynchronously.
|
|
7242
|
+
:type async_req: bool, optional
|
|
7243
|
+
:param _request_timeout: timeout setting for this request.
|
|
7244
|
+
If one number provided, it will be total request
|
|
7245
|
+
timeout. It can also be a pair (tuple) of
|
|
7246
|
+
(connection, read) timeouts.
|
|
7247
|
+
:return: Returns the result object.
|
|
7248
|
+
If the method is called asynchronously,
|
|
7249
|
+
returns the request thread.
|
|
7250
|
+
:rtype: ValidateExternalStorageRootResponseDto
|
|
7251
|
+
"""
|
|
7252
|
+
kwargs["_return_http_data_only"] = True
|
|
7253
|
+
if "_preload_content" in kwargs:
|
|
7254
|
+
message = "Error! Please call the validate_external_storage_root_path_post_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
|
7255
|
+
raise ValueError(message)
|
|
7256
|
+
return self.validate_external_storage_root_path_post_with_http_info(
|
|
7257
|
+
validate_external_storage_root_request_dto, **kwargs
|
|
7258
|
+
) # noqa: E501
|
|
7259
|
+
|
|
7260
|
+
@validate_arguments
|
|
7261
|
+
def validate_external_storage_root_path_post_with_http_info(
|
|
7262
|
+
self,
|
|
7263
|
+
validate_external_storage_root_request_dto: ValidateExternalStorageRootRequestDto,
|
|
7264
|
+
**kwargs,
|
|
7265
|
+
) -> ApiResponse: # noqa: E501
|
|
7266
|
+
"""Validate External Storage Root Path # noqa: E501
|
|
7267
|
+
|
|
7268
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
7269
|
+
asynchronous HTTP request, please pass async_req=True
|
|
7270
|
+
|
|
7271
|
+
>>> thread = api.validate_external_storage_root_path_post_with_http_info(validate_external_storage_root_request_dto, async_req=True)
|
|
7272
|
+
>>> result = thread.get()
|
|
7273
|
+
|
|
7274
|
+
:param validate_external_storage_root_request_dto: (required)
|
|
7275
|
+
:type validate_external_storage_root_request_dto: ValidateExternalStorageRootRequestDto
|
|
7276
|
+
:param async_req: Whether to execute the request asynchronously.
|
|
7277
|
+
:type async_req: bool, optional
|
|
7278
|
+
:param _preload_content: if False, the ApiResponse.data will
|
|
7279
|
+
be set to none and raw_data will store the
|
|
7280
|
+
HTTP response body without reading/decoding.
|
|
7281
|
+
Default is True.
|
|
7282
|
+
:type _preload_content: bool, optional
|
|
7283
|
+
:param _return_http_data_only: response data instead of ApiResponse
|
|
7284
|
+
object with status code, headers, etc
|
|
7285
|
+
:type _return_http_data_only: bool, optional
|
|
7286
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
7287
|
+
number provided, it will be total request
|
|
7288
|
+
timeout. It can also be a pair (tuple) of
|
|
7289
|
+
(connection, read) timeouts.
|
|
7290
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
7291
|
+
request; this effectively ignores the authentication
|
|
7292
|
+
in the spec for a single request.
|
|
7293
|
+
:type _request_auth: dict, optional
|
|
7294
|
+
:type _content_type: string, optional: force content-type for the request
|
|
7295
|
+
:return: Returns the result object.
|
|
7296
|
+
If the method is called asynchronously,
|
|
7297
|
+
returns the request thread.
|
|
7298
|
+
:rtype: tuple(ValidateExternalStorageRootResponseDto, status_code(int), headers(HTTPHeaderDict))
|
|
7299
|
+
"""
|
|
7300
|
+
|
|
7301
|
+
_params = locals()
|
|
7302
|
+
|
|
7303
|
+
_all_params = ["validate_external_storage_root_request_dto"]
|
|
7304
|
+
_all_params.extend(
|
|
7305
|
+
[
|
|
7306
|
+
"async_req",
|
|
7307
|
+
"_return_http_data_only",
|
|
7308
|
+
"_preload_content",
|
|
7309
|
+
"_request_timeout",
|
|
7310
|
+
"_request_auth",
|
|
7311
|
+
"_content_type",
|
|
7312
|
+
"_headers",
|
|
7313
|
+
]
|
|
7314
|
+
)
|
|
7315
|
+
|
|
7316
|
+
# validate the arguments
|
|
7317
|
+
for _key, _val in _params["kwargs"].items():
|
|
7318
|
+
if _key not in _all_params:
|
|
7319
|
+
raise ApiTypeError(
|
|
7320
|
+
"Got an unexpected keyword argument '%s'"
|
|
7321
|
+
" to method validate_external_storage_root_path_post" % _key
|
|
7322
|
+
)
|
|
7323
|
+
_params[_key] = _val
|
|
7324
|
+
del _params["kwargs"]
|
|
7325
|
+
|
|
7326
|
+
_collection_formats = {}
|
|
7327
|
+
|
|
7328
|
+
# process the path parameters
|
|
7329
|
+
_path_params = {}
|
|
7330
|
+
|
|
7331
|
+
# process the query parameters
|
|
7332
|
+
_query_params = []
|
|
7333
|
+
# process the header parameters
|
|
7334
|
+
_header_params = dict(_params.get("_headers", {}))
|
|
7335
|
+
# process the form parameters
|
|
7336
|
+
_form_params = []
|
|
7337
|
+
_files = {}
|
|
7338
|
+
# process the body parameter
|
|
7339
|
+
_body_params = None
|
|
7340
|
+
if _params["validate_external_storage_root_request_dto"] is not None:
|
|
7341
|
+
_body_params = _params["validate_external_storage_root_request_dto"]
|
|
7342
|
+
|
|
7343
|
+
# set the HTTP header `Accept`
|
|
7344
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
7345
|
+
["application/json"]
|
|
7346
|
+
) # noqa: E501
|
|
7347
|
+
|
|
7348
|
+
# set the HTTP header `Content-Type`
|
|
7349
|
+
_content_types_list = _params.get(
|
|
7350
|
+
"_content_type",
|
|
7351
|
+
self.api_client.select_header_content_type(["application/json"]),
|
|
7352
|
+
)
|
|
7353
|
+
if _content_types_list:
|
|
7354
|
+
_header_params["Content-Type"] = _content_types_list
|
|
7355
|
+
|
|
7356
|
+
# authentication setting
|
|
7357
|
+
_auth_settings = ["HTTPBearer", "APIKeyCookie"] # noqa: E501
|
|
7358
|
+
|
|
7359
|
+
_response_types_map = {
|
|
7360
|
+
"200": "ValidateExternalStorageRootResponseDto",
|
|
7361
|
+
"422": "HTTPValidationError",
|
|
7362
|
+
}
|
|
7363
|
+
|
|
7364
|
+
return self.api_client.call_api(
|
|
7365
|
+
"/api/2.0/mlflow/mlfoundry-artifacts/artifact-versions/validate-storage-root",
|
|
7366
|
+
"POST",
|
|
7367
|
+
_path_params,
|
|
7368
|
+
_query_params,
|
|
7369
|
+
_header_params,
|
|
7370
|
+
body=_body_params,
|
|
7371
|
+
post_params=_form_params,
|
|
7372
|
+
files=_files,
|
|
7373
|
+
response_types_map=_response_types_map,
|
|
7374
|
+
auth_settings=_auth_settings,
|
|
7375
|
+
async_req=_params.get("async_req"),
|
|
7376
|
+
_return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501
|
|
7377
|
+
_preload_content=_params.get("_preload_content", True),
|
|
7378
|
+
_request_timeout=_params.get("_request_timeout"),
|
|
7379
|
+
collection_formats=_collection_formats,
|
|
7380
|
+
_request_auth=_params.get("_request_auth"),
|
|
7381
|
+
)
|
|
@@ -143,6 +143,9 @@ from truefoundry.ml.autogen.client.models.experiment_response_dto import (
|
|
|
143
143
|
ExperimentResponseDto,
|
|
144
144
|
)
|
|
145
145
|
from truefoundry.ml.autogen.client.models.experiment_tag_dto import ExperimentTagDto
|
|
146
|
+
from truefoundry.ml.autogen.client.models.export_deployment_files_request_dto import (
|
|
147
|
+
ExportDeploymentFilesRequestDto,
|
|
148
|
+
)
|
|
146
149
|
from truefoundry.ml.autogen.client.models.external_artifact_source import (
|
|
147
150
|
ExternalArtifactSource,
|
|
148
151
|
)
|
|
@@ -195,6 +198,7 @@ from truefoundry.ml.autogen.client.models.http_validation_error import (
|
|
|
195
198
|
)
|
|
196
199
|
from truefoundry.ml.autogen.client.models.image_content_part import ImageContentPart
|
|
197
200
|
from truefoundry.ml.autogen.client.models.image_url import ImageUrl
|
|
201
|
+
from truefoundry.ml.autogen.client.models.infer_method_name import InferMethodName
|
|
198
202
|
from truefoundry.ml.autogen.client.models.internal_metadata import InternalMetadata
|
|
199
203
|
from truefoundry.ml.autogen.client.models.keras_framework import KerasFramework
|
|
200
204
|
from truefoundry.ml.autogen.client.models.latest_run_log_dto import LatestRunLogDto
|
|
@@ -282,6 +286,7 @@ from truefoundry.ml.autogen.client.models.mime_type import MimeType
|
|
|
282
286
|
from truefoundry.ml.autogen.client.models.model_configuration import ModelConfiguration
|
|
283
287
|
from truefoundry.ml.autogen.client.models.model_dto import ModelDto
|
|
284
288
|
from truefoundry.ml.autogen.client.models.model_response_dto import ModelResponseDto
|
|
289
|
+
from truefoundry.ml.autogen.client.models.model_server import ModelServer
|
|
285
290
|
from truefoundry.ml.autogen.client.models.model_version_dto import ModelVersionDto
|
|
286
291
|
from truefoundry.ml.autogen.client.models.model_version_environment import (
|
|
287
292
|
ModelVersionEnvironment,
|
|
@@ -329,15 +334,16 @@ from truefoundry.ml.autogen.client.models.search_runs_request_dto import (
|
|
|
329
334
|
from truefoundry.ml.autogen.client.models.search_runs_response_dto import (
|
|
330
335
|
SearchRunsResponseDto,
|
|
331
336
|
)
|
|
332
|
-
from truefoundry.ml.autogen.client.models.serialization_format import (
|
|
333
|
-
SerializationFormat,
|
|
334
|
-
)
|
|
335
337
|
from truefoundry.ml.autogen.client.models.set_experiment_tag_request_dto import (
|
|
336
338
|
SetExperimentTagRequestDto,
|
|
337
339
|
)
|
|
338
340
|
from truefoundry.ml.autogen.client.models.set_tag_request_dto import SetTagRequestDto
|
|
339
341
|
from truefoundry.ml.autogen.client.models.signed_url_dto import SignedURLDto
|
|
340
342
|
from truefoundry.ml.autogen.client.models.sklearn_framework import SklearnFramework
|
|
343
|
+
from truefoundry.ml.autogen.client.models.sklearn_model_schema import SklearnModelSchema
|
|
344
|
+
from truefoundry.ml.autogen.client.models.sklearn_serialization_format import (
|
|
345
|
+
SklearnSerializationFormat,
|
|
346
|
+
)
|
|
341
347
|
from truefoundry.ml.autogen.client.models.source import Source
|
|
342
348
|
from truefoundry.ml.autogen.client.models.source1 import Source1
|
|
343
349
|
from truefoundry.ml.autogen.client.models.spa_cy_framework import SpaCyFramework
|
|
@@ -388,8 +394,20 @@ from truefoundry.ml.autogen.client.models.update_run_response_dto import (
|
|
|
388
394
|
)
|
|
389
395
|
from truefoundry.ml.autogen.client.models.url import Url
|
|
390
396
|
from truefoundry.ml.autogen.client.models.user_message import UserMessage
|
|
397
|
+
from truefoundry.ml.autogen.client.models.validate_external_storage_root_request_dto import (
|
|
398
|
+
ValidateExternalStorageRootRequestDto,
|
|
399
|
+
)
|
|
400
|
+
from truefoundry.ml.autogen.client.models.validate_external_storage_root_response_dto import (
|
|
401
|
+
ValidateExternalStorageRootResponseDto,
|
|
402
|
+
)
|
|
391
403
|
from truefoundry.ml.autogen.client.models.validation_error import ValidationError
|
|
392
404
|
from truefoundry.ml.autogen.client.models.validation_error_loc_inner import (
|
|
393
405
|
ValidationErrorLocInner,
|
|
394
406
|
)
|
|
395
407
|
from truefoundry.ml.autogen.client.models.xg_boost_framework import XGBoostFramework
|
|
408
|
+
from truefoundry.ml.autogen.client.models.xg_boost_model_schema import (
|
|
409
|
+
XGBoostModelSchema,
|
|
410
|
+
)
|
|
411
|
+
from truefoundry.ml.autogen.client.models.xg_boost_serialization_format import (
|
|
412
|
+
XGBoostSerializationFormat,
|
|
413
|
+
)
|
|
@@ -36,11 +36,11 @@ class ArtifactVersionManifest(BaseModel):
|
|
|
36
36
|
|
|
37
37
|
description: Optional[constr(strict=True, max_length=512)] = Field(
|
|
38
38
|
default=None,
|
|
39
|
-
description="+label=Description +docs=Description of the artifact version",
|
|
39
|
+
description="+label=Description +usage=Description of the artifact or model version +docs=Description of the artifact or model version",
|
|
40
40
|
)
|
|
41
41
|
metadata: Dict[str, Any] = Field(
|
|
42
42
|
default=...,
|
|
43
|
-
description="+label=Metadata +docs=Metadata for the model version +usage=Metadata for the model version +uiType=JsonInput",
|
|
43
|
+
description="+label=Metadata +docs=Metadata for the artifact or model version +usage=Metadata for the artifact or model version +uiType=JsonInput",
|
|
44
44
|
)
|
|
45
45
|
type: Optional[StrictStr] = "artifact-version"
|
|
46
46
|
source: Source = Field(...)
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
FastAPI
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
import json
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
from typing import Optional
|
|
20
|
+
|
|
21
|
+
from truefoundry.ml.autogen.client.models.model_server import ModelServer
|
|
22
|
+
from truefoundry.pydantic_v1 import BaseModel, Field, StrictStr
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class ExportDeploymentFilesRequestDto(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
ExportDeploymentFilesRequestDto
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
model_version_fqn: StrictStr = Field(...)
|
|
31
|
+
workspace_fqn: StrictStr = Field(...)
|
|
32
|
+
service_name: StrictStr = Field(...)
|
|
33
|
+
model_server: Optional[ModelServer] = None
|
|
34
|
+
__properties = [
|
|
35
|
+
"model_version_fqn",
|
|
36
|
+
"workspace_fqn",
|
|
37
|
+
"service_name",
|
|
38
|
+
"model_server",
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
class Config:
|
|
42
|
+
"""Pydantic configuration"""
|
|
43
|
+
|
|
44
|
+
allow_population_by_field_name = True
|
|
45
|
+
validate_assignment = True
|
|
46
|
+
|
|
47
|
+
def to_str(self) -> str:
|
|
48
|
+
"""Returns the string representation of the model using alias"""
|
|
49
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
50
|
+
|
|
51
|
+
def to_json(self) -> str:
|
|
52
|
+
"""Returns the JSON representation of the model using alias"""
|
|
53
|
+
return json.dumps(self.to_dict())
|
|
54
|
+
|
|
55
|
+
@classmethod
|
|
56
|
+
def from_json(cls, json_str: str) -> ExportDeploymentFilesRequestDto:
|
|
57
|
+
"""Create an instance of ExportDeploymentFilesRequestDto from a JSON string"""
|
|
58
|
+
return cls.from_dict(json.loads(json_str))
|
|
59
|
+
|
|
60
|
+
def to_dict(self):
|
|
61
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
62
|
+
_dict = self.dict(by_alias=True, exclude={}, exclude_none=True)
|
|
63
|
+
return _dict
|
|
64
|
+
|
|
65
|
+
@classmethod
|
|
66
|
+
def from_dict(cls, obj: dict) -> ExportDeploymentFilesRequestDto:
|
|
67
|
+
"""Create an instance of ExportDeploymentFilesRequestDto from a dict"""
|
|
68
|
+
if obj is None:
|
|
69
|
+
return None
|
|
70
|
+
|
|
71
|
+
if not isinstance(obj, dict):
|
|
72
|
+
return ExportDeploymentFilesRequestDto.parse_obj(obj)
|
|
73
|
+
|
|
74
|
+
_obj = ExportDeploymentFilesRequestDto.parse_obj(
|
|
75
|
+
{
|
|
76
|
+
"model_version_fqn": obj.get("model_version_fqn"),
|
|
77
|
+
"workspace_fqn": obj.get("workspace_fqn"),
|
|
78
|
+
"service_name": obj.get("service_name"),
|
|
79
|
+
"model_server": obj.get("model_server"),
|
|
80
|
+
}
|
|
81
|
+
)
|
|
82
|
+
return _obj
|
|
@@ -0,0 +1,34 @@
|
|
|
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 json
|
|
15
|
+
import re # noqa: F401
|
|
16
|
+
|
|
17
|
+
from aenum import Enum
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class InferMethodName(str, Enum):
|
|
21
|
+
"""
|
|
22
|
+
+label=Inference Method Name +usage=Name of the method used for inference
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
"""
|
|
26
|
+
allowed enum values
|
|
27
|
+
"""
|
|
28
|
+
PREDICT = "predict"
|
|
29
|
+
PREDICT_PROBA = "predict_proba"
|
|
30
|
+
|
|
31
|
+
@classmethod
|
|
32
|
+
def from_json(cls, json_str: str) -> InferMethodName:
|
|
33
|
+
"""Create an instance of InferMethodName from a JSON string"""
|
|
34
|
+
return InferMethodName(json.loads(json_str))
|
|
@@ -0,0 +1,34 @@
|
|
|
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 json
|
|
15
|
+
import re # noqa: F401
|
|
16
|
+
|
|
17
|
+
from aenum import Enum
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class ModelServer(str, Enum):
|
|
21
|
+
"""
|
|
22
|
+
An enumeration.
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
"""
|
|
26
|
+
allowed enum values
|
|
27
|
+
"""
|
|
28
|
+
TRITON = "triton"
|
|
29
|
+
FASTAPI = "fastapi"
|
|
30
|
+
|
|
31
|
+
@classmethod
|
|
32
|
+
def from_json(cls, json_str: str) -> ModelServer:
|
|
33
|
+
"""Create an instance of ModelServer from a JSON string"""
|
|
34
|
+
return ModelServer(json.loads(json_str))
|