flyte 0.2.0b4__py3-none-any.whl → 0.2.0b7__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 flyte might be problematic. Click here for more details.
- flyte/__init__.py +2 -1
- flyte/_build.py +3 -2
- flyte/_code_bundle/_utils.py +0 -16
- flyte/_code_bundle/bundle.py +1 -1
- flyte/_deploy.py +4 -4
- flyte/_initialize.py +69 -26
- flyte/_internal/controllers/remote/_core.py +1 -1
- flyte/_protos/workflow/common_pb2.py +27 -0
- flyte/_protos/workflow/common_pb2.pyi +14 -0
- flyte/_protos/workflow/common_pb2_grpc.py +4 -0
- flyte/_protos/workflow/run_definition_pb2.py +14 -14
- flyte/_protos/workflow/run_definition_pb2.pyi +4 -2
- flyte/_protos/workflow/task_definition_pb2.py +14 -13
- flyte/_protos/workflow/task_definition_pb2.pyi +7 -3
- flyte/_run.py +7 -5
- flyte/_trace.py +1 -6
- flyte/_version.py +2 -2
- flyte/cli/_common.py +23 -15
- flyte/cli/_run.py +12 -6
- flyte/cli/main.py +15 -9
- flyte/config/__init__.py +2 -189
- flyte/config/_config.py +181 -172
- flyte/config/_internal.py +1 -1
- flyte/config/_reader.py +207 -0
- flyte/io/_dir.py +2 -2
- flyte/io/_file.py +1 -4
- flyte/remote/_data.py +3 -3
- flyte/remote/_logs.py +49 -26
- flyte/remote/_project.py +8 -9
- flyte/remote/_run.py +106 -61
- flyte/remote/_secret.py +12 -12
- flyte/remote/_task.py +3 -3
- flyte/report/_report.py +4 -4
- flyte/syncify/__init__.py +5 -0
- flyte/syncify/_api.py +277 -0
- flyte-0.2.0b7.dist-info/METADATA +156 -0
- {flyte-0.2.0b4.dist-info → flyte-0.2.0b7.dist-info}/RECORD +40 -35
- flyte/_api_commons.py +0 -3
- flyte-0.2.0b4.dist-info/METADATA +0 -179
- {flyte-0.2.0b4.dist-info → flyte-0.2.0b7.dist-info}/WHEEL +0 -0
- {flyte-0.2.0b4.dist-info → flyte-0.2.0b7.dist-info}/entry_points.txt +0 -0
- {flyte-0.2.0b4.dist-info → flyte-0.2.0b7.dist-info}/top_level.txt +0 -0
flyte/__init__.py
CHANGED
|
@@ -38,6 +38,7 @@ __all__ = [
|
|
|
38
38
|
"deploy",
|
|
39
39
|
"group",
|
|
40
40
|
"init",
|
|
41
|
+
"init_auto_from_config",
|
|
41
42
|
"run",
|
|
42
43
|
"trace",
|
|
43
44
|
"with_runcontext",
|
|
@@ -49,7 +50,7 @@ from ._deploy import deploy
|
|
|
49
50
|
from ._environment import Environment
|
|
50
51
|
from ._group import group
|
|
51
52
|
from ._image import Image
|
|
52
|
-
from ._initialize import init
|
|
53
|
+
from ._initialize import init, init_auto_from_config
|
|
53
54
|
from ._resources import GPU, TPU, Device, Resources
|
|
54
55
|
from ._retry import RetryStrategy
|
|
55
56
|
from ._reusable_environment import ReusePolicy
|
flyte/_build.py
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
from .
|
|
3
|
+
from flyte.syncify import syncify
|
|
4
|
+
|
|
4
5
|
from ._image import Image
|
|
5
6
|
|
|
6
7
|
|
|
7
|
-
@
|
|
8
|
+
@syncify
|
|
8
9
|
async def build(image: Image) -> str:
|
|
9
10
|
"""
|
|
10
11
|
Build an image. The existing async context will be used.
|
flyte/_code_bundle/_utils.py
CHANGED
|
@@ -14,7 +14,6 @@ import tempfile
|
|
|
14
14
|
import typing
|
|
15
15
|
from datetime import datetime, timezone
|
|
16
16
|
from functools import lru_cache
|
|
17
|
-
from pathlib import Path
|
|
18
17
|
from types import ModuleType
|
|
19
18
|
from typing import List, Literal, Optional, Tuple, Union
|
|
20
19
|
|
|
@@ -322,18 +321,3 @@ def hash_file(file_path: typing.Union[os.PathLike, str]) -> Tuple[bytes, str, in
|
|
|
322
321
|
size += len(chunk)
|
|
323
322
|
|
|
324
323
|
return h.digest(), h.hexdigest(), size
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
def _find_project_root(source_path) -> str:
|
|
328
|
-
"""
|
|
329
|
-
Find the root of the project.
|
|
330
|
-
The root of the project is considered to be the first ancestor from source_path that does
|
|
331
|
-
not contain a __init__.py file.
|
|
332
|
-
|
|
333
|
-
N.B.: This assumption only holds for regular packages (as opposed to namespace packages)
|
|
334
|
-
"""
|
|
335
|
-
# Start from the directory right above source_path
|
|
336
|
-
path = Path(source_path).parent.resolve()
|
|
337
|
-
while os.path.exists(os.path.join(path, "__init__.py")):
|
|
338
|
-
path = path.parent
|
|
339
|
-
return str(path)
|
flyte/_code_bundle/bundle.py
CHANGED
|
@@ -146,7 +146,7 @@ async def build_code_bundle(
|
|
|
146
146
|
logger.info(f"Code bundle created at {bundle_path}, size: {tar_size} MB, archive size: {archive_size} MB")
|
|
147
147
|
if not dryrun:
|
|
148
148
|
hash_digest, remote_path = await upload_file(bundle_path)
|
|
149
|
-
logger.
|
|
149
|
+
logger.debug(f"Code bundle uploaded to {remote_path}")
|
|
150
150
|
else:
|
|
151
151
|
remote_path = "na"
|
|
152
152
|
if copy_bundle_to:
|
flyte/_deploy.py
CHANGED
|
@@ -7,11 +7,11 @@ from typing import TYPE_CHECKING, Dict, List, Optional, Tuple
|
|
|
7
7
|
import rich.repr
|
|
8
8
|
|
|
9
9
|
from flyte.models import SerializationContext
|
|
10
|
+
from flyte.syncify import syncify
|
|
10
11
|
|
|
11
|
-
from ._api_commons import syncer
|
|
12
12
|
from ._environment import Environment
|
|
13
13
|
from ._image import Image
|
|
14
|
-
from ._initialize import get_client, get_common_config,
|
|
14
|
+
from ._initialize import ensure_client, get_client, get_common_config, requires_initialization
|
|
15
15
|
from ._logging import logger
|
|
16
16
|
from ._task import TaskTemplate
|
|
17
17
|
from ._task_environment import TaskEnvironment
|
|
@@ -47,13 +47,13 @@ class Deployment:
|
|
|
47
47
|
return f"Deployment(envs=[{env_names}], tasks=[{task_names_versions}])"
|
|
48
48
|
|
|
49
49
|
|
|
50
|
-
@requires_client
|
|
51
50
|
async def _deploy_task(
|
|
52
51
|
task: TaskTemplate, serialization_context: SerializationContext, dryrun: bool = False
|
|
53
52
|
) -> task_definition_pb2.TaskSpec:
|
|
54
53
|
"""
|
|
55
54
|
Deploy the given task.
|
|
56
55
|
"""
|
|
56
|
+
ensure_client()
|
|
57
57
|
from ._internal.runtime.task_serde import translate_task_to_wire
|
|
58
58
|
from ._protos.workflow import task_definition_pb2, task_service_pb2
|
|
59
59
|
|
|
@@ -177,7 +177,7 @@ def plan_deploy(*envs: Environment, version: Optional[str] = None) -> Deployment
|
|
|
177
177
|
return DeploymentPlan(planned_envs, version=version)
|
|
178
178
|
|
|
179
179
|
|
|
180
|
-
@
|
|
180
|
+
@syncify
|
|
181
181
|
async def deploy(
|
|
182
182
|
*envs: Environment,
|
|
183
183
|
dryrun: bool = False,
|
flyte/_initialize.py
CHANGED
|
@@ -8,9 +8,9 @@ from pathlib import Path
|
|
|
8
8
|
from typing import TYPE_CHECKING, Callable, List, Literal, Optional, TypeVar
|
|
9
9
|
|
|
10
10
|
from flyte.errors import InitializationError
|
|
11
|
+
from flyte.syncify import syncify
|
|
11
12
|
|
|
12
|
-
from .
|
|
13
|
-
from ._logging import initialize_logger
|
|
13
|
+
from ._logging import initialize_logger, logger
|
|
14
14
|
from ._tools import ipython_check
|
|
15
15
|
|
|
16
16
|
if TYPE_CHECKING:
|
|
@@ -108,7 +108,7 @@ async def _initialize_client(
|
|
|
108
108
|
)
|
|
109
109
|
|
|
110
110
|
|
|
111
|
-
@
|
|
111
|
+
@syncify
|
|
112
112
|
async def init(
|
|
113
113
|
org: str | None = None,
|
|
114
114
|
project: str | None = None,
|
|
@@ -130,7 +130,6 @@ async def init(
|
|
|
130
130
|
rpc_retries: int = 3,
|
|
131
131
|
http_proxy_url: str | None = None,
|
|
132
132
|
storage: Storage | None = None,
|
|
133
|
-
config: Config | None = None,
|
|
134
133
|
) -> None:
|
|
135
134
|
"""
|
|
136
135
|
Initialize the Flyte system with the given configuration. This method should be called before any other Flyte
|
|
@@ -179,42 +178,72 @@ async def init(
|
|
|
179
178
|
global _init_config # noqa: PLW0603
|
|
180
179
|
|
|
181
180
|
with _init_lock:
|
|
182
|
-
if config is None:
|
|
183
|
-
import flyte.config as _f_cfg
|
|
184
|
-
|
|
185
|
-
config = _f_cfg.Config()
|
|
186
|
-
platform_cfg = config.platform
|
|
187
|
-
task_cfg = config.task
|
|
188
181
|
client = None
|
|
189
|
-
if endpoint or
|
|
182
|
+
if endpoint or api_key:
|
|
190
183
|
client = await _initialize_client(
|
|
191
184
|
api_key=api_key,
|
|
192
|
-
auth_type=auth_type
|
|
193
|
-
endpoint=endpoint
|
|
185
|
+
auth_type=auth_type,
|
|
186
|
+
endpoint=endpoint,
|
|
194
187
|
headless=headless,
|
|
195
|
-
insecure=insecure
|
|
196
|
-
insecure_skip_verify=insecure_skip_verify
|
|
197
|
-
ca_cert_file_path=ca_cert_file_path
|
|
198
|
-
command=command
|
|
199
|
-
proxy_command=proxy_command
|
|
200
|
-
client_id=client_id
|
|
201
|
-
client_credentials_secret=client_credentials_secret
|
|
188
|
+
insecure=insecure,
|
|
189
|
+
insecure_skip_verify=insecure_skip_verify,
|
|
190
|
+
ca_cert_file_path=ca_cert_file_path,
|
|
191
|
+
command=command,
|
|
192
|
+
proxy_command=proxy_command,
|
|
193
|
+
client_id=client_id,
|
|
194
|
+
client_credentials_secret=client_credentials_secret,
|
|
202
195
|
client_config=auth_client_config,
|
|
203
|
-
rpc_retries=rpc_retries
|
|
204
|
-
http_proxy_url=http_proxy_url
|
|
196
|
+
rpc_retries=rpc_retries,
|
|
197
|
+
http_proxy_url=http_proxy_url,
|
|
205
198
|
)
|
|
206
199
|
|
|
207
200
|
root_dir = root_dir or get_cwd_editable_install() or Path.cwd()
|
|
208
201
|
_init_config = _InitConfig(
|
|
209
202
|
root_dir=root_dir,
|
|
210
|
-
project=project
|
|
211
|
-
domain=domain
|
|
203
|
+
project=project,
|
|
204
|
+
domain=domain,
|
|
212
205
|
client=client,
|
|
213
206
|
storage=storage,
|
|
214
|
-
org=org
|
|
207
|
+
org=org,
|
|
215
208
|
)
|
|
216
209
|
|
|
217
210
|
|
|
211
|
+
@syncify
|
|
212
|
+
async def init_auto_from_config(path_or_config: str | Config | None = None) -> None:
|
|
213
|
+
"""
|
|
214
|
+
Initialize the Flyte system using a configuration file or Config object. This method should be called before any
|
|
215
|
+
other Flyte remote API methods are called. Thread-safe implementation.
|
|
216
|
+
|
|
217
|
+
:param path_or_config: Path to the configuration file or Config object
|
|
218
|
+
:return: None
|
|
219
|
+
"""
|
|
220
|
+
import flyte.config as config
|
|
221
|
+
|
|
222
|
+
cfg: config.Config
|
|
223
|
+
if path_or_config is None or isinstance(path_or_config, str):
|
|
224
|
+
# If a string is passed, treat it as a path to the config file
|
|
225
|
+
cfg = config.auto(path_or_config)
|
|
226
|
+
else:
|
|
227
|
+
# If a Config object is passed, use it directly
|
|
228
|
+
cfg = path_or_config
|
|
229
|
+
|
|
230
|
+
logger.debug(f"Flyte config initialized as {cfg}")
|
|
231
|
+
await init.aio(
|
|
232
|
+
org=cfg.task.org,
|
|
233
|
+
project=cfg.task.project,
|
|
234
|
+
domain=cfg.task.domain,
|
|
235
|
+
endpoint=cfg.platform.endpoint,
|
|
236
|
+
insecure=cfg.platform.insecure,
|
|
237
|
+
insecure_skip_verify=cfg.platform.insecure_skip_verify,
|
|
238
|
+
ca_cert_file_path=cfg.platform.ca_cert_file_path,
|
|
239
|
+
auth_type=cfg.platform.auth_mode,
|
|
240
|
+
command=cfg.platform.command,
|
|
241
|
+
proxy_command=cfg.platform.proxy_command,
|
|
242
|
+
client_id=cfg.platform.client_id,
|
|
243
|
+
client_credentials_secret=cfg.platform.client_credentials_secret,
|
|
244
|
+
)
|
|
245
|
+
|
|
246
|
+
|
|
218
247
|
def _get_init_config() -> Optional[_InitConfig]:
|
|
219
248
|
"""
|
|
220
249
|
Get the current initialization configuration. Thread-safe implementation.
|
|
@@ -298,6 +327,20 @@ def initialize_in_cluster() -> None:
|
|
|
298
327
|
T = TypeVar("T", bound=Callable)
|
|
299
328
|
|
|
300
329
|
|
|
330
|
+
def ensure_client():
|
|
331
|
+
"""
|
|
332
|
+
Ensure that the client is initialized. If not, raise an InitializationError.
|
|
333
|
+
This function is used to check if the client is initialized before executing any Flyte remote API methods.
|
|
334
|
+
"""
|
|
335
|
+
if _get_init_config() is None or _get_init_config().client is None:
|
|
336
|
+
raise InitializationError(
|
|
337
|
+
"ClientNotInitializedError",
|
|
338
|
+
"user",
|
|
339
|
+
"Client has not been initialized. Call flyte.init() with a valid endpoint"
|
|
340
|
+
" or api-key before using this function.",
|
|
341
|
+
)
|
|
342
|
+
|
|
343
|
+
|
|
301
344
|
def requires_client(func: T) -> T:
|
|
302
345
|
"""
|
|
303
346
|
Decorator that checks if the client has been initialized before executing the function.
|
|
@@ -308,7 +351,7 @@ def requires_client(func: T) -> T:
|
|
|
308
351
|
"""
|
|
309
352
|
|
|
310
353
|
@functools.wraps(func)
|
|
311
|
-
def wrapper(*args, **kwargs) -> T:
|
|
354
|
+
async def wrapper(*args, **kwargs) -> T:
|
|
312
355
|
init_config = _get_init_config()
|
|
313
356
|
if init_config is None or init_config.client is None:
|
|
314
357
|
raise InitializationError(
|
|
@@ -32,7 +32,7 @@ class Controller:
|
|
|
32
32
|
max_system_retries: int = 5,
|
|
33
33
|
resource_log_interval_sec: float = 10.0,
|
|
34
34
|
min_backoff_on_err_sec: float = 0.1,
|
|
35
|
-
thread_wait_timeout_sec: float = 0
|
|
35
|
+
thread_wait_timeout_sec: float = 5.0,
|
|
36
36
|
enqueue_timeout_sec: float = 5.0,
|
|
37
37
|
):
|
|
38
38
|
"""
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: workflow/common.proto
|
|
4
|
+
"""Generated protocol buffer code."""
|
|
5
|
+
from google.protobuf import descriptor as _descriptor
|
|
6
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
7
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
8
|
+
from google.protobuf.internal import builder as _builder
|
|
9
|
+
# @@protoc_insertion_point(imports)
|
|
10
|
+
|
|
11
|
+
_sym_db = _symbol_database.Default()
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
from flyteidl.core import interface_pb2 as flyteidl_dot_core_dot_interface__pb2
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15workflow/common.proto\x12\x11\x63loudidl.workflow\x1a\x1d\x66lyteidl/core/interface.proto\"\\\n\x0eNamedParameter\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x36\n\tparameter\x18\x02 \x01(\x0b\x32\x18.flyteidl.core.ParameterR\tparameterB\xb8\x01\n\x15\x63om.cloudidl.workflowB\x0b\x43ommonProtoH\x02P\x01Z+github.com/unionai/cloud/gen/pb-go/workflow\xa2\x02\x03\x43WX\xaa\x02\x11\x43loudidl.Workflow\xca\x02\x11\x43loudidl\\Workflow\xe2\x02\x1d\x43loudidl\\Workflow\\GPBMetadata\xea\x02\x12\x43loudidl::Workflowb\x06proto3')
|
|
18
|
+
|
|
19
|
+
_globals = globals()
|
|
20
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
21
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'workflow.common_pb2', _globals)
|
|
22
|
+
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
23
|
+
DESCRIPTOR._options = None
|
|
24
|
+
DESCRIPTOR._serialized_options = b'\n\025com.cloudidl.workflowB\013CommonProtoH\002P\001Z+github.com/unionai/cloud/gen/pb-go/workflow\242\002\003CWX\252\002\021Cloudidl.Workflow\312\002\021Cloudidl\\Workflow\342\002\035Cloudidl\\Workflow\\GPBMetadata\352\002\022Cloudidl::Workflow'
|
|
25
|
+
_globals['_NAMEDPARAMETER']._serialized_start=75
|
|
26
|
+
_globals['_NAMEDPARAMETER']._serialized_end=167
|
|
27
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
from flyteidl.core import interface_pb2 as _interface_pb2
|
|
2
|
+
from google.protobuf import descriptor as _descriptor
|
|
3
|
+
from google.protobuf import message as _message
|
|
4
|
+
from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union
|
|
5
|
+
|
|
6
|
+
DESCRIPTOR: _descriptor.FileDescriptor
|
|
7
|
+
|
|
8
|
+
class NamedParameter(_message.Message):
|
|
9
|
+
__slots__ = ["name", "parameter"]
|
|
10
|
+
NAME_FIELD_NUMBER: _ClassVar[int]
|
|
11
|
+
PARAMETER_FIELD_NUMBER: _ClassVar[int]
|
|
12
|
+
name: str
|
|
13
|
+
parameter: _interface_pb2.Parameter
|
|
14
|
+
def __init__(self, name: _Optional[str] = ..., parameter: _Optional[_Union[_interface_pb2.Parameter, _Mapping]] = ...) -> None: ...
|
|
@@ -21,7 +21,7 @@ from flyte._protos.validate.validate import validate_pb2 as validate_dot_validat
|
|
|
21
21
|
from flyte._protos.workflow import task_definition_pb2 as workflow_dot_task__definition__pb2
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1dworkflow/run_definition.proto\x12\x11\x63loudidl.workflow\x1a\x17\x63ommon/identifier.proto\x1a\x15\x63ommon/identity.proto\x1a\x1d\x66lyteidl/core/execution.proto\x1a\x1c\x66lyteidl/core/literals.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x17validate/validate.proto\x1a\x1eworkflow/task_definition.proto\"\x8d\x01\n\rRunIdentifier\x12\x19\n\x03org\x18\x01 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x03org\x12!\n\x07project\x18\x02 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x07project\x12\x1f\n\x06\x64omain\x18\x03 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x06\x64omain\x12\x1d\n\x04name\x18\x04 \x01(\tB\t\xfa\x42\x06r\x04\x10\x01\x18\x1eR\x04name\"\x82\x01\n\x06Labels\x12=\n\x06values\x18\x01 \x03(\x0b\x32%.cloudidl.workflow.Labels.ValuesEntryR\x06values\x1a\x39\n\x0bValuesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\x8c\x01\n\x0b\x41nnotations\x12\x42\n\x06values\x18\x01 \x03(\x0b\x32*.cloudidl.workflow.Annotations.ValuesEntryR\x06values\x1a\x39\n\x0bValuesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\";\n\x04\x45nvs\x12\x33\n\x06values\x18\x01 \x03(\x0b\x32\x1b.flyteidl.core.KeyValuePairR\x06values\"\x96\x02\n\x07RunSpec\x12\x31\n\x06labels\x18\x01 \x01(\x0b\x32\x19.cloudidl.workflow.LabelsR\x06labels\x12@\n\x0b\x61nnotations\x18\x02 \x01(\x0b\x32\x1e.cloudidl.workflow.AnnotationsR\x0b\x61nnotations\x12+\n\x04\x65nvs\x18\x03 \x01(\x0b\x32\x17.cloudidl.workflow.EnvsR\x04\x65nvs\x12@\n\rinterruptible\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.BoolValueR\rinterruptible\x12\'\n\x0foverwrite_cache\x18\x05 \x01(\x08R\x0eoverwriteCache\"8\n\x03Run\x12\x31\n\x06\x61\x63tion\x18\x01 \x01(\x0b\x32\x19.cloudidl.workflow.ActionR\x06\x61\x63tion\"}\n\nRunDetails\x12\x35\n\x08run_spec\x18\x01 \x01(\x0b\x32\x1a.cloudidl.workflow.RunSpecR\x07runSpec\x12\x38\n\x06\x61\x63tion\x18\x02 \x01(\x0b\x32 .cloudidl.workflow.ActionDetailsR\x06\x61\x63tion\"o\n\x10\x41\x63tionIdentifier\x12<\n\x03run\x18\x01 \x01(\x0b\x32 .cloudidl.workflow.RunIdentifierB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x03run\x12\x1d\n\x04name\x18\x02 \x01(\tB\t\xfa\x42\x06r\x04\x10\x01\x18\x1eR\x04name\"d\n\x12TaskActionMetadata\x12\x31\n\x02id\x18\x01 \x01(\x0b\x32!.cloudidl.workflow.TaskIdentifierR\x02id\x12\x1b\n\ttask_type\x18\x02 \x01(\tR\x08taskType\")\n\x13TraceActionMetadata\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\"\x9f\x01\n\x17\x43onditionActionMetadata\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12 \n\x06run_id\x18\x02 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01H\x00R\x05runId\x12&\n\taction_id\x18\x03 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01H\x00R\x08\x61\x63tionId\x12\x18\n\x06global\x18\x04 \x01(\x08H\x00R\x06globalB\x0c\n\x05scope\x12\x03\xf8\x42\x01\"\xf1\x02\n\x0e\x41\x63tionMetadata\x12\x16\n\x06parent\x18\x03 \x01(\tR\x06parent\x12\x14\n\x05group\x18\x05 \x01(\tR\x05group\x12\x42\n\x0b\x65xecuted_by\x18\x06 \x01(\x0b\x32!.cloudidl.common.EnrichedIdentityR\nexecutedBy\x12\x45\n\x04task\x18\x07 \x01(\x0b\x32%.cloudidl.workflow.TaskActionMetadataB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01H\x00R\x04task\x12H\n\x05trace\x18\x08 \x01(\x0b\x32&.cloudidl.workflow.TraceActionMetadataB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01H\x00R\x05trace\x12T\n\tcondition\x18\t \x01(\x0b\x32*.cloudidl.workflow.ConditionActionMetadataB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01H\x00R\tconditionB\x06\n\x04spec\"\xe7\x01\n\x0c\x41\x63tionStatus\x12.\n\x05phase\x18\x01 \x01(\x0e\x32\x18.cloudidl.workflow.PhaseR\x05phase\x12\x39\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tstartTime\x12:\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00R\x07\x65ndTime\x88\x01\x01\x12#\n\x08\x61ttempts\x18\x04 \x01(\rB\x07\xfa\x42\x04*\x02 \x00R\x08\x61ttemptsB\x0b\n\t_end_time\"\xb5\x01\n\x06\x41\x63tion\x12\x33\n\x02id\x18\x01 \x01(\x0b\x32#.cloudidl.workflow.ActionIdentifierR\x02id\x12=\n\x08metadata\x18\x02 \x01(\x0b\x32!.cloudidl.workflow.ActionMetadataR\x08metadata\x12\x37\n\x06status\x18\x03 \x01(\x0b\x32\x1f.cloudidl.workflow.ActionStatusR\x06status\"\x9e\x02\n\x0e\x45nrichedAction\x12\x31\n\x06\x61\x63tion\x18\x01 \x01(\x0b\x32\x19.cloudidl.workflow.ActionR\x06\x61\x63tion\x12!\n\x0cmeets_filter\x18\x02 \x01(\x08R\x0bmeetsFilter\x12n\n\x15\x63hildren_phase_counts\x18\x03 \x03(\x0b\x32:.cloudidl.workflow.EnrichedAction.ChildrenPhaseCountsEntryR\x13\x63hildrenPhaseCounts\x1a\x46\n\x18\x43hildrenPhaseCountsEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\x9a\x01\n\tErrorInfo\x12\x18\n\x07message\x18\x01 \x01(\tR\x07message\x12\x35\n\x04kind\x18\x02 \x01(\x0e\x32!.cloudidl.workflow.ErrorInfo.KindR\x04kind\"<\n\x04Kind\x12\x14\n\x10KIND_UNSPECIFIED\x10\x00\x12\r\n\tKIND_USER\x10\x01\x12\x0f\n\x0bKIND_SYSTEM\x10\x02\"e\n\tAbortInfo\x12\x16\n\x06reason\x18\x01 \x01(\tR\x06reason\x12@\n\naborted_by\x18\x02 \x01(\x0b\x32!.cloudidl.common.EnrichedIdentityR\tabortedBy\"\xcd\x03\n\rActionDetails\x12\x33\n\x02id\x18\x01 \x01(\x0b\x32#.cloudidl.workflow.ActionIdentifierR\x02id\x12=\n\x08metadata\x18\x02 \x01(\x0b\x32!.cloudidl.workflow.ActionMetadataR\x08metadata\x12\x37\n\x06status\x18\x03 \x01(\x0b\x32\x1f.cloudidl.workflow.ActionStatusR\x06status\x12=\n\nerror_info\x18\x04 \x01(\x0b\x32\x1c.cloudidl.workflow.ErrorInfoH\x00R\terrorInfo\x12=\n\nabort_info\x18\x05 \x01(\x0b\x32\x1c.cloudidl.workflow.AbortInfoH\x00R\tabortInfo\x12I\n\x12resolved_task_spec\x18\x06 \x01(\x0b\x32\x1b.cloudidl.workflow.TaskSpecR\x10resolvedTaskSpec\x12<\n\x08\x61ttempts\x18\x07 \x03(\x0b\x32 .cloudidl.workflow.ActionAttemptR\x08\x61ttemptsB\x08\n\x06result\"\
|
|
24
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1dworkflow/run_definition.proto\x12\x11\x63loudidl.workflow\x1a\x17\x63ommon/identifier.proto\x1a\x15\x63ommon/identity.proto\x1a\x1d\x66lyteidl/core/execution.proto\x1a\x1c\x66lyteidl/core/literals.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x17validate/validate.proto\x1a\x1eworkflow/task_definition.proto\"\x8d\x01\n\rRunIdentifier\x12\x19\n\x03org\x18\x01 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x03org\x12!\n\x07project\x18\x02 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x07project\x12\x1f\n\x06\x64omain\x18\x03 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x06\x64omain\x12\x1d\n\x04name\x18\x04 \x01(\tB\t\xfa\x42\x06r\x04\x10\x01\x18\x1eR\x04name\"\x82\x01\n\x06Labels\x12=\n\x06values\x18\x01 \x03(\x0b\x32%.cloudidl.workflow.Labels.ValuesEntryR\x06values\x1a\x39\n\x0bValuesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\x8c\x01\n\x0b\x41nnotations\x12\x42\n\x06values\x18\x01 \x03(\x0b\x32*.cloudidl.workflow.Annotations.ValuesEntryR\x06values\x1a\x39\n\x0bValuesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\";\n\x04\x45nvs\x12\x33\n\x06values\x18\x01 \x03(\x0b\x32\x1b.flyteidl.core.KeyValuePairR\x06values\"\x96\x02\n\x07RunSpec\x12\x31\n\x06labels\x18\x01 \x01(\x0b\x32\x19.cloudidl.workflow.LabelsR\x06labels\x12@\n\x0b\x61nnotations\x18\x02 \x01(\x0b\x32\x1e.cloudidl.workflow.AnnotationsR\x0b\x61nnotations\x12+\n\x04\x65nvs\x18\x03 \x01(\x0b\x32\x17.cloudidl.workflow.EnvsR\x04\x65nvs\x12@\n\rinterruptible\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.BoolValueR\rinterruptible\x12\'\n\x0foverwrite_cache\x18\x05 \x01(\x08R\x0eoverwriteCache\"8\n\x03Run\x12\x31\n\x06\x61\x63tion\x18\x01 \x01(\x0b\x32\x19.cloudidl.workflow.ActionR\x06\x61\x63tion\"}\n\nRunDetails\x12\x35\n\x08run_spec\x18\x01 \x01(\x0b\x32\x1a.cloudidl.workflow.RunSpecR\x07runSpec\x12\x38\n\x06\x61\x63tion\x18\x02 \x01(\x0b\x32 .cloudidl.workflow.ActionDetailsR\x06\x61\x63tion\"o\n\x10\x41\x63tionIdentifier\x12<\n\x03run\x18\x01 \x01(\x0b\x32 .cloudidl.workflow.RunIdentifierB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x03run\x12\x1d\n\x04name\x18\x02 \x01(\tB\t\xfa\x42\x06r\x04\x10\x01\x18\x1eR\x04name\"d\n\x12TaskActionMetadata\x12\x31\n\x02id\x18\x01 \x01(\x0b\x32!.cloudidl.workflow.TaskIdentifierR\x02id\x12\x1b\n\ttask_type\x18\x02 \x01(\tR\x08taskType\")\n\x13TraceActionMetadata\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\"\x9f\x01\n\x17\x43onditionActionMetadata\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12 \n\x06run_id\x18\x02 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01H\x00R\x05runId\x12&\n\taction_id\x18\x03 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01H\x00R\x08\x61\x63tionId\x12\x18\n\x06global\x18\x04 \x01(\x08H\x00R\x06globalB\x0c\n\x05scope\x12\x03\xf8\x42\x01\"\xf1\x02\n\x0e\x41\x63tionMetadata\x12\x16\n\x06parent\x18\x03 \x01(\tR\x06parent\x12\x14\n\x05group\x18\x05 \x01(\tR\x05group\x12\x42\n\x0b\x65xecuted_by\x18\x06 \x01(\x0b\x32!.cloudidl.common.EnrichedIdentityR\nexecutedBy\x12\x45\n\x04task\x18\x07 \x01(\x0b\x32%.cloudidl.workflow.TaskActionMetadataB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01H\x00R\x04task\x12H\n\x05trace\x18\x08 \x01(\x0b\x32&.cloudidl.workflow.TraceActionMetadataB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01H\x00R\x05trace\x12T\n\tcondition\x18\t \x01(\x0b\x32*.cloudidl.workflow.ConditionActionMetadataB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01H\x00R\tconditionB\x06\n\x04spec\"\xe7\x01\n\x0c\x41\x63tionStatus\x12.\n\x05phase\x18\x01 \x01(\x0e\x32\x18.cloudidl.workflow.PhaseR\x05phase\x12\x39\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tstartTime\x12:\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00R\x07\x65ndTime\x88\x01\x01\x12#\n\x08\x61ttempts\x18\x04 \x01(\rB\x07\xfa\x42\x04*\x02 \x00R\x08\x61ttemptsB\x0b\n\t_end_time\"\xb5\x01\n\x06\x41\x63tion\x12\x33\n\x02id\x18\x01 \x01(\x0b\x32#.cloudidl.workflow.ActionIdentifierR\x02id\x12=\n\x08metadata\x18\x02 \x01(\x0b\x32!.cloudidl.workflow.ActionMetadataR\x08metadata\x12\x37\n\x06status\x18\x03 \x01(\x0b\x32\x1f.cloudidl.workflow.ActionStatusR\x06status\"\x9e\x02\n\x0e\x45nrichedAction\x12\x31\n\x06\x61\x63tion\x18\x01 \x01(\x0b\x32\x19.cloudidl.workflow.ActionR\x06\x61\x63tion\x12!\n\x0cmeets_filter\x18\x02 \x01(\x08R\x0bmeetsFilter\x12n\n\x15\x63hildren_phase_counts\x18\x03 \x03(\x0b\x32:.cloudidl.workflow.EnrichedAction.ChildrenPhaseCountsEntryR\x13\x63hildrenPhaseCounts\x1a\x46\n\x18\x43hildrenPhaseCountsEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x05R\x05value:\x02\x38\x01\"\x9a\x01\n\tErrorInfo\x12\x18\n\x07message\x18\x01 \x01(\tR\x07message\x12\x35\n\x04kind\x18\x02 \x01(\x0e\x32!.cloudidl.workflow.ErrorInfo.KindR\x04kind\"<\n\x04Kind\x12\x14\n\x10KIND_UNSPECIFIED\x10\x00\x12\r\n\tKIND_USER\x10\x01\x12\x0f\n\x0bKIND_SYSTEM\x10\x02\"e\n\tAbortInfo\x12\x16\n\x06reason\x18\x01 \x01(\tR\x06reason\x12@\n\naborted_by\x18\x02 \x01(\x0b\x32!.cloudidl.common.EnrichedIdentityR\tabortedBy\"\xcd\x03\n\rActionDetails\x12\x33\n\x02id\x18\x01 \x01(\x0b\x32#.cloudidl.workflow.ActionIdentifierR\x02id\x12=\n\x08metadata\x18\x02 \x01(\x0b\x32!.cloudidl.workflow.ActionMetadataR\x08metadata\x12\x37\n\x06status\x18\x03 \x01(\x0b\x32\x1f.cloudidl.workflow.ActionStatusR\x06status\x12=\n\nerror_info\x18\x04 \x01(\x0b\x32\x1c.cloudidl.workflow.ErrorInfoH\x00R\terrorInfo\x12=\n\nabort_info\x18\x05 \x01(\x0b\x32\x1c.cloudidl.workflow.AbortInfoH\x00R\tabortInfo\x12I\n\x12resolved_task_spec\x18\x06 \x01(\x0b\x32\x1b.cloudidl.workflow.TaskSpecR\x10resolvedTaskSpec\x12<\n\x08\x61ttempts\x18\x07 \x03(\x0b\x32 .cloudidl.workflow.ActionAttemptR\x08\x61ttemptsB\x08\n\x06result\"\xd0\x03\n\rActionAttempt\x12.\n\x05phase\x18\x01 \x01(\x0e\x32\x18.cloudidl.workflow.PhaseR\x05phase\x12\x39\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tstartTime\x12:\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00R\x07\x65ndTime\x88\x01\x01\x12@\n\nerror_info\x18\x04 \x01(\x0b\x32\x1c.cloudidl.workflow.ErrorInfoH\x01R\terrorInfo\x88\x01\x01\x12!\n\x07\x61ttempt\x18\x05 \x01(\rB\x07\xfa\x42\x04*\x02 \x00R\x07\x61ttempt\x12\x31\n\x08log_info\x18\x06 \x03(\x0b\x32\x16.flyteidl.core.TaskLogR\x07logInfo\x12=\n\x07outputs\x18\x07 \x01(\x0b\x32#.cloudidl.workflow.OutputReferencesR\x07outputs\x12%\n\x0elogs_available\x18\x08 \x01(\x08R\rlogsAvailableB\x0b\n\t_end_timeB\r\n\x0b_error_info\"\x95\x05\n\x0b\x41\x63tionEvent\x12=\n\x02id\x18\x01 \x01(\x0b\x32#.cloudidl.workflow.ActionIdentifierB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x02id\x12!\n\x07\x61ttempt\x18\x02 \x01(\rB\x07\xfa\x42\x04*\x02 \x00R\x07\x61ttempt\x12.\n\x05phase\x18\x03 \x01(\x0e\x32\x18.cloudidl.workflow.PhaseR\x05phase\x12\x18\n\x07version\x18\x04 \x01(\rR\x07version\x12\x39\n\nstart_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tstartTime\x12=\n\x0cupdated_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x0bupdatedTime\x12:\n\x08\x65nd_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00R\x07\x65ndTime\x88\x01\x01\x12@\n\nerror_info\x18\x08 \x01(\x0b\x32\x1c.cloudidl.workflow.ErrorInfoH\x01R\terrorInfo\x88\x01\x01\x12\x31\n\x08log_info\x18\t \x03(\x0b\x32\x16.flyteidl.core.TaskLogR\x07logInfo\x12:\n\x0blog_context\x18\n \x01(\x0b\x32\x19.flyteidl.core.LogContextR\nlogContext\x12\x18\n\x07\x63luster\x18\x0b \x01(\tR\x07\x63luster\x12=\n\x07outputs\x18\x0c \x01(\x0b\x32#.cloudidl.workflow.OutputReferencesR\x07outputsB\x0b\n\t_end_timeB\r\n\x0b_error_info\"P\n\x0cNamedLiteral\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12,\n\x05value\x18\x02 \x01(\x0b\x32\x16.flyteidl.core.LiteralR\x05value\"1\n\x10OutputReferences\x12\x1d\n\noutput_uri\x18\x01 \x01(\tR\toutputUri\"E\n\x06Inputs\x12;\n\x08literals\x18\x01 \x03(\x0b\x32\x1f.cloudidl.workflow.NamedLiteralR\x08literals\"F\n\x07Outputs\x12;\n\x08literals\x18\x01 \x03(\x0b\x32\x1f.cloudidl.workflow.NamedLiteralR\x08literals*\xcb\x01\n\x05Phase\x12\x15\n\x11PHASE_UNSPECIFIED\x10\x00\x12\x10\n\x0cPHASE_QUEUED\x10\x01\x12\x1f\n\x1bPHASE_WAITING_FOR_RESOURCES\x10\x02\x12\x16\n\x12PHASE_INITIALIZING\x10\x03\x12\x11\n\rPHASE_RUNNING\x10\x04\x12\x13\n\x0fPHASE_SUCCEEDED\x10\x05\x12\x10\n\x0cPHASE_FAILED\x10\x06\x12\x11\n\rPHASE_ABORTED\x10\x07\x12\x13\n\x0fPHASE_TIMED_OUT\x10\x08\x42\xbf\x01\n\x15\x63om.cloudidl.workflowB\x12RunDefinitionProtoH\x02P\x01Z+github.com/unionai/cloud/gen/pb-go/workflow\xa2\x02\x03\x43WX\xaa\x02\x11\x43loudidl.Workflow\xca\x02\x11\x43loudidl\\Workflow\xe2\x02\x1d\x43loudidl\\Workflow\\GPBMetadata\xea\x02\x12\x43loudidl::Workflowb\x06proto3')
|
|
25
25
|
|
|
26
26
|
_globals = globals()
|
|
27
27
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
@@ -67,8 +67,8 @@ if _descriptor._USE_C_DESCRIPTORS == False:
|
|
|
67
67
|
_ACTIONEVENT.fields_by_name['id']._serialized_options = b'\372B\005\212\001\002\020\001'
|
|
68
68
|
_ACTIONEVENT.fields_by_name['attempt']._options = None
|
|
69
69
|
_ACTIONEVENT.fields_by_name['attempt']._serialized_options = b'\372B\004*\002 \000'
|
|
70
|
-
_globals['_PHASE']._serialized_start=
|
|
71
|
-
_globals['_PHASE']._serialized_end=
|
|
70
|
+
_globals['_PHASE']._serialized_start=4861
|
|
71
|
+
_globals['_PHASE']._serialized_end=5064
|
|
72
72
|
_globals['_RUNIDENTIFIER']._serialized_start=284
|
|
73
73
|
_globals['_RUNIDENTIFIER']._serialized_end=425
|
|
74
74
|
_globals['_LABELS']._serialized_start=428
|
|
@@ -114,15 +114,15 @@ if _descriptor._USE_C_DESCRIPTORS == False:
|
|
|
114
114
|
_globals['_ACTIONDETAILS']._serialized_start=2990
|
|
115
115
|
_globals['_ACTIONDETAILS']._serialized_end=3451
|
|
116
116
|
_globals['_ACTIONATTEMPT']._serialized_start=3454
|
|
117
|
-
_globals['_ACTIONATTEMPT']._serialized_end=
|
|
118
|
-
_globals['_ACTIONEVENT']._serialized_start=
|
|
119
|
-
_globals['_ACTIONEVENT']._serialized_end=
|
|
120
|
-
_globals['_NAMEDLITERAL']._serialized_start=
|
|
121
|
-
_globals['_NAMEDLITERAL']._serialized_end=
|
|
122
|
-
_globals['_OUTPUTREFERENCES']._serialized_start=
|
|
123
|
-
_globals['_OUTPUTREFERENCES']._serialized_end=
|
|
124
|
-
_globals['_INPUTS']._serialized_start=
|
|
125
|
-
_globals['_INPUTS']._serialized_end=
|
|
126
|
-
_globals['_OUTPUTS']._serialized_start=
|
|
127
|
-
_globals['_OUTPUTS']._serialized_end=
|
|
117
|
+
_globals['_ACTIONATTEMPT']._serialized_end=3918
|
|
118
|
+
_globals['_ACTIONEVENT']._serialized_start=3921
|
|
119
|
+
_globals['_ACTIONEVENT']._serialized_end=4582
|
|
120
|
+
_globals['_NAMEDLITERAL']._serialized_start=4584
|
|
121
|
+
_globals['_NAMEDLITERAL']._serialized_end=4664
|
|
122
|
+
_globals['_OUTPUTREFERENCES']._serialized_start=4666
|
|
123
|
+
_globals['_OUTPUTREFERENCES']._serialized_end=4715
|
|
124
|
+
_globals['_INPUTS']._serialized_start=4717
|
|
125
|
+
_globals['_INPUTS']._serialized_end=4786
|
|
126
|
+
_globals['_OUTPUTS']._serialized_start=4788
|
|
127
|
+
_globals['_OUTPUTS']._serialized_end=4858
|
|
128
128
|
# @@protoc_insertion_point(module_scope)
|
|
@@ -238,7 +238,7 @@ class ActionDetails(_message.Message):
|
|
|
238
238
|
def __init__(self, id: _Optional[_Union[ActionIdentifier, _Mapping]] = ..., metadata: _Optional[_Union[ActionMetadata, _Mapping]] = ..., status: _Optional[_Union[ActionStatus, _Mapping]] = ..., error_info: _Optional[_Union[ErrorInfo, _Mapping]] = ..., abort_info: _Optional[_Union[AbortInfo, _Mapping]] = ..., resolved_task_spec: _Optional[_Union[_task_definition_pb2.TaskSpec, _Mapping]] = ..., attempts: _Optional[_Iterable[_Union[ActionAttempt, _Mapping]]] = ...) -> None: ...
|
|
239
239
|
|
|
240
240
|
class ActionAttempt(_message.Message):
|
|
241
|
-
__slots__ = ["phase", "start_time", "end_time", "error_info", "attempt", "log_info", "outputs"]
|
|
241
|
+
__slots__ = ["phase", "start_time", "end_time", "error_info", "attempt", "log_info", "outputs", "logs_available"]
|
|
242
242
|
PHASE_FIELD_NUMBER: _ClassVar[int]
|
|
243
243
|
START_TIME_FIELD_NUMBER: _ClassVar[int]
|
|
244
244
|
END_TIME_FIELD_NUMBER: _ClassVar[int]
|
|
@@ -246,6 +246,7 @@ class ActionAttempt(_message.Message):
|
|
|
246
246
|
ATTEMPT_FIELD_NUMBER: _ClassVar[int]
|
|
247
247
|
LOG_INFO_FIELD_NUMBER: _ClassVar[int]
|
|
248
248
|
OUTPUTS_FIELD_NUMBER: _ClassVar[int]
|
|
249
|
+
LOGS_AVAILABLE_FIELD_NUMBER: _ClassVar[int]
|
|
249
250
|
phase: Phase
|
|
250
251
|
start_time: _timestamp_pb2.Timestamp
|
|
251
252
|
end_time: _timestamp_pb2.Timestamp
|
|
@@ -253,7 +254,8 @@ class ActionAttempt(_message.Message):
|
|
|
253
254
|
attempt: int
|
|
254
255
|
log_info: _containers.RepeatedCompositeFieldContainer[_execution_pb2.TaskLog]
|
|
255
256
|
outputs: OutputReferences
|
|
256
|
-
|
|
257
|
+
logs_available: bool
|
|
258
|
+
def __init__(self, phase: _Optional[_Union[Phase, str]] = ..., start_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., end_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., error_info: _Optional[_Union[ErrorInfo, _Mapping]] = ..., attempt: _Optional[int] = ..., log_info: _Optional[_Iterable[_Union[_execution_pb2.TaskLog, _Mapping]]] = ..., outputs: _Optional[_Union[OutputReferences, _Mapping]] = ..., logs_available: bool = ...) -> None: ...
|
|
257
259
|
|
|
258
260
|
class ActionEvent(_message.Message):
|
|
259
261
|
__slots__ = ["id", "attempt", "phase", "version", "start_time", "updated_time", "end_time", "error_info", "log_info", "log_context", "cluster", "outputs"]
|
|
@@ -15,9 +15,10 @@ from flyte._protos.common import identifier_pb2 as common_dot_identifier__pb2
|
|
|
15
15
|
from flyte._protos.common import identity_pb2 as common_dot_identity__pb2
|
|
16
16
|
from flyteidl.core import tasks_pb2 as flyteidl_dot_core_dot_tasks__pb2
|
|
17
17
|
from flyte._protos.validate.validate import validate_pb2 as validate_dot_validate__pb2
|
|
18
|
+
from flyte._protos.workflow import common_pb2 as workflow_dot_common__pb2
|
|
18
19
|
|
|
19
20
|
|
|
20
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1eworkflow/task_definition.proto\x12\x11\x63loudidl.workflow\x1a\x17\x63ommon/identifier.proto\x1a\x15\x63ommon/identity.proto\x1a\x19\x66lyteidl/core/tasks.proto\x1a\x17validate/validate.proto\"\x88\x01\n\x08TaskName\x12\x19\n\x03org\x18\x01 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x03org\x12!\n\x07project\x18\x02 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x07project\x12\x1f\n\x06\x64omain\x18\x03 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x06\x64omain\x12\x1d\n\x04name\x18\x04 \x01(\tB\t\xfa\x42\x06r\x04\x10\x01\x18\x1eR\x04name\"\xb1\x01\n\x0eTaskIdentifier\x12\x19\n\x03org\x18\x01 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x03org\x12!\n\x07project\x18\x02 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x07project\x12\x1f\n\x06\x64omain\x18\x03 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x06\x64omain\x12\x1d\n\x04name\x18\x04 \x01(\tB\t\xfa\x42\x06r\x04\x10\x01\x18\x1eR\x04name\x12!\n\x07version\x18\x05 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x07version\"\\\n\x0cTaskMetadata\x12L\n\x0b\x64\x65ployed_by\x18\x01 \x01(\x0b\x32!.cloudidl.common.EnrichedIdentityB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\ndeployedBy\"\x93\x01\n\x04Task\x12\x44\n\x07task_id\x18\x01 \x01(\x0b\x32!.cloudidl.workflow.TaskIdentifierB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x06taskId\x12\x45\n\x08metadata\x18\x02 \x01(\x0b\x32\x1f.cloudidl.workflow.TaskMetadataB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08metadata\"
|
|
21
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1eworkflow/task_definition.proto\x12\x11\x63loudidl.workflow\x1a\x17\x63ommon/identifier.proto\x1a\x15\x63ommon/identity.proto\x1a\x19\x66lyteidl/core/tasks.proto\x1a\x17validate/validate.proto\x1a\x15workflow/common.proto\"\x88\x01\n\x08TaskName\x12\x19\n\x03org\x18\x01 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x03org\x12!\n\x07project\x18\x02 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x07project\x12\x1f\n\x06\x64omain\x18\x03 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x06\x64omain\x12\x1d\n\x04name\x18\x04 \x01(\tB\t\xfa\x42\x06r\x04\x10\x01\x18\x1eR\x04name\"\xb1\x01\n\x0eTaskIdentifier\x12\x19\n\x03org\x18\x01 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x03org\x12!\n\x07project\x18\x02 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x07project\x12\x1f\n\x06\x64omain\x18\x03 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x06\x64omain\x12\x1d\n\x04name\x18\x04 \x01(\tB\t\xfa\x42\x06r\x04\x10\x01\x18\x1eR\x04name\x12!\n\x07version\x18\x05 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x07version\"\\\n\x0cTaskMetadata\x12L\n\x0b\x64\x65ployed_by\x18\x01 \x01(\x0b\x32!.cloudidl.common.EnrichedIdentityB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\ndeployedBy\"\x93\x01\n\x04Task\x12\x44\n\x07task_id\x18\x01 \x01(\x0b\x32!.cloudidl.workflow.TaskIdentifierB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x06taskId\x12\x45\n\x08metadata\x18\x02 \x01(\x0b\x32\x1f.cloudidl.workflow.TaskMetadataB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08metadata\"\xa0\x01\n\x08TaskSpec\x12J\n\rtask_template\x18\x01 \x01(\x0b\x32\x1b.flyteidl.core.TaskTemplateB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x0ctaskTemplate\x12H\n\x0e\x64\x65\x66\x61ult_inputs\x18\x02 \x03(\x0b\x32!.cloudidl.workflow.NamedParameterR\rdefaultInputs\"\xd5\x01\n\x0bTaskDetails\x12\x44\n\x07task_id\x18\x01 \x01(\x0b\x32!.cloudidl.workflow.TaskIdentifierB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x06taskId\x12\x45\n\x08metadata\x18\x02 \x01(\x0b\x32\x1f.cloudidl.workflow.TaskMetadataB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08metadata\x12\x39\n\x04spec\x18\x03 \x01(\x0b\x32\x1b.cloudidl.workflow.TaskSpecB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x04specB\xc0\x01\n\x15\x63om.cloudidl.workflowB\x13TaskDefinitionProtoH\x02P\x01Z+github.com/unionai/cloud/gen/pb-go/workflow\xa2\x02\x03\x43WX\xaa\x02\x11\x43loudidl.Workflow\xca\x02\x11\x43loudidl\\Workflow\xe2\x02\x1d\x43loudidl\\Workflow\\GPBMetadata\xea\x02\x12\x43loudidl::Workflowb\x06proto3')
|
|
21
22
|
|
|
22
23
|
_globals = globals()
|
|
23
24
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
@@ -57,16 +58,16 @@ if _descriptor._USE_C_DESCRIPTORS == False:
|
|
|
57
58
|
_TASKDETAILS.fields_by_name['metadata']._serialized_options = b'\372B\005\212\001\002\020\001'
|
|
58
59
|
_TASKDETAILS.fields_by_name['spec']._options = None
|
|
59
60
|
_TASKDETAILS.fields_by_name['spec']._serialized_options = b'\372B\005\212\001\002\020\001'
|
|
60
|
-
_globals['_TASKNAME']._serialized_start=
|
|
61
|
-
_globals['_TASKNAME']._serialized_end=
|
|
62
|
-
_globals['_TASKIDENTIFIER']._serialized_start=
|
|
63
|
-
_globals['_TASKIDENTIFIER']._serialized_end=
|
|
64
|
-
_globals['_TASKMETADATA']._serialized_start=
|
|
65
|
-
_globals['_TASKMETADATA']._serialized_end=
|
|
66
|
-
_globals['_TASK']._serialized_start=
|
|
67
|
-
_globals['_TASK']._serialized_end=
|
|
68
|
-
_globals['_TASKSPEC']._serialized_start=
|
|
69
|
-
_globals['_TASKSPEC']._serialized_end=
|
|
70
|
-
_globals['_TASKDETAILS']._serialized_start=
|
|
71
|
-
_globals['_TASKDETAILS']._serialized_end=
|
|
61
|
+
_globals['_TASKNAME']._serialized_start=177
|
|
62
|
+
_globals['_TASKNAME']._serialized_end=313
|
|
63
|
+
_globals['_TASKIDENTIFIER']._serialized_start=316
|
|
64
|
+
_globals['_TASKIDENTIFIER']._serialized_end=493
|
|
65
|
+
_globals['_TASKMETADATA']._serialized_start=495
|
|
66
|
+
_globals['_TASKMETADATA']._serialized_end=587
|
|
67
|
+
_globals['_TASK']._serialized_start=590
|
|
68
|
+
_globals['_TASK']._serialized_end=737
|
|
69
|
+
_globals['_TASKSPEC']._serialized_start=740
|
|
70
|
+
_globals['_TASKSPEC']._serialized_end=900
|
|
71
|
+
_globals['_TASKDETAILS']._serialized_start=903
|
|
72
|
+
_globals['_TASKDETAILS']._serialized_end=1116
|
|
72
73
|
# @@protoc_insertion_point(module_scope)
|
|
@@ -2,9 +2,11 @@ from flyte._protos.common import identifier_pb2 as _identifier_pb2
|
|
|
2
2
|
from flyte._protos.common import identity_pb2 as _identity_pb2
|
|
3
3
|
from flyteidl.core import tasks_pb2 as _tasks_pb2
|
|
4
4
|
from flyte._protos.validate.validate import validate_pb2 as _validate_pb2
|
|
5
|
+
from flyte._protos.workflow import common_pb2 as _common_pb2
|
|
6
|
+
from google.protobuf.internal import containers as _containers
|
|
5
7
|
from google.protobuf import descriptor as _descriptor
|
|
6
8
|
from google.protobuf import message as _message
|
|
7
|
-
from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union
|
|
9
|
+
from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union
|
|
8
10
|
|
|
9
11
|
DESCRIPTOR: _descriptor.FileDescriptor
|
|
10
12
|
|
|
@@ -49,10 +51,12 @@ class Task(_message.Message):
|
|
|
49
51
|
def __init__(self, task_id: _Optional[_Union[TaskIdentifier, _Mapping]] = ..., metadata: _Optional[_Union[TaskMetadata, _Mapping]] = ...) -> None: ...
|
|
50
52
|
|
|
51
53
|
class TaskSpec(_message.Message):
|
|
52
|
-
__slots__ = ["task_template"]
|
|
54
|
+
__slots__ = ["task_template", "default_inputs"]
|
|
53
55
|
TASK_TEMPLATE_FIELD_NUMBER: _ClassVar[int]
|
|
56
|
+
DEFAULT_INPUTS_FIELD_NUMBER: _ClassVar[int]
|
|
54
57
|
task_template: _tasks_pb2.TaskTemplate
|
|
55
|
-
|
|
58
|
+
default_inputs: _containers.RepeatedCompositeFieldContainer[_common_pb2.NamedParameter]
|
|
59
|
+
def __init__(self, task_template: _Optional[_Union[_tasks_pb2.TaskTemplate, _Mapping]] = ..., default_inputs: _Optional[_Iterable[_Union[_common_pb2.NamedParameter, _Mapping]]] = ...) -> None: ...
|
|
56
60
|
|
|
57
61
|
class TaskDetails(_message.Message):
|
|
58
62
|
__slots__ = ["task_id", "metadata", "spec"]
|
flyte/_run.py
CHANGED
|
@@ -5,8 +5,9 @@ import uuid
|
|
|
5
5
|
from typing import TYPE_CHECKING, Any, Literal, Optional, Tuple, Union, cast
|
|
6
6
|
|
|
7
7
|
from flyte.errors import InitializationError
|
|
8
|
+
from flyte.models import ActionID, Checkpoints, CodeBundle, RawDataPath, SerializationContext, TaskContext
|
|
9
|
+
from flyte.syncify import syncify
|
|
8
10
|
|
|
9
|
-
from ._api_commons import syncer
|
|
10
11
|
from ._context import contextual_run, internal_ctx
|
|
11
12
|
from ._environment import Environment
|
|
12
13
|
from ._initialize import (
|
|
@@ -20,7 +21,6 @@ from ._initialize import (
|
|
|
20
21
|
from ._logging import logger
|
|
21
22
|
from ._task import P, R, TaskTemplate
|
|
22
23
|
from ._tools import ipython_check
|
|
23
|
-
from .models import ActionID, Checkpoints, CodeBundle, RawDataPath, SerializationContext, TaskContext
|
|
24
24
|
|
|
25
25
|
if TYPE_CHECKING:
|
|
26
26
|
from flyte.remote import Run
|
|
@@ -38,7 +38,7 @@ async def _get_code_bundle_for_run(name: str) -> CodeBundle | None:
|
|
|
38
38
|
from flyte._internal.runtime.task_serde import extract_code_bundle
|
|
39
39
|
from flyte.remote import Run
|
|
40
40
|
|
|
41
|
-
run = await Run.get.aio(
|
|
41
|
+
run = await Run.get.aio(name=name)
|
|
42
42
|
if run:
|
|
43
43
|
run_details = await run.details()
|
|
44
44
|
spec = run_details.action_details.pb2.resolved_task_spec
|
|
@@ -46,7 +46,6 @@ async def _get_code_bundle_for_run(name: str) -> CodeBundle | None:
|
|
|
46
46
|
return None
|
|
47
47
|
|
|
48
48
|
|
|
49
|
-
@syncer.wrap
|
|
50
49
|
class _Runner:
|
|
51
50
|
def __init__(
|
|
52
51
|
self,
|
|
@@ -323,6 +322,7 @@ class _Runner:
|
|
|
323
322
|
return cast(R, await convert_outputs_to_native(obj.native_interface, out))
|
|
324
323
|
return cast(R, None)
|
|
325
324
|
|
|
325
|
+
@syncify
|
|
326
326
|
async def run(self, task: TaskTemplate[P, Union[R, Run]], *args: P.args, **kwargs: P.kwargs) -> Union[R, Run]:
|
|
327
327
|
"""
|
|
328
328
|
Run an async `@env.task` or `TaskTemplate` instance. The existing async context will be used.
|
|
@@ -398,6 +398,8 @@ def with_runcontext(
|
|
|
398
398
|
interactive mode, while scripts are not. This is used to determine how the code bundle is created.
|
|
399
399
|
:param raw_data_path: Use this path to store the raw data for the run. Currently only supported for local runs,
|
|
400
400
|
and can be used to store raw data in specific locations. TODO coming soon for remote runs as well.
|
|
401
|
+
:param run_base_dir: Optional The base directory to use for the run. This is used to store the metadata for the run,
|
|
402
|
+
that is passed between tasks.
|
|
401
403
|
:return: runner
|
|
402
404
|
"""
|
|
403
405
|
if mode == "hybrid" and not name and not run_base_dir:
|
|
@@ -416,7 +418,7 @@ def with_runcontext(
|
|
|
416
418
|
)
|
|
417
419
|
|
|
418
420
|
|
|
419
|
-
@
|
|
421
|
+
@syncify
|
|
420
422
|
async def run(task: TaskTemplate[P, R], *args: P.args, **kwargs: P.kwargs) -> Union[R, Run]:
|
|
421
423
|
"""
|
|
422
424
|
Run a task with the given parameters
|
flyte/_trace.py
CHANGED
|
@@ -87,17 +87,12 @@ def trace(func: Callable[..., T]) -> Callable[..., T]:
|
|
|
87
87
|
items = []
|
|
88
88
|
result = func(*args, **kwargs)
|
|
89
89
|
# TODO ideally we should use streaming into the type-engine so that it stream uploads large blocks
|
|
90
|
-
if inspect.isasyncgen(result):
|
|
90
|
+
if inspect.isasyncgen(result) or is_async_iterable(result):
|
|
91
91
|
# If it's directly an async generator
|
|
92
92
|
async_iter = result
|
|
93
93
|
async for item in async_iter:
|
|
94
94
|
items.append(item)
|
|
95
95
|
yield item
|
|
96
|
-
elif is_async_iterable(result):
|
|
97
|
-
# If it's an async iterable (has __aiter__)
|
|
98
|
-
async for item in result:
|
|
99
|
-
items.append(item)
|
|
100
|
-
yield item
|
|
101
96
|
duration = time.time() - start_time
|
|
102
97
|
info.add_outputs(items, timedelta(seconds=duration))
|
|
103
98
|
await controller.record_trace(info)
|
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.2.
|
|
21
|
-
__version_tuple__ = version_tuple = (0, 2, 0, '
|
|
20
|
+
__version__ = version = '0.2.0b7'
|
|
21
|
+
__version_tuple__ = version_tuple = (0, 2, 0, 'b7')
|