def end(self, session=None):
    super(ExportMonitor, self).end(session=session)
    latest_path = saver_lib.latest_checkpoint(self._estimator.model_dir)
    if (latest_path is None):
        logging.info('Skipping export at the end since model has not been saved yet.')
        return
    try:
        self._last_export_dir = self._estimator.export(self.export_dir, exports_to_keep=self.exports_to_keep, signature_fn=self.signature_fn, input_fn=self._input_fn, default_batch_size=self._default_batch_size, input_feature_key=self._input_feature_key, use_deprecated_input_fn=self._use_deprecated_input_fn)
    except RuntimeError:
        logging.info('Skipping exporting for the same step.')
def end(self, session=None):
    super(ExportMonitor, self).end(session=session)
    latest_path = saver_lib.latest_checkpoint(self._estimator.model_dir)
    if (latest_path is None):
        logging.info('Skipping export at the end since model has not been saved yet.')
        return
    try:
        self._last_export_dir = self._estimator.export(self.export_dir, exports_to_keep=self.exports_to_keep, signature_fn=self.signature_fn, input_fn=self._input_fn, default_batch_size=self._default_batch_size, input_feature_key=self._input_feature_key, use_deprecated_input_fn=self._use_deprecated_input_fn)
    except RuntimeError:
        logging.info('Skipping exporting for the same step.')