Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Architecture

Execution flow

  1. tfmesos2.cluster(...) normalizes job dictionaries into Job objects.
  2. TensorflowMesos creates task IDs and registers a Mesos client.
  3. For each offer, CPU, memory, GPUs, and MESOS_ATTRIBUTES are checked.
  4. A Mesos task starts python3 -m tfmesos2.server <task-id> <client-ip>.
  5. The task reports a random local port and waits for cluster metadata.
  6. The API returns cluster_def; the task starts tf.distribute.Server.
  7. Once all tasks are ready, the framework is suppressed and accepts no further offers.

Component boundaries

  • Scheduler process: owns the Mesos framework, task queue, resource matching, and readiness state.
  • Mesos master and agents: place and run the TensorFlow containers.
  • Task callback API: exchanges task ports, readiness, and cluster metadata.
  • TensorFlow task: starts the gRPC server and executes the user workload.

Failure boundaries

Terminal Mesos states are never treated as successful readiness. wait_until_ready() aborts on TASK_FAILED, TASK_LOST, or TASK_KILLED and has a configurable timeout. Status updates for unknown task IDs are ignored and logged.