Я использовал https://github.com/bluecamel/best_checkpoint_copier, который хорошо работает для меня.
Пример:
best_copier = BestCheckpointCopier(
name='best', # directory within model directory to copy checkpoints to
checkpoints_to_keep=10, # number of checkpoints to keep
score_metric='metrics/total_loss', # metric to use to determine "best"
compare_fn=lambda x,y: x.score < y.score, # comparison function used to determine "best" checkpoint (x is the current checkpoint; y is the previously copied checkpoint with the highest/worst score)
sort_key_fn=lambda x: x.score,
sort_reverse=False) # sort order when discarding excess checkpoints
передать его в свой eval_spec:
eval_spec = tf.estimator.EvalSpec(
...
exporters=best_copier,
...)