truefoundry 0.4.1__py3-none-any.whl → 0.4.2__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 +14 -5
- truefoundry/common/constants.py +2 -1
- truefoundry/common/credential_file_manager.py +4 -3
- truefoundry/common/credential_provider.py +4 -5
- truefoundry/common/servicefoundry_client.py +14 -7
- truefoundry/common/utils.py +59 -10
- truefoundry/deploy/auto_gen/models.py +11 -5
- truefoundry/deploy/builder/__init__.py +2 -2
- truefoundry/deploy/builder/builders/tfy_notebook_buildpack/__init__.py +7 -1
- truefoundry/deploy/builder/builders/tfy_notebook_buildpack/dockerfile_template.py +25 -12
- truefoundry/deploy/builder/builders/tfy_python_buildpack/__init__.py +8 -2
- truefoundry/deploy/builder/builders/tfy_python_buildpack/dockerfile_template.py +26 -3
- truefoundry/deploy/builder/constants.py +7 -0
- truefoundry/deploy/builder/utils.py +32 -0
- truefoundry/deploy/cli/commands/deploy_command.py +46 -2
- truefoundry/deploy/cli/util.py +4 -1
- truefoundry/deploy/lib/auth/servicefoundry_session.py +4 -2
- truefoundry/deploy/lib/clients/servicefoundry_client.py +3 -1
- truefoundry/deploy/lib/session.py +6 -6
- truefoundry/deploy/v2/lib/patched_models.py +4 -0
- truefoundry/ml/autogen/client/__init__.py +3 -0
- truefoundry/ml/autogen/client/api/mlfoundry_artifacts_api.py +163 -0
- truefoundry/ml/autogen/client/models/__init__.py +3 -0
- truefoundry/ml/autogen/client/models/delete_files_for_dataset_request_dto.py +68 -0
- truefoundry/ml/autogen/client_README.md +2 -0
- truefoundry/ml/autogen/entities/artifacts.py +286 -0
- truefoundry/ml/clients/servicefoundry_client.py +2 -4
- truefoundry/ml/log_types/artifacts/artifact.py +59 -1
- truefoundry/ml/mlfoundry_api.py +48 -3
- truefoundry/ml/mlfoundry_run.py +33 -16
- truefoundry/ml/run_utils.py +0 -14
- truefoundry/ml/session.py +9 -8
- truefoundry/workflow/example/hello_world_package/workflow.py +2 -2
- truefoundry/workflow/example/package/test_workflow.py +14 -15
- {truefoundry-0.4.1.dist-info → truefoundry-0.4.2.dist-info}/METADATA +1 -2
- {truefoundry-0.4.1.dist-info → truefoundry-0.4.2.dist-info}/RECORD +38 -34
- {truefoundry-0.4.1.dist-info → truefoundry-0.4.2.dist-info}/WHEEL +0 -0
- {truefoundry-0.4.1.dist-info → truefoundry-0.4.2.dist-info}/entry_points.txt +0 -0
|
@@ -9,7 +9,7 @@ from click.exceptions import ClickException
|
|
|
9
9
|
|
|
10
10
|
from truefoundry.autodeploy.cli import cli as autodeploy_cli
|
|
11
11
|
from truefoundry.autodeploy.exception import InvalidRequirementsException
|
|
12
|
-
from truefoundry.deploy.cli.const import GROUP_CLS
|
|
12
|
+
from truefoundry.deploy.cli.const import COMMAND_CLS, GROUP_CLS
|
|
13
13
|
from truefoundry.deploy.cli.util import handle_exception_wrapper
|
|
14
14
|
|
|
15
15
|
|
|
@@ -54,8 +54,13 @@ def _get_default_spec_file():
|
|
|
54
54
|
default=True,
|
|
55
55
|
help="Wait and tail the deployment progress",
|
|
56
56
|
)
|
|
57
|
+
@click.pass_context
|
|
57
58
|
@handle_exception_wrapper
|
|
58
|
-
def deploy_command(
|
|
59
|
+
def deploy_command(
|
|
60
|
+
ctx: click.Context, file: str, workspace_fqn: Optional[str], wait: bool
|
|
61
|
+
):
|
|
62
|
+
if ctx.invoked_subcommand is not None:
|
|
63
|
+
return
|
|
59
64
|
from truefoundry.deploy.lib.auth.servicefoundry_session import ServiceFoundrySession
|
|
60
65
|
from truefoundry.deploy.v2.lib.deployable_patched_models import Application
|
|
61
66
|
|
|
@@ -98,5 +103,44 @@ def deploy_command(file: str, workspace_fqn: Optional[str], wait: bool):
|
|
|
98
103
|
raise UsageError(message=str(e)) from e
|
|
99
104
|
|
|
100
105
|
|
|
106
|
+
@deploy_command.command(name="workflow", cls=COMMAND_CLS, help="Deploy a Workflow")
|
|
107
|
+
@click.option(
|
|
108
|
+
"-n",
|
|
109
|
+
"--name",
|
|
110
|
+
required=True,
|
|
111
|
+
help="Name of the Workflow",
|
|
112
|
+
)
|
|
113
|
+
@click.option(
|
|
114
|
+
"-f",
|
|
115
|
+
"--file",
|
|
116
|
+
type=click.Path(exists=True, dir_okay=False, resolve_path=True),
|
|
117
|
+
required=True,
|
|
118
|
+
help="Path to the Workflow file. e.g. workflow.py",
|
|
119
|
+
)
|
|
120
|
+
@click.option(
|
|
121
|
+
"-w",
|
|
122
|
+
"--workspace-fqn",
|
|
123
|
+
"--workspace_fqn",
|
|
124
|
+
required=True,
|
|
125
|
+
help="FQN of the Workspace to deploy to.",
|
|
126
|
+
)
|
|
127
|
+
@handle_exception_wrapper
|
|
128
|
+
def deploy_workflow_command(name: str, workflow_file: str, workspace_fqn: str):
|
|
129
|
+
from truefoundry.deploy.lib.auth.servicefoundry_session import ServiceFoundrySession
|
|
130
|
+
|
|
131
|
+
try:
|
|
132
|
+
_ = ServiceFoundrySession()
|
|
133
|
+
except Exception as e:
|
|
134
|
+
raise ClickException(message=str(e)) from e
|
|
135
|
+
|
|
136
|
+
from truefoundry.deploy.v2.lib.deployable_patched_models import Workflow
|
|
137
|
+
|
|
138
|
+
workflow = Workflow(
|
|
139
|
+
name=name,
|
|
140
|
+
workflow_file_path=workflow_file,
|
|
141
|
+
)
|
|
142
|
+
workflow.deploy(workspace_fqn=workspace_fqn)
|
|
143
|
+
|
|
144
|
+
|
|
101
145
|
def get_deploy_command():
|
|
102
146
|
return deploy_command
|
truefoundry/deploy/cli/util.py
CHANGED
|
@@ -35,9 +35,12 @@ def handle_exception(exception):
|
|
|
35
35
|
border_style="red",
|
|
36
36
|
)
|
|
37
37
|
elif isinstance(exception, ConnectionError):
|
|
38
|
+
loc = ""
|
|
39
|
+
if exception.request:
|
|
40
|
+
loc = f" at {exception.request.url}"
|
|
38
41
|
print_dict_as_table_panel(
|
|
39
42
|
{
|
|
40
|
-
"Error": "Couldn't connect to TrueFoundry. Please make sure that the provided `--host` is correct."
|
|
43
|
+
"Error": f"Couldn't connect to TrueFoundry{loc}. Please make sure that the provided `--host` is correct."
|
|
41
44
|
},
|
|
42
45
|
title="Command Failed",
|
|
43
46
|
border_style="red",
|
|
@@ -8,6 +8,7 @@ from truefoundry.common.credential_provider import (
|
|
|
8
8
|
FileCredentialProvider,
|
|
9
9
|
)
|
|
10
10
|
from truefoundry.common.entities import UserInfo
|
|
11
|
+
from truefoundry.common.utils import relogin_error_message
|
|
11
12
|
from truefoundry.logger import logger
|
|
12
13
|
|
|
13
14
|
ACTIVE_SESSION: Optional[ServiceFoundrySession] = None
|
|
@@ -41,8 +42,9 @@ class ServiceFoundrySession:
|
|
|
41
42
|
break
|
|
42
43
|
if final_cred_provider is None:
|
|
43
44
|
raise Exception(
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
relogin_error_message(
|
|
46
|
+
"No active session found. Perhaps you are not logged in?",
|
|
47
|
+
)
|
|
46
48
|
)
|
|
47
49
|
return final_cred_provider
|
|
48
50
|
|
|
@@ -76,6 +76,7 @@ def _upload_packaged_code(metadata, package_file):
|
|
|
76
76
|
|
|
77
77
|
|
|
78
78
|
class ServiceFoundryServiceClient(BaseServiceFoundryServiceClient):
|
|
79
|
+
# TODO (chiragjn): Rename base_url to tfy_host
|
|
79
80
|
def __init__(self, init_session: bool = True, base_url: Optional[str] = None):
|
|
80
81
|
self._session: Optional[ServiceFoundrySession] = None
|
|
81
82
|
if init_session:
|
|
@@ -595,8 +596,9 @@ class ServiceFoundryServiceClient(BaseServiceFoundryServiceClient):
|
|
|
595
596
|
|
|
596
597
|
def trigger_workflow(self, application_id: str, inputs: Dict[str, Any]):
|
|
597
598
|
url = f"{self._api_server_url}/{VERSION_PREFIX}/workflow/{application_id}/executions"
|
|
599
|
+
body = {"inputs": inputs}
|
|
598
600
|
response = session_with_retries().post(
|
|
599
|
-
url, json=
|
|
601
|
+
url, json=body, headers=self._get_header()
|
|
600
602
|
)
|
|
601
603
|
response = request_handling(response)
|
|
602
604
|
return response
|
|
@@ -8,7 +8,7 @@ from truefoundry.common.constants import TFY_API_KEY_ENV_KEY, TFY_HOST_ENV_KEY
|
|
|
8
8
|
from truefoundry.common.credential_file_manager import CredentialsFileManager
|
|
9
9
|
from truefoundry.common.credential_provider import EnvCredentialProvider
|
|
10
10
|
from truefoundry.common.entities import CredentialsFileContent, Token
|
|
11
|
-
from truefoundry.common.utils import
|
|
11
|
+
from truefoundry.common.utils import relogin_error_message, resolve_tfy_host
|
|
12
12
|
from truefoundry.deploy.io.output_callback import OutputCallBack
|
|
13
13
|
from truefoundry.deploy.lib.const import (
|
|
14
14
|
RICH_OUTPUT_CALLBACK,
|
|
@@ -43,7 +43,7 @@ def login(
|
|
|
43
43
|
"Login will just save the credentials on disk."
|
|
44
44
|
)
|
|
45
45
|
|
|
46
|
-
host =
|
|
46
|
+
host = resolve_tfy_host(host)
|
|
47
47
|
|
|
48
48
|
with CredentialsFileManager() as cred_file:
|
|
49
49
|
if not relogin and cred_file.exists():
|
|
@@ -58,10 +58,10 @@ def login(
|
|
|
58
58
|
user_info = cred_file_content.to_token().to_user_info()
|
|
59
59
|
user_name_display_info = user_info.email or user_info.user_type.value
|
|
60
60
|
output_hook.print_line(
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
relogin_error_message(
|
|
62
|
+
f"Already logged in to {cred_file_content.host!r} as {user_info.user_id!r} ({user_name_display_info})",
|
|
63
|
+
host=host,
|
|
64
|
+
)
|
|
65
65
|
)
|
|
66
66
|
return False
|
|
67
67
|
|
|
@@ -84,6 +84,10 @@ class CUDAVersion(str, enum.Enum):
|
|
|
84
84
|
CUDA_12_0_CUDNN8 = "12.0-cudnn8"
|
|
85
85
|
CUDA_12_1_CUDNN8 = "12.1-cudnn8"
|
|
86
86
|
CUDA_12_2_CUDNN8 = "12.2-cudnn8"
|
|
87
|
+
CUDA_12_3_CUDNN9 = "12.3-cudnn9"
|
|
88
|
+
CUDA_12_4_CUDNN9 = "12.4-cudnn9"
|
|
89
|
+
CUDA_12_5_CUDNN9 = "12.5-cudnn9"
|
|
90
|
+
CUDA_12_6_CUDNN9 = "12.6-cudnn9"
|
|
87
91
|
|
|
88
92
|
|
|
89
93
|
class GPUType(str, enum.Enum):
|
|
@@ -144,6 +144,9 @@ from truefoundry.ml.autogen.client.models.delete_artifact_versions_request_dto i
|
|
|
144
144
|
from truefoundry.ml.autogen.client.models.delete_dataset_request_dto import (
|
|
145
145
|
DeleteDatasetRequestDto,
|
|
146
146
|
)
|
|
147
|
+
from truefoundry.ml.autogen.client.models.delete_files_for_dataset_request_dto import (
|
|
148
|
+
DeleteFilesForDatasetRequestDto,
|
|
149
|
+
)
|
|
147
150
|
from truefoundry.ml.autogen.client.models.delete_model_version_request_dto import (
|
|
148
151
|
DeleteModelVersionRequestDto,
|
|
149
152
|
)
|
|
@@ -73,6 +73,9 @@ from truefoundry.ml.autogen.client.models.delete_artifact_versions_request_dto i
|
|
|
73
73
|
from truefoundry.ml.autogen.client.models.delete_dataset_request_dto import (
|
|
74
74
|
DeleteDatasetRequestDto,
|
|
75
75
|
)
|
|
76
|
+
from truefoundry.ml.autogen.client.models.delete_files_for_dataset_request_dto import (
|
|
77
|
+
DeleteFilesForDatasetRequestDto,
|
|
78
|
+
)
|
|
76
79
|
from truefoundry.ml.autogen.client.models.delete_model_version_request_dto import (
|
|
77
80
|
DeleteModelVersionRequestDto,
|
|
78
81
|
)
|
|
@@ -2280,6 +2283,166 @@ class MlfoundryArtifactsApi:
|
|
|
2280
2283
|
_request_auth=_params.get("_request_auth"),
|
|
2281
2284
|
)
|
|
2282
2285
|
|
|
2286
|
+
@validate_arguments
|
|
2287
|
+
def delete_files_for_dataset_delete(
|
|
2288
|
+
self,
|
|
2289
|
+
delete_files_for_dataset_request_dto: DeleteFilesForDatasetRequestDto,
|
|
2290
|
+
**kwargs,
|
|
2291
|
+
) -> object: # noqa: E501
|
|
2292
|
+
"""Delete Files For Dataset # noqa: E501
|
|
2293
|
+
|
|
2294
|
+
Delete files from the dataset. # noqa: E501
|
|
2295
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
2296
|
+
asynchronous HTTP request, please pass async_req=True
|
|
2297
|
+
|
|
2298
|
+
>>> thread = api.delete_files_for_dataset_delete(delete_files_for_dataset_request_dto, async_req=True)
|
|
2299
|
+
>>> result = thread.get()
|
|
2300
|
+
|
|
2301
|
+
:param delete_files_for_dataset_request_dto: (required)
|
|
2302
|
+
:type delete_files_for_dataset_request_dto: DeleteFilesForDatasetRequestDto
|
|
2303
|
+
:param async_req: Whether to execute the request asynchronously.
|
|
2304
|
+
:type async_req: bool, optional
|
|
2305
|
+
:param _request_timeout: timeout setting for this request.
|
|
2306
|
+
If one number provided, it will be total request
|
|
2307
|
+
timeout. It can also be a pair (tuple) of
|
|
2308
|
+
(connection, read) timeouts.
|
|
2309
|
+
:return: Returns the result object.
|
|
2310
|
+
If the method is called asynchronously,
|
|
2311
|
+
returns the request thread.
|
|
2312
|
+
:rtype: object
|
|
2313
|
+
"""
|
|
2314
|
+
kwargs["_return_http_data_only"] = True
|
|
2315
|
+
if "_preload_content" in kwargs:
|
|
2316
|
+
message = "Error! Please call the delete_files_for_dataset_delete_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
|
2317
|
+
raise ValueError(message)
|
|
2318
|
+
return self.delete_files_for_dataset_delete_with_http_info(
|
|
2319
|
+
delete_files_for_dataset_request_dto, **kwargs
|
|
2320
|
+
) # noqa: E501
|
|
2321
|
+
|
|
2322
|
+
@validate_arguments
|
|
2323
|
+
def delete_files_for_dataset_delete_with_http_info(
|
|
2324
|
+
self,
|
|
2325
|
+
delete_files_for_dataset_request_dto: DeleteFilesForDatasetRequestDto,
|
|
2326
|
+
**kwargs,
|
|
2327
|
+
) -> ApiResponse: # noqa: E501
|
|
2328
|
+
"""Delete Files For Dataset # noqa: E501
|
|
2329
|
+
|
|
2330
|
+
Delete files from the dataset. # noqa: E501
|
|
2331
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
2332
|
+
asynchronous HTTP request, please pass async_req=True
|
|
2333
|
+
|
|
2334
|
+
>>> thread = api.delete_files_for_dataset_delete_with_http_info(delete_files_for_dataset_request_dto, async_req=True)
|
|
2335
|
+
>>> result = thread.get()
|
|
2336
|
+
|
|
2337
|
+
:param delete_files_for_dataset_request_dto: (required)
|
|
2338
|
+
:type delete_files_for_dataset_request_dto: DeleteFilesForDatasetRequestDto
|
|
2339
|
+
:param async_req: Whether to execute the request asynchronously.
|
|
2340
|
+
:type async_req: bool, optional
|
|
2341
|
+
:param _preload_content: if False, the ApiResponse.data will
|
|
2342
|
+
be set to none and raw_data will store the
|
|
2343
|
+
HTTP response body without reading/decoding.
|
|
2344
|
+
Default is True.
|
|
2345
|
+
:type _preload_content: bool, optional
|
|
2346
|
+
:param _return_http_data_only: response data instead of ApiResponse
|
|
2347
|
+
object with status code, headers, etc
|
|
2348
|
+
:type _return_http_data_only: bool, optional
|
|
2349
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2350
|
+
number provided, it will be total request
|
|
2351
|
+
timeout. It can also be a pair (tuple) of
|
|
2352
|
+
(connection, read) timeouts.
|
|
2353
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2354
|
+
request; this effectively ignores the authentication
|
|
2355
|
+
in the spec for a single request.
|
|
2356
|
+
:type _request_auth: dict, optional
|
|
2357
|
+
:type _content_type: string, optional: force content-type for the request
|
|
2358
|
+
:return: Returns the result object.
|
|
2359
|
+
If the method is called asynchronously,
|
|
2360
|
+
returns the request thread.
|
|
2361
|
+
:rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
|
|
2362
|
+
"""
|
|
2363
|
+
|
|
2364
|
+
_params = locals()
|
|
2365
|
+
|
|
2366
|
+
_all_params = ["delete_files_for_dataset_request_dto"]
|
|
2367
|
+
_all_params.extend(
|
|
2368
|
+
[
|
|
2369
|
+
"async_req",
|
|
2370
|
+
"_return_http_data_only",
|
|
2371
|
+
"_preload_content",
|
|
2372
|
+
"_request_timeout",
|
|
2373
|
+
"_request_auth",
|
|
2374
|
+
"_content_type",
|
|
2375
|
+
"_headers",
|
|
2376
|
+
]
|
|
2377
|
+
)
|
|
2378
|
+
|
|
2379
|
+
# validate the arguments
|
|
2380
|
+
for _key, _val in _params["kwargs"].items():
|
|
2381
|
+
if _key not in _all_params:
|
|
2382
|
+
raise ApiTypeError(
|
|
2383
|
+
"Got an unexpected keyword argument '%s'"
|
|
2384
|
+
" to method delete_files_for_dataset_delete" % _key
|
|
2385
|
+
)
|
|
2386
|
+
_params[_key] = _val
|
|
2387
|
+
del _params["kwargs"]
|
|
2388
|
+
|
|
2389
|
+
_collection_formats = {}
|
|
2390
|
+
|
|
2391
|
+
# process the path parameters
|
|
2392
|
+
_path_params = {}
|
|
2393
|
+
|
|
2394
|
+
# process the query parameters
|
|
2395
|
+
_query_params = []
|
|
2396
|
+
# process the header parameters
|
|
2397
|
+
_header_params = dict(_params.get("_headers", {}))
|
|
2398
|
+
# process the form parameters
|
|
2399
|
+
_form_params = []
|
|
2400
|
+
_files = {}
|
|
2401
|
+
# process the body parameter
|
|
2402
|
+
_body_params = None
|
|
2403
|
+
if _params["delete_files_for_dataset_request_dto"] is not None:
|
|
2404
|
+
_body_params = _params["delete_files_for_dataset_request_dto"]
|
|
2405
|
+
|
|
2406
|
+
# set the HTTP header `Accept`
|
|
2407
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
2408
|
+
["application/json"]
|
|
2409
|
+
) # noqa: E501
|
|
2410
|
+
|
|
2411
|
+
# set the HTTP header `Content-Type`
|
|
2412
|
+
_content_types_list = _params.get(
|
|
2413
|
+
"_content_type",
|
|
2414
|
+
self.api_client.select_header_content_type(["application/json"]),
|
|
2415
|
+
)
|
|
2416
|
+
if _content_types_list:
|
|
2417
|
+
_header_params["Content-Type"] = _content_types_list
|
|
2418
|
+
|
|
2419
|
+
# authentication setting
|
|
2420
|
+
_auth_settings = ["HTTPBearer", "APIKeyCookie"] # noqa: E501
|
|
2421
|
+
|
|
2422
|
+
_response_types_map = {
|
|
2423
|
+
"200": "object",
|
|
2424
|
+
"422": "HTTPValidationError",
|
|
2425
|
+
}
|
|
2426
|
+
|
|
2427
|
+
return self.api_client.call_api(
|
|
2428
|
+
"/api/2.0/mlflow/mlfoundry-artifacts/datasets/files/",
|
|
2429
|
+
"DELETE",
|
|
2430
|
+
_path_params,
|
|
2431
|
+
_query_params,
|
|
2432
|
+
_header_params,
|
|
2433
|
+
body=_body_params,
|
|
2434
|
+
post_params=_form_params,
|
|
2435
|
+
files=_files,
|
|
2436
|
+
response_types_map=_response_types_map,
|
|
2437
|
+
auth_settings=_auth_settings,
|
|
2438
|
+
async_req=_params.get("async_req"),
|
|
2439
|
+
_return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501
|
|
2440
|
+
_preload_content=_params.get("_preload_content", True),
|
|
2441
|
+
_request_timeout=_params.get("_request_timeout"),
|
|
2442
|
+
collection_formats=_collection_formats,
|
|
2443
|
+
_request_auth=_params.get("_request_auth"),
|
|
2444
|
+
)
|
|
2445
|
+
|
|
2283
2446
|
@validate_arguments
|
|
2284
2447
|
def delete_model_version_post(
|
|
2285
2448
|
self, delete_model_version_request_dto: DeleteModelVersionRequestDto, **kwargs
|
|
@@ -115,6 +115,9 @@ from truefoundry.ml.autogen.client.models.delete_artifact_versions_request_dto i
|
|
|
115
115
|
from truefoundry.ml.autogen.client.models.delete_dataset_request_dto import (
|
|
116
116
|
DeleteDatasetRequestDto,
|
|
117
117
|
)
|
|
118
|
+
from truefoundry.ml.autogen.client.models.delete_files_for_dataset_request_dto import (
|
|
119
|
+
DeleteFilesForDatasetRequestDto,
|
|
120
|
+
)
|
|
118
121
|
from truefoundry.ml.autogen.client.models.delete_model_version_request_dto import (
|
|
119
122
|
DeleteModelVersionRequestDto,
|
|
120
123
|
)
|
|
@@ -0,0 +1,68 @@
|
|
|
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
|
+
|
|
20
|
+
from truefoundry.pydantic_v1 import BaseModel, Field, StrictStr, conlist
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class DeleteFilesForDatasetRequestDto(BaseModel):
|
|
24
|
+
"""
|
|
25
|
+
DeleteFilesForDatasetRequestDto
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
dataset_fqn: StrictStr = Field(...)
|
|
29
|
+
paths: conlist(StrictStr, max_items=100) = Field(...)
|
|
30
|
+
__properties = ["dataset_fqn", "paths"]
|
|
31
|
+
|
|
32
|
+
class Config:
|
|
33
|
+
"""Pydantic configuration"""
|
|
34
|
+
|
|
35
|
+
allow_population_by_field_name = True
|
|
36
|
+
validate_assignment = True
|
|
37
|
+
|
|
38
|
+
def to_str(self) -> str:
|
|
39
|
+
"""Returns the string representation of the model using alias"""
|
|
40
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
41
|
+
|
|
42
|
+
def to_json(self) -> str:
|
|
43
|
+
"""Returns the JSON representation of the model using alias"""
|
|
44
|
+
return json.dumps(self.to_dict())
|
|
45
|
+
|
|
46
|
+
@classmethod
|
|
47
|
+
def from_json(cls, json_str: str) -> DeleteFilesForDatasetRequestDto:
|
|
48
|
+
"""Create an instance of DeleteFilesForDatasetRequestDto from a JSON string"""
|
|
49
|
+
return cls.from_dict(json.loads(json_str))
|
|
50
|
+
|
|
51
|
+
def to_dict(self):
|
|
52
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
53
|
+
_dict = self.dict(by_alias=True, exclude={}, exclude_none=True)
|
|
54
|
+
return _dict
|
|
55
|
+
|
|
56
|
+
@classmethod
|
|
57
|
+
def from_dict(cls, obj: dict) -> DeleteFilesForDatasetRequestDto:
|
|
58
|
+
"""Create an instance of DeleteFilesForDatasetRequestDto from a dict"""
|
|
59
|
+
if obj is None:
|
|
60
|
+
return None
|
|
61
|
+
|
|
62
|
+
if not isinstance(obj, dict):
|
|
63
|
+
return DeleteFilesForDatasetRequestDto.parse_obj(obj)
|
|
64
|
+
|
|
65
|
+
_obj = DeleteFilesForDatasetRequestDto.parse_obj(
|
|
66
|
+
{"dataset_fqn": obj.get("dataset_fqn"), "paths": obj.get("paths")}
|
|
67
|
+
)
|
|
68
|
+
return _obj
|
|
@@ -98,6 +98,7 @@ Class | Method | HTTP request | Description
|
|
|
98
98
|
*MlfoundryArtifactsApi* | [**delete_artifact_post**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#delete_artifact_post) | **POST** /api/2.0/mlflow/mlfoundry-artifacts/artifact/delete | Delete Artifact
|
|
99
99
|
*MlfoundryArtifactsApi* | [**delete_artifact_version_post**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#delete_artifact_version_post) | **POST** /api/2.0/mlflow/mlfoundry-artifacts/artifact-versions/delete | Delete Artifact Version
|
|
100
100
|
*MlfoundryArtifactsApi* | [**delete_dataset_post**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#delete_dataset_post) | **POST** /api/2.0/mlflow/mlfoundry-artifacts/datasets/delete | Delete Dataset
|
|
101
|
+
*MlfoundryArtifactsApi* | [**delete_files_for_dataset_delete**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#delete_files_for_dataset_delete) | **DELETE** /api/2.0/mlflow/mlfoundry-artifacts/datasets/files/ | Delete Files For Dataset
|
|
101
102
|
*MlfoundryArtifactsApi* | [**delete_model_version_post**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#delete_model_version_post) | **POST** /api/2.0/mlflow/mlfoundry-artifacts/model-versions/delete | Delete Model Version
|
|
102
103
|
*MlfoundryArtifactsApi* | [**finalize_artifact_version_post**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#finalize_artifact_version_post) | **POST** /api/2.0/mlflow/mlfoundry-artifacts/artifact-versions/finalize | Finalize Artifact Version
|
|
103
104
|
*MlfoundryArtifactsApi* | [**get_artifact_by_fqn_get**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#get_artifact_by_fqn_get) | **GET** /api/2.0/mlflow/mlfoundry-artifacts/artifacts/get-by-fqn | Get Artifact By Fqn
|
|
@@ -197,6 +198,7 @@ Class | Method | HTTP request | Description
|
|
|
197
198
|
- [DatasetResponseDto](truefoundry/ml/autogen/client/docs/DatasetResponseDto.md)
|
|
198
199
|
- [DeleteArtifactVersionsRequestDto](truefoundry/ml/autogen/client/docs/DeleteArtifactVersionsRequestDto.md)
|
|
199
200
|
- [DeleteDatasetRequestDto](truefoundry/ml/autogen/client/docs/DeleteDatasetRequestDto.md)
|
|
201
|
+
- [DeleteFilesForDatasetRequestDto](truefoundry/ml/autogen/client/docs/DeleteFilesForDatasetRequestDto.md)
|
|
200
202
|
- [DeleteModelVersionRequestDto](truefoundry/ml/autogen/client/docs/DeleteModelVersionRequestDto.md)
|
|
201
203
|
- [DeleteRunRequest](truefoundry/ml/autogen/client/docs/DeleteRunRequest.md)
|
|
202
204
|
- [DeleteTagRequestDto](truefoundry/ml/autogen/client/docs/DeleteTagRequestDto.md)
|