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: Check that model is blessed by upstream validators.
  
  Args:
    input_dict: Input dict from input key to a list of artifacts:
      - model_blessing: A `ModelBlessing` artifact from model validator or
        evaluator.
        Pusher looks for a custom property `blessed` in the artifact to check
        it is safe to push.
      - infra_blessing: An `InfraBlessing` artifact from infra validator.
        Pusher looks for a custom proeprty `blessed` in the artifact to
        determine whether the model is mechanically servable from the model
        server to which Pusher is going to push.
  
  Returns:
    True if the model is blessed by validator.
docstr_tok: ["Check","that","model","is","blessed","by","upstream","validators",".","Args",":","input_dict",":","Input","dict","from","input","key","to","a","list","of","artifacts",":","-","model_blessing",":","A","`","ModelBlessing","`","artifact","from","model","validator","or","evaluator",".","Pusher","looks","for","a","custom","property","`","blessed","`","in","the","artifact","to","check","it","is","safe","to","push",".","-","infra_blessing",":","An","`","InfraBlessing","`","artifact","from","infra","validator",".","Pusher","looks","for","a","custom","proeprty","`","blessed","`","in","the","artifact","to","determine","whether","the","model","is","mechanically","servable","from","the","model","server","to","which","Pusher","is","going","to","push",".","Returns",":","True","if","the","model","is","blessed","by","validator","."]
code: def CheckBlessing(
      self, input_dict: Dict[str, List[types.Artifact]]
  ) -> bool:
      """Check that model is blessed by upstream validators.
  
      Args:
        input_dict: Input dict from input key to a list of artifacts:
          - model_blessing: A `ModelBlessing` artifact from model validator or
            evaluator.
            Pusher looks for a custom property `blessed` in the artifact to check
            it is safe to push.
          - infra_blessing: An `InfraBlessing` artifact from infra validator.
            Pusher looks for a custom proeprty `blessed` in the artifact to
            determine whether the model is mechanically servable from the model
            server to which Pusher is going to push.
  
      Returns:
        True if the model is blessed by validator.
      """
      # TODO(jyzhao): should this be in driver or executor.
      maybe_model_blessing = input_dict.get(
          standard_component_specs.MODEL_BLESSING_KEY
      )
      if maybe_model_blessing:
          model_blessing = artifact_utils.get_single_instance(
              maybe_model_blessing
          )
          if not model_utils.is_model_blessed(model_blessing):
              logging.info(
                  "Model on %s was not blessed by model validation",
                  model_blessing.uri,
              )
              return False
      maybe_infra_blessing = input_dict.get(
          standard_component_specs.INFRA_BLESSING_KEY
      )
      if maybe_infra_blessing:
          infra_blessing = artifact_utils.get_single_instance(
              maybe_infra_blessing
          )
          if not model_utils.is_infra_validated(infra_blessing):
              logging.info(
                  "Model on %s was not blessed by infra validator",
                  infra_blessing.uri,
              )
              return False
      if not maybe_model_blessing and not maybe_infra_blessing:
          logging.warning(
              "Pusher is going to push the model without validation. "
              "Consider using Evaluator or InfraValidator in your "
              "pipeline."
          )
      return True
  
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 1 for calling the Executor obj's underlying member method code with example usage: obj.CheckBlessing(input_dict) and returns: True, False, False