def setUp(self):
    super(ExecutorTest, self).setUp()
    self._source_data_dir = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'testdata')
    self._output_data_dir = os.path.join(os.environ.get('TEST_UNDECLARED_OUTPUTS_DIR', self.get_temp_dir()), self._testMethodName)
    tf.io.gfile.makedirs(self._output_data_dir)
    self._model_export = standard_artifacts.Model()
    self._model_export.uri = os.path.join(self._source_data_dir, 'trainer/current/')
    self._model_blessing = standard_artifacts.ModelBlessing()
    self._input_dict = {'model_export': [self._model_export], 'model_blessing': [self._model_blessing]}
    self._model_push = standard_artifacts.PushedModel()
    self._model_push.uri = os.path.join(self._output_data_dir, 'model_push')
    tf.io.gfile.makedirs(self._model_push.uri)
    self._output_dict = {'model_push': [self._model_push]}
    self._serving_model_dir = os.path.join(self._output_data_dir, 'serving_model_dir')
    tf.io.gfile.makedirs(self._serving_model_dir)
    self._exec_properties = {'push_destination': json_format.MessageToJson(pusher_pb2.PushDestination(filesystem=pusher_pb2.PushDestination.Filesystem(base_directory=self._serving_model_dir)), preserving_proto_field_name=True)}
    self._executor = executor.Executor()
def setUp(self):
    super(ExecutorTest, self).setUp()
    self._source_data_dir = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'testdata')
    self._output_data_dir = os.path.join(os.environ.get('TEST_UNDECLARED_OUTPUTS_DIR', self.get_temp_dir()), self._testMethodName)
    tf.io.gfile.makedirs(self._output_data_dir)
    self._model_export = standard_artifacts.Model()
    self._model_export.uri = os.path.join(self._source_data_dir, 'trainer/current/')
    self._model_blessing = standard_artifacts.ModelBlessing()
    self._input_dict = {'model_export': [self._model_export], 'model_blessing': [self._model_blessing]}
    self._model_push = standard_artifacts.PushedModel()
    self._model_push.uri = os.path.join(self._output_data_dir, 'model_push')
    tf.io.gfile.makedirs(self._model_push.uri)
    self._output_dict = {'model_push': [self._model_push]}
    self._serving_model_dir = os.path.join(self._output_data_dir, 'serving_model_dir')
    tf.io.gfile.makedirs(self._serving_model_dir)
    self._exec_properties = {'push_destination': json_format.MessageToJson(pusher_pb2.PushDestination(filesystem=pusher_pb2.PushDestination.Filesystem(base_directory=self._serving_model_dir)), preserving_proto_field_name=True)}
    self._executor = executor.Executor()