flyte 0.2.0b3__py3-none-any.whl → 0.2.0b5__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/_build.py +3 -2
- flyte/_deploy.py +4 -4
- flyte/_initialize.py +17 -3
- flyte/_internal/controllers/remote/_core.py +5 -4
- flyte/_internal/controllers/remote/_service_protocol.py +6 -6
- flyte/_protos/logs/dataplane/payload_pb2.py +28 -24
- flyte/_protos/logs/dataplane/payload_pb2.pyi +11 -2
- 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/queue_service_pb2.py +39 -41
- flyte/_protos/workflow/queue_service_pb2.pyi +30 -28
- flyte/_protos/workflow/queue_service_pb2_grpc.py +15 -15
- 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/__init__.py +10 -0
- flyte/cli/_abort.py +26 -0
- flyte/{_cli → cli}/_common.py +2 -0
- flyte/{_cli → cli}/_create.py +1 -1
- flyte/{_cli → cli}/_delete.py +1 -1
- flyte/{_cli → cli}/_get.py +12 -3
- flyte/{_cli → cli}/_run.py +49 -16
- flyte/{_cli → cli}/main.py +10 -1
- flyte/config/_config.py +2 -0
- flyte/errors.py +9 -0
- flyte/io/_dir.py +2 -2
- flyte/io/_file.py +1 -4
- flyte/remote/_data.py +3 -3
- flyte/remote/_logs.py +80 -27
- flyte/remote/_project.py +8 -9
- flyte/remote/_run.py +194 -107
- 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.0b3.dist-info → flyte-0.2.0b5.dist-info}/METADATA +2 -3
- {flyte-0.2.0b3.dist-info → flyte-0.2.0b5.dist-info}/RECORD +48 -43
- {flyte-0.2.0b3.dist-info → flyte-0.2.0b5.dist-info}/entry_points.txt +1 -1
- flyte/_api_commons.py +0 -3
- flyte/_cli/__init__.py +0 -0
- /flyte/{_cli → cli}/_deploy.py +0 -0
- /flyte/{_cli → cli}/_params.py +0 -0
- {flyte-0.2.0b3.dist-info → flyte-0.2.0b5.dist-info}/WHEEL +0 -0
- {flyte-0.2.0b3.dist-info → flyte-0.2.0b5.dist-info}/top_level.txt +0 -0
|
@@ -20,10 +20,10 @@ class QueueServiceStub(object):
|
|
|
20
20
|
request_serializer=workflow_dot_queue__service__pb2.EnqueueActionRequest.SerializeToString,
|
|
21
21
|
response_deserializer=workflow_dot_queue__service__pb2.EnqueueActionResponse.FromString,
|
|
22
22
|
)
|
|
23
|
-
self.
|
|
24
|
-
'/cloudidl.workflow.QueueService/
|
|
25
|
-
request_serializer=workflow_dot_queue__service__pb2.
|
|
26
|
-
response_deserializer=workflow_dot_queue__service__pb2.
|
|
23
|
+
self.AbortQueuedRun = channel.unary_unary(
|
|
24
|
+
'/cloudidl.workflow.QueueService/AbortQueuedRun',
|
|
25
|
+
request_serializer=workflow_dot_queue__service__pb2.AbortQueuedRunRequest.SerializeToString,
|
|
26
|
+
response_deserializer=workflow_dot_queue__service__pb2.AbortQueuedRunResponse.FromString,
|
|
27
27
|
)
|
|
28
28
|
self.Heartbeat = channel.stream_stream(
|
|
29
29
|
'/cloudidl.workflow.QueueService/Heartbeat',
|
|
@@ -48,8 +48,8 @@ class QueueServiceServicer(object):
|
|
|
48
48
|
context.set_details('Method not implemented!')
|
|
49
49
|
raise NotImplementedError('Method not implemented!')
|
|
50
50
|
|
|
51
|
-
def
|
|
52
|
-
"""abort a queued
|
|
51
|
+
def AbortQueuedRun(self, request, context):
|
|
52
|
+
"""abort a queued run.
|
|
53
53
|
"""
|
|
54
54
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
55
55
|
context.set_details('Method not implemented!')
|
|
@@ -63,7 +63,7 @@ class QueueServiceServicer(object):
|
|
|
63
63
|
raise NotImplementedError('Method not implemented!')
|
|
64
64
|
|
|
65
65
|
def StreamLeases(self, request, context):
|
|
66
|
-
"""
|
|
66
|
+
"""stream leases for a worker.
|
|
67
67
|
"""
|
|
68
68
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
69
69
|
context.set_details('Method not implemented!')
|
|
@@ -77,10 +77,10 @@ def add_QueueServiceServicer_to_server(servicer, server):
|
|
|
77
77
|
request_deserializer=workflow_dot_queue__service__pb2.EnqueueActionRequest.FromString,
|
|
78
78
|
response_serializer=workflow_dot_queue__service__pb2.EnqueueActionResponse.SerializeToString,
|
|
79
79
|
),
|
|
80
|
-
'
|
|
81
|
-
servicer.
|
|
82
|
-
request_deserializer=workflow_dot_queue__service__pb2.
|
|
83
|
-
response_serializer=workflow_dot_queue__service__pb2.
|
|
80
|
+
'AbortQueuedRun': grpc.unary_unary_rpc_method_handler(
|
|
81
|
+
servicer.AbortQueuedRun,
|
|
82
|
+
request_deserializer=workflow_dot_queue__service__pb2.AbortQueuedRunRequest.FromString,
|
|
83
|
+
response_serializer=workflow_dot_queue__service__pb2.AbortQueuedRunResponse.SerializeToString,
|
|
84
84
|
),
|
|
85
85
|
'Heartbeat': grpc.stream_stream_rpc_method_handler(
|
|
86
86
|
servicer.Heartbeat,
|
|
@@ -121,7 +121,7 @@ class QueueService(object):
|
|
|
121
121
|
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
122
122
|
|
|
123
123
|
@staticmethod
|
|
124
|
-
def
|
|
124
|
+
def AbortQueuedRun(request,
|
|
125
125
|
target,
|
|
126
126
|
options=(),
|
|
127
127
|
channel_credentials=None,
|
|
@@ -131,9 +131,9 @@ class QueueService(object):
|
|
|
131
131
|
wait_for_ready=None,
|
|
132
132
|
timeout=None,
|
|
133
133
|
metadata=None):
|
|
134
|
-
return grpc.experimental.unary_unary(request, target, '/cloudidl.workflow.QueueService/
|
|
135
|
-
workflow_dot_queue__service__pb2.
|
|
136
|
-
workflow_dot_queue__service__pb2.
|
|
134
|
+
return grpc.experimental.unary_unary(request, target, '/cloudidl.workflow.QueueService/AbortQueuedRun',
|
|
135
|
+
workflow_dot_queue__service__pb2.AbortQueuedRunRequest.SerializeToString,
|
|
136
|
+
workflow_dot_queue__service__pb2.AbortQueuedRunResponse.FromString,
|
|
137
137
|
options, channel_credentials,
|
|
138
138
|
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
139
139
|
|
|
@@ -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.0b5'
|
|
21
|
+
__version_tuple__ = version_tuple = (0, 2, 0, 'b5')
|
flyte/cli/__init__.py
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"""
|
|
2
|
+
# CLI for Flyte
|
|
3
|
+
|
|
4
|
+
The flyte cli follows a simple verb based structure, where the top-level commands are verbs that describe the action
|
|
5
|
+
to be taken, and the subcommands are nouns that describe the object of the action.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from flyte.cli.main import main
|
|
9
|
+
|
|
10
|
+
__all__ = ["main"]
|
flyte/cli/_abort.py
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import rich_click as click
|
|
2
|
+
|
|
3
|
+
from flyte.cli import _common as common
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
@click.group(name="abort")
|
|
7
|
+
def abort():
|
|
8
|
+
"""
|
|
9
|
+
Abort a run.
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@abort.command(cls=common.CommandBase)
|
|
14
|
+
@click.argument("run-name", type=str, required=True)
|
|
15
|
+
@click.pass_obj
|
|
16
|
+
def run(cfg: common.CLIConfig, run_name: str, project: str | None = None, domain: str | None = None):
|
|
17
|
+
"""
|
|
18
|
+
Abort a run.
|
|
19
|
+
"""
|
|
20
|
+
from flyte.remote import Run
|
|
21
|
+
|
|
22
|
+
cfg.init(project=project, domain=domain)
|
|
23
|
+
r = Run.get(name=run_name)
|
|
24
|
+
if r:
|
|
25
|
+
r.abort(r)
|
|
26
|
+
print(f"Run '{run_name}' has been aborted.")
|
flyte/{_cli → cli}/_common.py
RENAMED
|
@@ -132,6 +132,8 @@ class InvokeBaseMixin:
|
|
|
132
132
|
raise click.ClickException(f"RPC error invoking command: {e!s}") from e
|
|
133
133
|
except flyte.errors.InitializationError:
|
|
134
134
|
raise click.ClickException("Initialize the CLI with a remote configuration. For example, pass --endpoint")
|
|
135
|
+
except flyte.errors.BaseRuntimeError as e:
|
|
136
|
+
raise click.ClickException(f"{e.kind} failure, {e.code}. {e}") from e
|
|
135
137
|
except click.exceptions.Exit as e:
|
|
136
138
|
# This is a normal exit, do nothing
|
|
137
139
|
raise e
|
flyte/{_cli → cli}/_create.py
RENAMED
flyte/{_cli → cli}/_delete.py
RENAMED
flyte/{_cli → cli}/_get.py
RENAMED
|
@@ -122,7 +122,10 @@ def action(
|
|
|
122
122
|
default=False,
|
|
123
123
|
help="Show logs in a auto scrolling box, where number of lines is limited to `--lines`",
|
|
124
124
|
)
|
|
125
|
-
@click.option(
|
|
125
|
+
@click.option(
|
|
126
|
+
"--attempt", "-a", type=int, default=None, help="Attempt number to show logs for, defaults to the latest attempt."
|
|
127
|
+
)
|
|
128
|
+
@click.option("--filter-system", is_flag=True, default=False, help="Filter all system logs from the output.")
|
|
126
129
|
@click.pass_obj
|
|
127
130
|
def logs(
|
|
128
131
|
cfg: common.CLIConfig,
|
|
@@ -134,16 +137,22 @@ def logs(
|
|
|
134
137
|
show_ts: bool = False,
|
|
135
138
|
pretty: bool = True,
|
|
136
139
|
attempt: int | None = None,
|
|
140
|
+
filter_system: bool = False,
|
|
137
141
|
):
|
|
138
142
|
"""
|
|
139
|
-
|
|
143
|
+
Stream logs for the provided run or action. If the run is provided, only the logs for the parent action will be
|
|
144
|
+
streamed.
|
|
140
145
|
"""
|
|
141
146
|
import flyte.remote as remote
|
|
142
147
|
|
|
143
148
|
cfg.init(project=project, domain=domain)
|
|
144
149
|
|
|
145
150
|
async def _run_log_view(_obj):
|
|
146
|
-
task = asyncio.create_task(
|
|
151
|
+
task = asyncio.create_task(
|
|
152
|
+
_obj.show_logs(
|
|
153
|
+
max_lines=lines, show_ts=show_ts, raw=not pretty, attempt=attempt, filter_system=filter_system
|
|
154
|
+
)
|
|
155
|
+
)
|
|
147
156
|
try:
|
|
148
157
|
await task
|
|
149
158
|
except KeyboardInterrupt:
|
flyte/{_cli → cli}/_run.py
RENAMED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
+
import asyncio
|
|
3
4
|
import inspect
|
|
4
5
|
from dataclasses import dataclass, field, fields
|
|
5
6
|
from pathlib import Path
|
|
@@ -50,6 +51,28 @@ class RunArguments:
|
|
|
50
51
|
)
|
|
51
52
|
},
|
|
52
53
|
)
|
|
54
|
+
name: str | None = field(
|
|
55
|
+
default=None,
|
|
56
|
+
metadata={
|
|
57
|
+
"click.option": click.Option(
|
|
58
|
+
["--name"],
|
|
59
|
+
type=str,
|
|
60
|
+
help="Name of the run. If not provided, a random name will be generated.",
|
|
61
|
+
)
|
|
62
|
+
},
|
|
63
|
+
)
|
|
64
|
+
follow: bool = field(
|
|
65
|
+
default=True,
|
|
66
|
+
metadata={
|
|
67
|
+
"click.option": click.Option(
|
|
68
|
+
["--follow", "-f"],
|
|
69
|
+
is_flag=True,
|
|
70
|
+
default=False,
|
|
71
|
+
help="Wait and watch logs for the parent action. If not provided, the cli will exit after "
|
|
72
|
+
"successfully launching a remote execution with a link to the UI.",
|
|
73
|
+
)
|
|
74
|
+
},
|
|
75
|
+
)
|
|
53
76
|
|
|
54
77
|
@classmethod
|
|
55
78
|
def from_dict(cls, d: Dict[str, Any]) -> RunArguments:
|
|
@@ -76,21 +99,31 @@ class RunTaskCommand(click.Command):
|
|
|
76
99
|
assert obj.endpoint, "CLI Config should have an endpoint"
|
|
77
100
|
obj.init(self.run_args.project, self.run_args.domain)
|
|
78
101
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
102
|
+
async def _run():
|
|
103
|
+
r = flyte.with_runcontext(
|
|
104
|
+
copy_style=self.run_args.copy_style,
|
|
105
|
+
version=self.run_args.copy_style,
|
|
106
|
+
mode="local" if self.run_args.local else "remote",
|
|
107
|
+
name=self.run_args.name,
|
|
108
|
+
).run(self.obj, **ctx.params)
|
|
109
|
+
if isinstance(r, Run) and r.action is not None:
|
|
110
|
+
console = Console()
|
|
111
|
+
console.print(
|
|
112
|
+
common.get_panel(
|
|
113
|
+
"Run",
|
|
114
|
+
f"[green bold]Created Run: {r.name} [/green bold] "
|
|
115
|
+
f"(Project: {r.action.action_id.run.project}, Domain: {r.action.action_id.run.domain})\n\n"
|
|
116
|
+
f"[blue bold]{r.url}[/blue bold]",
|
|
117
|
+
)
|
|
92
118
|
)
|
|
93
|
-
|
|
119
|
+
if self.run_args.follow:
|
|
120
|
+
console.print(
|
|
121
|
+
"[dim]Log streaming enabled, will wait for task to start running "
|
|
122
|
+
"and log stream to be available[/dim]"
|
|
123
|
+
)
|
|
124
|
+
await r.show_logs(max_lines=30, show_ts=True, raw=False)
|
|
125
|
+
|
|
126
|
+
asyncio.run(_run())
|
|
94
127
|
|
|
95
128
|
def get_params(self, ctx: Context) -> List[Parameter]:
|
|
96
129
|
# Note this function may be called multiple times by click.
|
|
@@ -165,11 +198,11 @@ class TaskFiles(common.FileGroup):
|
|
|
165
198
|
filename=Path(filename),
|
|
166
199
|
run_args=run_args,
|
|
167
200
|
name=filename,
|
|
168
|
-
help=f"Run, functions decorated `env.task`
|
|
201
|
+
help=f"Run, functions decorated `env.task` {filename}",
|
|
169
202
|
)
|
|
170
203
|
|
|
171
204
|
|
|
172
205
|
run = TaskFiles(
|
|
173
206
|
name="run",
|
|
174
|
-
help="Run a task from a python file",
|
|
207
|
+
help="Run a task from a python file.",
|
|
175
208
|
)
|
flyte/{_cli → cli}/main.py
RENAMED
|
@@ -3,6 +3,7 @@ import rich_click as click
|
|
|
3
3
|
from flyte._logging import initialize_logger, logger
|
|
4
4
|
|
|
5
5
|
from ..config import Config
|
|
6
|
+
from ._abort import abort
|
|
6
7
|
from ._common import CLIConfig
|
|
7
8
|
from ._create import create
|
|
8
9
|
from ._deploy import deploy
|
|
@@ -79,7 +80,14 @@ def main(
|
|
|
79
80
|
config_file: str | None,
|
|
80
81
|
):
|
|
81
82
|
"""
|
|
82
|
-
|
|
83
|
+
|
|
84
|
+
____ __ _ _ ____ ____ _ _ ____ __
|
|
85
|
+
( __)( ) ( \\/ )(_ _)( __) / )( \\(___ \\ / \
|
|
86
|
+
) _) / (_/\\ ) / )( ) _) \\ \\/ / / __/ _( 0 )
|
|
87
|
+
(__) \\____/(__/ (__) (____) \\__/ (____)(_)\\__/
|
|
88
|
+
|
|
89
|
+
The flyte cli follows a simple verb based structure, where the top-level commands are verbs that describe the action
|
|
90
|
+
to be taken, and the subcommands are nouns that describe the object of the action.
|
|
83
91
|
"""
|
|
84
92
|
log_level = _verbosity_to_loglevel(verbose)
|
|
85
93
|
if log_level is not None:
|
|
@@ -102,3 +110,4 @@ main.add_command(run)
|
|
|
102
110
|
main.add_command(deploy)
|
|
103
111
|
main.add_command(get) # type: ignore
|
|
104
112
|
main.add_command(create) # type: ignore
|
|
113
|
+
main.add_command(abort) # type: ignore
|
flyte/config/_config.py
CHANGED
|
@@ -183,6 +183,8 @@ def get_config_file(c: typing.Union[str, ConfigFile, None]) -> ConfigFile | None
|
|
|
183
183
|
if isinstance(c, str):
|
|
184
184
|
logger.debug(f"Using specified config file at {c}")
|
|
185
185
|
return ConfigFile(c)
|
|
186
|
+
elif isinstance(c, ConfigFile):
|
|
187
|
+
return c
|
|
186
188
|
config_path = resolve_config_path()
|
|
187
189
|
if config_path:
|
|
188
190
|
return ConfigFile(str(config_path))
|
flyte/errors.py
CHANGED
|
@@ -141,3 +141,12 @@ class ReferenceTaskError(RuntimeUserError):
|
|
|
141
141
|
|
|
142
142
|
def __init__(self, message: str):
|
|
143
143
|
super().__init__("ReferenceTaskUsageError", message, "user")
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
class LogsNotYetAvailableError(BaseRuntimeError):
|
|
147
|
+
"""
|
|
148
|
+
This error is raised when the logs are not yet available for a task.
|
|
149
|
+
"""
|
|
150
|
+
|
|
151
|
+
def __init__(self, message: str):
|
|
152
|
+
super().__init__("LogsNotYetAvailable", "system", message, None)
|
flyte/io/_dir.py
CHANGED
|
@@ -244,7 +244,7 @@ class Dir(BaseModel, Generic[T], SerializableType):
|
|
|
244
244
|
|
|
245
245
|
shutil.copytree(self.path, local_dest, dirs_exist_ok=True)
|
|
246
246
|
|
|
247
|
-
# Figure this out when we figure out the final
|
|
247
|
+
# Figure this out when we figure out the final sync story
|
|
248
248
|
raise NotImplementedError("Sync download is not implemented for remote paths")
|
|
249
249
|
|
|
250
250
|
@classmethod
|
|
@@ -287,7 +287,7 @@ class Dir(BaseModel, Generic[T], SerializableType):
|
|
|
287
287
|
remote_dir = Dir[DataFrame].from_local_sync('/tmp/data_dir/', 's3://bucket/data/')
|
|
288
288
|
```
|
|
289
289
|
"""
|
|
290
|
-
# Implement this after we figure out the final
|
|
290
|
+
# Implement this after we figure out the final sync story
|
|
291
291
|
raise NotImplementedError("Sync upload is not implemented for remote paths")
|
|
292
292
|
|
|
293
293
|
async def exists(self) -> bool:
|