truefoundry 0.5.1rc8__py3-none-any.whl → 0.5.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/autodeploy/cli.py +1 -1
- truefoundry/cli/__main__.py +92 -2
- truefoundry/{deploy/cli → cli}/display_util.py +9 -4
- truefoundry/{deploy/cli → cli}/util.py +2 -11
- truefoundry/common/constants.py +2 -0
- truefoundry/common/utils.py +10 -0
- truefoundry/deploy/auto_gen/models.py +3 -3
- truefoundry/deploy/cli/commands/apply_command.py +12 -5
- truefoundry/deploy/cli/commands/build_command.py +3 -3
- truefoundry/deploy/cli/commands/build_logs_command.py +2 -2
- truefoundry/deploy/cli/commands/create_command.py +3 -3
- truefoundry/deploy/cli/commands/delete_command.py +4 -4
- truefoundry/deploy/cli/commands/deploy_command.py +2 -2
- truefoundry/deploy/cli/commands/deploy_init_command.py +1 -1
- truefoundry/deploy/cli/commands/get_command.py +5 -5
- truefoundry/deploy/cli/commands/list_command.py +4 -4
- truefoundry/deploy/cli/commands/login_command.py +3 -3
- truefoundry/deploy/cli/commands/logout_command.py +2 -2
- truefoundry/deploy/cli/commands/logs_command.py +2 -2
- truefoundry/deploy/cli/commands/patch_application_command.py +2 -2
- truefoundry/deploy/cli/commands/patch_command.py +2 -2
- truefoundry/deploy/cli/commands/redeploy_command.py +2 -2
- truefoundry/deploy/cli/commands/terminate_comand.py +3 -3
- truefoundry/deploy/cli/commands/trigger_command.py +2 -2
- truefoundry/deploy/lib/clients/servicefoundry_client.py +2 -2
- truefoundry/deploy/lib/const.py +0 -3
- truefoundry/deploy/lib/dao/apply.py +21 -6
- truefoundry/deploy/lib/dao/workspace.py +1 -1
- truefoundry/deploy/lib/model/entity.py +2 -2
- truefoundry/deploy/lib/util.py +0 -14
- truefoundry/ml/__init__.py +8 -4
- truefoundry/ml/cli/cli.py +5 -1
- truefoundry/ml/cli/commands/download.py +16 -3
- truefoundry/ml/cli/commands/model_init.py +4 -4
- truefoundry/ml/mlfoundry_api.py +2 -1
- truefoundry/ml/mlfoundry_run.py +2 -1
- truefoundry/ml/model_framework.py +47 -10
- {truefoundry-0.5.1rc8.dist-info → truefoundry-0.5.2.dist-info}/METADATA +1 -1
- {truefoundry-0.5.1rc8.dist-info → truefoundry-0.5.2.dist-info}/RECORD +44 -47
- truefoundry/deploy/cli/cli.py +0 -96
- truefoundry/deploy/json_util.py +0 -7
- truefoundry/deploy/lib/exceptions.py +0 -10
- /truefoundry/{deploy/cli → cli}/config.py +0 -0
- /truefoundry/{deploy/cli → cli}/console.py +0 -0
- /truefoundry/{deploy/cli → cli}/const.py +0 -0
- {truefoundry-0.5.1rc8.dist-info → truefoundry-0.5.2.dist-info}/WHEEL +0 -0
- {truefoundry-0.5.1rc8.dist-info → truefoundry-0.5.2.dist-info}/entry_points.txt +0 -0
truefoundry/autodeploy/cli.py
CHANGED
|
@@ -31,8 +31,8 @@ from truefoundry.autodeploy.tools.ask import AskQuestion
|
|
|
31
31
|
from truefoundry.autodeploy.tools.commit import CommitConfirmation
|
|
32
32
|
from truefoundry.autodeploy.tools.docker_run import DockerRun, DockerRunLog
|
|
33
33
|
from truefoundry.autodeploy.utils.client import get_git_binary
|
|
34
|
+
from truefoundry.cli.const import COMMAND_CLS
|
|
34
35
|
from truefoundry.deploy import Build, DockerFileBuild, Job, LocalSource, Port, Service
|
|
35
|
-
from truefoundry.deploy.cli.const import COMMAND_CLS
|
|
36
36
|
from truefoundry.deploy.lib.auth.servicefoundry_session import ServiceFoundrySession
|
|
37
37
|
from truefoundry.deploy.lib.clients.servicefoundry_client import (
|
|
38
38
|
ServiceFoundryServiceClient,
|
truefoundry/cli/__main__.py
CHANGED
|
@@ -1,9 +1,100 @@
|
|
|
1
|
+
import logging
|
|
1
2
|
import sys
|
|
2
3
|
|
|
3
4
|
import rich_click as click
|
|
4
5
|
|
|
5
|
-
from truefoundry
|
|
6
|
+
from truefoundry import logger
|
|
7
|
+
from truefoundry.cli.config import CliConfig
|
|
8
|
+
from truefoundry.cli.const import GROUP_CLS
|
|
9
|
+
from truefoundry.cli.util import setup_rich_click
|
|
10
|
+
from truefoundry.common.utils import is_debug_env_set, is_internal_env_set
|
|
11
|
+
from truefoundry.deploy.cli.commands import (
|
|
12
|
+
get_apply_command,
|
|
13
|
+
get_build_command,
|
|
14
|
+
get_delete_command,
|
|
15
|
+
get_deploy_command,
|
|
16
|
+
get_deploy_init_command,
|
|
17
|
+
get_login_command,
|
|
18
|
+
get_logout_command,
|
|
19
|
+
get_patch_application_command,
|
|
20
|
+
get_patch_command,
|
|
21
|
+
get_terminate_command,
|
|
22
|
+
get_trigger_command,
|
|
23
|
+
)
|
|
6
24
|
from truefoundry.ml.cli.cli import get_ml_cli
|
|
25
|
+
from truefoundry.version import __version__
|
|
26
|
+
|
|
27
|
+
click.rich_click.USE_RICH_MARKUP = True
|
|
28
|
+
|
|
29
|
+
CONTEXT_SETTINGS = dict(help_option_names=["-h", "--help"]) # noqa: C408
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
@click.group(
|
|
33
|
+
cls=GROUP_CLS, context_settings=CONTEXT_SETTINGS, invoke_without_command=True
|
|
34
|
+
)
|
|
35
|
+
@click.option(
|
|
36
|
+
"--json",
|
|
37
|
+
is_flag=True,
|
|
38
|
+
help="Output entities in json format instead of formatted tables",
|
|
39
|
+
)
|
|
40
|
+
@click.option(
|
|
41
|
+
"--debug",
|
|
42
|
+
is_flag=True,
|
|
43
|
+
default=is_debug_env_set,
|
|
44
|
+
help="Set logging level to Debug. Can also be set using environment variable. E.g. SFY_DEBUG=1",
|
|
45
|
+
)
|
|
46
|
+
@click.version_option(__version__)
|
|
47
|
+
@click.pass_context
|
|
48
|
+
def truefoundry_cli(ctx, json, debug):
|
|
49
|
+
"""
|
|
50
|
+
TrueFoundry provides an easy way to deploy your Services, Jobs and Models.
|
|
51
|
+
\b
|
|
52
|
+
|
|
53
|
+
To start, login to your TrueFoundry account with [b]tfy login[/]
|
|
54
|
+
|
|
55
|
+
Then start deploying with [b]tfy deploy[/]
|
|
56
|
+
|
|
57
|
+
And more: [link=https://docs.truefoundry.com/docs]https://docs.truefoundry.com/docs[/]
|
|
58
|
+
|
|
59
|
+
"""
|
|
60
|
+
setup_rich_click()
|
|
61
|
+
# TODO (chiragjn): Change this to -o json|yaml|table|pager
|
|
62
|
+
CliConfig.set("json", json)
|
|
63
|
+
if ctx.invoked_subcommand is None:
|
|
64
|
+
click.echo(ctx.get_help())
|
|
65
|
+
log_level = logging.INFO
|
|
66
|
+
# no info logs while outputting json
|
|
67
|
+
if json:
|
|
68
|
+
log_level = logging.ERROR
|
|
69
|
+
if debug:
|
|
70
|
+
log_level = logging.DEBUG
|
|
71
|
+
logger.add_cli_handler(level=log_level)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
def create_truefoundry_cli() -> click.MultiCommand:
|
|
75
|
+
"""Generates CLI by combining all subcommands into a main CLI and returns in
|
|
76
|
+
|
|
77
|
+
Returns:
|
|
78
|
+
function: main CLI functions will all added sub-commands
|
|
79
|
+
"""
|
|
80
|
+
cli = truefoundry_cli
|
|
81
|
+
cli.add_command(get_login_command())
|
|
82
|
+
cli.add_command(get_logout_command())
|
|
83
|
+
cli.add_command(get_apply_command())
|
|
84
|
+
cli.add_command(get_deploy_command())
|
|
85
|
+
cli.add_command(get_deploy_init_command())
|
|
86
|
+
cli.add_command(get_patch_application_command())
|
|
87
|
+
cli.add_command(get_delete_command())
|
|
88
|
+
cli.add_command(get_trigger_command())
|
|
89
|
+
cli.add_command(get_terminate_command())
|
|
90
|
+
cli.add_command(get_ml_cli())
|
|
91
|
+
|
|
92
|
+
if not (sys.platform.startswith("win32") or sys.platform.startswith("cygwin")):
|
|
93
|
+
cli.add_command(get_patch_command())
|
|
94
|
+
|
|
95
|
+
if is_internal_env_set():
|
|
96
|
+
cli.add_command(get_build_command())
|
|
97
|
+
return cli
|
|
7
98
|
|
|
8
99
|
|
|
9
100
|
def main():
|
|
@@ -13,7 +104,6 @@ def main():
|
|
|
13
104
|
# If it is another kind of object, it will be printed and the system exit status will be one (i.e., failure).
|
|
14
105
|
try:
|
|
15
106
|
cli = create_truefoundry_cli()
|
|
16
|
-
cli.add_command(get_ml_cli())
|
|
17
107
|
except Exception as e:
|
|
18
108
|
raise click.exceptions.UsageError(message=str(e)) from e
|
|
19
109
|
sys.exit(cli())
|
|
@@ -5,10 +5,15 @@ from rich import box
|
|
|
5
5
|
from rich import print_json as _rich_print_json
|
|
6
6
|
from rich.table import Table
|
|
7
7
|
|
|
8
|
-
from truefoundry.
|
|
9
|
-
from truefoundry.
|
|
10
|
-
from truefoundry.
|
|
11
|
-
|
|
8
|
+
from truefoundry.cli.config import CliConfig
|
|
9
|
+
from truefoundry.cli.console import console
|
|
10
|
+
from truefoundry.cli.const import DISPLAY_DATETIME_FORMAT
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def json_default_encoder(o):
|
|
14
|
+
if isinstance(o, datetime.datetime):
|
|
15
|
+
return o.isoformat()
|
|
16
|
+
raise TypeError(f"Cannot json encode {type(o)}: {o}")
|
|
12
17
|
|
|
13
18
|
|
|
14
19
|
def print_json(data, default=json_default_encoder):
|
|
@@ -10,12 +10,9 @@ from rich.padding import Padding
|
|
|
10
10
|
from rich.panel import Panel
|
|
11
11
|
from rich.table import Table
|
|
12
12
|
|
|
13
|
+
from truefoundry.cli.console import console
|
|
13
14
|
from truefoundry.common.exceptions import BadRequestException
|
|
14
|
-
from truefoundry.
|
|
15
|
-
from truefoundry.deploy.lib.exceptions import (
|
|
16
|
-
ConfigurationException,
|
|
17
|
-
)
|
|
18
|
-
from truefoundry.deploy.lib.util import is_debug_env_set
|
|
15
|
+
from truefoundry.common.utils import is_debug_env_set
|
|
19
16
|
|
|
20
17
|
|
|
21
18
|
def setup_rich_click():
|
|
@@ -45,12 +42,6 @@ def handle_exception(exception):
|
|
|
45
42
|
title="Command Failed",
|
|
46
43
|
border_style="red",
|
|
47
44
|
)
|
|
48
|
-
elif isinstance(exception, ConfigurationException):
|
|
49
|
-
print_dict_as_table_panel(
|
|
50
|
-
{"Error": exception.message},
|
|
51
|
-
title="Command Failed",
|
|
52
|
-
border_style="red",
|
|
53
|
-
)
|
|
54
45
|
else:
|
|
55
46
|
print_dict_as_table_panel(
|
|
56
47
|
{"Error": str(exception)},
|
truefoundry/common/constants.py
CHANGED
|
@@ -11,6 +11,8 @@ CREDENTIAL_FILEPATH = TFY_CONFIG_DIR / "credentials.json"
|
|
|
11
11
|
# These keys are kept separately because we use them in error messages and some checks
|
|
12
12
|
TFY_HOST_ENV_KEY = "TFY_HOST"
|
|
13
13
|
TFY_API_KEY_ENV_KEY = "TFY_API_KEY"
|
|
14
|
+
TFY_DEBUG_ENV_KEY = "TFY_DEBUG"
|
|
15
|
+
TFY_INTERNAL_ENV_KEY = "TFY_INTERNAL"
|
|
14
16
|
|
|
15
17
|
TFY_INTERNAL_SIGNED_URL_SERVER_HOST_ENV_KEY = "TFY_INTERNAL_SIGNED_URL_SERVER_HOST"
|
|
16
18
|
TFY_INTERNAL_SIGNED_URL_SERVER_TOKEN_ENV_KEY = "TFY_INTERNAL_SIGNED_URL_SERVER_TOKEN"
|
truefoundry/common/utils.py
CHANGED
|
@@ -15,7 +15,9 @@ from truefoundry.common.constants import (
|
|
|
15
15
|
API_SERVER_RELATIVE_PATH,
|
|
16
16
|
ENV_VARS,
|
|
17
17
|
MLFOUNDRY_SERVER_RELATIVE_PATH,
|
|
18
|
+
TFY_DEBUG_ENV_KEY,
|
|
18
19
|
TFY_HOST_ENV_KEY,
|
|
20
|
+
TFY_INTERNAL_ENV_KEY,
|
|
19
21
|
)
|
|
20
22
|
from truefoundry.pydantic_v1 import BaseSettings
|
|
21
23
|
|
|
@@ -182,3 +184,11 @@ def list_pip_packages_installed(
|
|
|
182
184
|
InstalledPipPackage(package["name"], package["version"])
|
|
183
185
|
)
|
|
184
186
|
return relevant_package_names
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
def is_debug_env_set() -> bool:
|
|
190
|
+
return bool(os.getenv(TFY_DEBUG_ENV_KEY))
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
def is_internal_env_set() -> bool:
|
|
194
|
+
return bool(os.getenv(TFY_INTERNAL_ENV_KEY))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: application.json
|
|
3
|
-
# timestamp: 2024-
|
|
3
|
+
# timestamp: 2024-12-16T11:59:07+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -877,7 +877,7 @@ class Resources(BaseModel):
|
|
|
877
877
|
None,
|
|
878
878
|
description="+label=GPU Count\n+usage=Count of GPUs to provide to the application\nNote the exact count and max count available for a given GPU type depends on cloud provider and cluster type.",
|
|
879
879
|
)
|
|
880
|
-
shared_memory_size: Optional[conint(ge=64, le=
|
|
880
|
+
shared_memory_size: Optional[conint(ge=64, le=2000000)] = Field(
|
|
881
881
|
None,
|
|
882
882
|
description="+label=Shared Memory Size (MB)\n+usage=Define the shared memory requirements for your workload. Machine learning libraries like Pytorch can use Shared Memory\nfor inter-process communication. If you use this, we will mount a `tmpfs` backed volume at the `/dev/shm` directory.\nAny usage will also count against the workload's memory limit (`resources.memory_limit`) along with your workload's memory usage.\nIf the overall usage goes above `resources.memory_limit` the user process may get killed.\nShared Memory Size cannot be more than the defined Memory Limit for the workload.",
|
|
883
883
|
)
|
|
@@ -913,7 +913,7 @@ class Rolling(BaseModel):
|
|
|
913
913
|
description="+label=Max unavailable(%)\n+usage=Percentage of total replicas that can be brought down at one time.\nFor a value of 25 when replicas are set to 12 this would mean minimum (25% of 12) = 3 pods might be unavailable during the deployment.\nSetting this to a higher value can help in speeding up the deployment process.",
|
|
914
914
|
)
|
|
915
915
|
max_surge_percentage: conint(ge=0, le=100) = Field(
|
|
916
|
-
|
|
916
|
+
25,
|
|
917
917
|
description="+label=Max Surge(%)\n+usage=Percentage of total replicas of updated image that can be brought up over the total replicas count.\nFor a value of 25 when replicas are set to 12 this would mean (12+(25% of 12) = 15) pods might be running at one time.\nSetting this to a higher value can help in speeding up the deployment process.",
|
|
918
918
|
)
|
|
919
919
|
|
|
@@ -2,9 +2,9 @@ from typing import List, Tuple
|
|
|
2
2
|
|
|
3
3
|
import rich_click as click
|
|
4
4
|
|
|
5
|
-
from truefoundry.
|
|
6
|
-
from truefoundry.
|
|
7
|
-
from truefoundry.
|
|
5
|
+
from truefoundry.cli.console import console
|
|
6
|
+
from truefoundry.cli.const import GROUP_CLS
|
|
7
|
+
from truefoundry.cli.util import handle_exception_wrapper
|
|
8
8
|
from truefoundry.deploy.lib.clients.servicefoundry_client import (
|
|
9
9
|
ServiceFoundryServiceClient,
|
|
10
10
|
)
|
|
@@ -30,13 +30,20 @@ from truefoundry.deploy.lib.model.entity import ApplyResult
|
|
|
30
30
|
required=True,
|
|
31
31
|
multiple=True,
|
|
32
32
|
)
|
|
33
|
+
@click.option(
|
|
34
|
+
"--dry-run",
|
|
35
|
+
"--dry_run",
|
|
36
|
+
is_flag=True,
|
|
37
|
+
show_default=True,
|
|
38
|
+
help="Simulate the process without actually applying the manifest",
|
|
39
|
+
)
|
|
33
40
|
@handle_exception_wrapper
|
|
34
|
-
def apply_command(files: Tuple[str, ...]):
|
|
41
|
+
def apply_command(files: Tuple[str, ...], dry_run: bool = False):
|
|
35
42
|
apply_results: List[ApplyResult] = []
|
|
36
43
|
client = ServiceFoundryServiceClient()
|
|
37
44
|
for file in files:
|
|
38
45
|
with console.status(PROMPT_APPLYING_MANIFEST.format(file), spinner="dots"):
|
|
39
|
-
for apply_result in apply_lib.apply_manifest_file(file, client):
|
|
46
|
+
for apply_result in apply_lib.apply_manifest_file(file, client, dry_run):
|
|
40
47
|
if apply_result.success:
|
|
41
48
|
console.print(f"[green]\u2714 {apply_result.message}[/]")
|
|
42
49
|
else:
|
|
@@ -2,10 +2,10 @@ import json
|
|
|
2
2
|
|
|
3
3
|
import rich_click as click
|
|
4
4
|
|
|
5
|
+
from truefoundry.cli.console import console
|
|
6
|
+
from truefoundry.cli.const import GROUP_CLS
|
|
7
|
+
from truefoundry.cli.util import handle_exception_wrapper
|
|
5
8
|
from truefoundry.deploy import builder
|
|
6
|
-
from truefoundry.deploy.cli.console import console
|
|
7
|
-
from truefoundry.deploy.cli.const import GROUP_CLS
|
|
8
|
-
from truefoundry.deploy.cli.util import handle_exception_wrapper
|
|
9
9
|
from truefoundry.version import __version__
|
|
10
10
|
|
|
11
11
|
|
|
@@ -2,8 +2,8 @@ from typing import Optional
|
|
|
2
2
|
|
|
3
3
|
import rich_click as click
|
|
4
4
|
|
|
5
|
-
from truefoundry.
|
|
6
|
-
from truefoundry.
|
|
5
|
+
from truefoundry.cli.const import COMMAND_CLS
|
|
6
|
+
from truefoundry.cli.util import handle_exception_wrapper
|
|
7
7
|
from truefoundry.deploy.io.rich_output_callback import RichOutputCallBack
|
|
8
8
|
from truefoundry.deploy.lib.clients.servicefoundry_client import (
|
|
9
9
|
ServiceFoundryServiceClient,
|
|
@@ -2,9 +2,9 @@ from typing import Optional
|
|
|
2
2
|
|
|
3
3
|
import rich_click as click
|
|
4
4
|
|
|
5
|
-
from truefoundry.
|
|
6
|
-
from truefoundry.
|
|
7
|
-
from truefoundry.
|
|
5
|
+
from truefoundry.cli.const import COMMAND_CLS, GROUP_CLS
|
|
6
|
+
from truefoundry.cli.display_util import print_obj
|
|
7
|
+
from truefoundry.cli.util import handle_exception_wrapper
|
|
8
8
|
from truefoundry.deploy.lib.dao import workspace as workspace_lib
|
|
9
9
|
|
|
10
10
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import rich_click as click
|
|
2
2
|
|
|
3
|
-
from truefoundry.
|
|
4
|
-
from truefoundry.
|
|
5
|
-
from truefoundry.
|
|
6
|
-
from truefoundry.
|
|
3
|
+
from truefoundry.cli.config import CliConfig
|
|
4
|
+
from truefoundry.cli.const import COMMAND_CLS, GROUP_CLS
|
|
5
|
+
from truefoundry.cli.display_util import print_json
|
|
6
|
+
from truefoundry.cli.util import handle_exception_wrapper
|
|
7
7
|
from truefoundry.deploy.io.rich_output_callback import RichOutputCallBack
|
|
8
8
|
from truefoundry.deploy.lib.dao import application as application_lib
|
|
9
9
|
from truefoundry.deploy.lib.dao import workspace as workspace_lib
|
|
@@ -9,8 +9,8 @@ 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.
|
|
13
|
-
from truefoundry.
|
|
12
|
+
from truefoundry.cli.const import COMMAND_CLS, GROUP_CLS
|
|
13
|
+
from truefoundry.cli.util import handle_exception_wrapper
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
def _get_default_spec_file():
|
|
@@ -6,11 +6,11 @@ import rich_click as click
|
|
|
6
6
|
import yaml
|
|
7
7
|
from rich.pretty import pprint
|
|
8
8
|
|
|
9
|
-
from truefoundry.
|
|
10
|
-
from truefoundry.
|
|
11
|
-
from truefoundry.
|
|
12
|
-
from truefoundry.
|
|
13
|
-
from truefoundry.
|
|
9
|
+
from truefoundry.cli.config import CliConfig
|
|
10
|
+
from truefoundry.cli.console import console
|
|
11
|
+
from truefoundry.cli.const import COMMAND_CLS, GROUP_CLS
|
|
12
|
+
from truefoundry.cli.display_util import print_entity_obj, print_json
|
|
13
|
+
from truefoundry.cli.util import handle_exception_wrapper
|
|
14
14
|
from truefoundry.deploy.lib.dao import application as application_lib
|
|
15
15
|
from truefoundry.deploy.lib.dao import version as version_lib
|
|
16
16
|
from truefoundry.deploy.lib.dao import workspace as workspace_lib
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import rich_click as click
|
|
2
2
|
|
|
3
|
-
from truefoundry.
|
|
4
|
-
from truefoundry.
|
|
5
|
-
from truefoundry.
|
|
6
|
-
from truefoundry.
|
|
3
|
+
from truefoundry.cli.config import CliConfig
|
|
4
|
+
from truefoundry.cli.const import COMMAND_CLS, GROUP_CLS
|
|
5
|
+
from truefoundry.cli.display_util import print_entity_list, print_json
|
|
6
|
+
from truefoundry.cli.util import handle_exception_wrapper
|
|
7
7
|
from truefoundry.deploy.io.rich_output_callback import RichOutputCallBack
|
|
8
8
|
from truefoundry.deploy.lib.dao import application as application_lib
|
|
9
9
|
from truefoundry.deploy.lib.dao import version as version_lib
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import rich_click as click
|
|
2
2
|
|
|
3
|
-
from truefoundry.
|
|
4
|
-
from truefoundry.
|
|
5
|
-
from truefoundry.deploy.cli.util import (
|
|
3
|
+
from truefoundry.cli.const import COMMAND_CLS
|
|
4
|
+
from truefoundry.cli.util import (
|
|
6
5
|
_prompt_if_no_value_and_supported,
|
|
7
6
|
handle_exception_wrapper,
|
|
8
7
|
)
|
|
8
|
+
from truefoundry.common.constants import TFY_HOST_ENV_KEY
|
|
9
9
|
from truefoundry.deploy.io.rich_output_callback import RichOutputCallBack
|
|
10
10
|
from truefoundry.deploy.lib.session import login
|
|
11
11
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import rich_click as click
|
|
2
2
|
|
|
3
|
-
from truefoundry.
|
|
4
|
-
from truefoundry.
|
|
3
|
+
from truefoundry.cli.const import COMMAND_CLS
|
|
4
|
+
from truefoundry.cli.util import handle_exception_wrapper
|
|
5
5
|
from truefoundry.deploy.io.rich_output_callback import RichOutputCallBack
|
|
6
6
|
from truefoundry.deploy.lib.session import logout
|
|
7
7
|
|
|
@@ -4,8 +4,8 @@ from typing import Optional
|
|
|
4
4
|
import rich_click as click
|
|
5
5
|
from dateutil.tz import tzlocal
|
|
6
6
|
|
|
7
|
-
from truefoundry.
|
|
8
|
-
from truefoundry.
|
|
7
|
+
from truefoundry.cli.const import COMMAND_CLS
|
|
8
|
+
from truefoundry.cli.util import handle_exception_wrapper
|
|
9
9
|
from truefoundry.deploy.io.rich_output_callback import RichOutputCallBack
|
|
10
10
|
from truefoundry.deploy.lib.clients.servicefoundry_client import (
|
|
11
11
|
ServiceFoundryServiceClient,
|
|
@@ -3,8 +3,8 @@ import json
|
|
|
3
3
|
import rich_click as click
|
|
4
4
|
import yaml
|
|
5
5
|
|
|
6
|
-
from truefoundry.
|
|
7
|
-
from truefoundry.
|
|
6
|
+
from truefoundry.cli.const import GROUP_CLS
|
|
7
|
+
from truefoundry.cli.util import handle_exception_wrapper
|
|
8
8
|
from truefoundry.deploy.lib.dao import application as application_lib
|
|
9
9
|
|
|
10
10
|
|
|
@@ -3,8 +3,8 @@ from typing import Optional
|
|
|
3
3
|
|
|
4
4
|
import rich_click as click
|
|
5
5
|
|
|
6
|
-
from truefoundry.
|
|
7
|
-
from truefoundry.
|
|
6
|
+
from truefoundry.cli.const import GROUP_CLS
|
|
7
|
+
from truefoundry.cli.util import handle_exception_wrapper
|
|
8
8
|
from truefoundry.deploy.io.rich_output_callback import RichOutputCallBack
|
|
9
9
|
|
|
10
10
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import rich_click as click
|
|
2
2
|
|
|
3
|
-
from truefoundry.
|
|
4
|
-
from truefoundry.
|
|
3
|
+
from truefoundry.cli.const import COMMAND_CLS
|
|
4
|
+
from truefoundry.cli.util import handle_exception_wrapper
|
|
5
5
|
from truefoundry.deploy.lib.dao import application as application_lib
|
|
6
6
|
|
|
7
7
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import rich_click as click
|
|
2
2
|
|
|
3
|
-
from truefoundry.
|
|
4
|
-
from truefoundry.
|
|
5
|
-
from truefoundry.
|
|
3
|
+
from truefoundry.cli.const import COMMAND_CLS, GROUP_CLS
|
|
4
|
+
from truefoundry.cli.display_util import print_json
|
|
5
|
+
from truefoundry.cli.util import handle_exception_wrapper
|
|
6
6
|
from truefoundry.deploy.lib.dao import application as application_lib
|
|
7
7
|
|
|
8
8
|
|
|
@@ -3,8 +3,8 @@ from typing import Optional, Sequence
|
|
|
3
3
|
import rich_click as click
|
|
4
4
|
from click import ClickException
|
|
5
5
|
|
|
6
|
-
from truefoundry.
|
|
7
|
-
from truefoundry.
|
|
6
|
+
from truefoundry.cli.const import COMMAND_CLS, GROUP_CLS
|
|
7
|
+
from truefoundry.cli.util import handle_exception_wrapper
|
|
8
8
|
from truefoundry.deploy.lib.dao import application
|
|
9
9
|
|
|
10
10
|
|
|
@@ -680,9 +680,9 @@ class ServiceFoundryServiceClient(BaseServiceFoundryServiceClient):
|
|
|
680
680
|
return parse_obj_as(List[Deployment], response)
|
|
681
681
|
|
|
682
682
|
@check_min_cli_version
|
|
683
|
-
def apply(self, manifest: Dict[str, Any]):
|
|
683
|
+
def apply(self, manifest: Dict[str, Any], dry_run: bool = False):
|
|
684
684
|
url = f"{self._api_server_url}/{VERSION_PREFIX}/apply"
|
|
685
|
-
body = {"manifest": manifest}
|
|
685
|
+
body = {"manifest": manifest, "dryRun": dry_run}
|
|
686
686
|
response = session_with_retries().put(
|
|
687
687
|
url, headers=self._get_header(), json=body
|
|
688
688
|
)
|
truefoundry/deploy/lib/const.py
CHANGED
|
@@ -15,6 +15,7 @@ def _apply_manifest(
|
|
|
15
15
|
client: Optional[ServiceFoundryServiceClient] = None,
|
|
16
16
|
filename: Optional[str] = None,
|
|
17
17
|
index: Optional[int] = None,
|
|
18
|
+
dry_run: bool = False,
|
|
18
19
|
) -> ApplyResult:
|
|
19
20
|
client = client or ServiceFoundryServiceClient()
|
|
20
21
|
|
|
@@ -32,29 +33,38 @@ def _apply_manifest(
|
|
|
32
33
|
message=f"Failed to apply manifest{file_metadata}. Error: {ex}",
|
|
33
34
|
)
|
|
34
35
|
|
|
36
|
+
prefix = "[Dry Run] " if dry_run else ""
|
|
37
|
+
suffix = " (No changes were applied)" if dry_run else ""
|
|
35
38
|
try:
|
|
36
|
-
client.apply(manifest.dict())
|
|
39
|
+
client.apply(manifest.dict(), dry_run)
|
|
40
|
+
|
|
37
41
|
return ApplyResult(
|
|
38
42
|
success=True,
|
|
39
|
-
message=
|
|
43
|
+
message=(
|
|
44
|
+
f"{prefix}Successfully configured manifest {manifest.name} of type {manifest.type}.{suffix}"
|
|
45
|
+
),
|
|
40
46
|
)
|
|
41
47
|
except Exception as ex:
|
|
42
48
|
return ApplyResult(
|
|
43
49
|
success=False,
|
|
44
|
-
message=
|
|
50
|
+
message=(
|
|
51
|
+
f"{prefix}Failed to apply manifest {manifest.name} of type {manifest.type}. Error: {ex}.{suffix}"
|
|
52
|
+
),
|
|
45
53
|
)
|
|
46
54
|
|
|
47
55
|
|
|
48
56
|
def apply_manifest(
|
|
49
57
|
manifest: Dict[str, Any],
|
|
50
58
|
client: Optional[ServiceFoundryServiceClient] = None,
|
|
59
|
+
dry_run: bool = False,
|
|
51
60
|
) -> ApplyResult:
|
|
52
|
-
return _apply_manifest(manifest=manifest, client=client)
|
|
61
|
+
return _apply_manifest(manifest=manifest, client=client, dry_run=dry_run)
|
|
53
62
|
|
|
54
63
|
|
|
55
64
|
def apply_manifest_file(
|
|
56
65
|
filepath: str,
|
|
57
66
|
client: Optional[ServiceFoundryServiceClient] = None,
|
|
67
|
+
dry_run: bool = False,
|
|
58
68
|
) -> Iterator[ApplyResult]:
|
|
59
69
|
client = client or ServiceFoundryServiceClient()
|
|
60
70
|
filename = Path(filepath).name
|
|
@@ -67,14 +77,19 @@ def apply_manifest_file(
|
|
|
67
77
|
message=f"Failed to read file {filepath} as a valid YAML file. Error: {ex}",
|
|
68
78
|
)
|
|
69
79
|
else:
|
|
80
|
+
prefix = "[Dry Run] " if dry_run else ""
|
|
70
81
|
for index, manifest in enumerate(manifests_it):
|
|
71
82
|
if not isinstance(manifest, dict):
|
|
72
83
|
yield ApplyResult(
|
|
73
84
|
success=False,
|
|
74
|
-
message=f"Failed to apply manifest at index {index} from file {filename}. Error: A manifest must be a dict, got type {type(manifest)}",
|
|
85
|
+
message=f"{prefix}Failed to apply manifest at index {index} from file {filename}. Error: A manifest must be a dict, got type {type(manifest)}",
|
|
75
86
|
)
|
|
76
87
|
continue
|
|
77
88
|
|
|
78
89
|
yield _apply_manifest(
|
|
79
|
-
manifest=manifest,
|
|
90
|
+
manifest=manifest,
|
|
91
|
+
client=client,
|
|
92
|
+
filename=filename,
|
|
93
|
+
index=index,
|
|
94
|
+
dry_run=dry_run,
|
|
80
95
|
)
|
|
@@ -220,7 +220,7 @@ class JobRun(Base):
|
|
|
220
220
|
status: str
|
|
221
221
|
|
|
222
222
|
def list_row_data(self) -> Dict[str, Any]:
|
|
223
|
-
from truefoundry.
|
|
223
|
+
from truefoundry.cli.display_util import display_time_passed
|
|
224
224
|
|
|
225
225
|
triggered_at = (
|
|
226
226
|
(datetime.datetime.now().timestamp() * 1000) - self.createdAt
|
|
@@ -238,7 +238,7 @@ class JobRun(Base):
|
|
|
238
238
|
}
|
|
239
239
|
|
|
240
240
|
def get_data(self) -> Dict[str, Any]:
|
|
241
|
-
from truefoundry.
|
|
241
|
+
from truefoundry.cli.display_util import display_time_passed
|
|
242
242
|
|
|
243
243
|
created_at = datetime.datetime.fromtimestamp(self.createdAt // 1000)
|
|
244
244
|
end_time = ""
|
truefoundry/deploy/lib/util.py
CHANGED
|
@@ -1,20 +1,6 @@
|
|
|
1
|
-
import os
|
|
2
1
|
import re
|
|
3
2
|
from typing import Union
|
|
4
3
|
|
|
5
|
-
from truefoundry.deploy.lib.const import (
|
|
6
|
-
TFY_DEBUG_ENV_KEY,
|
|
7
|
-
TFY_INTERNAL_ENV_KEY,
|
|
8
|
-
)
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
def is_debug_env_set() -> bool:
|
|
12
|
-
return bool(os.getenv(TFY_DEBUG_ENV_KEY))
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
def is_internal_env_set() -> bool:
|
|
16
|
-
return bool(os.getenv(TFY_INTERNAL_ENV_KEY))
|
|
17
|
-
|
|
18
4
|
|
|
19
5
|
def get_application_fqn_from_deployment_fqn(deployment_fqn: str) -> str:
|
|
20
6
|
if not re.search(r":\d+$", deployment_fqn):
|
truefoundry/ml/__init__.py
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
from truefoundry.ml.autogen.client.models import (
|
|
2
|
-
|
|
1
|
+
from truefoundry.ml.autogen.client.models import ( # type: ignore[attr-defined]
|
|
2
|
+
InferMethodName,
|
|
3
3
|
ModelVersionEnvironment,
|
|
4
4
|
SklearnModelSchema,
|
|
5
5
|
XGBoostModelSchema,
|
|
6
6
|
)
|
|
7
|
+
from truefoundry.ml.autogen.entities.artifacts import LibraryName
|
|
7
8
|
from truefoundry.ml.enums import (
|
|
8
9
|
DataSlice,
|
|
9
10
|
FileFormat,
|
|
@@ -40,6 +41,7 @@ from truefoundry.ml.model_framework import (
|
|
|
40
41
|
TransformersFramework,
|
|
41
42
|
XGBoostFramework,
|
|
42
43
|
sklearn_infer_schema,
|
|
44
|
+
xgboost_infer_schema,
|
|
43
45
|
)
|
|
44
46
|
|
|
45
47
|
__all__ = [
|
|
@@ -51,9 +53,11 @@ __all__ = [
|
|
|
51
53
|
"DataSlice",
|
|
52
54
|
"FastAIFramework",
|
|
53
55
|
"FileFormat",
|
|
56
|
+
"get_client",
|
|
54
57
|
"GluonFramework",
|
|
55
58
|
"H2OFramework",
|
|
56
59
|
"Image",
|
|
60
|
+
"InferMethodName",
|
|
57
61
|
"KerasFramework",
|
|
58
62
|
"LibraryName",
|
|
59
63
|
"LightGBMFramework",
|
|
@@ -68,6 +72,7 @@ __all__ = [
|
|
|
68
72
|
"PaddleFramework",
|
|
69
73
|
"Plot",
|
|
70
74
|
"PyTorchFramework",
|
|
75
|
+
"sklearn_infer_schema",
|
|
71
76
|
"SklearnFramework",
|
|
72
77
|
"SklearnModelSchema",
|
|
73
78
|
"SpaCyFramework",
|
|
@@ -75,10 +80,9 @@ __all__ = [
|
|
|
75
80
|
"TensorFlowFramework",
|
|
76
81
|
"TransformersFramework",
|
|
77
82
|
"ViewType",
|
|
83
|
+
"xgboost_infer_schema",
|
|
78
84
|
"XGBoostFramework",
|
|
79
85
|
"XGBoostModelSchema",
|
|
80
|
-
"get_client",
|
|
81
|
-
"sklearn_infer_schema",
|
|
82
86
|
]
|
|
83
87
|
|
|
84
88
|
init_logger()
|
truefoundry/ml/cli/cli.py
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import rich_click as click
|
|
2
2
|
|
|
3
|
+
from truefoundry.cli.const import GROUP_CLS
|
|
3
4
|
from truefoundry.ml.cli.commands import download
|
|
4
5
|
|
|
5
6
|
click.rich_click.USE_RICH_MARKUP = True
|
|
6
7
|
|
|
7
8
|
|
|
8
|
-
@click.group(
|
|
9
|
+
@click.group(
|
|
10
|
+
name="ml",
|
|
11
|
+
cls=GROUP_CLS,
|
|
12
|
+
)
|
|
9
13
|
def ml():
|
|
10
14
|
"""
|
|
11
15
|
TrueFoundry ML CLI
|
|
@@ -2,14 +2,23 @@ from typing import Optional
|
|
|
2
2
|
|
|
3
3
|
import click
|
|
4
4
|
|
|
5
|
+
from truefoundry.cli.const import COMMAND_CLS, GROUP_CLS
|
|
5
6
|
from truefoundry.ml import get_client
|
|
6
7
|
|
|
7
8
|
|
|
8
|
-
@click.group(
|
|
9
|
+
@click.group(
|
|
10
|
+
name="download",
|
|
11
|
+
cls=GROUP_CLS,
|
|
12
|
+
help="Download artifact/model versions logged with TrueFoundry",
|
|
13
|
+
)
|
|
9
14
|
def download(): ...
|
|
10
15
|
|
|
11
16
|
|
|
12
|
-
@download.command(
|
|
17
|
+
@download.command(
|
|
18
|
+
name="model",
|
|
19
|
+
cls=COMMAND_CLS,
|
|
20
|
+
help="Download a model version logged with TrueFoundry",
|
|
21
|
+
)
|
|
13
22
|
@click.option(
|
|
14
23
|
"--fqn",
|
|
15
24
|
required=True,
|
|
@@ -48,7 +57,11 @@ def model(fqn: str, path: str, overwrite: bool, progress: Optional[bool] = None)
|
|
|
48
57
|
print(f"Downloaded model files to {download_path}")
|
|
49
58
|
|
|
50
59
|
|
|
51
|
-
@download.command(
|
|
60
|
+
@download.command(
|
|
61
|
+
name="artifact",
|
|
62
|
+
cls=COMMAND_CLS,
|
|
63
|
+
short_help="Download a artifact version logged with TrueFoundry",
|
|
64
|
+
)
|
|
52
65
|
@click.option(
|
|
53
66
|
"--fqn",
|
|
54
67
|
required=True,
|
|
@@ -3,10 +3,10 @@ from typing import Optional
|
|
|
3
3
|
|
|
4
4
|
import rich_click as click
|
|
5
5
|
|
|
6
|
-
from truefoundry.
|
|
7
|
-
from truefoundry.
|
|
8
|
-
from truefoundry.
|
|
9
|
-
from truefoundry.ml.autogen.client
|
|
6
|
+
from truefoundry.cli.console import console
|
|
7
|
+
from truefoundry.cli.const import COMMAND_CLS
|
|
8
|
+
from truefoundry.cli.util import handle_exception_wrapper
|
|
9
|
+
from truefoundry.ml.autogen.client import ModelServer # type: ignore[attr-defined]
|
|
10
10
|
from truefoundry.ml.cli.utils import (
|
|
11
11
|
AppName,
|
|
12
12
|
NonEmptyString,
|
truefoundry/ml/mlfoundry_api.py
CHANGED
|
@@ -18,7 +18,7 @@ from typing import (
|
|
|
18
18
|
import coolname
|
|
19
19
|
|
|
20
20
|
from truefoundry.common.utils import ContextualDirectoryManager, relogin_error_message
|
|
21
|
-
from truefoundry.ml import
|
|
21
|
+
from truefoundry.ml import constants
|
|
22
22
|
from truefoundry.ml.autogen.client import ( # type: ignore[attr-defined]
|
|
23
23
|
ArtifactDto,
|
|
24
24
|
ArtifactType,
|
|
@@ -35,6 +35,7 @@ from truefoundry.ml.autogen.client import ( # type: ignore[attr-defined]
|
|
|
35
35
|
MlfoundryArtifactsApi,
|
|
36
36
|
ModelDto,
|
|
37
37
|
ModelServer,
|
|
38
|
+
ModelVersionEnvironment,
|
|
38
39
|
RunsApi,
|
|
39
40
|
RunTagDto,
|
|
40
41
|
SearchRunsRequestDto,
|
truefoundry/ml/mlfoundry_run.py
CHANGED
|
@@ -18,7 +18,7 @@ from urllib.parse import urljoin, urlsplit
|
|
|
18
18
|
|
|
19
19
|
from truefoundry import version
|
|
20
20
|
from truefoundry.common.utils import relogin_error_message
|
|
21
|
-
from truefoundry.ml import
|
|
21
|
+
from truefoundry.ml import constants
|
|
22
22
|
from truefoundry.ml.autogen.client import ( # type: ignore[attr-defined]
|
|
23
23
|
ArtifactType,
|
|
24
24
|
DeleteRunRequest,
|
|
@@ -29,6 +29,7 @@ from truefoundry.ml.autogen.client import ( # type: ignore[attr-defined]
|
|
|
29
29
|
MetricDto,
|
|
30
30
|
MetricsApi,
|
|
31
31
|
MlfoundryArtifactsApi,
|
|
32
|
+
ModelVersionEnvironment,
|
|
32
33
|
ParamDto,
|
|
33
34
|
RunDataDto,
|
|
34
35
|
RunDto,
|
|
@@ -35,6 +35,7 @@ from truefoundry.pydantic_v1 import BaseModel, Field
|
|
|
35
35
|
|
|
36
36
|
if TYPE_CHECKING:
|
|
37
37
|
from sklearn.base import BaseEstimator
|
|
38
|
+
from xgboost import Booster, XGBModel
|
|
38
39
|
|
|
39
40
|
# Map serialization format to corresponding pip packages
|
|
40
41
|
SERIALIZATION_FORMAT_TO_PACKAGES_NAME_MAP = {
|
|
@@ -467,6 +468,24 @@ def auto_update_model_framework_details(
|
|
|
467
468
|
)
|
|
468
469
|
|
|
469
470
|
|
|
471
|
+
def _infer_schema(
|
|
472
|
+
model_input: Any,
|
|
473
|
+
model: Union["BaseEstimator", "Booster", "XGBModel"],
|
|
474
|
+
infer_method_name: str = "predict",
|
|
475
|
+
) -> Dict[str, Any]:
|
|
476
|
+
if not hasattr(model, infer_method_name):
|
|
477
|
+
raise ValueError(
|
|
478
|
+
f"Model does not have the method '{infer_method_name}' to infer the schema."
|
|
479
|
+
)
|
|
480
|
+
model_infer_method = getattr(model, infer_method_name)
|
|
481
|
+
model_output = model_infer_method(model_input)
|
|
482
|
+
|
|
483
|
+
model_signature = infer_signature(
|
|
484
|
+
model_input=model_input, model_output=model_output
|
|
485
|
+
)
|
|
486
|
+
return model_signature.to_dict()
|
|
487
|
+
|
|
488
|
+
|
|
470
489
|
def sklearn_infer_schema(
|
|
471
490
|
model_input: Any,
|
|
472
491
|
model: "BaseEstimator",
|
|
@@ -483,19 +502,37 @@ def sklearn_infer_schema(
|
|
|
483
502
|
Returns:
|
|
484
503
|
SklearnModelSchema: The inferred schema of the Sklearn model.
|
|
485
504
|
"""
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
f"Model does not have the method '{infer_method_name}' to infer the schema."
|
|
489
|
-
)
|
|
490
|
-
model_infer_method = getattr(model, infer_method_name)
|
|
491
|
-
model_output = model_infer_method(model_input)
|
|
492
|
-
|
|
493
|
-
model_signature = infer_signature(
|
|
494
|
-
model_input=model_input, model_output=model_output
|
|
505
|
+
model_signature_json = _infer_schema(
|
|
506
|
+
model_input=model_input, model=model, infer_method_name=infer_method_name
|
|
495
507
|
)
|
|
496
|
-
model_signature_json = model_signature.to_dict()
|
|
497
508
|
return autogen_artifacts.SklearnModelSchema(
|
|
498
509
|
infer_method_name=infer_method_name,
|
|
499
510
|
inputs=json.loads(model_signature_json["inputs"]),
|
|
500
511
|
outputs=json.loads(model_signature_json["outputs"]),
|
|
501
512
|
)
|
|
513
|
+
|
|
514
|
+
|
|
515
|
+
def xgboost_infer_schema(
|
|
516
|
+
model_input: Any,
|
|
517
|
+
model: Union["Booster", "XGBModel"],
|
|
518
|
+
infer_method_name: str = "predict",
|
|
519
|
+
) -> autogen_artifacts.XGBoostModelSchema:
|
|
520
|
+
"""
|
|
521
|
+
Infer the schema of an XGBoost model.
|
|
522
|
+
|
|
523
|
+
Args:
|
|
524
|
+
model_input (Any): The input data to be used for schema inference.
|
|
525
|
+
model (Any): The XGBoost model instance.
|
|
526
|
+
infer_method_name (str): The name of the method to be used for schema inference.
|
|
527
|
+
Eg: predict (default), predict_proba
|
|
528
|
+
Returns:
|
|
529
|
+
XGBoostModelSchema: The inferred schema of the XGBoost model.
|
|
530
|
+
"""
|
|
531
|
+
model_signature_json = _infer_schema(
|
|
532
|
+
model_input=model_input, model=model, infer_method_name=infer_method_name
|
|
533
|
+
)
|
|
534
|
+
return autogen_artifacts.XGBoostModelSchema(
|
|
535
|
+
infer_method_name=infer_method_name,
|
|
536
|
+
inputs=json.loads(model_signature_json["inputs"]),
|
|
537
|
+
outputs=json.loads(model_signature_json["outputs"]),
|
|
538
|
+
)
|
|
@@ -5,7 +5,7 @@ truefoundry/autodeploy/agents/base.py,sha256=woCry229x7WX0IZmBopW_e_NB76aCLQRLXZ
|
|
|
5
5
|
truefoundry/autodeploy/agents/developer.py,sha256=Fh-EJDT3wPwCPYsrxRNtanyKMiZxhK73LHb-5Kpmh0A,4127
|
|
6
6
|
truefoundry/autodeploy/agents/project_identifier.py,sha256=dm1A6MHNA-0Sc48y7dYpSA7e4uvw3Wi8AADSs-JcOZs,4505
|
|
7
7
|
truefoundry/autodeploy/agents/tester.py,sha256=Hp1bul8Xd6qZPdUDUPqQwwHF7bsPQ5tK7x6gaBuX0NI,2403
|
|
8
|
-
truefoundry/autodeploy/cli.py,sha256=
|
|
8
|
+
truefoundry/autodeploy/cli.py,sha256=1VnDAP9ylM6l00v0Ko5KL6_Dr7bL_voeAPdbEvWvU3Y,14215
|
|
9
9
|
truefoundry/autodeploy/constants.py,sha256=vTh2nA7cjqghqbW2rNh3FbtcIk2scdAWZuuQCmVBO80,1273
|
|
10
10
|
truefoundry/autodeploy/exception.py,sha256=fa_ZyTDUKiMKG2Uayynk1yWcEMsuVluqk2GtV4tfTPU,158
|
|
11
11
|
truefoundry/autodeploy/logger.py,sha256=tkV2UKcOTFl5nz0cn4eRbzxF-2CZd8b7MK9vnhaflYw,325
|
|
@@ -24,19 +24,24 @@ truefoundry/autodeploy/utils/client.py,sha256=PvbSkfgAjAogGjisinqmh4mP4svowxAC0I
|
|
|
24
24
|
truefoundry/autodeploy/utils/diff.py,sha256=Ef8Y-VffDKel_-q-GxRam6gqiv8qTLMcqVg6iifXfcA,5358
|
|
25
25
|
truefoundry/autodeploy/utils/pydantic_compat.py,sha256=hEAUy5kLjhPdzw7yGZ2iXGMXbbMVXVlGzIofmyHafXQ,412
|
|
26
26
|
truefoundry/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
27
|
-
truefoundry/cli/__main__.py,sha256
|
|
27
|
+
truefoundry/cli/__main__.py,sha256=0nEwE0UkFagCO5ctGcqEThdmBT2fN8MVcr0ERItnsNQ,3483
|
|
28
|
+
truefoundry/cli/config.py,sha256=tf8w4UfVzcC6eYkENvuuCPYt_V3sqVpO1bclORV9tAk,206
|
|
29
|
+
truefoundry/cli/console.py,sha256=9-dMy4YPisCJQziRKTg8Qa0UJnOGl1soiUnJjsnLDvE,242
|
|
30
|
+
truefoundry/cli/const.py,sha256=dVHPo1uAiDSSMXwXoT2mR5kNQjExT98QNVRz98Hz_Ts,510
|
|
31
|
+
truefoundry/cli/display_util.py,sha256=vypx4FQImmDwl2QAj7GpjwlpvG3VFhqoNPvCkBzGqNg,3120
|
|
32
|
+
truefoundry/cli/util.py,sha256=yA8sie7TBTOu-5QFf2zEFWYEKYcBCaV6o1gtctj1dtI,3390
|
|
28
33
|
truefoundry/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
29
34
|
truefoundry/common/auth_service_client.py,sha256=RRiGUqITxeVYwKZLc923zJP-61UAvFtVlMaG2HJBvXc,7940
|
|
30
|
-
truefoundry/common/constants.py,sha256=
|
|
35
|
+
truefoundry/common/constants.py,sha256=Pxksh1MMjz9WAKV6wCcq1wu9uawzZGMe9RU9FrLOZbQ,2626
|
|
31
36
|
truefoundry/common/credential_file_manager.py,sha256=1yEk1Zm2xS4G0VDFwKSZ4w0VUrcPWQ1nJnoBaz9xyKA,4251
|
|
32
37
|
truefoundry/common/credential_provider.py,sha256=Aht7hFLsnyRgMR34dRbzln7dor0WYSeA8ej8ApNmnKM,4148
|
|
33
38
|
truefoundry/common/entities.py,sha256=8O-EGPk4PKqnyoFMKUTxISCU19rz0KBnfRDJU695DhY,3797
|
|
34
39
|
truefoundry/common/exceptions.py,sha256=ePpiQ_zmWe4e94gOgeMiyP_AZnKwjEBfyXsB5ScGYcI,329
|
|
35
40
|
truefoundry/common/request_utils.py,sha256=5xw4YGUcMf71Ncal3OfFCa-PoWDIvG3hYGCDa4Da4OI,2854
|
|
36
41
|
truefoundry/common/servicefoundry_client.py,sha256=2fxmgCM-ckFHpnm6n_mL-5Z8RWN_q-dYVvFC29bkYSg,3120
|
|
37
|
-
truefoundry/common/utils.py,sha256=
|
|
42
|
+
truefoundry/common/utils.py,sha256=H87mfvqSE9OSRRdX-G9m3_JvWLVtkNuLmsFsvJHMczc,6098
|
|
38
43
|
truefoundry/deploy/__init__.py,sha256=p14_yIJw2bcaKW3c1DTaoM7UwfHvt2T_MfeFlZIz1g4,2359
|
|
39
|
-
truefoundry/deploy/auto_gen/models.py,sha256=
|
|
44
|
+
truefoundry/deploy/auto_gen/models.py,sha256=3_GTdaYE95piMzhbM4SvMSQhP4UGWDGpJnLxERjYHGw,82555
|
|
40
45
|
truefoundry/deploy/builder/__init__.py,sha256=1qjHMNBE1poRCZW0WrG46dFM1f1IlivD5352qzsioMU,4953
|
|
41
46
|
truefoundry/deploy/builder/builders/__init__.py,sha256=tlFLXqyDaKLd4iZbo4Hcu_8gOmgtL6drnXpbmQ6x1P8,636
|
|
42
47
|
truefoundry/deploy/builder/builders/dockerfile.py,sha256=AXXTziCkaqIhuM_bwyD1vT1znOwemN1TKgU7eyo-KuM,1522
|
|
@@ -48,54 +53,46 @@ truefoundry/deploy/builder/constants.py,sha256=amUkHoHvVKzGv0v_knfiioRuKiJM0V0xW
|
|
|
48
53
|
truefoundry/deploy/builder/docker_service.py,sha256=OI8efqK0Gnoii8bcHihpA2StwHVzsMREfBk7NvMR4hY,3950
|
|
49
54
|
truefoundry/deploy/builder/utils.py,sha256=D68-bqM0NQx-Elg-56mtkENyVyg9faZ9tgTmBuo1Sjs,1076
|
|
50
55
|
truefoundry/deploy/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
51
|
-
truefoundry/deploy/cli/cli.py,sha256=BuAW-R98oz1wzPDg00fPgrK1UDoCfy0Tu6pWW9Ud1Ns,2887
|
|
52
56
|
truefoundry/deploy/cli/commands/__init__.py,sha256=-i3ltscehEO0hy-Cf6gPLaiobfv8tZetPKaaCyR9B3M,1364
|
|
53
|
-
truefoundry/deploy/cli/commands/apply_command.py,sha256=
|
|
54
|
-
truefoundry/deploy/cli/commands/build_command.py,sha256=
|
|
55
|
-
truefoundry/deploy/cli/commands/build_logs_command.py,sha256=
|
|
56
|
-
truefoundry/deploy/cli/commands/create_command.py,sha256=
|
|
57
|
-
truefoundry/deploy/cli/commands/delete_command.py,sha256=
|
|
58
|
-
truefoundry/deploy/cli/commands/deploy_command.py,sha256=
|
|
59
|
-
truefoundry/deploy/cli/commands/deploy_init_command.py,sha256=
|
|
60
|
-
truefoundry/deploy/cli/commands/get_command.py,sha256=
|
|
61
|
-
truefoundry/deploy/cli/commands/list_command.py,sha256=
|
|
62
|
-
truefoundry/deploy/cli/commands/login_command.py,sha256=
|
|
63
|
-
truefoundry/deploy/cli/commands/logout_command.py,sha256=
|
|
64
|
-
truefoundry/deploy/cli/commands/logs_command.py,sha256=
|
|
65
|
-
truefoundry/deploy/cli/commands/patch_application_command.py,sha256=
|
|
66
|
-
truefoundry/deploy/cli/commands/patch_command.py,sha256=
|
|
67
|
-
truefoundry/deploy/cli/commands/redeploy_command.py,sha256
|
|
68
|
-
truefoundry/deploy/cli/commands/terminate_comand.py,sha256=
|
|
69
|
-
truefoundry/deploy/cli/commands/trigger_command.py,sha256=
|
|
70
|
-
truefoundry/deploy/cli/config.py,sha256=tf8w4UfVzcC6eYkENvuuCPYt_V3sqVpO1bclORV9tAk,206
|
|
71
|
-
truefoundry/deploy/cli/console.py,sha256=9-dMy4YPisCJQziRKTg8Qa0UJnOGl1soiUnJjsnLDvE,242
|
|
72
|
-
truefoundry/deploy/cli/const.py,sha256=dVHPo1uAiDSSMXwXoT2mR5kNQjExT98QNVRz98Hz_Ts,510
|
|
73
|
-
truefoundry/deploy/cli/display_util.py,sha256=gq8EBdpBMHUzYQp_hxOg9EOYi08FIHgOVFCqXqC2tuo,3044
|
|
74
|
-
truefoundry/deploy/cli/util.py,sha256=bxbNEX3mbhtDpXw3b2GAnbxe0xvCF9N1sCMK6yatz0Q,3689
|
|
57
|
+
truefoundry/deploy/cli/commands/apply_command.py,sha256=Y2e_C8HVpo8CssVod-3JRz-89qStC5JRaNzJ7O2mRlY,2039
|
|
58
|
+
truefoundry/deploy/cli/commands/build_command.py,sha256=zJBywMatbpUlXx5O2aqpEVmPeBIJ9RNnG9abSc8C8CE,1234
|
|
59
|
+
truefoundry/deploy/cli/commands/build_logs_command.py,sha256=DE_yprQQ6PrhOQo3xsYxGWQrXSopzSYDkt3hWB4n728,2790
|
|
60
|
+
truefoundry/deploy/cli/commands/create_command.py,sha256=rCajvQvAfZU10nDZOYpRACbAATH1zj52ihTWrhnLLUc,1829
|
|
61
|
+
truefoundry/deploy/cli/commands/delete_command.py,sha256=JMibxvt1rsZ8sODa0jI1e6vavjN8Pv04ttVFURSTKTw,2362
|
|
62
|
+
truefoundry/deploy/cli/commands/deploy_command.py,sha256=B5taHuy2qRJEwco78kroMEAj6uf2_UMYatqb4Rn2-ko,3986
|
|
63
|
+
truefoundry/deploy/cli/commands/deploy_init_command.py,sha256=g-jBfrEmhZ0TDWsyqPDn4K6q33EqJSGmBTt1eMYig-w,600
|
|
64
|
+
truefoundry/deploy/cli/commands/get_command.py,sha256=HZQGWib-qrS0RdzctRDwDLfMGu0wqWkAM1u26cTZlsc,5944
|
|
65
|
+
truefoundry/deploy/cli/commands/list_command.py,sha256=zKu_JWY35eMIzgSNFYtmwi2uezZ4k-8yk3C1Vqsvshc,4470
|
|
66
|
+
truefoundry/deploy/cli/commands/login_command.py,sha256=EHZH3cDQdbVWMkuFxd7JfB0B0Dr89sUmt214ICBmspY,1024
|
|
67
|
+
truefoundry/deploy/cli/commands/logout_command.py,sha256=u3kfrEp0ETbrz40KjD4GCC3XEZ5YRAlrca_Df4U_mk0,536
|
|
68
|
+
truefoundry/deploy/cli/commands/logs_command.py,sha256=osl2z5VaIceB9sYa6GtwsuyAPZKcw-A0oVEt3g1f62Q,4140
|
|
69
|
+
truefoundry/deploy/cli/commands/patch_application_command.py,sha256=YdTlkWGI2gCMoVAgPJtybjuvRFqZq9tp6TqbCpwgXUY,2443
|
|
70
|
+
truefoundry/deploy/cli/commands/patch_command.py,sha256=wA95khMO9uVz8SaJlgYMUwaX7HagtchjyxXXATq83Bk,1665
|
|
71
|
+
truefoundry/deploy/cli/commands/redeploy_command.py,sha256=JNeSK3itsirrKYJh3q-Cc10pCtYR9bojsvI8up6_0wI,1018
|
|
72
|
+
truefoundry/deploy/cli/commands/terminate_comand.py,sha256=UKhOdbAej8ubX3q44vpLrOotAcvH4vHpRZJQrRf_AfM,1077
|
|
73
|
+
truefoundry/deploy/cli/commands/trigger_command.py,sha256=_qSl-AShepZpbGUGTfLfJGd74VJJ_wd3eXYt2DfxIFo,4716
|
|
75
74
|
truefoundry/deploy/core/__init__.py,sha256=j61bMWj4BkWihdssKMSFhieo7afJDtpc7qO7zk1rDB4,140
|
|
76
75
|
truefoundry/deploy/core/login.py,sha256=N2VrW3nlBzoyoYulkipxwQvCpjBhi3sfsmhxK1ktWhg,236
|
|
77
76
|
truefoundry/deploy/core/logout.py,sha256=TpWLq4_DsxYS5GX2OJQGDhekNOfiOLb-vO5khQueHXw,80
|
|
78
77
|
truefoundry/deploy/io/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
79
78
|
truefoundry/deploy/io/output_callback.py,sha256=V2YwUFec4G4a67lM4r-x_64AqdOVNo_9sTdfQWLlvi0,604
|
|
80
79
|
truefoundry/deploy/io/rich_output_callback.py,sha256=TJLiRD-EnFVwgcepxR7WN0koKqW1X2DevETPhNPi_nU,829
|
|
81
|
-
truefoundry/deploy/json_util.py,sha256=x_-7YYQ4_HUIJ8ofOcclAp9JWhgTWjR9Th6Q0FuRqGk,175
|
|
82
80
|
truefoundry/deploy/lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
83
81
|
truefoundry/deploy/lib/auth/servicefoundry_session.py,sha256=5TCYPunAygtn5mb0mp_VcWKEalKMKPbyWMWer-Vty2g,1916
|
|
84
82
|
truefoundry/deploy/lib/clients/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
85
|
-
truefoundry/deploy/lib/clients/servicefoundry_client.py,sha256=
|
|
86
|
-
truefoundry/deploy/lib/const.py,sha256=
|
|
83
|
+
truefoundry/deploy/lib/clients/servicefoundry_client.py,sha256=yhHsHo9T0mTbum7X2sOuNVf-am1AdtzyK0KBQkdC0io,26212
|
|
84
|
+
truefoundry/deploy/lib/const.py,sha256=Wg0GDnfFu-g1fJr4lU80NH2ULw0R0dYjV7LnW-PbOeM,173
|
|
87
85
|
truefoundry/deploy/lib/dao/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
88
86
|
truefoundry/deploy/lib/dao/application.py,sha256=xUqF34abde71YZo9gkR-WvVJi1C6nBeGBNw4kL5FdIo,9226
|
|
89
|
-
truefoundry/deploy/lib/dao/apply.py,sha256=
|
|
87
|
+
truefoundry/deploy/lib/dao/apply.py,sha256=Jadfa3DcbIRz-Bb4Tlixed179HLDnmDXOlrvSxfEgQ0,3021
|
|
90
88
|
truefoundry/deploy/lib/dao/version.py,sha256=AtdW_4O1DPUKdfv2qy6iUJsZ_95vM6z0AqeEy3WDKs8,1130
|
|
91
|
-
truefoundry/deploy/lib/dao/workspace.py,sha256=
|
|
92
|
-
truefoundry/deploy/lib/exceptions.py,sha256=ZT2o3mar3BYtnjKHn2wf4rBGEaFIgf-zkQmzDicg6Ps,236
|
|
89
|
+
truefoundry/deploy/lib/dao/workspace.py,sha256=KZA8QrlOTecFLAi4Xt0qJ0hNwQL76UYsTKJgZbsA_5s,2349
|
|
93
90
|
truefoundry/deploy/lib/logs_utils.py,sha256=SQxRv3jDDmgHdOUMhlMaAPGYskybnBUMpst7QU_i_sc,1469
|
|
94
91
|
truefoundry/deploy/lib/messages.py,sha256=nhp0bCYf_XpUM68hTq5lBY-__vtEyV2uP7NgnJXJ_Vg,925
|
|
95
92
|
truefoundry/deploy/lib/model/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
96
|
-
truefoundry/deploy/lib/model/entity.py,sha256=
|
|
93
|
+
truefoundry/deploy/lib/model/entity.py,sha256=3YRdyvMYI1aUXUu2tB5b5lZWwpxKdAhjpT79gzTCZGo,8373
|
|
97
94
|
truefoundry/deploy/lib/session.py,sha256=Vg6rCA315T0yS0xG4ayJ84Ia_9ZfibH8utOSwPBMAmw,4953
|
|
98
|
-
truefoundry/deploy/lib/util.py,sha256=
|
|
95
|
+
truefoundry/deploy/lib/util.py,sha256=J7r8San2wKo48A7-BlH2-OKTlBO67zlPjLEhMsL8os0,1059
|
|
99
96
|
truefoundry/deploy/lib/win32.py,sha256=1RcvPTdlOAJ48rt8rCbE2Ufha2ztRqBAE9dueNXArrY,5009
|
|
100
97
|
truefoundry/deploy/python_deploy_codegen.py,sha256=qJHH1BJQII9e6PhkcRFYiE_3De7_VMMm8nM4AX5Eq1o,6513
|
|
101
98
|
truefoundry/deploy/v2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -107,7 +104,7 @@ truefoundry/deploy/v2/lib/models.py,sha256=pSolLMTArDuYpeNsmeeS5DWliloN_iCDfZSpR
|
|
|
107
104
|
truefoundry/deploy/v2/lib/patched_models.py,sha256=NTU8J_CwdvEuF9zNXwFyN3suOp_196Wrm75DDy5qcXE,14184
|
|
108
105
|
truefoundry/deploy/v2/lib/source.py,sha256=VHKuFREiixUP40D3Mrz-TA70spu1M0RbCzl--qwlFaY,9263
|
|
109
106
|
truefoundry/logger.py,sha256=u-YCNjg5HBwE70uQcpjIG64Ghos-K2ulTWaxC03BSj4,714
|
|
110
|
-
truefoundry/ml/__init__.py,sha256=
|
|
107
|
+
truefoundry/ml/__init__.py,sha256=ssUEIs8BixPWxynKoeSh-dkRl6AtLXG0PBGYnUR5Az8,2217
|
|
111
108
|
truefoundry/ml/artifact/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
112
109
|
truefoundry/ml/artifact/truefoundry_artifact_repo.py,sha256=FksxhUpRHb9pgWZmAB16DhXqkAL6UIAPA1S3RJUApQU,46201
|
|
113
110
|
truefoundry/ml/autogen/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -316,10 +313,10 @@ truefoundry/ml/autogen/models/schema.py,sha256=IhpO9qbygLqEamP3NIt3m90SseJXCOm1Z
|
|
|
316
313
|
truefoundry/ml/autogen/models/signature.py,sha256=rBjpxUIsEeWM0sIyYG5uCJB18DKHR4k5yZw8TzuoP48,4987
|
|
317
314
|
truefoundry/ml/autogen/models/utils.py,sha256=c7RtSLXhOLcP8rjuUtfnMdaKVTZvvbsmw98gPAkAFrs,24371
|
|
318
315
|
truefoundry/ml/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
319
|
-
truefoundry/ml/cli/cli.py,sha256=
|
|
316
|
+
truefoundry/ml/cli/cli.py,sha256=MwpY7z_NEeJE_XIP7XbZELjNeu2vpMmohttHCKDRk54,335
|
|
320
317
|
truefoundry/ml/cli/commands/__init__.py,sha256=diDUiRUX4l6TtNLI4iF-ZblczkELM7FRViJ-8gGNJQY,82
|
|
321
|
-
truefoundry/ml/cli/commands/download.py,sha256=
|
|
322
|
-
truefoundry/ml/cli/commands/model_init.py,sha256=
|
|
318
|
+
truefoundry/ml/cli/commands/download.py,sha256=N9MhsEQ3U24v_OmnMZT8Q4SoAi38Sm7a21unrACOSDw,2573
|
|
319
|
+
truefoundry/ml/cli/commands/model_init.py,sha256=9fHCernmQswjEhREzdrnKxwCCWkgmFrpL29H52Sd1gQ,2663
|
|
323
320
|
truefoundry/ml/cli/utils.py,sha256=j6_mZ4Spn114mz3P4QQ8jx0tmorXIuyQnHXVUSDvZi4,1035
|
|
324
321
|
truefoundry/ml/clients/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
325
322
|
truefoundry/ml/clients/entities.py,sha256=sNP4DnAVdQoMfc06s0r3VTzKHTo7jmxAOuTlQOVmsMs,151
|
|
@@ -347,9 +344,9 @@ truefoundry/ml/log_types/plot.py,sha256=HuYvvRA5r8V0xAIuuqMME2IHb9d3SfGHUiuEkOP3
|
|
|
347
344
|
truefoundry/ml/log_types/pydantic_base.py,sha256=eBlw_AEyAz4iJKDP4zgJOCFWcldwQqpf7FADW1jzIQY,272
|
|
348
345
|
truefoundry/ml/log_types/utils.py,sha256=xjJ21jdPScvFmw3TbVh5NCzbzJwaqiXJyiiT4xxX1EI,335
|
|
349
346
|
truefoundry/ml/logger.py,sha256=VT-BF3BnBYTWVq87O58F0c8uXMu94gYzsiFlGY3_7Ao,458
|
|
350
|
-
truefoundry/ml/mlfoundry_api.py,sha256=
|
|
351
|
-
truefoundry/ml/mlfoundry_run.py,sha256=
|
|
352
|
-
truefoundry/ml/model_framework.py,sha256=
|
|
347
|
+
truefoundry/ml/mlfoundry_api.py,sha256=avuGgjbRnQXk774Vd3Dx7n99bbrOkL9pob9DI-vNvWE,62368
|
|
348
|
+
truefoundry/ml/mlfoundry_run.py,sha256=scHjdjojRGbE4ZZlByZTFrcBTamRbm_JGidaSX9Gi9o,44601
|
|
349
|
+
truefoundry/ml/model_framework.py,sha256=xHmVFI3Xcd6z6BH9TyZY8kFiw3Fp70423_M_wTYxd5Y,18841
|
|
353
350
|
truefoundry/ml/run_utils.py,sha256=0W208wSLUrbdfk2pjNcZlkUi9bNxG2JORqoe-5rVqHI,2423
|
|
354
351
|
truefoundry/ml/session.py,sha256=F83GTC5WwGBjnJ69Ct8MqMnlutYc56JCc6YhEY1Wl-A,5394
|
|
355
352
|
truefoundry/ml/validation_utils.py,sha256=J5atNhcJLvKj64ralSV9Y5Fv1Rt4SE237ICdP9-7sP4,12149
|
|
@@ -370,7 +367,7 @@ truefoundry/workflow/remote_filesystem/tfy_signed_url_client.py,sha256=5mBCIc-ON
|
|
|
370
367
|
truefoundry/workflow/remote_filesystem/tfy_signed_url_fs.py,sha256=Hf6Dk6Fu6P7DqsK5ULgraf9DStjgigf-kjaRAMBW-RU,8680
|
|
371
368
|
truefoundry/workflow/task.py,sha256=ToitYiKcNzFCtOVQwz1W8sRjbR97eVS7vQBdbgUQtKg,1779
|
|
372
369
|
truefoundry/workflow/workflow.py,sha256=WaTqUjhwfAXDWu4E5ehuwAxrCbDJkoAf1oWmR2E9Qy0,4575
|
|
373
|
-
truefoundry-0.5.
|
|
374
|
-
truefoundry-0.5.
|
|
375
|
-
truefoundry-0.5.
|
|
376
|
-
truefoundry-0.5.
|
|
370
|
+
truefoundry-0.5.2.dist-info/METADATA,sha256=6hHSeJgoWF54g-W-F9zKjBcHi1irRbByE2aTXb-3qPo,2884
|
|
371
|
+
truefoundry-0.5.2.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
|
372
|
+
truefoundry-0.5.2.dist-info/entry_points.txt,sha256=TXvUxQkI6zmqJuycPsyxEIMr3oqfDjgrWj0m_9X12x4,95
|
|
373
|
+
truefoundry-0.5.2.dist-info/RECORD,,
|
truefoundry/deploy/cli/cli.py
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import logging
|
|
2
|
-
import sys
|
|
3
|
-
|
|
4
|
-
import rich_click as click
|
|
5
|
-
|
|
6
|
-
from truefoundry import logger
|
|
7
|
-
from truefoundry.deploy.cli.commands import (
|
|
8
|
-
get_apply_command,
|
|
9
|
-
get_build_command,
|
|
10
|
-
get_delete_command,
|
|
11
|
-
get_deploy_command,
|
|
12
|
-
get_deploy_init_command,
|
|
13
|
-
get_login_command,
|
|
14
|
-
get_logout_command,
|
|
15
|
-
get_patch_application_command,
|
|
16
|
-
get_patch_command,
|
|
17
|
-
get_terminate_command,
|
|
18
|
-
get_trigger_command,
|
|
19
|
-
)
|
|
20
|
-
from truefoundry.deploy.cli.config import CliConfig
|
|
21
|
-
from truefoundry.deploy.cli.const import GROUP_CLS
|
|
22
|
-
from truefoundry.deploy.cli.util import setup_rich_click
|
|
23
|
-
from truefoundry.deploy.lib.util import is_debug_env_set, is_internal_env_set
|
|
24
|
-
from truefoundry.version import __version__
|
|
25
|
-
|
|
26
|
-
click.rich_click.USE_RICH_MARKUP = True
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
def create_truefoundry_cli() -> click.MultiCommand:
|
|
30
|
-
"""Generates CLI by combining all subcommands into a main CLI and returns in
|
|
31
|
-
|
|
32
|
-
Returns:
|
|
33
|
-
function: main CLI functions will all added sub-commands
|
|
34
|
-
"""
|
|
35
|
-
cli = truefoundry_cli
|
|
36
|
-
cli.add_command(get_login_command())
|
|
37
|
-
cli.add_command(get_logout_command())
|
|
38
|
-
cli.add_command(get_apply_command())
|
|
39
|
-
cli.add_command(get_deploy_command())
|
|
40
|
-
cli.add_command(get_deploy_init_command())
|
|
41
|
-
cli.add_command(get_patch_application_command())
|
|
42
|
-
cli.add_command(get_delete_command())
|
|
43
|
-
cli.add_command(get_trigger_command())
|
|
44
|
-
cli.add_command(get_terminate_command())
|
|
45
|
-
|
|
46
|
-
if not (sys.platform.startswith("win32") or sys.platform.startswith("cygwin")):
|
|
47
|
-
cli.add_command(get_patch_command())
|
|
48
|
-
|
|
49
|
-
if is_internal_env_set():
|
|
50
|
-
cli.add_command(get_build_command())
|
|
51
|
-
return cli
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
CONTEXT_SETTINGS = dict(help_option_names=["-h", "--help"]) # noqa: C408
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
@click.group(
|
|
58
|
-
cls=GROUP_CLS, context_settings=CONTEXT_SETTINGS, invoke_without_command=True
|
|
59
|
-
)
|
|
60
|
-
@click.option(
|
|
61
|
-
"--json",
|
|
62
|
-
is_flag=True,
|
|
63
|
-
help="Output entities in json format instead of formatted tables",
|
|
64
|
-
)
|
|
65
|
-
@click.option(
|
|
66
|
-
"--debug",
|
|
67
|
-
is_flag=True,
|
|
68
|
-
default=is_debug_env_set,
|
|
69
|
-
help="Set logging level to Debug. Can also be set using environment variable. E.g. SFY_DEBUG=1",
|
|
70
|
-
)
|
|
71
|
-
@click.version_option(__version__)
|
|
72
|
-
@click.pass_context
|
|
73
|
-
def truefoundry_cli(ctx, json, debug):
|
|
74
|
-
"""
|
|
75
|
-
TrueFoundry provides an easy way to deploy your Services, Jobs and Models.
|
|
76
|
-
\b
|
|
77
|
-
|
|
78
|
-
To start, login to your TrueFoundry account with [b]tfy login[/]
|
|
79
|
-
|
|
80
|
-
Then start deploying with [b]tfy deploy[/]
|
|
81
|
-
|
|
82
|
-
And more: [link=https://docs.truefoundry.com/docs]https://docs.truefoundry.com/docs[/]
|
|
83
|
-
|
|
84
|
-
"""
|
|
85
|
-
setup_rich_click()
|
|
86
|
-
# TODO (chiragjn): Change this to -o json|yaml|table|pager
|
|
87
|
-
CliConfig.set("json", json)
|
|
88
|
-
if ctx.invoked_subcommand is None:
|
|
89
|
-
click.echo(ctx.get_help())
|
|
90
|
-
log_level = logging.INFO
|
|
91
|
-
# no info logs while outputting json
|
|
92
|
-
if json:
|
|
93
|
-
log_level = logging.ERROR
|
|
94
|
-
if debug:
|
|
95
|
-
log_level = logging.DEBUG
|
|
96
|
-
logger.add_cli_handler(level=log_level)
|
truefoundry/deploy/json_util.py
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|