Workload Class

WorkloadClass custom resource

A WorkloadClass resource specifies the hardware resources assigned to a Job that will be executed. Specifically, the resource specifies memory, CPU, and GPU allocations. Workload classes are not static and can be customized during the creation of objects that use the WorkloadClass resource. All workload classes can be viewed by navigating to the Workload Classes section of the modela-catalog namespace.

Relationships to Other Resources

All DataProduct resources have a default WorkloadClass.
All Dataset resources are assigned a WorkloadClass for data processing.
All Model resources are assigned a WorkloadClass during training.

WorkloadClass API Reference

WorkloadClass define a template for a job.

Name Type Description Required
apiVersion string catalog.modela.ai/v1alpha1 true
kind string WorkloadClass true
metadata object Refer to the Kubernetes API documentation for the fields of the `metadata` field. true
spec object WorkloadClassSpec defines the specification of a workload class.
true

WorkloadClass.spec

↩ Parent

WorkloadClassSpec defines the specification of a workload class.

Name Type Description Required
resourcesTemplate object ResourceSpec specifies the amount of resources that will be allocated to a workload
false

WorkloadClass.spec.resourcesTemplate

↩ Parent

ResourceSpec specifies the amount of resources that will be allocated to a workload

Name Type Description Required
cpuImage object Reference to the managed CPU trainer image, used internally
false
gpuImage object Reference to the managed GPU trainer image, used internally
false
requirements object The custom resource requirements for the workload, which are used if `WorkloadName` is not set
false
workloadName string If this resource is based on the workload, this field contain the name of the workload. The name of a WorkloadClass. The system will use the resource requirements described by the WorkloadClass
false

WorkloadClass.spec.resourcesTemplate.cpuImage

↩ Parent

Reference to the managed CPU trainer image, used internally

Name Type Description Required
apiVersion string API version of the referent.
false
fieldPath string If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.
false
kind string Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
false
name string Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
false
namespace string Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
false
resourceVersion string Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
false
uid string UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
false

WorkloadClass.spec.resourcesTemplate.gpuImage

↩ Parent

Reference to the managed GPU trainer image, used internally

Name Type Description Required
apiVersion string API version of the referent.
false
fieldPath string If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.
false
kind string Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
false
name string Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
false
namespace string Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
false
resourceVersion string Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
false
uid string UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
false

WorkloadClass.spec.resourcesTemplate.requirements

↩ Parent

The custom resource requirements for the workload, which are used if WorkloadName is not set

Name Type Description Required
limits map[string]int or string Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
false
requests map[string]int or string Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
false