Standard Training Templates

This section explains how to create standard training templates for reuse during workload submission. To manage templates, see Workload Templates.

Note

Flexible workload templates is disabled by default and require 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.

Adding a New Template

  1. To add a new template, go to Workload manager → Templates.

  2. Click +NEW TEMPLATE and select Training from the dropdown menu.

  3. Within the new training template form, select the scope.

  4. Set the training workload architecture as standard, which consists of a single main running process. This workload uses environments that support standard training workloads only.

  5. Enter a unique name for the training template. If the name already exists in the project, you will be requested to submit a different name.

  6. Click CONTINUE

Setting up an Environment

Load from existing setup

  1. Click the load icon. A side pane appears, displaying a list of available environments. Select an environment from the list.

  2. Optionally, customize any of the environment’s predefined fields as shown below. The changes will apply to this template only and will not affect the selected environment.

  3. Alternatively, click the icon in the side pane to create a new environment. For step-by-step instructions, see Environments.

Provide your own settings

Manually configure the settings below as needed.

Configure environment

  1. Add the Image URL or update the URL of the existing setup.

  2. Set the condition for pulling the image by selecting the image pull policy. It is recommended to pull the image only if it's not already present on the host.

  3. Set the connection for your tool(s). If you are loading from existing setup, the tools are configured as part of the environment.

    • Select the connection type - External URL or NodePort:

      • Auto generate - A unique URL / port is automatically created for each workload using the environment.

      • Custom URL / Custom port - Manually define the URL or port. For custom port, make sure to enter a port between 30000 and 32767. If the node port is already in use, the workload will fail and display an error message.

    • Modify who can access the tool:

      • By default, All authenticated users is selected giving access to everyone within the organization’s account.

      • For Specific group(s), enter group names as they appear in your identity provider. You must be a member of one of the groups listed to have access to the tool.

      • For Specific user(s), enter a valid email address or username. If you remove yourself, you will lose access to the tool.

  4. Set the command and arguments for the container running the workspace. If no command is added, the container will use the image’s default command (entry-point):

    • Modify the existing command or click +COMMAND & ARGUMENTS to add a new command.

    • Set multiple arguments separated by spaces, using the following format (e.g.: --arg1=val1).

  5. Set the environment variable(s):

    • Modify the existing environment variable(s) if you are loading from an existing setup. The existing environment variables may include instructions to guide you with entering the correct values.

    • To add a new variable, click + ENVIRONMENT VARIABLE.

    • You can either select Custom to define your own variable, or choose from a predefined list of Secrets or ConfigMaps.

  6. Enter a path pointing to the container's working directory.

  7. Set where the UID, GID, and supplementary groups for the container should be taken from. If you select Custom, you’ll need to manually enter the UID, GID and Supplementary groups values.

  8. Select additional Linux capabilities for the container from the dropdown menu. This grants certain privileges to a container without granting all the root user's privileges.

Setting Up Compute Resources

Note

GPU memory limit is disabled by default. If unavailable, your administrator must enable it under General settings → Resources → GPU resource optimization.

Load from existing setup

  1. Click the load icon. A side pane appears, displaying a list of available compute resources. Select a compute resource from the list.

  2. Optionally, customize any of the compute resource's predefined fields as shown below. The changes will apply to this template only and will not affect the selected compute resource.

  3. Alternatively, click the icon in the side pane to create a new compute resource. For step-by-step instructions, see Compute resources.

Provide your own settings

Manually configure the settings below as needed.

Configure compute resources

  1. Set the number of GPU devices per pod (physical GPUs).

  2. Enable GPU fractioning to set the GPU memory per device using either a fraction of a GPU device’s memory (% of device) or a GPU memory unit (MB/GB):

    • Request - The minimum GPU memory allocated per device. Each pod in the workspace receives at least this amount per device it uses.

    • Limit - The maximum GPU memory allocated per device. Each pod in the workspace receives at most this amount of GPU memory for each device(s) the pod utilizes. This is disabled by default, to enable see the above note.

  3. Set the CPU resources

    • Set CPU compute resources per pod by choosing the unit (cores or millicores):

      • Request - The minimum amount of CPU compute provisioned per pod. Each running pod receives this amount of CPU compute.

      • Limit - The maximum amount of CPU compute a pod can use. Each pod receives at most this amount of CPU compute. By default, the limit is set to Unlimited which means that the pod may consume all the node's free CPU compute resources.

    • Set the CPU memory per pod by selecting the unit (MB or GB):

      • Request - The minimum amount of CPU memory provisioned per pod. Each running pod receives this amount of CPU memory.

      • Limit - The maximum amount of CPU memory a pod can use. Each pod receives at most this amount of CPU memory. By default, the limit is set to Unlimited which means that the pod may consume all the node's free CPU memory resources.

  4. Set extended resource(s)

    • Enable Increase shared memory size to allow the shared memory size available to the pod to increase from the default 64MB to the node's total available memory or the CPU memory limit, if set above.

    • Click +EXTENDED RESOURCES to add resource/quantity pairs. For more information on how to set extended resources, see the Extended resources and Quantity guides.

  5. Click +TOLERATION to allow the workspace to be scheduled on a node with a matching taint. Select the operator and the effect:

    • If you select Exists, the effect will be applied if the key exists on the node.

    • If you select Equals, the effect will be applied if the key and the value set match the value on the node.

Setting Up Data & Storage

Note

  • Data volumes is disabled by default. If unavailable, your administrator must enable it under General settings → Workloads → Data volumes.

  • If Data volumes is not enabled, Data & storage appears as Data sources only, and no data volumes will be available.

Load from existing setup

  1. Click the load icon. A side pane appears, displaying a list of available data sources/volumes. Select a data source/volume from the list.

  2. Optionally, customize any of the data source's predefined fields as shown below. The changes will apply to this template only and will not affect the selected data source.

  3. Alternatively, click the icon in the side pane to create a new data source/volume. For step-by-step instructions, see Data sources or Data volumes.

Provide your own settings

Manually configure the settings below as needed.

Note: Secrets, ConfigMaps and Data volumes cannot be added as a one-time configuration.

Configure data sources

  1. Click the icon and choose the data source from the dropdown menu. You can add multiple data sources.

  2. Once selected, set the data origin according to the required fields and enter the container path to set the data target location.

    • For Git and S3, select a Secret. This option is relevant for private buckets/repositories based on existing secrets that were created for the scope.

    • For ConfigMap, set a Sub path. This refers to the specific file (key) inside the ConfigMap to mount (e.g., app.properties), allowing you to mount a specific file from the ConfigMap.

  3. Select Volume to allocate a storage space to your workspace that is persistent across restarts:

    • Set the Storage class to None or select an existing storage class from the list. To add new storage classes, and for additional information, see Kubernetes storage classes. If the administrator defined the storage class configuration, the rest of the fields will appear accordingly.

    • Select one or more access mode(s) and define the claim size and its units.

    • Select the volume mode. If you select Filesystem (default), the volume will be mounted as a filesystem, enabling the usage of directories and files. If you select Block, the volume is exposed as a block storage, which can be formatted or used directly by applications without a filesystem.

    • Set the Container path with the volume target location.

    • Set the volume persistency to Persistent if the volume and its data should be deleted when the workspace is deleted or Ephemeral if the volume and its data should be deleted every time the workspace’s status changes to “Stopped”.

Setting Up General Settings

Note

The following general settings are optional.

  1. Set the workload priority. Choose the appropriate priority level for the workload. Higher-priority workloads are scheduled before lower-priority ones. See Workload priority control for more details.

  2. Set the grace period for workload preemption. This is a buffer that allows a preempted workload to reach a safe checkpoint before it is forcibly preempted. Enter a timeframe between 0 sec and 5 min.

  3. Set the number of runs the workload must finish to be considered complete. Multiple runs enhance the reliability and validity of the training results.

  4. If the number of runs is above 1, enter a value under Parallelism to specify how many runs may be scheduled in parallel. The value must be less than or equal to the number of runs.

  5. Set the backoff limit before workload failure. The backoff limit is the maximum number of retry attempts for failed workloads. After reaching the limit, the workload status will change to "Failed." Enter a value between 0 and 100.

  6. Set the timeframe for auto-deletion after workload completion or failure. The time after which a completed or failed workload is deleted; if this field is set to 0 seconds, the workload will be deleted automatically.

  7. Set annotations(s). Kubernetes annotations are key-value pairs attached to the workload. They are used for storing additional descriptive metadata to enable documentation, monitoring and automation.

  8. Set labels(s). Kubernetes labels are key-value pairs attached to the workload. They are used for categorizing to enable querying.

Completing the Template

  1. Before finalizing your template, review your configurations and make any necessary adjustments.

  2. Click CREATE TEMPLATE

Using API

Go to the Workload templates API reference to view the available actions.

Last updated