title: How to run evaluation with MultiWorkerMirroredStrategy in Tensorflow 2?
body: <p>I have the following code which works fine on a single machine:</p>
  <pre><code>if distributed_training:
      strategy = tf.distribute.experimental.MultiWorkerMirroredStrategy()
  elif len(available_gpus) &gt; 1:
      strategy = tf.distribute.MirroredStrategy()
  else:
      strategy = None
      
  run_config = tf.compat.v1.estimator.tpu.RunConfig(
      train_distribute=strategy,
      model_dir=model_dir
  )
  
  estimator = tf.compat.v1.estimator.tpu.TPUEstimator(
      model_fn=model_fn,
      config=run_config,
      train_batch_size=train_batch_size,
      eval_batch_size=eval_batch_size)
  
  train_spec = tf.estimator.TrainSpec(input_fn=train_input_fn)
  eval_spec = tf.estimator.EvalSpec(input_fn=eval_input_fn)
  
  tf.estimator.train_and_evaluate(estimator, train_spec, eval_spec)
  </code></pre>
  <p>However, when I try to run it in a distributed fashion it simply won't do evaluation. It will train fine, but for some reason evaluation is skipped. I've already tried setting eval_distribute to MultiWorkerMirroredStrategy, but that doesn't change anything.</p>
  <p>Any ideas?</p>