class_docstr: A gRPC service server for updating remote job info to MLMD.
  
  Attributes:
    local_address: Local network address to the server.
    address: Remote network address to the server, same as local_address if not
             configured.
class_docstr_tok: ["A","gRPC","service","server","for","updating","remote","job","info","to","MLMD",".","Attributes",":","local_address",":","Local","network","address","to","the","server",".","address",":","Remote","network","address","to","the","server",",","same","as","local_address","if","not","configured","."]
docstr: Initializes the gRPC server.
  
  Args:
    port: Which port the service will be using.
    mlmd_connection: ML metadata connection.
    execution: The MLMD Execution to keep track of.
    address: Remote address used to contact the server. Should be formatted as
             an ipv4 or ipv6 address in the format `address:port`. If left as
             None, server will use local address.
    creds: gRPC server credentials. If left as None, server will use an
           insecure port.
docstr_tok: ["Initializes","the","gRPC","server",".","Args",":","port",":","Which","port","the","service","will","be","using",".","mlmd_connection",":","ML","metadata","connection",".","execution",":","The","MLMD","Execution","to","keep","track","of",".","address",":","Remote","address","used","to","contact","the","server",".","Should","be","formatted","as","an","ipv4","or","ipv6","address","in","the","format","`","address",":","port","`",".","If","left","as","None",",","server","will","use","local","address",".","creds",":","gRPC","server","credentials",".","If","left","as","None",",","server","will","use","an","insecure","port","."]
code: def __init__(
      self,
      port: int,
      mlmd_connection: metadata.Metadata,
      execution: metadata_store_pb2.Execution,
      address: Optional[str] = None,
      creds: Optional[grpc.ServerCredentials] = None,
  ):
      """Initializes the gRPC server.
  
      Args:
        port: Which port the service will be using.
        mlmd_connection: ML metadata connection.
        execution: The MLMD Execution to keep track of.
        address: Remote address used to contact the server. Should be formatted as
                 an ipv4 or ipv6 address in the format `address:port`. If left as
                 None, server will use local address.
        creds: gRPC server credentials. If left as None, server will use an
               insecure port.
      """
      super().__init__()
      self._port = port
      self._address = address
      self._creds = creds
      self._mlmd_connection = mlmd_connection
      self._server = self._create_server()
      if not execution.HasField("id"):
          raise ValueError(
              "execution id must be set to be tracked by ExecutionWatcher."
          )
      self._execution = execution
  
file_path: tfx/tfx/orchestration/portable/execution_watcher.py
imports: from concurrent import futures
  from typing import Optional
  from absl import logging
  import grpc
  from tfx.orchestration import metadata
  from tfx.proto.orchestration import execution_watcher_pb2
  from tfx.proto.orchestration import execution_watcher_pb2_grpc
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 1 to create a new ExecutionWatcher object from inherited base classes: execution_watcher_pb2_grpc with example: obj = ExecutionWatcher(port, mlmd_connection, execution, address, creds)