Skip to content

Commit

Permalink
change MessageFactory class to GetMessageClass()
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 662629553
  • Loading branch information
tfx-copybara committed Aug 13, 2024
1 parent 0082555 commit a5209f8
Showing 1 changed file with 2 additions and 3 deletions.
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 a5209f8

Please sign in to comment.