File tree Expand file tree Collapse file tree 2 files changed +38
-1
lines changed
tfx/orchestration/experimental/core Expand file tree Collapse file tree 2 files changed +38
-1
lines changed Original file line number Diff line number Diff line change 14
14
"""For environment specific extensions."""
15
15
16
16
import abc
17
- from typing import Optional
17
+ from typing import Optional , Sequence
18
18
19
19
from tfx .orchestration .experimental .core import orchestration_options
20
20
from tfx .proto .orchestration import pipeline_pb2
21
21
from tfx .utils import status as status_lib
22
22
23
+ from ml_metadata .proto import metadata_store_pb2
24
+
23
25
_ENV = None
24
26
25
27
@@ -85,6 +87,17 @@ def prepare_orchestrator_for_pipeline_run(
85
87
pipeline: The pipeline IR to prepare for.
86
88
"""
87
89
90
+ @abc .abstractmethod
91
+ def update_pipeline_run_status (
92
+ self ,
93
+ owner : str ,
94
+ pipeline_name : str ,
95
+ original_execution : metadata_store_pb2 .Execution ,
96
+ modified_execution : metadata_store_pb2 .Execution ,
97
+ sub_pipeline_ids : Optional [Sequence [str ]] = None ,
98
+ ) -> None :
99
+ """Updates orchestrator storage backends with pipeline run status."""
100
+
88
101
89
102
class _DefaultEnv (Env ):
90
103
"""Default environment."""
@@ -125,6 +138,16 @@ def prepare_orchestrator_for_pipeline_run(
125
138
):
126
139
pass
127
140
141
+ def update_pipeline_run_status (
142
+ self ,
143
+ owner : str ,
144
+ pipeline_name : str ,
145
+ original_execution : metadata_store_pb2 .Execution ,
146
+ modified_execution : metadata_store_pb2 .Execution ,
147
+ sub_pipeline_ids : Optional [Sequence [str ]] = None ,
148
+ ) -> None :
149
+ pass
150
+
128
151
129
152
_ENV = _DefaultEnv ()
130
153
Original file line number Diff line number Diff line change 13
13
# limitations under the License.
14
14
"""Tests for tfx.orchestration.experimental.core.env."""
15
15
16
+ from typing import Optional , Sequence
17
+
16
18
import tensorflow as tf
17
19
from tfx .orchestration .experimental .core import env
18
20
from tfx .orchestration .experimental .core import test_utils
19
21
from tfx .proto .orchestration import pipeline_pb2
20
22
from tfx .utils import status as status_lib
21
23
24
+ from ml_metadata .proto import metadata_store_pb2
25
+
22
26
23
27
class _TestEnv (env .Env ):
24
28
@@ -51,6 +55,16 @@ def prepare_orchestrator_for_pipeline_run(
51
55
):
52
56
raise NotImplementedError ()
53
57
58
+ def update_pipeline_run_status (
59
+ self ,
60
+ owner : str ,
61
+ pipeline_name : str ,
62
+ original_execution : metadata_store_pb2 .Execution ,
63
+ modified_execution : metadata_store_pb2 .Execution ,
64
+ sub_pipeline_ids : Optional [Sequence [str ]] = None ,
65
+ ) -> None :
66
+ raise NotImplementedError ()
67
+
54
68
55
69
class EnvTest (test_utils .TfxTest ):
56
70
You can’t perform that action at this time.
0 commit comments