class_docstr: TFX Pusher executor to push the new TF model to a filesystem target.
  
  The Pusher component is used to deploy a validated model to a filesystem
  target or serving environment using tf.serving.  Pusher depends on the outputs
  of ModelValidator to determine if a model is ready to push. A model is
  considered to be safe to push only if ModelValidator has marked it as BLESSED.
  A push action delivers the model exports produced by Trainer to the
  destination defined in the ``push_destination`` of the component config.
  
  To include Pusher in a TFX pipeline, configure your pipeline similar to
  https://github.com/tensorflow/tfx/blob/master/tfx/examples/chicago_taxi_pipeline/taxi_pipeline_simple.py#L104.
  
  For more details on tf.serving itself, please refer to
  https://tensorflow.org/tfx/guide/pusher.  For a tutuorial on TF Serving,
  please refer to https://www.tensorflow.org/tfx/guide/serving.
class_docstr_tok: ["TFX","Pusher","executor","to","push","the","new","TF","model","to","a","filesystem","target",".","The","Pusher","component","is","used","to","deploy","a","validated","model","to","a","filesystem","target","or","serving","environment","using","tf.serving",".","Pusher","depends","on","the","outputs","of","ModelValidator","to","determine","if","a","model","is","ready","to","push",".","A","model","is","considered","to","be","safe","to","push","only","if","ModelValidator","has","marked","it","as","BLESSED",".","A","push","action","delivers","the","model","exports","produced","by","Trainer","to","the","destination","defined","in","the","``","push_destination","``","of","the","component","config",".","To","include","Pusher","in","a","TFX","pipeline",",","configure","your","pipeline","similar","to","https",":","\/\/github.com\/tensorflow\/tfx\/blob\/master\/tfx\/examples\/chicago_taxi_pipeline\/taxi_pipeline_simple.py","#","L104",".","For","more","details","on","tf.serving","itself",",","please","refer","to","https",":","\/\/tensorflow.org\/tfx\/guide\/pusher",".","For","a","tutuorial","on","TF","Serving",",","please","refer","to","https",":","\/\/www.tensorflow.org\/tfx\/guide\/serving","."]
docstr: Get input model path to push.
  
  Pusher can push various types of artifacts if it contains the model. This
  method decides which artifact type is given to the Pusher and extracts the
  real model path. Subclass of Pusher Executor should use this method to
  acquire the source model path.
  
  Args:
    input_dict: A dictionary of artifacts that is given as the fisrt argument
        to the Executor.Do() method.
  Returns:
    A resolved input model path.
  Raises:
    RuntimeError: If no model path is found from input_dict.
docstr_tok: ["Get","input","model","path","to","push",".","Pusher","can","push","various","types","of","artifacts","if","it","contains","the","model",".","This","method","decides","which","artifact","type","is","given","to","the","Pusher","and","extracts","the","real","model","path",".","Subclass","of","Pusher","Executor","should","use","this","method","to","acquire","the","source","model","path",".","Args",":","input_dict",":","A","dictionary","of","artifacts","that","is","given","as","the","fisrt","argument","to","the","Executor.Do","(",")","method",".","Returns",":","A","resolved","input","model","path",".","Raises",":","RuntimeError",":","If","no","model","path","is","found","from","input_dict","."]
code: def GetModelPath(
      self, input_dict: Dict[str, List[types.Artifact]]
  ) -> str:
      """Get input model path to push.
  
      Pusher can push various types of artifacts if it contains the model. This
      method decides which artifact type is given to the Pusher and extracts the
      real model path. Subclass of Pusher Executor should use this method to
      acquire the source model path.
  
      Args:
        input_dict: A dictionary of artifacts that is given as the fisrt argument
            to the Executor.Do() method.
      Returns:
        A resolved input model path.
      Raises:
        RuntimeError: If no model path is found from input_dict.
      """
      # Check input_dict['model'] first.
      models = input_dict.get(standard_component_specs.MODEL_KEY)
      if models:
          model = artifact_utils.get_single_instance(models)
          return path_utils.serving_model_path(
              model.uri, path_utils.is_old_model_artifact(model)
          )
  
      # Falls back to input_dict['infra_blessing']
      blessed_models = input_dict.get(
          standard_component_specs.INFRA_BLESSING_KEY
      )
      if not blessed_models:
          # Should not reach here; Pusher.__init__ prohibits creating a component
          # without having any of model or infra_blessing inputs.
          raise RuntimeError("Pusher has no model input.")
      model = artifact_utils.get_single_instance(blessed_models)
      if not model.get_int_custom_property(
          _INFRA_BLESSING_MODEL_FLAG_KEY
      ):
          raise RuntimeError(
              "InfraBlessing does not contain a model. Check "
              "request_spec.make_warmup is set to True."
          )
      return path_utils.stamped_model_path(model.uri)
  
imports: import os
  import time
  from typing import Any, Dict, List, Optional
  from absl import logging
  from tfx import types
  from tfx.components.util import model_utils
  from tfx.dsl.components.base import base_executor
  from tfx.dsl.io import fileio
  from tfx.proto import pusher_pb2
  from tfx.types import artifact_utils
  from tfx.types import standard_component_specs
  from tfx.utils import io_utils
  from tfx.utils import path_utils
  from tfx.utils import proto_utils
label_desc: Use image node_id 2 for calling the Executor obj's underlying member method code with example usage: obj.GetModelPath(input_dict) and returns: path_utils, path_utils