# Workload Templates

A workload template is a reusable setup that defines all the required configuration fields for submitting a workload. Templates simplify the submission process by allowing users to predefine settings. Researchers can quickly submit workloads using a saved template or adjust the values before submission as needed.

{% hint style="info" %}
**Note**

* **Flexible workload templates** is disabled by default and requires **Flexible workload submission** to be enabled. If unavailable, your administrator must enable both settings under **General Settings** → Workloads → Flexible workload submission and Flexible workload templates.
* Migrating existing templates (legacy) to flexible workload templates will be supported in a future release.
* Templates (legacy) is deprecated and will be removed in a future release. See [Workspace Templates (Legacy)](https://run-ai-docs.nvidia.com/self-hosted/2.22/workloads-in-nvidia-run-ai/workload-templates/workspace-templates/workspace-templates-legacy) for more details.
  {% endhint %}

## Templates Table

The Templates table can be found under **Workload manager** in the NVIDIA Run:ai User Interface.

The Templates table provides a list of all the templates defined in the platform, and allows you to manage them.

<figure><img src="https://3765967871-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlZD4O0TqiQ8mlhnxho0w%2Fuploads%2Fgit-blob-69e429d0096ec3e3270620e8794bf295b3249d2c%2Fnew-template.png?alt=media" alt=""><figcaption></figcaption></figure>

The Templates table consists of the following columns:

| Column                | Description                                                                                                                                                                                                                        |
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Template              | The name of the template                                                                                                                                                                                                           |
| Description           | A description of the template                                                                                                                                                                                                      |
| Scope                 | The scope to which the subject has access. Click the name of the scope to see the scope and its subordinates                                                                                                                       |
| Image                 | The application or service to be run by the workload                                                                                                                                                                               |
| GPU compute request   | The amount of GPU devices requested                                                                                                                                                                                                |
| Workload type         | The workload types that can use the template (workspace/ standard training/ distributed training)                                                                                                                                  |
| Workload architecture | <p>Standard or distributed training:</p><ul><li>Standard - A single-process workload that runs on a single node</li><li>Distributed - A multi-process workload where processes coordinate across nodes (e.g., using MPI)</li></ul> |
| Created by            | The subject that created the template                                                                                                                                                                                              |
| Creation time         | The timestamp for when the template was created                                                                                                                                                                                    |
| Last updated          | The timestamp of when the template was last updated                                                                                                                                                                                |
| Cluster               | The cluster name containing the template                                                                                                                                                                                           |

### Customizing the Table View

* Filter - Click ADD FILTER, select the column to filter by, and enter the filter values
* Search - Click SEARCH and type the value to search by
* Sort - Click each column header to sort by
* Column selection - Click COLUMNS and select the columns to display in the table
* Download table - Click MORE and then click Download as CSV. Export to CSV is limited to 20,000 rows.
* Refresh (optional) - Click REFRESH to update the table with the latest data
* Show/Hide details (optional) - Click to view additional information on the selected row

## Adding a New Template

To create a new template:

1. Click **+NEW TEMPLATE**
2. Select a workload type - Follow the links below to view the step-by-step guide for each workload type:
   * [Workspace](https://run-ai-docs.nvidia.com/self-hosted/2.22/workloads-in-nvidia-run-ai/workload-templates/workspace-templates) - Used for data preparation and model-building tasks.
   * [Training](https://run-ai-docs.nvidia.com/self-hosted/2.22/workloads-in-nvidia-run-ai/workload-templates/training-templates/standard-training-templates) - Used for standard training tasks of all sorts
   * [Distributed Training](https://run-ai-docs.nvidia.com/self-hosted/2.22/workloads-in-nvidia-run-ai/workload-templates/training-templates/distributed-training-templates) - Used for distributed tasks of all sorts
3. Click **CREATE TEMPLATE**

## Editing a Template

To edit an existing template:

1. Select the template you want to update
2. Click **EDIT**
3. Edit the template and click **SAVE TEMPLATE**

## Copying a Template

To copy an existing template:

1. Select the template you want to copy
2. Click **MAKE A COPY**
3. Enter a **name** for the template. The name must be unique.
4. Update the template and click **CREATE TEMPLATE**

## Deleting a Template

To delete a template:

1. Select the template you want to delete
2. Click **DELETE**
3. Confirm you want to delete the template

## Using APIs

Go to the [Workload templates](https://app.gitbook.com/s/b5QLzc5pV7wpXz3CDYyp/workloads/workload-templates) API reference to view the available actions.
