diff --git a/tfx/orchestration/experimental/core/env.py b/tfx/orchestration/experimental/core/env.py index a1381ecbd7..817ffcc6aa 100644 --- a/tfx/orchestration/experimental/core/env.py +++ b/tfx/orchestration/experimental/core/env.py @@ -158,6 +158,10 @@ def get_status_code_from_exception( Returns None if the exception is not a known type. """ + @abc.abstractmethod + def maximum_concurrent_task_schedulers(self) -> int: + """Returns the maximum number of concurrent task schedulers.""" + class _DefaultEnv(Env): """Default environment.""" @@ -244,6 +248,9 @@ def get_status_code_from_exception( ) -> Optional[int]: return None + def maximum_concurrent_task_schedulers(self) -> int: + return 1 + _ENV = _DefaultEnv()