Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No op #6853

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

No op #6853

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions tfx/orchestration/portable/launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,12 @@ def __init__(
executor_spec: Optional[message.Message] = None,
custom_driver_spec: Optional[message.Message] = None,
platform_config: Optional[message.Message] = None,
custom_executor_operators: Optional[Dict[Any,
Type[ExecutorOperator]]] = None,
custom_driver_operators: Optional[Dict[Any,
Type[DriverOperator]]] = None):
custom_executor_operators: Optional[
Dict[Any, Type[ExecutorOperator]]
] = None,
custom_driver_operators: Optional[Dict[Any, Type[DriverOperator]]] = None,
creds: Optional[grpc.ChannelCredentials] = None,
):
"""Initializes a Launcher.

Args:
Expand All @@ -174,6 +176,7 @@ def __init__(
ExecutorOperation implementation.
custom_driver_operators: a map of ExecutableSpec to its DriverOperator
implementation.
creds: The credentials to use for the execution watcher.

Raises:
ValueError: when component and component_config are not launchable by the
Expand All @@ -191,6 +194,7 @@ def __init__(
self._driver_operators = {}
self._driver_operators.update(DEFAULT_DRIVER_OPERATORS)
self._driver_operators.update(custom_driver_operators or {})
self._creds = creds or grpc.local_server_credentials()

self._executor_operator = None
if executor_spec:
Expand Down Expand Up @@ -600,7 +604,8 @@ def launch(self) -> Optional[data_types.ExecutionInfo]:
port=portpicker.pick_unused_port(),
mlmd_connection=self._mlmd_connection,
execution=execution_preparation_result.execution_metadata,
creds=grpc.local_server_credentials())
creds=self._creds,
)
self._executor_operator.with_execution_watcher(
executor_watcher.address)
executor_watcher.start()
Expand Down