Skip to content

Commit

Permalink
2 graphs in one request to DG Oracle
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 660028166
  • Loading branch information
tfx-copybara committed Aug 13, 2024
1 parent 0082555 commit 98abbe1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
10 changes: 2 additions & 8 deletions tfx/orchestration/portable/launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,15 +193,9 @@ def __init__(
self._driver_operators.update(custom_driver_operators or {})

self._executor_operator = None
# redundant line for external usage.
executor_operator = None
if executor_spec:
if executor_operator is None:
executor_operator = self._executor_operators[type(executor_spec)](
executor_spec=executor_spec, platform_config=platform_config
)
self._executor_operator = executor_operator

self._executor_operator = self._executor_operators[type(executor_spec)](
executor_spec, platform_config)
self._output_resolver = outputs_utils.OutputsResolver(
pipeline_node=self._pipeline_node,
pipeline_info=self._pipeline_info,
Expand Down
5 changes: 2 additions & 3 deletions tfx/utils/proto_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,8 @@ def _create_proto_instance_from_name(
message_name: str, pool: descriptor_pool.DescriptorPool) -> ProtoMessage:
"""Creates a protobuf message instance from a given message name."""
message_descriptor = pool.FindMessageTypeByName(message_name)
factory = message_factory.MessageFactory(pool)
message_type = factory.GetPrototype(message_descriptor)
return message_type()
message_class = message_factory.GetMessageClass(message_descriptor)
return message_class()


def get_pool_with_descriptors(
Expand Down

0 comments on commit 98abbe1

Please sign in to comment.