> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flex.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Lifecycle

> Understand the status progression of a training job from creation to completion

A Training Job progresses through several statuses:

* **pending**: The workload has been registered and its creation process has begun.
* **scheduling**: FlexAI is searching for the suitable hardware resources to run the workload.
* **building**: The Runtime environment is being prepared, including cloning the source repository on the specified revision and installing the project's dependencies.
* **in progress**: The workload is currently executing the code defined in the entry point file.
* **enqueued**: The workload is waiting for resources to become available.
* **succeeded**: The workload completed successfully and output artifacts are ready for download.
* **failed**: The workload did not complete successfully. Common reasons include missing files, dependency errors, or exceeding time limits.
* **stopped**: The workload was stopped by the user before completion.

Terminal statuses (**succeeded**, **failed**, **stopped**) mean the job is finished and can be deleted if desired.

```mermaid theme={null}
stateDiagram-v2
    [*] --> pending
    pending --> scheduling
    scheduling --> building
    scheduling --> enqueued
    building --> in_progress: in progress
    building --> enqueued
    enqueued --> in_progress: in progress
    enqueued --> scheduling
    in_progress --> succeeded: succeeded [Terminal]
    in_progress --> failed: failed [Terminal]
    in_progress --> stopped: stopped [Terminal]
    succeeded --> [*]
    failed --> [*]
    stopped --> [*]
```
