tensorflow/models · error · ValueError

Coordinator uninitialized for async run. Call init_async() f

Error message

Coordinator uninitialized for async run. Call init_async() first.

What it means

Error "Coordinator uninitialized for async run. Call init_async() first." thrown in tensorflow/models.

Source

Thrown at official/core/base_trainer.py:54

class _AsyncTrainer(orbit.StandardTrainer, orbit.StandardEvaluator):
  """Trainer class for both sync and async Strategy."""

  def init_async(self):
    """Initializes the Async Trainer base class."""
    assert isinstance(self._strategy, tf.distribute.Strategy)
    self._is_async = isinstance(
        self._strategy, tf.distribute.experimental.ParameterServerStrategy)
    self._coordinator = None
    if self._is_async:
      self._coordinator = (
          tf.distribute.experimental.coordinator.ClusterCoordinator(
              self._strategy))

  def coordinator_for_async(
      self,
  ) -> tf.distribute.experimental.coordinator.ClusterCoordinator:
    if not self._coordinator:
      raise ValueError(
          "Coordinator uninitialized for async run. Call init_async() first."
      )
    return self._coordinator

  def join(self):
    """Join all async steps. Only useful in aysnc training."""
    if getattr(self, "_is_async", False):
      self.coordinator_for_async().join()

  def create_train_loop_fn(self):
    """Creates a eval loop from the given step function and options."""
    train_loop_fn = super().create_train_loop_fn()
    if getattr(self, "_is_async", False):

      def _async_loop_fn(iterator, num_steps):
        self.coordinator_for_async().schedule(
            train_loop_fn, args=(iterator, num_steps)
        )

View on GitHub (pinned to e006f5f0d5)

When it happens

Trigger: Thrown at official/core/base_trainer.py:54 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tensorflow/models@e006f5f0d5 (2026-08-24). Data as JSON: /api/errors/2c56895c7797fcf9. Report an issue: GitHub.