flyte 0.0.1b1__py3-none-any.whl → 0.0.1b2__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.
- flyte/_cli/_common.py +0 -12
- flyte/_cli/_run.py +2 -24
- flyte/_cli/main.py +2 -28
- flyte/_image.py +6 -10
- flyte/_initialize.py +15 -24
- flyte/_internal/imagebuild/docker_builder.py +2 -2
- flyte/_internal/runtime/convert.py +0 -6
- flyte/_run.py +1 -0
- flyte/_version.py +2 -2
- flyte/remote/_console.py +1 -1
- flyte/types/_type_engine.py +3 -4
- {flyte-0.0.1b1.dist-info → flyte-0.0.1b2.dist-info}/METADATA +1 -1
- flyte-0.0.1b2.dist-info/RECORD +390 -0
- union/__init__.py +54 -0
- union/_api_commons.py +3 -0
- union/_bin/__init__.py +0 -0
- union/_bin/runtime.py +113 -0
- union/_build.py +25 -0
- union/_cache/__init__.py +12 -0
- union/_cache/cache.py +141 -0
- union/_cache/defaults.py +9 -0
- union/_cache/policy_function_body.py +42 -0
- union/_cli/__init__.py +0 -0
- union/_cli/_common.py +263 -0
- union/_cli/_create.py +40 -0
- union/_cli/_delete.py +23 -0
- union/_cli/_deploy.py +120 -0
- union/_cli/_get.py +162 -0
- {flyte → union}/_cli/_params.py +147 -106
- union/_cli/_run.py +150 -0
- union/_cli/main.py +72 -0
- union/_code_bundle/__init__.py +8 -0
- union/_code_bundle/_ignore.py +113 -0
- union/_code_bundle/_packaging.py +187 -0
- union/_code_bundle/_utils.py +342 -0
- union/_code_bundle/bundle.py +176 -0
- union/_context.py +146 -0
- union/_datastructures.py +295 -0
- union/_deploy.py +185 -0
- union/_doc.py +29 -0
- union/_docstring.py +26 -0
- union/_environment.py +43 -0
- union/_group.py +31 -0
- union/_hash.py +23 -0
- union/_image.py +760 -0
- union/_initialize.py +585 -0
- union/_interface.py +84 -0
- union/_internal/__init__.py +3 -0
- union/_internal/controllers/__init__.py +77 -0
- union/_internal/controllers/_local_controller.py +77 -0
- union/_internal/controllers/pbhash.py +39 -0
- union/_internal/controllers/remote/__init__.py +40 -0
- union/_internal/controllers/remote/_action.py +131 -0
- union/_internal/controllers/remote/_client.py +43 -0
- union/_internal/controllers/remote/_controller.py +169 -0
- union/_internal/controllers/remote/_core.py +341 -0
- union/_internal/controllers/remote/_informer.py +260 -0
- union/_internal/controllers/remote/_service_protocol.py +44 -0
- union/_internal/imagebuild/__init__.py +11 -0
- union/_internal/imagebuild/docker_builder.py +416 -0
- union/_internal/imagebuild/image_builder.py +243 -0
- union/_internal/imagebuild/remote_builder.py +0 -0
- union/_internal/resolvers/__init__.py +0 -0
- union/_internal/resolvers/_task_module.py +31 -0
- union/_internal/resolvers/common.py +24 -0
- union/_internal/resolvers/default.py +27 -0
- union/_internal/runtime/__init__.py +0 -0
- union/_internal/runtime/convert.py +163 -0
- union/_internal/runtime/entrypoints.py +121 -0
- union/_internal/runtime/io.py +136 -0
- union/_internal/runtime/resources_serde.py +134 -0
- union/_internal/runtime/task_serde.py +202 -0
- union/_internal/runtime/taskrunner.py +179 -0
- union/_internal/runtime/types_serde.py +53 -0
- union/_logging.py +124 -0
- union/_protos/__init__.py +0 -0
- union/_protos/common/authorization_pb2.py +66 -0
- union/_protos/common/authorization_pb2.pyi +106 -0
- union/_protos/common/authorization_pb2_grpc.py +4 -0
- union/_protos/common/identifier_pb2.py +71 -0
- union/_protos/common/identifier_pb2.pyi +82 -0
- union/_protos/common/identifier_pb2_grpc.py +4 -0
- union/_protos/common/identity_pb2.py +48 -0
- union/_protos/common/identity_pb2.pyi +72 -0
- union/_protos/common/identity_pb2_grpc.py +4 -0
- union/_protos/common/list_pb2.py +36 -0
- union/_protos/common/list_pb2.pyi +69 -0
- union/_protos/common/list_pb2_grpc.py +4 -0
- union/_protos/common/policy_pb2.py +37 -0
- union/_protos/common/policy_pb2.pyi +27 -0
- union/_protos/common/policy_pb2_grpc.py +4 -0
- union/_protos/common/role_pb2.py +37 -0
- union/_protos/common/role_pb2.pyi +51 -0
- union/_protos/common/role_pb2_grpc.py +4 -0
- union/_protos/common/runtime_version_pb2.py +28 -0
- union/_protos/common/runtime_version_pb2.pyi +24 -0
- union/_protos/common/runtime_version_pb2_grpc.py +4 -0
- union/_protos/logs/dataplane/payload_pb2.py +96 -0
- union/_protos/logs/dataplane/payload_pb2.pyi +168 -0
- union/_protos/logs/dataplane/payload_pb2_grpc.py +4 -0
- union/_protos/secret/definition_pb2.py +49 -0
- union/_protos/secret/definition_pb2.pyi +93 -0
- union/_protos/secret/definition_pb2_grpc.py +4 -0
- union/_protos/secret/payload_pb2.py +62 -0
- union/_protos/secret/payload_pb2.pyi +94 -0
- union/_protos/secret/payload_pb2_grpc.py +4 -0
- union/_protos/secret/secret_pb2.py +38 -0
- union/_protos/secret/secret_pb2.pyi +6 -0
- union/_protos/secret/secret_pb2_grpc.py +198 -0
- union/_protos/validate/validate/validate_pb2.py +76 -0
- union/_protos/workflow/node_execution_service_pb2.py +26 -0
- union/_protos/workflow/node_execution_service_pb2.pyi +4 -0
- union/_protos/workflow/node_execution_service_pb2_grpc.py +32 -0
- union/_protos/workflow/queue_service_pb2.py +75 -0
- union/_protos/workflow/queue_service_pb2.pyi +103 -0
- union/_protos/workflow/queue_service_pb2_grpc.py +172 -0
- union/_protos/workflow/run_definition_pb2.py +100 -0
- union/_protos/workflow/run_definition_pb2.pyi +256 -0
- union/_protos/workflow/run_definition_pb2_grpc.py +4 -0
- union/_protos/workflow/run_logs_service_pb2.py +41 -0
- union/_protos/workflow/run_logs_service_pb2.pyi +28 -0
- union/_protos/workflow/run_logs_service_pb2_grpc.py +69 -0
- union/_protos/workflow/run_service_pb2.py +133 -0
- union/_protos/workflow/run_service_pb2.pyi +173 -0
- union/_protos/workflow/run_service_pb2_grpc.py +412 -0
- union/_protos/workflow/state_service_pb2.py +58 -0
- union/_protos/workflow/state_service_pb2.pyi +69 -0
- union/_protos/workflow/state_service_pb2_grpc.py +138 -0
- union/_protos/workflow/task_definition_pb2.py +72 -0
- union/_protos/workflow/task_definition_pb2.pyi +65 -0
- union/_protos/workflow/task_definition_pb2_grpc.py +4 -0
- union/_protos/workflow/task_service_pb2.py +44 -0
- union/_protos/workflow/task_service_pb2.pyi +31 -0
- union/_protos/workflow/task_service_pb2_grpc.py +104 -0
- union/_resources.py +226 -0
- union/_retry.py +32 -0
- union/_reusable_environment.py +25 -0
- union/_run.py +374 -0
- union/_secret.py +61 -0
- union/_task.py +354 -0
- union/_task_environment.py +186 -0
- union/_timeout.py +47 -0
- union/_tools.py +27 -0
- union/_utils/__init__.py +11 -0
- union/_utils/asyn.py +119 -0
- union/_utils/file_handling.py +71 -0
- union/_utils/helpers.py +46 -0
- union/_utils/lazy_module.py +54 -0
- union/_utils/uv_script_parser.py +49 -0
- union/_version.py +21 -0
- union/connectors/__init__.py +0 -0
- union/errors.py +128 -0
- union/extras/__init__.py +5 -0
- union/extras/_container.py +263 -0
- union/io/__init__.py +11 -0
- union/io/_dataframe.py +0 -0
- union/io/_dir.py +425 -0
- union/io/_file.py +418 -0
- union/io/pickle/__init__.py +0 -0
- union/io/pickle/transformer.py +117 -0
- union/io/structured_dataset/__init__.py +122 -0
- union/io/structured_dataset/basic_dfs.py +219 -0
- union/io/structured_dataset/structured_dataset.py +1057 -0
- union/py.typed +0 -0
- union/remote/__init__.py +23 -0
- union/remote/_client/__init__.py +0 -0
- union/remote/_client/_protocols.py +129 -0
- union/remote/_client/auth/__init__.py +12 -0
- union/remote/_client/auth/_authenticators/__init__.py +0 -0
- union/remote/_client/auth/_authenticators/base.py +391 -0
- union/remote/_client/auth/_authenticators/client_credentials.py +73 -0
- union/remote/_client/auth/_authenticators/device_code.py +120 -0
- union/remote/_client/auth/_authenticators/external_command.py +77 -0
- union/remote/_client/auth/_authenticators/factory.py +200 -0
- union/remote/_client/auth/_authenticators/pkce.py +515 -0
- union/remote/_client/auth/_channel.py +184 -0
- union/remote/_client/auth/_client_config.py +83 -0
- union/remote/_client/auth/_default_html.py +32 -0
- union/remote/_client/auth/_grpc_utils/__init__.py +0 -0
- union/remote/_client/auth/_grpc_utils/auth_interceptor.py +204 -0
- union/remote/_client/auth/_grpc_utils/default_metadata_interceptor.py +144 -0
- union/remote/_client/auth/_keyring.py +154 -0
- union/remote/_client/auth/_token_client.py +258 -0
- union/remote/_client/auth/errors.py +16 -0
- union/remote/_client/controlplane.py +86 -0
- union/remote/_data.py +149 -0
- union/remote/_logs.py +74 -0
- union/remote/_project.py +86 -0
- union/remote/_run.py +820 -0
- union/remote/_secret.py +132 -0
- union/remote/_task.py +193 -0
- union/report/__init__.py +3 -0
- union/report/_report.py +178 -0
- union/report/_template.html +124 -0
- union/storage/__init__.py +24 -0
- union/storage/_remote_fs.py +34 -0
- union/storage/_storage.py +247 -0
- union/storage/_utils.py +5 -0
- union/types/__init__.py +11 -0
- union/types/_renderer.py +162 -0
- union/types/_string_literals.py +120 -0
- union/types/_type_engine.py +2131 -0
- union/types/_utils.py +80 -0
- flyte/config/__init__.py +0 -168
- flyte/config/_config.py +0 -196
- flyte/config/_internal.py +0 -64
- flyte-0.0.1b1.dist-info/RECORD +0 -204
- {flyte-0.0.1b1.dist-info → flyte-0.0.1b2.dist-info}/WHEEL +0 -0
- {flyte-0.0.1b1.dist-info → flyte-0.0.1b2.dist-info}/entry_points.txt +0 -0
- {flyte-0.0.1b1.dist-info → flyte-0.0.1b2.dist-info}/top_level.txt +0 -0
flyte/_cli/_common.py
CHANGED
|
@@ -12,13 +12,10 @@ from typing import Any, Dict, Iterable, List, Optional
|
|
|
12
12
|
|
|
13
13
|
import rich.box
|
|
14
14
|
import rich_click as click
|
|
15
|
-
from rich.console import Console
|
|
16
15
|
from rich.panel import Panel
|
|
17
16
|
from rich.table import Table
|
|
18
|
-
from rich.traceback import Traceback
|
|
19
17
|
|
|
20
18
|
import flyte.errors
|
|
21
|
-
from flyte.config import Config
|
|
22
19
|
|
|
23
20
|
PREFERRED_BORDER_COLOR = "dim cyan"
|
|
24
21
|
PREFERRED_ACCENT_COLOR = "bold #FFD700"
|
|
@@ -73,7 +70,6 @@ class CLIConfig:
|
|
|
73
70
|
endpoint: str | None = None
|
|
74
71
|
insecure: bool = False
|
|
75
72
|
org_override: str | None = None
|
|
76
|
-
config: Config | None = None
|
|
77
73
|
|
|
78
74
|
def replace(self, **kwargs) -> CLIConfig:
|
|
79
75
|
"""
|
|
@@ -91,7 +87,6 @@ class CLIConfig:
|
|
|
91
87
|
project=project,
|
|
92
88
|
domain=domain,
|
|
93
89
|
log_level=self.log_level,
|
|
94
|
-
config=self.config,
|
|
95
90
|
)
|
|
96
91
|
|
|
97
92
|
|
|
@@ -116,14 +111,7 @@ class InvokeBaseMixin:
|
|
|
116
111
|
raise click.ClickException(f"RPC error invoking command: {e!s}") from e
|
|
117
112
|
except flyte.errors.InitializationError:
|
|
118
113
|
raise click.ClickException("Initialize the CLI with a remote configuration. For example, pass --endpoint")
|
|
119
|
-
except click.exceptions.Exit as e:
|
|
120
|
-
# This is a normal exit, do nothing
|
|
121
|
-
raise e
|
|
122
114
|
except Exception as e:
|
|
123
|
-
if ctx.obj and ctx.obj.log_level and ctx.obj.log_level <= logging.DEBUG:
|
|
124
|
-
# If the user has requested verbose output, print the full traceback
|
|
125
|
-
console = Console()
|
|
126
|
-
console.print(Traceback.from_exception(type(e), e, e.__traceback__))
|
|
127
115
|
raise click.ClickException(f"Error invoking command: {e}") from e
|
|
128
116
|
|
|
129
117
|
|
flyte/_cli/_run.py
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
import inspect
|
|
4
3
|
from dataclasses import dataclass, field, fields
|
|
5
4
|
from pathlib import Path
|
|
6
5
|
from types import ModuleType
|
|
7
6
|
from typing import Any, Dict, List, cast
|
|
8
7
|
|
|
9
8
|
import click
|
|
10
|
-
from click import Context
|
|
9
|
+
from click import Context
|
|
11
10
|
from rich.console import Console
|
|
12
11
|
from typing_extensions import get_args
|
|
13
12
|
|
|
@@ -18,7 +17,6 @@ from .._task import TaskTemplate
|
|
|
18
17
|
from ..remote import Run
|
|
19
18
|
from . import _common as common
|
|
20
19
|
from ._common import CLIConfig
|
|
21
|
-
from ._params import to_click_option
|
|
22
20
|
|
|
23
21
|
|
|
24
22
|
@dataclass
|
|
@@ -79,7 +77,7 @@ class RunTaskCommand(click.Command):
|
|
|
79
77
|
copy_style=self.run_args.copy_style,
|
|
80
78
|
version=self.run_args.copy_style,
|
|
81
79
|
mode="local" if self.run_args.local else "remote",
|
|
82
|
-
).run(self.obj
|
|
80
|
+
).run(self.obj)
|
|
83
81
|
if isinstance(r, Run) and r.action is not None:
|
|
84
82
|
console = Console()
|
|
85
83
|
console.print(
|
|
@@ -91,26 +89,6 @@ class RunTaskCommand(click.Command):
|
|
|
91
89
|
)
|
|
92
90
|
)
|
|
93
91
|
|
|
94
|
-
def get_params(self, ctx: Context) -> List[Parameter]:
|
|
95
|
-
# Note this function may be called multiple times by click.
|
|
96
|
-
task = self.obj
|
|
97
|
-
from .._internal.runtime.types_serde import transform_native_to_typed_interface
|
|
98
|
-
|
|
99
|
-
interface = transform_native_to_typed_interface(task.native_interface)
|
|
100
|
-
if interface is None:
|
|
101
|
-
return super().get_params(ctx)
|
|
102
|
-
inputs_interface = task.native_interface.inputs
|
|
103
|
-
|
|
104
|
-
params: List[Parameter] = []
|
|
105
|
-
for name, var in interface.inputs.variables.items():
|
|
106
|
-
default_val = None
|
|
107
|
-
if inputs_interface[name][1] is not inspect._empty:
|
|
108
|
-
default_val = inputs_interface[name][1]
|
|
109
|
-
params.append(to_click_option(name, var, inputs_interface[name][0], default_val))
|
|
110
|
-
|
|
111
|
-
self.params = params
|
|
112
|
-
return super().get_params(ctx)
|
|
113
|
-
|
|
114
92
|
|
|
115
93
|
class TaskPerFileGroup(common.ObjectsPerFileGroup):
|
|
116
94
|
"""
|
flyte/_cli/main.py
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import rich_click as click
|
|
2
2
|
|
|
3
|
-
from ..config import Config
|
|
4
3
|
from ._common import CLIConfig
|
|
5
4
|
from ._create import create
|
|
6
5
|
from ._deploy import deploy
|
|
@@ -58,38 +57,13 @@ def _verbosity_to_loglevel(verbosity: int) -> int | None:
|
|
|
58
57
|
required=False,
|
|
59
58
|
help="Override for org",
|
|
60
59
|
)
|
|
61
|
-
@click.option(
|
|
62
|
-
"-c",
|
|
63
|
-
"--config",
|
|
64
|
-
"config_file",
|
|
65
|
-
required=False,
|
|
66
|
-
type=click.Path(exists=True),
|
|
67
|
-
help="Path to config file (YAML format) to use for the CLI. If not specified,"
|
|
68
|
-
" the default config file will be used.",
|
|
69
|
-
)
|
|
70
60
|
@click.pass_context
|
|
71
|
-
def main(
|
|
72
|
-
ctx: click.Context,
|
|
73
|
-
endpoint: str | None,
|
|
74
|
-
insecure: bool,
|
|
75
|
-
verbose: int,
|
|
76
|
-
org_override: str | None,
|
|
77
|
-
config_file: str | None,
|
|
78
|
-
):
|
|
61
|
+
def main(ctx: click.Context, endpoint: str | None, insecure: bool, verbose: int, org_override: str | None):
|
|
79
62
|
"""
|
|
80
63
|
v2 cli. Root command, please use one of the subcommands.
|
|
81
64
|
"""
|
|
82
65
|
log_level = _verbosity_to_loglevel(verbose)
|
|
83
|
-
|
|
84
|
-
config = Config.auto(config_file=config_file)
|
|
85
|
-
|
|
86
|
-
ctx.obj = CLIConfig(
|
|
87
|
-
log_level=log_level,
|
|
88
|
-
endpoint=endpoint or config.platform.endpoint,
|
|
89
|
-
insecure=insecure or config.platform.insecure,
|
|
90
|
-
org_override=org_override or config.task.org,
|
|
91
|
-
config=config,
|
|
92
|
-
)
|
|
66
|
+
ctx.obj = CLIConfig(log_level=log_level, endpoint=endpoint, insecure=insecure, org_override=org_override)
|
|
93
67
|
|
|
94
68
|
|
|
95
69
|
main.add_command(run)
|
flyte/_image.py
CHANGED
|
@@ -291,17 +291,13 @@ class Image:
|
|
|
291
291
|
def _get_default_image_for(cls, python_version: Tuple[int, int], flyte_version: Optional[str] = None) -> Image:
|
|
292
292
|
# Would love a way to move this outside of this class (but still needs to be accessible via Image.auto())
|
|
293
293
|
# this default image definition may need to be updated once there is a released pypi version
|
|
294
|
-
|
|
295
|
-
|
|
294
|
+
from flyte._version import __version__
|
|
295
|
+
|
|
296
|
+
dev_mode = cls._is_editable_install() or (__version__ and "dev" in __version__)
|
|
296
297
|
if flyte_version is None:
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
flyte_version = __version__.replace("+", "-")
|
|
301
|
-
|
|
302
|
-
if flyte_version:
|
|
303
|
-
preset_tag = flyte_version if flyte_version.startswith("v") else f"v{flyte_version}"
|
|
304
|
-
preset_tag = f"py{python_version[0]}.{python_version[1]}-{preset_tag}"
|
|
298
|
+
flyte_version = __version__.replace("+", "-")
|
|
299
|
+
preset_tag = flyte_version if flyte_version.startswith("v") else f"v{flyte_version}"
|
|
300
|
+
preset_tag = f"py{python_version[0]}.{python_version[1]}-{preset_tag}"
|
|
305
301
|
image = Image(
|
|
306
302
|
base_image=f"python:{python_version[0]}.{python_version[1]}-slim-bookworm",
|
|
307
303
|
registry=_BASE_REGISTRY,
|
flyte/_initialize.py
CHANGED
|
@@ -17,7 +17,6 @@ from ._logging import initialize_logger
|
|
|
17
17
|
from ._tools import ipython_check
|
|
18
18
|
|
|
19
19
|
if TYPE_CHECKING:
|
|
20
|
-
from flyte.config import Config
|
|
21
20
|
from flyte.remote._client.auth import AuthType, ClientConfig
|
|
22
21
|
from flyte.remote._client.controlplane import ClientSet
|
|
23
22
|
|
|
@@ -346,7 +345,6 @@ async def init(
|
|
|
346
345
|
rpc_retries: int = 3,
|
|
347
346
|
http_proxy_url: str | None = None,
|
|
348
347
|
storage: Storage | None = None,
|
|
349
|
-
config: Config | None = None,
|
|
350
348
|
) -> None:
|
|
351
349
|
"""
|
|
352
350
|
Initialize the Flyte system with the given configuration. This method should be called before any other Flyte
|
|
@@ -380,7 +378,6 @@ async def init(
|
|
|
380
378
|
:param insecure: insecure flag for the client
|
|
381
379
|
:param storage: Optional blob store (S3, GCS, Azure) configuration if needed to access (i.e. using Minio)
|
|
382
380
|
:param org: Optional organization override for the client. Should be set by auth instead.
|
|
383
|
-
:param config: Optional config to override the init parameters
|
|
384
381
|
|
|
385
382
|
:return: None
|
|
386
383
|
"""
|
|
@@ -395,39 +392,33 @@ async def init(
|
|
|
395
392
|
global _init_config # noqa: PLW0603
|
|
396
393
|
|
|
397
394
|
with _init_lock:
|
|
398
|
-
if config is None:
|
|
399
|
-
from flyte.config import Config
|
|
400
|
-
|
|
401
|
-
config = Config.auto()
|
|
402
|
-
platform_cfg = config.platform
|
|
403
|
-
task_cfg = config.task
|
|
404
395
|
client = None
|
|
405
|
-
if endpoint or
|
|
396
|
+
if endpoint or api_key:
|
|
406
397
|
client = await _initialize_client(
|
|
407
398
|
api_key=api_key,
|
|
408
|
-
auth_type=auth_type
|
|
409
|
-
endpoint=endpoint
|
|
399
|
+
auth_type=auth_type,
|
|
400
|
+
endpoint=endpoint,
|
|
410
401
|
headless=headless,
|
|
411
|
-
insecure=insecure
|
|
412
|
-
insecure_skip_verify=insecure_skip_verify
|
|
413
|
-
ca_cert_file_path=ca_cert_file_path
|
|
414
|
-
command=command
|
|
415
|
-
proxy_command=proxy_command
|
|
416
|
-
client_id=client_id
|
|
417
|
-
client_credentials_secret=client_credentials_secret
|
|
402
|
+
insecure=insecure,
|
|
403
|
+
insecure_skip_verify=insecure_skip_verify,
|
|
404
|
+
ca_cert_file_path=ca_cert_file_path,
|
|
405
|
+
command=command,
|
|
406
|
+
proxy_command=proxy_command,
|
|
407
|
+
client_id=client_id,
|
|
408
|
+
client_credentials_secret=client_credentials_secret,
|
|
418
409
|
client_config=auth_client_config,
|
|
419
|
-
rpc_retries=rpc_retries
|
|
420
|
-
http_proxy_url=http_proxy_url
|
|
410
|
+
rpc_retries=rpc_retries,
|
|
411
|
+
http_proxy_url=http_proxy_url,
|
|
421
412
|
)
|
|
422
413
|
|
|
423
414
|
root_dir = root_dir or get_cwd_editable_install() or Path.cwd()
|
|
424
415
|
_init_config = _InitConfig(
|
|
425
416
|
root_dir=root_dir,
|
|
426
|
-
project=project
|
|
427
|
-
domain=domain
|
|
417
|
+
project=project,
|
|
418
|
+
domain=domain,
|
|
428
419
|
client=client,
|
|
429
420
|
storage=storage,
|
|
430
|
-
org=org
|
|
421
|
+
org=org,
|
|
431
422
|
)
|
|
432
423
|
|
|
433
424
|
|
|
@@ -43,7 +43,7 @@ ENV PATH="/root/.venv/bin:$$PATH" \
|
|
|
43
43
|
UV_PACKAGE_INSTALL_COMMAND_TEMPLATE = Template("""\
|
|
44
44
|
RUN --mount=type=cache,sharing=locked,mode=0777,target=/root/.cache/uv,id=uv \
|
|
45
45
|
--mount=type=bind,target=requirements_uv.txt,src=requirements_uv.txt \
|
|
46
|
-
uv pip install --python $$UV_PYTHON $PIP_INSTALL_ARGS
|
|
46
|
+
uv pip install --prerelease=allow --python $$UV_PYTHON $PIP_INSTALL_ARGS
|
|
47
47
|
""")
|
|
48
48
|
|
|
49
49
|
APT_INSTALL_COMMAND_TEMPLATE = Template("""\
|
|
@@ -54,7 +54,7 @@ RUN --mount=type=cache,sharing=locked,mode=0777,target=/var/cache/apt,id=apt \
|
|
|
54
54
|
|
|
55
55
|
UV_PYTHON_INSTALL_COMMAND = Template("""\
|
|
56
56
|
RUN --mount=type=cache,sharing=locked,mode=0777,target=/root/.cache/uv,id=uv \
|
|
57
|
-
uv pip install $PIP_INSTALL_ARGS
|
|
57
|
+
uv pip install --prerelease=allow $PIP_INSTALL_ARGS
|
|
58
58
|
""")
|
|
59
59
|
|
|
60
60
|
# uv pip install --python /root/env/bin/python
|
|
@@ -60,12 +60,6 @@ async def convert_from_native_to_inputs(interface: NativeInterface, *args, **kwa
|
|
|
60
60
|
kwargs = interface.convert_to_kwargs(*args, **kwargs)
|
|
61
61
|
if len(kwargs) == 0:
|
|
62
62
|
return Inputs.empty()
|
|
63
|
-
# fill in defaults if missing
|
|
64
|
-
for input_name, (input_type, default_value) in interface.inputs.items():
|
|
65
|
-
if input_name not in kwargs:
|
|
66
|
-
if default_value is not None:
|
|
67
|
-
kwargs[input_name] = default_value
|
|
68
|
-
# todo: fill in Nones for optional inputs
|
|
69
63
|
if len(kwargs) < len(interface.inputs):
|
|
70
64
|
raise ValueError(
|
|
71
65
|
f"Received {len(kwargs)} inputs but interface has {len(interface.inputs)}. "
|
flyte/_run.py
CHANGED
|
@@ -277,6 +277,7 @@ class _Runner:
|
|
|
277
277
|
from flyte._internal.runtime.entrypoints import direct_dispatch
|
|
278
278
|
|
|
279
279
|
controller = create_controller(ct="local")
|
|
280
|
+
|
|
280
281
|
inputs = await convert_from_native_to_inputs(obj.native_interface, *args, **kwargs)
|
|
281
282
|
if self._name is None:
|
|
282
283
|
action = ActionID.create_random()
|
flyte/_version.py
CHANGED
|
@@ -17,5 +17,5 @@ __version__: str
|
|
|
17
17
|
__version_tuple__: VERSION_TUPLE
|
|
18
18
|
version_tuple: VERSION_TUPLE
|
|
19
19
|
|
|
20
|
-
__version__ = version = '0.0.
|
|
21
|
-
__version_tuple__ = version_tuple = (0, 0, 1, '
|
|
20
|
+
__version__ = version = '0.0.1b2'
|
|
21
|
+
__version_tuple__ = version_tuple = (0, 0, 1, 'b2')
|
flyte/remote/_console.py
CHANGED
|
@@ -7,7 +7,7 @@ def _get_http_domain(endpoint: str, insecure: bool) -> str:
|
|
|
7
7
|
if parsed.scheme == "dns":
|
|
8
8
|
domain = parsed.path.lstrip("/")
|
|
9
9
|
else:
|
|
10
|
-
domain = parsed.netloc
|
|
10
|
+
domain = parsed.netloc
|
|
11
11
|
# TODO: make console url configurable
|
|
12
12
|
if domain.split(":")[0] == "localhost":
|
|
13
13
|
domain = "localhost:8080"
|
flyte/types/_type_engine.py
CHANGED
|
@@ -450,6 +450,7 @@ class DataclassTransformer(TypeTransformer[object]):
|
|
|
450
450
|
# However, FooSchema is created by flytekit and it's not equal to the user-defined dataclass (Foo).
|
|
451
451
|
# Therefore, we should iterate all attributes in the dataclass and check the type of value in dataclass
|
|
452
452
|
# matches the expected_type.
|
|
453
|
+
|
|
453
454
|
expected_fields_dict = {}
|
|
454
455
|
|
|
455
456
|
for f in dataclasses.fields(expected_type):
|
|
@@ -1991,9 +1992,7 @@ DatetimeTransformer = SimpleTransformer(
|
|
|
1991
1992
|
datetime.datetime,
|
|
1992
1993
|
types_pb2.LiteralType(simple=types_pb2.SimpleType.DATETIME),
|
|
1993
1994
|
lambda x: Literal(scalar=Scalar(primitive=Primitive(datetime=x))),
|
|
1994
|
-
lambda x: x.scalar.primitive.datetime.
|
|
1995
|
-
if x.scalar.primitive.HasField("datetime")
|
|
1996
|
-
else None,
|
|
1995
|
+
lambda x: x.scalar.primitive.datetime if x.scalar.primitive.HasField("datetime") else None,
|
|
1997
1996
|
)
|
|
1998
1997
|
|
|
1999
1998
|
TimedeltaTransformer = SimpleTransformer(
|
|
@@ -2001,7 +2000,7 @@ TimedeltaTransformer = SimpleTransformer(
|
|
|
2001
2000
|
datetime.timedelta,
|
|
2002
2001
|
types_pb2.LiteralType(simple=types_pb2.SimpleType.DURATION),
|
|
2003
2002
|
lambda x: Literal(scalar=Scalar(primitive=Primitive(duration=x))),
|
|
2004
|
-
lambda x: x.scalar.primitive.duration
|
|
2003
|
+
lambda x: x.scalar.primitive.duration if x.scalar.primitive.HasField("duration") else None,
|
|
2005
2004
|
)
|
|
2006
2005
|
|
|
2007
2006
|
DateTransformer = SimpleTransformer(
|