Skip to content

Commit

Permalink
Add maximum_active_task_schedulers method to Env
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 660154575
  • Loading branch information
kmonte authored and tfx-copybara committed Aug 7, 2024
1 parent 5e90c67 commit cd5bddd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tfx/orchestration/experimental/core/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down Expand Up @@ -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()

Expand Down

0 comments on commit cd5bddd

Please sign in to comment.