truefoundry 0.5.7rc1__py3-none-any.whl → 0.5.8rc2__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/cli/__main__.py +2 -2
- truefoundry/common/credential_provider.py +1 -1
- truefoundry/common/entities.py +2 -4
- truefoundry/common/servicefoundry_client.py +7 -2
- truefoundry/common/types.py +7 -0
- truefoundry/common/utils.py +1 -1
- truefoundry/deploy/builder/docker_service.py +1 -1
- truefoundry/deploy/cli/commands/deploy_command.py +3 -5
- truefoundry/deploy/lib/clients/servicefoundry_client.py +4 -7
- truefoundry/deploy/v2/lib/deploy.py +5 -5
- truefoundry/deploy/v2/lib/deploy_workflow.py +8 -5
- truefoundry/deploy/v2/lib/deployable_patched_models.py +13 -9
- truefoundry/deploy/v2/lib/models.py +1 -1
- truefoundry/deploy/v2/lib/patched_models.py +1 -1
- truefoundry/deploy/v2/lib/source.py +2 -1
- truefoundry/ml/log_types/plot.py +2 -2
- truefoundry/ml/mlfoundry_run.py +1 -1
- truefoundry-0.5.8rc2.dist-info/METADATA +72 -0
- {truefoundry-0.5.7rc1.dist-info → truefoundry-0.5.8rc2.dist-info}/RECORD +60 -64
- {truefoundry-0.5.7rc1.dist-info → truefoundry-0.5.8rc2.dist-info}/WHEEL +1 -1
- truefoundry-0.5.8rc2.dist-info/entry_points.txt +3 -0
- truefoundry/workflow/example/deploy.sh +0 -1
- truefoundry/workflow/example/hello_world_package/workflow.py +0 -20
- truefoundry/workflow/example/package/test_workflow.py +0 -151
- truefoundry/workflow/example/truefoundry.yaml +0 -9
- truefoundry/workflow/example/workflow.yaml +0 -116
- truefoundry-0.5.7rc1.dist-info/METADATA +0 -79
- truefoundry-0.5.7rc1.dist-info/entry_points.txt +0 -4
truefoundry/cli/__main__.py
CHANGED
|
@@ -71,7 +71,7 @@ def truefoundry_cli(ctx, json, debug):
|
|
|
71
71
|
logger.add_cli_handler(level=log_level)
|
|
72
72
|
|
|
73
73
|
|
|
74
|
-
def create_truefoundry_cli() -> click.
|
|
74
|
+
def create_truefoundry_cli() -> click.Group:
|
|
75
75
|
"""Generates CLI by combining all subcommands into a main CLI and returns in
|
|
76
76
|
|
|
77
77
|
Returns:
|
|
@@ -105,7 +105,7 @@ def main():
|
|
|
105
105
|
try:
|
|
106
106
|
cli = create_truefoundry_cli()
|
|
107
107
|
except Exception as e:
|
|
108
|
-
raise click.
|
|
108
|
+
raise click.UsageError(message=str(e)) from e
|
|
109
109
|
sys.exit(cli())
|
|
110
110
|
|
|
111
111
|
|
|
@@ -38,7 +38,7 @@ class EnvCredentialProvider(CredentialProvider):
|
|
|
38
38
|
)
|
|
39
39
|
self._host = resolve_tfy_host()
|
|
40
40
|
self._auth_service = AuthServiceClient.from_tfy_host(tfy_host=self._host)
|
|
41
|
-
self._token: Token = Token(access_token=api_key, refresh_token=None)
|
|
41
|
+
self._token: Token = Token(access_token=api_key, refresh_token=None)
|
|
42
42
|
|
|
43
43
|
@staticmethod
|
|
44
44
|
def can_provide() -> bool:
|
truefoundry/common/entities.py
CHANGED
|
@@ -62,7 +62,7 @@ class Token(BaseModel):
|
|
|
62
62
|
return (exp - time.time()) < buffer_in_seconds
|
|
63
63
|
|
|
64
64
|
def to_user_info(self) -> UserInfo:
|
|
65
|
-
return UserInfo(
|
|
65
|
+
return UserInfo(
|
|
66
66
|
user_id=self.decoded_value["username"],
|
|
67
67
|
email=self.decoded_value["email"]
|
|
68
68
|
if "email" in self.decoded_value
|
|
@@ -81,9 +81,7 @@ class CredentialsFileContent(BaseModel):
|
|
|
81
81
|
host: NonEmptyStr
|
|
82
82
|
|
|
83
83
|
def to_token(self) -> Token:
|
|
84
|
-
return Token(
|
|
85
|
-
access_token=self.access_token, refresh_token=self.refresh_token
|
|
86
|
-
)
|
|
84
|
+
return Token(access_token=self.access_token, refresh_token=self.refresh_token)
|
|
87
85
|
|
|
88
86
|
|
|
89
87
|
class TenantInfo(BaseModel):
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
import functools
|
|
4
|
+
from typing import Callable, TypeVar
|
|
4
5
|
|
|
5
6
|
import requests
|
|
6
7
|
from packaging import version
|
|
8
|
+
from typing_extensions import ParamSpec
|
|
7
9
|
|
|
8
10
|
from truefoundry.common.constants import (
|
|
9
11
|
SERVICEFOUNDRY_CLIENT_MAX_RETRIES,
|
|
@@ -24,10 +26,13 @@ from truefoundry.common.utils import (
|
|
|
24
26
|
from truefoundry.logger import logger
|
|
25
27
|
from truefoundry.version import __version__
|
|
26
28
|
|
|
29
|
+
P = ParamSpec("P")
|
|
30
|
+
R = TypeVar("R")
|
|
27
31
|
|
|
28
|
-
|
|
32
|
+
|
|
33
|
+
def check_min_cli_version(fn: Callable[P, R]) -> Callable[P, R]:
|
|
29
34
|
@functools.wraps(fn)
|
|
30
|
-
def inner(*args, **kwargs):
|
|
35
|
+
def inner(*args: P.args, **kwargs: P.kwargs) -> R:
|
|
31
36
|
client: "ServiceFoundryServiceClient" = args[0]
|
|
32
37
|
client.check_min_cli_version()
|
|
33
38
|
return fn(*args, **kwargs)
|
truefoundry/common/utils.py
CHANGED
|
@@ -53,7 +53,7 @@ def get_tfy_servers_config(tfy_host: str) -> _TFYServersConfig:
|
|
|
53
53
|
global _tfy_servers_config
|
|
54
54
|
if _tfy_servers_config is None:
|
|
55
55
|
if ENV_VARS.TFY_CLI_LOCAL_DEV_MODE:
|
|
56
|
-
_tfy_servers_config = _TFYServersConfig()
|
|
56
|
+
_tfy_servers_config = _TFYServersConfig()
|
|
57
57
|
else:
|
|
58
58
|
_tfy_servers_config = _TFYServersConfig.from_tfy_host(tfy_host)
|
|
59
59
|
return _tfy_servers_config
|
|
@@ -38,7 +38,7 @@ def _catch_error_in_push(response: List[dict]):
|
|
|
38
38
|
for line in response:
|
|
39
39
|
if line.get("error") is not None:
|
|
40
40
|
raise Exception(
|
|
41
|
-
f
|
|
41
|
+
f"Failed to push to registry with message '{line.get('error')}'"
|
|
42
42
|
)
|
|
43
43
|
|
|
44
44
|
|
|
@@ -55,7 +55,7 @@ def _get_default_spec_file():
|
|
|
55
55
|
help="Wait and tail the deployment progress",
|
|
56
56
|
)
|
|
57
57
|
@click.option(
|
|
58
|
-
"--force
|
|
58
|
+
"--force/--no-force",
|
|
59
59
|
is_flag=True,
|
|
60
60
|
show_default=True,
|
|
61
61
|
default=False,
|
|
@@ -68,7 +68,7 @@ def deploy_command(
|
|
|
68
68
|
file: str,
|
|
69
69
|
workspace_fqn: Optional[str],
|
|
70
70
|
wait: bool,
|
|
71
|
-
|
|
71
|
+
force: bool = False,
|
|
72
72
|
):
|
|
73
73
|
if ctx.invoked_subcommand is not None:
|
|
74
74
|
return
|
|
@@ -85,9 +85,7 @@ def deploy_command(
|
|
|
85
85
|
application_definition = yaml.safe_load(f)
|
|
86
86
|
|
|
87
87
|
application = Application.parse_obj(application_definition)
|
|
88
|
-
application.deploy(
|
|
89
|
-
workspace_fqn=workspace_fqn, wait=wait, force_deploy=force_deploy
|
|
90
|
-
)
|
|
88
|
+
application.deploy(workspace_fqn=workspace_fqn, wait=wait, force=force)
|
|
91
89
|
sys.exit(0)
|
|
92
90
|
|
|
93
91
|
click.echo(
|
|
@@ -4,7 +4,7 @@ import json
|
|
|
4
4
|
import os
|
|
5
5
|
import time
|
|
6
6
|
from datetime import datetime, timezone
|
|
7
|
-
from typing import
|
|
7
|
+
from typing import Any, Dict, List, Optional
|
|
8
8
|
from urllib.parse import urljoin
|
|
9
9
|
|
|
10
10
|
import requests
|
|
@@ -50,9 +50,6 @@ DEPLOYMENT_LOGS_SUBSCRIBE_MESSAGE = "DEPLOYMENT_LOGS"
|
|
|
50
50
|
BUILD_LOGS_SUBSCRIBE_MESSAGE = "BUILD_LOGS"
|
|
51
51
|
MAX_RETRIES_WORKFLOW_TRIGGER = 3
|
|
52
52
|
|
|
53
|
-
if TYPE_CHECKING:
|
|
54
|
-
from truefoundry.deploy.auto_gen.models import Application
|
|
55
|
-
|
|
56
53
|
|
|
57
54
|
def _upload_packaged_code(metadata, package_file):
|
|
58
55
|
file_size = os.stat(package_file).st_size
|
|
@@ -242,13 +239,13 @@ class ServiceFoundryServiceClient(BaseServiceFoundryServiceClient):
|
|
|
242
239
|
self,
|
|
243
240
|
workspace_id: str,
|
|
244
241
|
application: auto_gen_models.Workflow,
|
|
245
|
-
|
|
242
|
+
force: bool = False,
|
|
246
243
|
) -> Deployment:
|
|
247
244
|
data = {
|
|
248
245
|
"workspaceId": workspace_id,
|
|
249
246
|
"name": application.name,
|
|
250
247
|
"manifest": application.dict(exclude_none=True),
|
|
251
|
-
"forceDeploy":
|
|
248
|
+
"forceDeploy": force,
|
|
252
249
|
}
|
|
253
250
|
logger.debug(json.dumps(data))
|
|
254
251
|
url = f"{self._api_server_url}/{VERSION_PREFIX}/deployment"
|
|
@@ -265,7 +262,7 @@ class ServiceFoundryServiceClient(BaseServiceFoundryServiceClient):
|
|
|
265
262
|
time_obj.replace(tzinfo=timezone.utc)
|
|
266
263
|
local_time = time_obj.astimezone(tzlocal())
|
|
267
264
|
local_time_str = local_time.isoformat()
|
|
268
|
-
return f
|
|
265
|
+
return f"[{local_time_str}] {log['log'].strip()}"
|
|
269
266
|
|
|
270
267
|
def _tail_logs(
|
|
271
268
|
self,
|
|
@@ -214,8 +214,8 @@ No Workspace FQN was provided or mentioned in the spec.
|
|
|
214
214
|
Either add a `workspace_fqn` to your yaml spec as
|
|
215
215
|
|
|
216
216
|
```
|
|
217
|
-
name: {getattr(component,
|
|
218
|
-
type: {getattr(component,
|
|
217
|
+
name: {getattr(component, "name", "my-app")}
|
|
218
|
+
type: {getattr(component, "type", "undefined")}
|
|
219
219
|
...
|
|
220
220
|
workspace_fqn: <your workspace fqn>
|
|
221
221
|
```
|
|
@@ -224,7 +224,7 @@ or Python deployment spec as
|
|
|
224
224
|
|
|
225
225
|
```
|
|
226
226
|
app = {component.__class__.__name__}(
|
|
227
|
-
name='{getattr(component,
|
|
227
|
+
name='{getattr(component, "name", "my-app")}',
|
|
228
228
|
...
|
|
229
229
|
workspace_fqn='<your workspace fqn>'
|
|
230
230
|
)
|
|
@@ -252,7 +252,7 @@ def deploy_component(
|
|
|
252
252
|
component: Component,
|
|
253
253
|
workspace_fqn: Optional[str] = None,
|
|
254
254
|
wait: bool = True,
|
|
255
|
-
|
|
255
|
+
force: bool = False,
|
|
256
256
|
) -> Deployment:
|
|
257
257
|
_warn_when_gpu_selected_without_cuda(component=component)
|
|
258
258
|
workspace_fqn = _resolve_workspace_fqn(
|
|
@@ -274,7 +274,7 @@ def deploy_component(
|
|
|
274
274
|
response = client.deploy_application(
|
|
275
275
|
workspace_id=workspace_id,
|
|
276
276
|
application=updated_component,
|
|
277
|
-
|
|
277
|
+
force=force,
|
|
278
278
|
)
|
|
279
279
|
logger.info(
|
|
280
280
|
"🚀 Deployment started for application '%s'. Deployment FQN is '%s'.",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import os
|
|
2
2
|
import sys
|
|
3
3
|
from pathlib import Path
|
|
4
|
-
from typing import
|
|
4
|
+
from typing import Dict, List, Optional, Union
|
|
5
5
|
|
|
6
6
|
import requirements
|
|
7
7
|
from flytekit.configuration import (
|
|
@@ -19,6 +19,7 @@ from flytekit.tools.translator import TaskSpec as FlyteTaskSpec
|
|
|
19
19
|
from flytekit.tools.translator import WorkflowSpec as FlyteWorkflowSpec
|
|
20
20
|
from google.protobuf.json_format import MessageToDict
|
|
21
21
|
|
|
22
|
+
from truefoundry.common.types import UploadCodePackageCallable
|
|
22
23
|
from truefoundry.deploy.auto_gen import models as auto_gen_models
|
|
23
24
|
from truefoundry.deploy.lib.clients.servicefoundry_client import (
|
|
24
25
|
ServiceFoundryServiceClient,
|
|
@@ -39,7 +40,7 @@ from truefoundry.workflow.workflow import (
|
|
|
39
40
|
def _handle_code_upload_for_workflow(
|
|
40
41
|
workflow: auto_gen_models.Workflow,
|
|
41
42
|
workspace_fqn: str,
|
|
42
|
-
upload_code_package:
|
|
43
|
+
upload_code_package: UploadCodePackageCallable,
|
|
43
44
|
) -> auto_gen_models.Workflow:
|
|
44
45
|
new_workflow = workflow.copy(deep=True)
|
|
45
46
|
new_workflow.source = local_source_to_remote_source(
|
|
@@ -92,7 +93,7 @@ def _is_tfy_wf_present_in_task_python_build(
|
|
|
92
93
|
|
|
93
94
|
|
|
94
95
|
def _is_dynamic_task(flyte_task: FlyteTaskSpec) -> bool:
|
|
95
|
-
envs: Dict[str
|
|
96
|
+
envs: Dict[str, str] = flyte_task.template.container.env or {}
|
|
96
97
|
return SERIALIZED_CONTEXT_ENV_VAR in envs.keys()
|
|
97
98
|
|
|
98
99
|
|
|
@@ -273,7 +274,7 @@ def deploy_workflow(
|
|
|
273
274
|
workflow: auto_gen_models.Workflow,
|
|
274
275
|
workspace_fqn: str,
|
|
275
276
|
wait: bool = True,
|
|
276
|
-
|
|
277
|
+
force: bool = False,
|
|
277
278
|
) -> Deployment:
|
|
278
279
|
_generate_manifest_for_workflow(workflow)
|
|
279
280
|
_validate_workspace_fqn(workflow, workspace_fqn)
|
|
@@ -296,7 +297,9 @@ def deploy_workflow(
|
|
|
296
297
|
)
|
|
297
298
|
|
|
298
299
|
deployment = client.deploy_application(
|
|
299
|
-
workspace_id=workspace_id,
|
|
300
|
+
workspace_id=workspace_id,
|
|
301
|
+
application=workflow,
|
|
302
|
+
force=force,
|
|
300
303
|
)
|
|
301
304
|
logger.info(
|
|
302
305
|
"🚀 Deployment started for application '%s'. Deployment FQN is '%s'.",
|
|
@@ -12,13 +12,13 @@ class DeployablePatchedModelBase(BaseModel):
|
|
|
12
12
|
extra = "forbid"
|
|
13
13
|
|
|
14
14
|
def deploy(
|
|
15
|
-
self, workspace_fqn: str, wait: bool = True,
|
|
15
|
+
self, workspace_fqn: str, wait: bool = True, force: bool = False
|
|
16
16
|
) -> Deployment:
|
|
17
17
|
return deploy_component(
|
|
18
18
|
component=self,
|
|
19
19
|
workspace_fqn=workspace_fqn,
|
|
20
20
|
wait=wait,
|
|
21
|
-
|
|
21
|
+
force=force,
|
|
22
22
|
)
|
|
23
23
|
|
|
24
24
|
|
|
@@ -26,7 +26,7 @@ class Service(models.Service, DeployablePatchedModelBase):
|
|
|
26
26
|
type: Literal["service"] = "service"
|
|
27
27
|
resources: models.Resources = Field(default_factory=models.Resources)
|
|
28
28
|
# This is being patched because cue export marks this as a "number"
|
|
29
|
-
replicas: Union[conint(ge=0, le=100), models.ServiceAutoscaling] = Field(
|
|
29
|
+
replicas: Union[conint(ge=0, le=100), models.ServiceAutoscaling] = Field( # type: ignore[valid-type]
|
|
30
30
|
1,
|
|
31
31
|
description="+label=Replicas\n+usage=Replicas of service you want to run\n+icon=fa-clone\n+sort=3",
|
|
32
32
|
)
|
|
@@ -70,7 +70,7 @@ class ApplicationSet(models.ApplicationSet, DeployablePatchedModelBase):
|
|
|
70
70
|
|
|
71
71
|
class AsyncService(models.AsyncService, DeployablePatchedModelBase):
|
|
72
72
|
type: Literal["async-service"] = "async-service"
|
|
73
|
-
replicas: Union[conint(ge=0, le=100), models.AsyncServiceAutoscaling] = 1
|
|
73
|
+
replicas: Union[conint(ge=0, le=100), models.AsyncServiceAutoscaling] = 1 # type: ignore[valid-type]
|
|
74
74
|
resources: models.Resources = Field(default_factory=models.Resources)
|
|
75
75
|
|
|
76
76
|
|
|
@@ -81,7 +81,7 @@ class SSHServer(models.SSHServer, DeployablePatchedModelBase):
|
|
|
81
81
|
|
|
82
82
|
class Application(models.Application, DeployablePatchedModelBase):
|
|
83
83
|
def deploy(
|
|
84
|
-
self, workspace_fqn: str, wait: bool = True,
|
|
84
|
+
self, workspace_fqn: str, wait: bool = True, force: bool = False
|
|
85
85
|
) -> Deployment:
|
|
86
86
|
if isinstance(self.__root__, models.Workflow):
|
|
87
87
|
from truefoundry.deploy.v2.lib.deploy_workflow import deploy_workflow
|
|
@@ -90,14 +90,14 @@ class Application(models.Application, DeployablePatchedModelBase):
|
|
|
90
90
|
workflow=self.__root__,
|
|
91
91
|
workspace_fqn=workspace_fqn,
|
|
92
92
|
wait=wait,
|
|
93
|
-
|
|
93
|
+
force=force,
|
|
94
94
|
)
|
|
95
95
|
else:
|
|
96
96
|
return deploy_component(
|
|
97
97
|
component=self.__root__,
|
|
98
98
|
workspace_fqn=workspace_fqn,
|
|
99
99
|
wait=wait,
|
|
100
|
-
|
|
100
|
+
force=force,
|
|
101
101
|
)
|
|
102
102
|
|
|
103
103
|
|
|
@@ -107,7 +107,11 @@ class Workflow(models.Workflow, DeployablePatchedModelBase):
|
|
|
107
107
|
default_factory=lambda: LocalSource(local_build=False)
|
|
108
108
|
)
|
|
109
109
|
|
|
110
|
-
def deploy(
|
|
110
|
+
def deploy(
|
|
111
|
+
self, workspace_fqn: str, wait: bool = True, force: bool = False
|
|
112
|
+
) -> Deployment:
|
|
111
113
|
from truefoundry.deploy.v2.lib.deploy_workflow import deploy_workflow
|
|
112
114
|
|
|
113
|
-
return deploy_workflow(
|
|
115
|
+
return deploy_workflow(
|
|
116
|
+
workflow=self, workspace_fqn=workspace_fqn, wait=wait, force=force
|
|
117
|
+
)
|
|
@@ -518,7 +518,7 @@ class ArtifactsDownload(models.ArtifactsDownload, PatchedModelBase):
|
|
|
518
518
|
|
|
519
519
|
class NvidiaGPU(models.NvidiaGPU, PatchedModelBase):
|
|
520
520
|
type: Literal["nvidia_gpu"] = "nvidia_gpu"
|
|
521
|
-
name: Optional[Union[GPUType, constr(regex=r"^tpu-[a-z\d\-]+$")]] = None
|
|
521
|
+
name: Optional[Union[GPUType, constr(regex=r"^tpu-[a-z\d\-]+$")]] = None # type: ignore[valid-type]
|
|
522
522
|
|
|
523
523
|
|
|
524
524
|
class NvidiaMIGGPU(models.NvidiaMIGGPU, PatchedModelBase):
|
|
@@ -8,6 +8,7 @@ from typing import Callable, List, Optional
|
|
|
8
8
|
import gitignorefile
|
|
9
9
|
from tqdm import tqdm
|
|
10
10
|
|
|
11
|
+
from truefoundry.common.types import UploadCodePackageCallable
|
|
11
12
|
from truefoundry.common.warnings import TrueFoundryDeprecationWarning
|
|
12
13
|
from truefoundry.deploy import builder
|
|
13
14
|
from truefoundry.deploy.auto_gen import models
|
|
@@ -136,7 +137,7 @@ def local_source_to_remote_source(
|
|
|
136
137
|
local_source: models.LocalSource,
|
|
137
138
|
workspace_fqn: str,
|
|
138
139
|
component_name: str,
|
|
139
|
-
upload_code_package:
|
|
140
|
+
upload_code_package: UploadCodePackageCallable,
|
|
140
141
|
) -> RemoteSource:
|
|
141
142
|
with tempfile.TemporaryDirectory() as local_dir:
|
|
142
143
|
package_local_path = os.path.join(local_dir, "build.tar.gz")
|
truefoundry/ml/log_types/plot.py
CHANGED
|
@@ -33,7 +33,7 @@ if TYPE_CHECKING:
|
|
|
33
33
|
PlotObjType = Union[
|
|
34
34
|
"matplotlib.figure.Figure",
|
|
35
35
|
"plotly.graph_objects.Figure",
|
|
36
|
-
"matplotlib.pyplot",
|
|
36
|
+
"matplotlib.pyplot", # type: ignore[valid-type]
|
|
37
37
|
]
|
|
38
38
|
|
|
39
39
|
|
|
@@ -103,7 +103,7 @@ def _save_matplotlib_figure(
|
|
|
103
103
|
|
|
104
104
|
|
|
105
105
|
def _save_matplotlib_plt(
|
|
106
|
-
plt: "matplotlib.pyplot",
|
|
106
|
+
plt: "matplotlib.pyplot", # type: ignore[valid-type]
|
|
107
107
|
key: str,
|
|
108
108
|
step: int,
|
|
109
109
|
local_dir: str,
|
truefoundry/ml/mlfoundry_run.py
CHANGED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: truefoundry
|
|
3
|
+
Version: 0.5.8rc2
|
|
4
|
+
Summary: TrueFoundry CLI
|
|
5
|
+
Author-email: TrueFoundry Team <abhishek@truefoundry.com>
|
|
6
|
+
Requires-Python: <3.13,>=3.8.1
|
|
7
|
+
Requires-Dist: aenum<4.0.0,>=3.0.0
|
|
8
|
+
Requires-Dist: click<9.0.0,>=7.0.0
|
|
9
|
+
Requires-Dist: coolname<2.0.0,>=1.1.0
|
|
10
|
+
Requires-Dist: docker<8.0.0,>=6.1.2
|
|
11
|
+
Requires-Dist: filelock<4.0.0,>=3.8.0
|
|
12
|
+
Requires-Dist: gitignorefile<2.0.0,>=1.1.2
|
|
13
|
+
Requires-Dist: gitpython<4.0.0,>=3.1.43
|
|
14
|
+
Requires-Dist: importlib-metadata<9.0.0,>=4.11.3
|
|
15
|
+
Requires-Dist: importlib-resources<7.0.0,>=5.2.0
|
|
16
|
+
Requires-Dist: mako<2.0.0,>=1.1.6
|
|
17
|
+
Requires-Dist: numpy<2.0.0,>=1.23.0; python_version < '3.12'
|
|
18
|
+
Requires-Dist: numpy<2.0.0,>=1.26.0; python_version >= '3.12'
|
|
19
|
+
Requires-Dist: openai<2.0.0,>=1.16.2
|
|
20
|
+
Requires-Dist: packaging<25.0,>=20.0
|
|
21
|
+
Requires-Dist: pydantic<3.0.0,>=1.8.2
|
|
22
|
+
Requires-Dist: pygments<3.0.0,>=2.12.0
|
|
23
|
+
Requires-Dist: pyjwt<3.0.0,>=2.0.0
|
|
24
|
+
Requires-Dist: python-dateutil<3.0.0,>=2.8.2
|
|
25
|
+
Requires-Dist: python-dotenv<2.0.0,>=1.0.1
|
|
26
|
+
Requires-Dist: python-socketio[client]<6.0.0,>=5.5.2
|
|
27
|
+
Requires-Dist: pyyaml<7.0.0,>=6.0.0
|
|
28
|
+
Requires-Dist: questionary<2.0.0,>=1.10.0
|
|
29
|
+
Requires-Dist: requests<3.0.0,>=2.18.0
|
|
30
|
+
Requires-Dist: requirements-parser<0.12.0,>=0.11.0
|
|
31
|
+
Requires-Dist: rich-click<2.0.0,>=1.2.1
|
|
32
|
+
Requires-Dist: rich<14.0.0,>=13.7.1
|
|
33
|
+
Requires-Dist: scipy<2.0.0,>=1.12.0; python_version >= '3.12'
|
|
34
|
+
Requires-Dist: scipy<2.0.0,>=1.5.0; python_version < '3.12'
|
|
35
|
+
Requires-Dist: tqdm<5.0.0,>=4.0.0
|
|
36
|
+
Requires-Dist: typing-extensions>=4.0
|
|
37
|
+
Requires-Dist: urllib3<3,>=1.26.18
|
|
38
|
+
Requires-Dist: yq<4.0.0,>=3.1.0
|
|
39
|
+
Provides-Extra: workflow
|
|
40
|
+
Requires-Dist: flytekit==1.13.13; extra == 'workflow'
|
|
41
|
+
Description-Content-Type: text/markdown
|
|
42
|
+
|
|
43
|
+
# TrueFoundry
|
|
44
|
+
|
|
45
|
+
TrueFoundry library to help you interact with the platform programmatically by
|
|
46
|
+
|
|
47
|
+
- Interacting with the deployments side of TrueFoundry, enabling you to manage workspaces, deployments, applications, and view logs.
|
|
48
|
+
- Providing experiment tracking capabilities, allowing you to track ML experiments and interact with ML repositories within TrueFoundry.
|
|
49
|
+
|
|
50
|
+
You can access the health of your service, monitoring links, deployed endpoints and track metadata and artifacts by logging on to TrueFoundry's dashboard.
|
|
51
|
+
|
|
52
|
+
## Installation
|
|
53
|
+
|
|
54
|
+
To install the `TrueFoundry CLI`, you can use pip:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
pip install truefoundry
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
To install the `TrueFoundry CLI` with Workflow deployment features, you can use pip:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
pip install truefoundry[workflow]
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Examples
|
|
67
|
+
|
|
68
|
+
https://github.com/truefoundry/getting-started-examples
|
|
69
|
+
|
|
70
|
+
## Documentation
|
|
71
|
+
|
|
72
|
+
https://docs.truefoundry.com/
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
truefoundry/__init__.py,sha256=Go9M0PvV9kYX8dhldJzpH0RAYB_Pc1kVOxfNlsps89c,321
|
|
2
|
+
truefoundry/logger.py,sha256=u-YCNjg5HBwE70uQcpjIG64Ghos-K2ulTWaxC03BSj4,714
|
|
3
|
+
truefoundry/pydantic_v1.py,sha256=jSuhGtz0Mbk1qYu8jJ1AcnIDK4oxUsdhALc4spqstmM,345
|
|
4
|
+
truefoundry/version.py,sha256=bqiT4Q-VWrTC6P4qfK43mez-Ppf-smWfrl6DcwV7mrw,137
|
|
2
5
|
truefoundry/autodeploy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
+
truefoundry/autodeploy/cli.py,sha256=9ZxKu_MGIpraMzaW4ZyuQZhlKIQYE3biBrBV4S1h6Fo,14167
|
|
7
|
+
truefoundry/autodeploy/constants.py,sha256=vTh2nA7cjqghqbW2rNh3FbtcIk2scdAWZuuQCmVBO80,1273
|
|
8
|
+
truefoundry/autodeploy/exception.py,sha256=fa_ZyTDUKiMKG2Uayynk1yWcEMsuVluqk2GtV4tfTPU,158
|
|
9
|
+
truefoundry/autodeploy/logger.py,sha256=tkV2UKcOTFl5nz0cn4eRbzxF-2CZd8b7MK9vnhaflYw,325
|
|
3
10
|
truefoundry/autodeploy/agents/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
11
|
truefoundry/autodeploy/agents/base.py,sha256=lYw6bKhfCWff5BbtXXn2k4MjMbRIUkOwPBjRT70iXE8,6420
|
|
5
12
|
truefoundry/autodeploy/agents/developer.py,sha256=tO9vmgGjoaqK4rX-DFCyMrViFC2Oqofd89WoXqsEm-A,4142
|
|
6
13
|
truefoundry/autodeploy/agents/project_identifier.py,sha256=KlF7FwrGHDCjF3y3-YaCDxZ8kE34s6XPBagXhG2U1aM,4520
|
|
7
14
|
truefoundry/autodeploy/agents/tester.py,sha256=lqvVBuVcFRvGZnSLAUF2r-1-Yti20o_cbybU19IlSXo,2418
|
|
8
|
-
truefoundry/autodeploy/cli.py,sha256=9ZxKu_MGIpraMzaW4ZyuQZhlKIQYE3biBrBV4S1h6Fo,14167
|
|
9
|
-
truefoundry/autodeploy/constants.py,sha256=vTh2nA7cjqghqbW2rNh3FbtcIk2scdAWZuuQCmVBO80,1273
|
|
10
|
-
truefoundry/autodeploy/exception.py,sha256=fa_ZyTDUKiMKG2Uayynk1yWcEMsuVluqk2GtV4tfTPU,158
|
|
11
|
-
truefoundry/autodeploy/logger.py,sha256=tkV2UKcOTFl5nz0cn4eRbzxF-2CZd8b7MK9vnhaflYw,325
|
|
12
15
|
truefoundry/autodeploy/tools/__init__.py,sha256=9zJiC1d4bv9EL-p5XTCa9fAQ6ZKV--AbgeLz9bBBkyQ,875
|
|
13
16
|
truefoundry/autodeploy/tools/ask.py,sha256=MxUFLP7rjpdJ85gCc3El0wUqTZDjpjAw7WOTdV4LLWE,856
|
|
14
17
|
truefoundry/autodeploy/tools/base.py,sha256=Ltzj2d6DO1gUMx_qSt2c2Zq91MJ5V4FJXpZwl4T3F8M,795
|
|
@@ -24,7 +27,7 @@ truefoundry/autodeploy/utils/client.py,sha256=PvbSkfgAjAogGjisinqmh4mP4svowxAC0I
|
|
|
24
27
|
truefoundry/autodeploy/utils/diff.py,sha256=Ef8Y-VffDKel_-q-GxRam6gqiv8qTLMcqVg6iifXfcA,5358
|
|
25
28
|
truefoundry/autodeploy/utils/pydantic_compat.py,sha256=hEAUy5kLjhPdzw7yGZ2iXGMXbbMVXVlGzIofmyHafXQ,412
|
|
26
29
|
truefoundry/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
27
|
-
truefoundry/cli/__main__.py,sha256=
|
|
30
|
+
truefoundry/cli/__main__.py,sha256=oPtY1egJ21nN46me7E-xLfU0m_Zy5Oz2jj571os8Yxg,3465
|
|
28
31
|
truefoundry/cli/config.py,sha256=tf8w4UfVzcC6eYkENvuuCPYt_V3sqVpO1bclORV9tAk,206
|
|
29
32
|
truefoundry/cli/console.py,sha256=9-dMy4YPisCJQziRKTg8Qa0UJnOGl1soiUnJjsnLDvE,242
|
|
30
33
|
truefoundry/cli/const.py,sha256=dVHPo1uAiDSSMXwXoT2mR5kNQjExT98QNVRz98Hz_Ts,510
|
|
@@ -34,34 +37,36 @@ truefoundry/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuF
|
|
|
34
37
|
truefoundry/common/auth_service_client.py,sha256=N3YxKlx63r6cPZqbgb2lqBOPI69ShB7D7RCIq4FSCjc,7949
|
|
35
38
|
truefoundry/common/constants.py,sha256=WQjylPv7xTVYURv4zicJUHYL73Gv3c3i6Iw4oy9Lhg4,2744
|
|
36
39
|
truefoundry/common/credential_file_manager.py,sha256=1yEk1Zm2xS4G0VDFwKSZ4w0VUrcPWQ1nJnoBaz9xyKA,4251
|
|
37
|
-
truefoundry/common/credential_provider.py,sha256=
|
|
38
|
-
truefoundry/common/entities.py,sha256=
|
|
40
|
+
truefoundry/common/credential_provider.py,sha256=_OhJ2XFlDaVsrUO-FyywxctcGGqDdC2pgcvwEKqQD0Q,4071
|
|
41
|
+
truefoundry/common/entities.py,sha256=12olLKzRT092Jnze5busK68cwH8wwyL6ch77ohKOFPU,3723
|
|
39
42
|
truefoundry/common/exceptions.py,sha256=jkU0N7hV_P-EhXeud4I5vuB9glXXZSWPf8LcH04mSbw,459
|
|
40
43
|
truefoundry/common/request_utils.py,sha256=e9qrAQ1MutU7JALDKcucmNd0KQEVBqgW3yx0w1zeHIU,5700
|
|
41
|
-
truefoundry/common/servicefoundry_client.py,sha256=
|
|
44
|
+
truefoundry/common/servicefoundry_client.py,sha256=2fYhdVPSvLXz5C5tosOq86JD8WM3IRUIy1VO9deDxZI,3340
|
|
42
45
|
truefoundry/common/session.py,sha256=BiTJ2WEzLkTvzpqy67xX3fXgiKH_ltzzmQdFG7xUtwI,2904
|
|
43
46
|
truefoundry/common/storage_provider_utils.py,sha256=yURhMw8k0FLFvaviRHDiifhvc6GnuQwGMC9Qd2uM440,10934
|
|
44
|
-
truefoundry/common/
|
|
47
|
+
truefoundry/common/types.py,sha256=BMJFCsR1lPJAw66IQBSvLyV4I6o_x5oj78gVsUa9si8,188
|
|
48
|
+
truefoundry/common/utils.py,sha256=E1kKw_hqlVMgwyPkER2SvVLIoQ-B_4TQCuM5IJXvgig,6046
|
|
45
49
|
truefoundry/common/warnings.py,sha256=rs6BHwk7imQYedo07iwh3TWEOywAR3Lqhj0AY4khByg,504
|
|
46
50
|
truefoundry/deploy/__init__.py,sha256=e0EgG-fVJ6N9PNIlBINO6QtIMEehQgmz3ONPPjYlcSY,2596
|
|
51
|
+
truefoundry/deploy/python_deploy_codegen.py,sha256=qJHH1BJQII9e6PhkcRFYiE_3De7_VMMm8nM4AX5Eq1o,6513
|
|
47
52
|
truefoundry/deploy/auto_gen/models.py,sha256=83OoBHcu3VP8Xe75vBNaQmPGjqxhsSkHAZZZD4mROOM,87620
|
|
48
53
|
truefoundry/deploy/builder/__init__.py,sha256=1qjHMNBE1poRCZW0WrG46dFM1f1IlivD5352qzsioMU,4953
|
|
54
|
+
truefoundry/deploy/builder/constants.py,sha256=amUkHoHvVKzGv0v_knfiioRuKiJM0V0xW0diERgWiI0,508
|
|
55
|
+
truefoundry/deploy/builder/docker_service.py,sha256=sm7GWeIqyrKaZpxskdLejZlsxcZnM3BTDJr6orvPN4E,3948
|
|
56
|
+
truefoundry/deploy/builder/utils.py,sha256=D68-bqM0NQx-Elg-56mtkENyVyg9faZ9tgTmBuo1Sjs,1076
|
|
49
57
|
truefoundry/deploy/builder/builders/__init__.py,sha256=tlFLXqyDaKLd4iZbo4Hcu_8gOmgtL6drnXpbmQ6x1P8,636
|
|
50
58
|
truefoundry/deploy/builder/builders/dockerfile.py,sha256=AXXTziCkaqIhuM_bwyD1vT1znOwemN1TKgU7eyo-KuM,1522
|
|
51
59
|
truefoundry/deploy/builder/builders/tfy_notebook_buildpack/__init__.py,sha256=x_GwRFKz-Kb4-ZlxOFjBlr0mTgUDe_hVeG4dsIbHo8c,1796
|
|
52
60
|
truefoundry/deploy/builder/builders/tfy_notebook_buildpack/dockerfile_template.py,sha256=rQgdvKmAT9HArVW4TAG5yd2QTKRs3S5LJ9RQbc_EkHE,2518
|
|
53
61
|
truefoundry/deploy/builder/builders/tfy_python_buildpack/__init__.py,sha256=9r1PYahn-HfzpMth6NkvJoycmmHQpSl0vIVZxWF12xI,1864
|
|
54
62
|
truefoundry/deploy/builder/builders/tfy_python_buildpack/dockerfile_template.py,sha256=X9mKH7SGZLGZGvY0S2aPB3sgWdSR9TY4eVXtqz_idEA,8973
|
|
55
|
-
truefoundry/deploy/builder/constants.py,sha256=amUkHoHvVKzGv0v_knfiioRuKiJM0V0xW0diERgWiI0,508
|
|
56
|
-
truefoundry/deploy/builder/docker_service.py,sha256=OI8efqK0Gnoii8bcHihpA2StwHVzsMREfBk7NvMR4hY,3950
|
|
57
|
-
truefoundry/deploy/builder/utils.py,sha256=D68-bqM0NQx-Elg-56mtkENyVyg9faZ9tgTmBuo1Sjs,1076
|
|
58
63
|
truefoundry/deploy/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
59
64
|
truefoundry/deploy/cli/commands/__init__.py,sha256=wn_TsmrImj9pER16O5aK3aW2mfqbRgrhv-jn4x3_2oM,1278
|
|
60
65
|
truefoundry/deploy/cli/commands/apply_command.py,sha256=Y2e_C8HVpo8CssVod-3JRz-89qStC5JRaNzJ7O2mRlY,2039
|
|
61
66
|
truefoundry/deploy/cli/commands/build_command.py,sha256=zJBywMatbpUlXx5O2aqpEVmPeBIJ9RNnG9abSc8C8CE,1234
|
|
62
67
|
truefoundry/deploy/cli/commands/create_command.py,sha256=rCajvQvAfZU10nDZOYpRACbAATH1zj52ihTWrhnLLUc,1829
|
|
63
68
|
truefoundry/deploy/cli/commands/delete_command.py,sha256=JMibxvt1rsZ8sODa0jI1e6vavjN8Pv04ttVFURSTKTw,2362
|
|
64
|
-
truefoundry/deploy/cli/commands/deploy_command.py,sha256=
|
|
69
|
+
truefoundry/deploy/cli/commands/deploy_command.py,sha256=8aTBvzPaT9xg6KPmpcpqJlmdj4yXzWUfAy6slcoPN74,4123
|
|
65
70
|
truefoundry/deploy/cli/commands/deploy_init_command.py,sha256=g-jBfrEmhZ0TDWsyqPDn4K6q33EqJSGmBTt1eMYig-w,600
|
|
66
71
|
truefoundry/deploy/cli/commands/get_command.py,sha256=HZQGWib-qrS0RdzctRDwDLfMGu0wqWkAM1u26cTZlsc,5944
|
|
67
72
|
truefoundry/deploy/cli/commands/list_command.py,sha256=zKu_JWY35eMIzgSNFYtmwi2uezZ4k-8yk3C1Vqsvshc,4470
|
|
@@ -80,36 +85,53 @@ truefoundry/deploy/io/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
|
|
|
80
85
|
truefoundry/deploy/io/output_callback.py,sha256=V2YwUFec4G4a67lM4r-x_64AqdOVNo_9sTdfQWLlvi0,604
|
|
81
86
|
truefoundry/deploy/io/rich_output_callback.py,sha256=TJLiRD-EnFVwgcepxR7WN0koKqW1X2DevETPhNPi_nU,829
|
|
82
87
|
truefoundry/deploy/lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
83
|
-
truefoundry/deploy/lib/clients/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
84
|
-
truefoundry/deploy/lib/clients/servicefoundry_client.py,sha256=twgEUKSES8HWewMj-8xeD1O3AOz9kfhaaZA4D0BATxk,26444
|
|
85
88
|
truefoundry/deploy/lib/const.py,sha256=Wg0GDnfFu-g1fJr4lU80NH2ULw0R0dYjV7LnW-PbOeM,173
|
|
89
|
+
truefoundry/deploy/lib/logs_utils.py,sha256=SQxRv3jDDmgHdOUMhlMaAPGYskybnBUMpst7QU_i_sc,1469
|
|
90
|
+
truefoundry/deploy/lib/messages.py,sha256=nhp0bCYf_XpUM68hTq5lBY-__vtEyV2uP7NgnJXJ_Vg,925
|
|
91
|
+
truefoundry/deploy/lib/session.py,sha256=FBSq3bxf3my_613NzgtPoeeaAYLGZEoF0n7XccTFNf4,5141
|
|
92
|
+
truefoundry/deploy/lib/util.py,sha256=J7r8San2wKo48A7-BlH2-OKTlBO67zlPjLEhMsL8os0,1059
|
|
93
|
+
truefoundry/deploy/lib/win32.py,sha256=1RcvPTdlOAJ48rt8rCbE2Ufha2ztRqBAE9dueNXArrY,5009
|
|
94
|
+
truefoundry/deploy/lib/clients/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
95
|
+
truefoundry/deploy/lib/clients/servicefoundry_client.py,sha256=xW_JGOk28bVMqdRiggCYMJFIx7iPjOUCdg8DDxfpjmo,26341
|
|
86
96
|
truefoundry/deploy/lib/dao/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
87
97
|
truefoundry/deploy/lib/dao/application.py,sha256=oMszpueXPUfTUuN_XdKwoRjQyqAgWHhZ-10cbprCVdM,9226
|
|
88
98
|
truefoundry/deploy/lib/dao/apply.py,sha256=Jadfa3DcbIRz-Bb4Tlixed179HLDnmDXOlrvSxfEgQ0,3021
|
|
89
99
|
truefoundry/deploy/lib/dao/version.py,sha256=AtdW_4O1DPUKdfv2qy6iUJsZ_95vM6z0AqeEy3WDKs8,1130
|
|
90
100
|
truefoundry/deploy/lib/dao/workspace.py,sha256=6YvfCgWDzAULI3Q6JswyZmP1CwJ5rM-ANsIFkbQia0Q,2349
|
|
91
|
-
truefoundry/deploy/lib/logs_utils.py,sha256=SQxRv3jDDmgHdOUMhlMaAPGYskybnBUMpst7QU_i_sc,1469
|
|
92
|
-
truefoundry/deploy/lib/messages.py,sha256=nhp0bCYf_XpUM68hTq5lBY-__vtEyV2uP7NgnJXJ_Vg,925
|
|
93
101
|
truefoundry/deploy/lib/model/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
94
102
|
truefoundry/deploy/lib/model/entity.py,sha256=3YRdyvMYI1aUXUu2tB5b5lZWwpxKdAhjpT79gzTCZGo,8373
|
|
95
|
-
truefoundry/deploy/lib/session.py,sha256=FBSq3bxf3my_613NzgtPoeeaAYLGZEoF0n7XccTFNf4,5141
|
|
96
|
-
truefoundry/deploy/lib/util.py,sha256=J7r8San2wKo48A7-BlH2-OKTlBO67zlPjLEhMsL8os0,1059
|
|
97
|
-
truefoundry/deploy/lib/win32.py,sha256=1RcvPTdlOAJ48rt8rCbE2Ufha2ztRqBAE9dueNXArrY,5009
|
|
98
|
-
truefoundry/deploy/python_deploy_codegen.py,sha256=qJHH1BJQII9e6PhkcRFYiE_3De7_VMMm8nM4AX5Eq1o,6513
|
|
99
103
|
truefoundry/deploy/v2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
100
104
|
truefoundry/deploy/v2/lib/__init__.py,sha256=WEiVMZXOVljzEE3tpGJil14liIn_PCDoACJ6b3tZ6sI,188
|
|
101
|
-
truefoundry/deploy/v2/lib/deploy.py,sha256=
|
|
102
|
-
truefoundry/deploy/v2/lib/deploy_workflow.py,sha256=
|
|
103
|
-
truefoundry/deploy/v2/lib/deployable_patched_models.py,sha256=
|
|
104
|
-
truefoundry/deploy/v2/lib/models.py,sha256=
|
|
105
|
-
truefoundry/deploy/v2/lib/patched_models.py,sha256
|
|
106
|
-
truefoundry/deploy/v2/lib/source.py,sha256=
|
|
107
|
-
truefoundry/logger.py,sha256=u-YCNjg5HBwE70uQcpjIG64Ghos-K2ulTWaxC03BSj4,714
|
|
105
|
+
truefoundry/deploy/v2/lib/deploy.py,sha256=OvotIwCzluaOqX3xceV5sb86WFXYNs4fXn6FJsR9KBU,12420
|
|
106
|
+
truefoundry/deploy/v2/lib/deploy_workflow.py,sha256=92aA8ji46-KjC3tu46KeJuvOFkajSU1WAdLKgqVOGh8,12869
|
|
107
|
+
truefoundry/deploy/v2/lib/deployable_patched_models.py,sha256=hqfPxQvuA9rTjaxZY9YqV51hdNFT-0YBXyR-S859PTo,4060
|
|
108
|
+
truefoundry/deploy/v2/lib/models.py,sha256=ogc1UYs1Z2nBdGSKCrde9sk8d0GxFKMkem99uqO5CmM,1148
|
|
109
|
+
truefoundry/deploy/v2/lib/patched_models.py,sha256=v26Rm0BaV6RKr-TxKZ8O3gT-90JA91K4bnGSKgCrQ7o,16338
|
|
110
|
+
truefoundry/deploy/v2/lib/source.py,sha256=zM8k3hJ2N5b8FgkVsYPhEvHPA4rt2rSqtLUMRcaGGiQ,9405
|
|
108
111
|
truefoundry/ml/__init__.py,sha256=ssUEIs8BixPWxynKoeSh-dkRl6AtLXG0PBGYnUR5Az8,2217
|
|
112
|
+
truefoundry/ml/constants.py,sha256=vDq72d4C9FSWqr9MMdjgTF4TuyNFApvo_6RVsSeAjB4,2837
|
|
113
|
+
truefoundry/ml/entities.py,sha256=si5GAqZsWzKu5MPrU4Hk6se7bebHOYhTiNw69ai-Uk8,1485
|
|
114
|
+
truefoundry/ml/enums.py,sha256=arqDkF8duU_oVLFeYMhcfWYbF6Nq5mmjwupJMIheyXM,1790
|
|
115
|
+
truefoundry/ml/exceptions.py,sha256=QpDJSWmF7dIsByS0qOQbQZ_jytdNTzkHDDO3BxhTSo0,332
|
|
116
|
+
truefoundry/ml/git_info.py,sha256=jvAVm9ilqivnGq8qJdUvYdd8Siv0PLtqurB-PXsS5ho,2023
|
|
117
|
+
truefoundry/ml/internal_namespace.py,sha256=QcqMHp6-C2im2H_02hlhi01EIcr1HhNaZprszs13EMU,1790
|
|
118
|
+
truefoundry/ml/logger.py,sha256=VT-BF3BnBYTWVq87O58F0c8uXMu94gYzsiFlGY3_7Ao,458
|
|
119
|
+
truefoundry/ml/mlfoundry_api.py,sha256=PUBGDcjrZsJKQYy1PjT8NYGYxrTvhhHzQ-0jLSl7-zc,61279
|
|
120
|
+
truefoundry/ml/mlfoundry_run.py,sha256=w9_Tph48eTDjna-rZ1fPa6PtX4JzhF-t5PS2hmbK2rY,44319
|
|
121
|
+
truefoundry/ml/model_framework.py,sha256=JGmzdG7o5P6CJr5EYTUOmuly53FfhpoNVqKrhfijAVg,18972
|
|
122
|
+
truefoundry/ml/run_utils.py,sha256=0W208wSLUrbdfk2pjNcZlkUi9bNxG2JORqoe-5rVqHI,2423
|
|
123
|
+
truefoundry/ml/session.py,sha256=eQo1zG5nd0-8Ok68uEBCQDPAWYeJkpzqHak-DQX1ENU,4553
|
|
124
|
+
truefoundry/ml/validation_utils.py,sha256=J5atNhcJLvKj64ralSV9Y5Fv1Rt4SE237ICdP9-7sP4,12149
|
|
109
125
|
truefoundry/ml/artifact/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
110
126
|
truefoundry/ml/artifact/truefoundry_artifact_repo.py,sha256=myDpr3RZzEkd_UG9C3rZ4UKEFxXopO5HMVJNpNDiuAo,37737
|
|
111
127
|
truefoundry/ml/autogen/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
128
|
+
truefoundry/ml/autogen/client_README.md,sha256=RpZTi__4UauH1kPvz7LfixtrbmTreiVpc2rDyDWstTs,37139
|
|
112
129
|
truefoundry/ml/autogen/client/__init__.py,sha256=Kh1qP7S8L-e7ItofskXQf3y7QFfmxGPFnv5ACAPzwKE,20123
|
|
130
|
+
truefoundry/ml/autogen/client/api_client.py,sha256=M31IycWorn10FYS8WbO_Whaipr0tVu2pVWFCfbS7XCo,29167
|
|
131
|
+
truefoundry/ml/autogen/client/api_response.py,sha256=KRyvecPMXF05PaxILHZ8JHoP4rgKBjKONMgG83aU-rM,844
|
|
132
|
+
truefoundry/ml/autogen/client/configuration.py,sha256=V1oaEnxt-NfpaNmp-EZpf2glovzVhM2coWYt8HBNB4M,15723
|
|
133
|
+
truefoundry/ml/autogen/client/exceptions.py,sha256=XbCbDHhYT3BVejdoGNPgEa4oS56ypkwFdxk1iOc_tFY,5355
|
|
134
|
+
truefoundry/ml/autogen/client/rest.py,sha256=9goba8qHjQuVx5O_yRaTKu7PvBnb7r7swfy3dwuTEgk,14281
|
|
113
135
|
truefoundry/ml/autogen/client/api/__init__.py,sha256=NyMBxBmIzB1o5LzZZwz9LiydHB3-hPqc_sevsnY6Jrw,746
|
|
114
136
|
truefoundry/ml/autogen/client/api/auth_api.py,sha256=zpWzJhUmW6HHMY_atlUf0B25k77E1kue2hmix5I5Ih0,7017
|
|
115
137
|
truefoundry/ml/autogen/client/api/deprecated_api.py,sha256=mu5x_skNcwz8v1Tr6VP72-tVP7pmBV9muyKy_2NH3F0,38824
|
|
@@ -120,10 +142,6 @@ truefoundry/ml/autogen/client/api/metrics_api.py,sha256=q3L38eD-2hu4_9YvcSdnWDYX
|
|
|
120
142
|
truefoundry/ml/autogen/client/api/mlfoundry_artifacts_api.py,sha256=T8_cYdrd60KzDddRxX3nDeIQe6ihMq-jD8BOAAmzPHo,309716
|
|
121
143
|
truefoundry/ml/autogen/client/api/run_artifacts_api.py,sha256=x-vVnY2LEFChZxiiFauswRWwFz6Qqh30PKXjzuTvxmc,8799
|
|
122
144
|
truefoundry/ml/autogen/client/api/runs_api.py,sha256=-aghrZ2VYuZOw_vBtOzWDsnK7Ji29oZQxK2CLRgyo2w,119232
|
|
123
|
-
truefoundry/ml/autogen/client/api_client.py,sha256=M31IycWorn10FYS8WbO_Whaipr0tVu2pVWFCfbS7XCo,29167
|
|
124
|
-
truefoundry/ml/autogen/client/api_response.py,sha256=KRyvecPMXF05PaxILHZ8JHoP4rgKBjKONMgG83aU-rM,844
|
|
125
|
-
truefoundry/ml/autogen/client/configuration.py,sha256=V1oaEnxt-NfpaNmp-EZpf2glovzVhM2coWYt8HBNB4M,15723
|
|
126
|
-
truefoundry/ml/autogen/client/exceptions.py,sha256=XbCbDHhYT3BVejdoGNPgEa4oS56ypkwFdxk1iOc_tFY,5355
|
|
127
145
|
truefoundry/ml/autogen/client/models/__init__.py,sha256=5LUnBRz-1KBea5KicUDeJ0LPDUKvHJYd6L0iP1q-rSs,18745
|
|
128
146
|
truefoundry/ml/autogen/client/models/add_custom_metrics_to_model_version_request_dto.py,sha256=_ISDspicTGjBCYYXubKfRYYSSQVyW3AvG-jFh47-Zfc,2163
|
|
129
147
|
truefoundry/ml/autogen/client/models/add_features_to_model_version_request_dto.py,sha256=OT1-98DyWNfAHz_EgD2gMX2XkrGQ4Re945fhoAl8qSE,2099
|
|
@@ -306,8 +324,6 @@ truefoundry/ml/autogen/client/models/validation_error_loc_inner.py,sha256=nThJ5G
|
|
|
306
324
|
truefoundry/ml/autogen/client/models/xg_boost_framework.py,sha256=a0EHzncxe_hSFUCAk3nFOMuh8ztQQQBLbTfg0IbwTE8,3324
|
|
307
325
|
truefoundry/ml/autogen/client/models/xg_boost_model_schema.py,sha256=QKJkiERNqF8UiolX2FjvhkUkUlUgDoo3CpTYPAdCxV8,2735
|
|
308
326
|
truefoundry/ml/autogen/client/models/xg_boost_serialization_format.py,sha256=wFFSH0Z9MP8eT_fysHfUu4iqdjEZART-HxTH4e4gNI8,872
|
|
309
|
-
truefoundry/ml/autogen/client/rest.py,sha256=9goba8qHjQuVx5O_yRaTKu7PvBnb7r7swfy3dwuTEgk,14281
|
|
310
|
-
truefoundry/ml/autogen/client_README.md,sha256=RpZTi__4UauH1kPvz7LfixtrbmTreiVpc2rDyDWstTs,37139
|
|
311
327
|
truefoundry/ml/autogen/entities/artifacts.py,sha256=TOm71ZrNo36le3YyMEsE1Cs_BYyMLkFQ7hQtAaMoB9M,21251
|
|
312
328
|
truefoundry/ml/autogen/models/__init__.py,sha256=--TGRea9SQBWFfwtcl3ekb1XGfFTdEkQGSG8a2SJ60I,187
|
|
313
329
|
truefoundry/ml/autogen/models/exceptions.py,sha256=q3n7FGBrg_hUy1UyoefhMnhcXUAaqXlLIGHoOVzn_d8,1390
|
|
@@ -316,19 +332,16 @@ truefoundry/ml/autogen/models/signature.py,sha256=rBjpxUIsEeWM0sIyYG5uCJB18DKHR4
|
|
|
316
332
|
truefoundry/ml/autogen/models/utils.py,sha256=c7RtSLXhOLcP8rjuUtfnMdaKVTZvvbsmw98gPAkAFrs,24371
|
|
317
333
|
truefoundry/ml/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
318
334
|
truefoundry/ml/cli/cli.py,sha256=MwpY7z_NEeJE_XIP7XbZELjNeu2vpMmohttHCKDRk54,335
|
|
335
|
+
truefoundry/ml/cli/utils.py,sha256=j6_mZ4Spn114mz3P4QQ8jx0tmorXIuyQnHXVUSDvZi4,1035
|
|
319
336
|
truefoundry/ml/cli/commands/__init__.py,sha256=diDUiRUX4l6TtNLI4iF-ZblczkELM7FRViJ-8gGNJQY,82
|
|
320
337
|
truefoundry/ml/cli/commands/download.py,sha256=N9MhsEQ3U24v_OmnMZT8Q4SoAi38Sm7a21unrACOSDw,2573
|
|
321
338
|
truefoundry/ml/cli/commands/model_init.py,sha256=9fHCernmQswjEhREzdrnKxwCCWkgmFrpL29H52Sd1gQ,2663
|
|
322
|
-
truefoundry/ml/cli/utils.py,sha256=j6_mZ4Spn114mz3P4QQ8jx0tmorXIuyQnHXVUSDvZi4,1035
|
|
323
339
|
truefoundry/ml/clients/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
324
340
|
truefoundry/ml/clients/servicefoundry_client.py,sha256=Rx-tjiDxNwUgOCDITjtL0vmZcQgJjh_tUdReE23TKIk,2363
|
|
325
|
-
truefoundry/ml/constants.py,sha256=vDq72d4C9FSWqr9MMdjgTF4TuyNFApvo_6RVsSeAjB4,2837
|
|
326
|
-
truefoundry/ml/entities.py,sha256=si5GAqZsWzKu5MPrU4Hk6se7bebHOYhTiNw69ai-Uk8,1485
|
|
327
|
-
truefoundry/ml/enums.py,sha256=arqDkF8duU_oVLFeYMhcfWYbF6Nq5mmjwupJMIheyXM,1790
|
|
328
|
-
truefoundry/ml/exceptions.py,sha256=QpDJSWmF7dIsByS0qOQbQZ_jytdNTzkHDDO3BxhTSo0,332
|
|
329
|
-
truefoundry/ml/git_info.py,sha256=jvAVm9ilqivnGq8qJdUvYdd8Siv0PLtqurB-PXsS5ho,2023
|
|
330
|
-
truefoundry/ml/internal_namespace.py,sha256=QcqMHp6-C2im2H_02hlhi01EIcr1HhNaZprszs13EMU,1790
|
|
331
341
|
truefoundry/ml/log_types/__init__.py,sha256=g4u4D4Jaj0aBK5GtrLV88-qThKZR9pSZ17vFEkN-LmM,125
|
|
342
|
+
truefoundry/ml/log_types/plot.py,sha256=KsVJiZ1uXvMoAumjDTT7EpjWoagtRWxF5rRQDTCRGOY,7571
|
|
343
|
+
truefoundry/ml/log_types/pydantic_base.py,sha256=eBlw_AEyAz4iJKDP4zgJOCFWcldwQqpf7FADW1jzIQY,272
|
|
344
|
+
truefoundry/ml/log_types/utils.py,sha256=xjJ21jdPScvFmw3TbVh5NCzbzJwaqiXJyiiT4xxX1EI,335
|
|
332
345
|
truefoundry/ml/log_types/artifacts/artifact.py,sha256=wIGmuwvf7-sgJ4WJSwhSYk3EBccJAdgcTG6wUiomBKg,22032
|
|
333
346
|
truefoundry/ml/log_types/artifacts/constants.py,sha256=qKxQ5mMvJE4j83BvGW3qNTKunxCiBg_EEjTdgbgJtyE,1036
|
|
334
347
|
truefoundry/ml/log_types/artifacts/dataset.py,sha256=a4dxd2EN8p7Ci-cLGGiDOboN3t0395_XhWE1dmTw1Q4,13112
|
|
@@ -340,34 +353,17 @@ truefoundry/ml/log_types/image/constants.py,sha256=wLtGEOA4T5fZHSlOXPuNDLX3lpbCt
|
|
|
340
353
|
truefoundry/ml/log_types/image/image.py,sha256=qQnAVgErAq4Jn6wXFFpaveOd52zcjUuomUCqNRxO2io,12478
|
|
341
354
|
truefoundry/ml/log_types/image/image_normalizer.py,sha256=vrzfuSpVGgIxw_Q2sbFe7kQ_JpAndX0bMwC7wtfi41g,3104
|
|
342
355
|
truefoundry/ml/log_types/image/types.py,sha256=inFQlyAyDvZtfliFpENirNCm1XO9beyZ8DNn97DoDKs,1568
|
|
343
|
-
truefoundry/ml/log_types/plot.py,sha256=HuYvvRA5r8V0xAIuuqMME2IHb9d3SfGHUiuEkOP3Uks,7515
|
|
344
|
-
truefoundry/ml/log_types/pydantic_base.py,sha256=eBlw_AEyAz4iJKDP4zgJOCFWcldwQqpf7FADW1jzIQY,272
|
|
345
|
-
truefoundry/ml/log_types/utils.py,sha256=xjJ21jdPScvFmw3TbVh5NCzbzJwaqiXJyiiT4xxX1EI,335
|
|
346
|
-
truefoundry/ml/logger.py,sha256=VT-BF3BnBYTWVq87O58F0c8uXMu94gYzsiFlGY3_7Ao,458
|
|
347
|
-
truefoundry/ml/mlfoundry_api.py,sha256=PUBGDcjrZsJKQYy1PjT8NYGYxrTvhhHzQ-0jLSl7-zc,61279
|
|
348
|
-
truefoundry/ml/mlfoundry_run.py,sha256=M-0FkZYDxwv5EZUDtVqiV8JxC_3BWR80N7Kp4Yj7bPY,44291
|
|
349
|
-
truefoundry/ml/model_framework.py,sha256=JGmzdG7o5P6CJr5EYTUOmuly53FfhpoNVqKrhfijAVg,18972
|
|
350
|
-
truefoundry/ml/run_utils.py,sha256=0W208wSLUrbdfk2pjNcZlkUi9bNxG2JORqoe-5rVqHI,2423
|
|
351
|
-
truefoundry/ml/session.py,sha256=eQo1zG5nd0-8Ok68uEBCQDPAWYeJkpzqHak-DQX1ENU,4553
|
|
352
|
-
truefoundry/ml/validation_utils.py,sha256=J5atNhcJLvKj64ralSV9Y5Fv1Rt4SE237ICdP9-7sP4,12149
|
|
353
|
-
truefoundry/pydantic_v1.py,sha256=jSuhGtz0Mbk1qYu8jJ1AcnIDK4oxUsdhALc4spqstmM,345
|
|
354
|
-
truefoundry/version.py,sha256=bqiT4Q-VWrTC6P4qfK43mez-Ppf-smWfrl6DcwV7mrw,137
|
|
355
356
|
truefoundry/workflow/__init__.py,sha256=XY83vqtLAclI82atZXyBtF9ZgLROXaaXO5p60XH5hJA,1493
|
|
356
357
|
truefoundry/workflow/container_task.py,sha256=8arieePsX4__OnG337hOtCiNgJwtKJJCsZcmFmCBJtk,402
|
|
357
|
-
truefoundry/workflow/example/deploy.sh,sha256=wfbPRrCi04WYRqCf4g-Xo12uWbcqPD6G_Tz0lV0jU_U,60
|
|
358
|
-
truefoundry/workflow/example/hello_world_package/workflow.py,sha256=IkRKfPY5BcvLPo_PVuNbZKK9PPJ93LRkzb1a3RKQYOw,435
|
|
359
|
-
truefoundry/workflow/example/package/test_workflow.py,sha256=TUcvYCGz4IbzF9bQJAfB-6Wd2wx-0RKcuIpUG0t6d8c,3972
|
|
360
|
-
truefoundry/workflow/example/truefoundry.yaml,sha256=LlPrMADSPJsiXRoK76N_RVjX1bnZ3FH1u2jXrwLfR9I,226
|
|
361
|
-
truefoundry/workflow/example/workflow.yaml,sha256=YtYdKXMuW_08gfEo21XSculj2MGI2lfEnGF8qCT8NKE,2858
|
|
362
358
|
truefoundry/workflow/map_task.py,sha256=2m3qGXQ90k9LdS45q8dqCCECc3qr8t2m_LMCVd1mZ7g,1737
|
|
363
359
|
truefoundry/workflow/python_task.py,sha256=SRXRLC4vdBqGjhkwuaY39LEWN6iPCpJAuW17URRdWTY,1128
|
|
360
|
+
truefoundry/workflow/task.py,sha256=34m55mALXx6ko9o5HkK6FDtMajdvJzBhOsHwDM2RcBA,1779
|
|
361
|
+
truefoundry/workflow/workflow.py,sha256=WaTqUjhwfAXDWu4E5ehuwAxrCbDJkoAf1oWmR2E9Qy0,4575
|
|
364
362
|
truefoundry/workflow/remote_filesystem/__init__.py,sha256=LQ95ViEjJ7Ts4JcCGOxMPs7NZmQdZ4bTiq6qXtsjUhE,206
|
|
365
363
|
truefoundry/workflow/remote_filesystem/logger.py,sha256=em2l7D6sw7xTLDP0kQSLpgfRRCLpN14Qw85TN7ujQcE,1022
|
|
366
364
|
truefoundry/workflow/remote_filesystem/tfy_signed_url_client.py,sha256=xcT0wQmQlgzcj0nP3tJopyFSVWT1uv3nhiTIuwfXYeg,12342
|
|
367
365
|
truefoundry/workflow/remote_filesystem/tfy_signed_url_fs.py,sha256=nSGPZu0Gyd_jz0KsEE-7w_BmnTD8CVF1S8cUJoxaCbc,13305
|
|
368
|
-
truefoundry/
|
|
369
|
-
truefoundry/
|
|
370
|
-
truefoundry-0.5.
|
|
371
|
-
truefoundry-0.5.
|
|
372
|
-
truefoundry-0.5.7rc1.dist-info/entry_points.txt,sha256=TXvUxQkI6zmqJuycPsyxEIMr3oqfDjgrWj0m_9X12x4,95
|
|
373
|
-
truefoundry-0.5.7rc1.dist-info/RECORD,,
|
|
366
|
+
truefoundry-0.5.8rc2.dist-info/METADATA,sha256=6TAdw_xKTV9A3DU7jZMAJp5yCSW6NyGzDtit4D8_1tg,2523
|
|
367
|
+
truefoundry-0.5.8rc2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
368
|
+
truefoundry-0.5.8rc2.dist-info/entry_points.txt,sha256=xVjn7RMN-MW2-9f7YU-bBdlZSvvrwzhpX1zmmRmsNPU,98
|
|
369
|
+
truefoundry-0.5.8rc2.dist-info/RECORD,,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
tfy deploy --workspace_fqn tfy-ctl-euwe1-devtest:nikhil-ws
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
from truefoundry.workflow import PythonTaskConfig, TaskPythonBuild, task, workflow
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
@task(
|
|
5
|
-
task_config=PythonTaskConfig(
|
|
6
|
-
image=TaskPythonBuild(
|
|
7
|
-
python_version="3.9",
|
|
8
|
-
pip_packages=["truefoundry[workflow]"],
|
|
9
|
-
),
|
|
10
|
-
service_account="tfy-workflows-sa",
|
|
11
|
-
)
|
|
12
|
-
)
|
|
13
|
-
def say_hello() -> str:
|
|
14
|
-
return "Hello, World!"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
@workflow
|
|
18
|
-
def hello_world_wf() -> str:
|
|
19
|
-
res = say_hello()
|
|
20
|
-
return res
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import os
|
|
2
|
-
from functools import partial
|
|
3
|
-
from pathlib import Path
|
|
4
|
-
from typing import List, Optional, Tuple
|
|
5
|
-
|
|
6
|
-
from truefoundry.deploy import Image, NvidiaGPU, Resources
|
|
7
|
-
from truefoundry.workflow import (
|
|
8
|
-
ContainerTask,
|
|
9
|
-
ContainerTaskConfig,
|
|
10
|
-
FlyteDirectory,
|
|
11
|
-
PythonTaskConfig,
|
|
12
|
-
TaskPythonBuild,
|
|
13
|
-
conditional,
|
|
14
|
-
map_task,
|
|
15
|
-
task,
|
|
16
|
-
workflow,
|
|
17
|
-
)
|
|
18
|
-
|
|
19
|
-
cpu_task_config = PythonTaskConfig(
|
|
20
|
-
image=TaskPythonBuild(
|
|
21
|
-
python_version="3.9",
|
|
22
|
-
pip_packages=["truefoundry[workflow]==0.4.1"],
|
|
23
|
-
),
|
|
24
|
-
resources=Resources(cpu_request=0.45),
|
|
25
|
-
service_account="tfy-workflows-sa",
|
|
26
|
-
)
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
# figure out naming
|
|
30
|
-
@task(task_config=cpu_task_config)
|
|
31
|
-
def should_train_tokenizer(tokenizer: str) -> bool:
|
|
32
|
-
print("Should train tokenizer")
|
|
33
|
-
return not bool(tokenizer)
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
@task(
|
|
37
|
-
task_config=cpu_task_config,
|
|
38
|
-
# currently we will not support the caching, but keeping here for now
|
|
39
|
-
# cache=True,
|
|
40
|
-
# cache_version="1.0",
|
|
41
|
-
)
|
|
42
|
-
def train_tokenizer() -> str:
|
|
43
|
-
print("Training tokenizer")
|
|
44
|
-
return "trained_tokenizer"
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
@task(
|
|
48
|
-
task_config=PythonTaskConfig(
|
|
49
|
-
image=TaskPythonBuild(
|
|
50
|
-
python_version="3.9",
|
|
51
|
-
pip_packages=["truefoundry[workflow]==0.4.1", "pynvml==11.5.0"],
|
|
52
|
-
cuda_version="11.5-cudnn8",
|
|
53
|
-
),
|
|
54
|
-
env={
|
|
55
|
-
"NVIDIA_DRIVER_CAPABILITIES": "compute,utility",
|
|
56
|
-
"NVIDIA_VISIBLE_DEVICES": "all",
|
|
57
|
-
},
|
|
58
|
-
resources=Resources(cpu_request=0.45, devices=[NvidiaGPU(name="T4", count=1)]),
|
|
59
|
-
service_account="tfy-workflows-sa",
|
|
60
|
-
),
|
|
61
|
-
)
|
|
62
|
-
def train_model(tokenizer: str) -> Tuple[FlyteDirectory, str]:
|
|
63
|
-
print("Training model")
|
|
64
|
-
import flytekit
|
|
65
|
-
# from pynvml import nvmlDeviceGetCount, nvmlInit
|
|
66
|
-
|
|
67
|
-
# nvmlInit()
|
|
68
|
-
# assert nvmlDeviceGetCount() > 0
|
|
69
|
-
|
|
70
|
-
working_dir = flytekit.current_context().working_directory
|
|
71
|
-
local_dir = Path(os.path.join(working_dir, "csv_files"))
|
|
72
|
-
local_dir.mkdir(exist_ok=True)
|
|
73
|
-
|
|
74
|
-
with open(os.path.join(local_dir, "model"), "w", encoding="utf-8") as f:
|
|
75
|
-
f.write(tokenizer)
|
|
76
|
-
|
|
77
|
-
return FlyteDirectory(path=str(local_dir)), "hello"
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
@task(task_config=cpu_task_config)
|
|
81
|
-
def get_validation_data() -> List[str]:
|
|
82
|
-
print("Getting validation data")
|
|
83
|
-
return ["foo", "bar", "baz"]
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
@task(task_config=cpu_task_config)
|
|
87
|
-
def validate_model(model: FlyteDirectory, tokenizer: str, validation_data: str) -> bool:
|
|
88
|
-
print(validation_data)
|
|
89
|
-
model_path = os.path.join(model, "model")
|
|
90
|
-
with open(model_path, "r", encoding="utf-8") as f:
|
|
91
|
-
return f.read() == tokenizer
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
@task(task_config=cpu_task_config)
|
|
95
|
-
def all_good(validations: List[bool]) -> bool:
|
|
96
|
-
print("Validations", validations)
|
|
97
|
-
return all(validations)
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
echo = ContainerTask(
|
|
101
|
-
name="echo",
|
|
102
|
-
task_config=ContainerTaskConfig(
|
|
103
|
-
image=Image(
|
|
104
|
-
image_uri="docker.io/bash:4.1",
|
|
105
|
-
command=["echo", "hello"],
|
|
106
|
-
),
|
|
107
|
-
service_account="tfy-workflows-sa",
|
|
108
|
-
),
|
|
109
|
-
)
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
@task(task_config=cpu_task_config)
|
|
113
|
-
def random(tokenizer: str) -> Tuple[FlyteDirectory, str]:
|
|
114
|
-
print(tokenizer)
|
|
115
|
-
return FlyteDirectory(path=""), "random"
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
@workflow(
|
|
119
|
-
# execution_configs=[
|
|
120
|
-
# ExecutionConfig(
|
|
121
|
-
# schedule="*/10 * * * *",
|
|
122
|
-
# )
|
|
123
|
-
# ]
|
|
124
|
-
)
|
|
125
|
-
def train(
|
|
126
|
-
tokenizer: str = "",
|
|
127
|
-
test_v2: str = "",
|
|
128
|
-
optional_var: Optional[str] = "",
|
|
129
|
-
default_v: Optional[str] = "hello1",
|
|
130
|
-
default_v2: str = "hello2",
|
|
131
|
-
) -> bool:
|
|
132
|
-
stt = should_train_tokenizer(tokenizer=tokenizer)
|
|
133
|
-
model, t = (
|
|
134
|
-
conditional("train_tokenizer")
|
|
135
|
-
.if_(stt.is_true())
|
|
136
|
-
.then(train_model(tokenizer=tokenizer))
|
|
137
|
-
.else_()
|
|
138
|
-
.then(random(tokenizer=tokenizer))
|
|
139
|
-
)
|
|
140
|
-
validation_task = partial(validate_model, model=model, tokenizer=t)
|
|
141
|
-
validation_data = get_validation_data()
|
|
142
|
-
validations = map_task(
|
|
143
|
-
validation_task,
|
|
144
|
-
concurrency=2,
|
|
145
|
-
)(validation_data=validation_data)
|
|
146
|
-
echo()
|
|
147
|
-
return all_good(validations=validations)
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
if __name__ == "__main__":
|
|
151
|
-
train()
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
type: workflow
|
|
2
|
-
name: my-test-workflow5
|
|
3
|
-
source:
|
|
4
|
-
type: remote
|
|
5
|
-
remote_uri: s3://tfy-mlfoundry-tfy-ctl-euwe1-devtest20221012173221749100000002/tfy-ctl-euwe1-devtest:nikhil-ws/my-test-workflow5/clyhb79w4013l01oyfq1iawd5/package.tar.gz
|
|
6
|
-
workflow_file_path: hello_world_package/workflow.py
|
|
7
|
-
docker_registry: docker.io/nikp-test
|
|
8
|
-
flyte_entities:
|
|
9
|
-
- template:
|
|
10
|
-
id:
|
|
11
|
-
resourceType: TASK
|
|
12
|
-
name: hello_world_package.workflow.say_hello
|
|
13
|
-
type: python-task
|
|
14
|
-
metadata:
|
|
15
|
-
runtime:
|
|
16
|
-
type: FLYTE_SDK
|
|
17
|
-
version: 1.12.2
|
|
18
|
-
flavor: python
|
|
19
|
-
retries: {}
|
|
20
|
-
interface:
|
|
21
|
-
inputs: {}
|
|
22
|
-
outputs:
|
|
23
|
-
variables:
|
|
24
|
-
o0:
|
|
25
|
-
type:
|
|
26
|
-
simple: STRING
|
|
27
|
-
description: o0
|
|
28
|
-
custom:
|
|
29
|
-
truefoundry:
|
|
30
|
-
type: python-task-config
|
|
31
|
-
image:
|
|
32
|
-
type: task-python-build
|
|
33
|
-
python_version: '3.9'
|
|
34
|
-
pip_packages:
|
|
35
|
-
- flytekit==1.10.3
|
|
36
|
-
resources:
|
|
37
|
-
cpu_request: 0.2
|
|
38
|
-
cpu_limit: 0.5
|
|
39
|
-
memory_request: 200
|
|
40
|
-
memory_limit: 500
|
|
41
|
-
ephemeral_storage_request: 1000
|
|
42
|
-
ephemeral_storage_limit: 2000
|
|
43
|
-
container:
|
|
44
|
-
image: ':'
|
|
45
|
-
args:
|
|
46
|
-
- pyflyte-execute
|
|
47
|
-
- --inputs
|
|
48
|
-
- '{{.input}}'
|
|
49
|
-
- --output-prefix
|
|
50
|
-
- '{{.outputPrefix}}'
|
|
51
|
-
- --raw-output-data-prefix
|
|
52
|
-
- '{{.rawOutputDataPrefix}}'
|
|
53
|
-
- --checkpoint-path
|
|
54
|
-
- '{{.checkpointOutputPrefix}}'
|
|
55
|
-
- --prev-checkpoint
|
|
56
|
-
- '{{.prevCheckpointPrefix}}'
|
|
57
|
-
- --resolver
|
|
58
|
-
- flytekit.core.python_auto_container.default_task_resolver
|
|
59
|
-
- --
|
|
60
|
-
- task-module
|
|
61
|
-
- hello_world_package.workflow
|
|
62
|
-
- task-name
|
|
63
|
-
- say_hello
|
|
64
|
-
resources: {}
|
|
65
|
-
description:
|
|
66
|
-
longDescription:
|
|
67
|
-
format: DESCRIPTION_FORMAT_RST
|
|
68
|
-
- template:
|
|
69
|
-
id:
|
|
70
|
-
resourceType: WORKFLOW
|
|
71
|
-
name: hello_world_package.workflow.hello_world_wf
|
|
72
|
-
metadata: {}
|
|
73
|
-
interface:
|
|
74
|
-
inputs: {}
|
|
75
|
-
outputs:
|
|
76
|
-
variables:
|
|
77
|
-
o0:
|
|
78
|
-
type:
|
|
79
|
-
simple: STRING
|
|
80
|
-
description: o0
|
|
81
|
-
nodes:
|
|
82
|
-
- id: n0
|
|
83
|
-
metadata:
|
|
84
|
-
name: say_hello
|
|
85
|
-
retries: {}
|
|
86
|
-
taskNode:
|
|
87
|
-
referenceId:
|
|
88
|
-
resourceType: TASK
|
|
89
|
-
name: hello_world_package.workflow.say_hello
|
|
90
|
-
overrides: {}
|
|
91
|
-
outputs:
|
|
92
|
-
- var: o0
|
|
93
|
-
binding:
|
|
94
|
-
promise:
|
|
95
|
-
nodeId: n0
|
|
96
|
-
var: o0
|
|
97
|
-
metadataDefaults: {}
|
|
98
|
-
description:
|
|
99
|
-
longDescription:
|
|
100
|
-
format: DESCRIPTION_FORMAT_RST
|
|
101
|
-
- id:
|
|
102
|
-
resourceType: LAUNCH_PLAN
|
|
103
|
-
name: hello_world_package.workflow.hello_world_wf
|
|
104
|
-
spec:
|
|
105
|
-
workflowId:
|
|
106
|
-
resourceType: WORKFLOW
|
|
107
|
-
name: hello_world_package.workflow.hello_world_wf
|
|
108
|
-
entityMetadata: {}
|
|
109
|
-
defaultInputs: {}
|
|
110
|
-
fixedInputs: {}
|
|
111
|
-
labels: {}
|
|
112
|
-
annotations: {}
|
|
113
|
-
rawOutputDataConfig: {}
|
|
114
|
-
closure:
|
|
115
|
-
expectedInputs: {}
|
|
116
|
-
expectedOutputs: {}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.3
|
|
2
|
-
Name: truefoundry
|
|
3
|
-
Version: 0.5.7rc1
|
|
4
|
-
Summary: TrueFoundry CLI
|
|
5
|
-
Author: Abhishek Choudhary
|
|
6
|
-
Author-email: abhishek@truefoundry.com
|
|
7
|
-
Requires-Python: >=3.8.1,<3.13
|
|
8
|
-
Classifier: Programming Language :: Python :: 3
|
|
9
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
10
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
11
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
-
Provides-Extra: workflow
|
|
14
|
-
Requires-Dist: GitPython (>=3.1.43,<4.0.0)
|
|
15
|
-
Requires-Dist: Mako (>=1.1.6,<2.0.0)
|
|
16
|
-
Requires-Dist: PyJWT (>=2.0.0,<3.0.0)
|
|
17
|
-
Requires-Dist: PyYAML (>=6.0.0,<7.0.0)
|
|
18
|
-
Requires-Dist: aenum (>=3.0.0,<4.0.0)
|
|
19
|
-
Requires-Dist: click (>=7.0.0,<9.0.0)
|
|
20
|
-
Requires-Dist: coolname (>=1.1.0,<2.0.0)
|
|
21
|
-
Requires-Dist: docker (>=6.1.2,<8.0.0)
|
|
22
|
-
Requires-Dist: filelock (>=3.8.0,<4.0.0)
|
|
23
|
-
Requires-Dist: flytekit (==1.13.13) ; extra == "workflow"
|
|
24
|
-
Requires-Dist: gitignorefile (>=1.1.2,<2.0.0)
|
|
25
|
-
Requires-Dist: importlib-metadata (>=4.11.3,<9.0.0)
|
|
26
|
-
Requires-Dist: importlib-resources (>=5.2.0,<7.0.0)
|
|
27
|
-
Requires-Dist: numpy (>=1.23.0,<2.0.0) ; python_version < "3.12"
|
|
28
|
-
Requires-Dist: numpy (>=1.26.0,<2.0.0) ; python_version >= "3.12"
|
|
29
|
-
Requires-Dist: openai (>=1.16.2,<2.0.0)
|
|
30
|
-
Requires-Dist: packaging (>=20.0,<25.0)
|
|
31
|
-
Requires-Dist: pydantic (>=1.8.2,<3.0.0)
|
|
32
|
-
Requires-Dist: pygments (>=2.12.0,<3.0.0)
|
|
33
|
-
Requires-Dist: python-dateutil (>=2.8.2,<3.0.0)
|
|
34
|
-
Requires-Dist: python-dotenv (>=1.0.1,<2.0.0)
|
|
35
|
-
Requires-Dist: python-socketio[client] (>=5.5.2,<6.0.0)
|
|
36
|
-
Requires-Dist: questionary (>=1.10.0,<2.0.0)
|
|
37
|
-
Requires-Dist: requests (>=2.18.0,<3.0.0)
|
|
38
|
-
Requires-Dist: requirements-parser (>=0.11.0,<0.12.0)
|
|
39
|
-
Requires-Dist: rich (>=13.7.1,<14.0.0)
|
|
40
|
-
Requires-Dist: rich-click (>=1.2.1,<2.0.0)
|
|
41
|
-
Requires-Dist: scipy (>=1.12.0,<2.0.0) ; python_version >= "3.12"
|
|
42
|
-
Requires-Dist: scipy (>=1.5.0,<2.0.0) ; python_version < "3.12"
|
|
43
|
-
Requires-Dist: tqdm (>=4.0.0,<5.0.0)
|
|
44
|
-
Requires-Dist: typing-extensions (>=4.0)
|
|
45
|
-
Requires-Dist: urllib3 (>=1.26.18,<3)
|
|
46
|
-
Requires-Dist: yq (>=3.1.0,<4.0.0)
|
|
47
|
-
Description-Content-Type: text/markdown
|
|
48
|
-
|
|
49
|
-
# TrueFoundry
|
|
50
|
-
|
|
51
|
-
TrueFoundry library to help you interact with the platform programmatically by
|
|
52
|
-
|
|
53
|
-
- Interacting with the deployments side of TrueFoundry, enabling you to manage workspaces, deployments, applications, and view logs.
|
|
54
|
-
- Providing experiment tracking capabilities, allowing you to track ML experiments and interact with ML repositories within TrueFoundry.
|
|
55
|
-
|
|
56
|
-
You can access the health of your service, monitoring links, deployed endpoints and track metadata and artifacts by logging on to TrueFoundry's dashboard.
|
|
57
|
-
|
|
58
|
-
## Installation
|
|
59
|
-
|
|
60
|
-
To install the `TrueFoundry CLI`, you can use pip:
|
|
61
|
-
|
|
62
|
-
```bash
|
|
63
|
-
pip install truefoundry
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
To install the `TrueFoundry CLI` with Workflow deployment features, you can use pip:
|
|
67
|
-
|
|
68
|
-
```bash
|
|
69
|
-
pip install truefoundry[workflow]
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
## Examples
|
|
73
|
-
|
|
74
|
-
https://github.com/truefoundry/getting-started-examples
|
|
75
|
-
|
|
76
|
-
## Documentation
|
|
77
|
-
|
|
78
|
-
https://docs.truefoundry.com/
|
|
79
|
-
|