v1alpha1

package
v0.4.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the model v1alpha1 API group +kubebuilder:object:generate=true +groupName=model.kubedl.io

Index

Constants

View Source
const (
	// KubeDLModelPath is the env key to indicate model path in container.
	KubeDLModelPath = "KUBEDL_MODEL_PATH"

	// DefaultModelPathInImage is the default path where model artifacts are stored inside the model image generated by Kaniko.
	DefaultModelPathInImage = "/kubedl-model"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: "model.kubedl.io", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

func RegisterDefaults

func RegisterDefaults(scheme *runtime.Scheme) error

RegisterDefaults adds defaulters functions to the given scheme. Public to allow building arbitrary schemes. All generated defaulters are covering - they call all nested defaulters.

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group-qualified GroupResource.

Types

type AWSEfs

type AWSEfs struct {
	// VolumeHandle indicates the backend EFS volume. Check the link for details
	// https://github.com/kubernetes-sigs/aws-efs-csi-driver/tree/master/examples/kubernetes
	// It is of the form "[FileSystemId]:[Subpath]:[AccessPointId]"
	// e.g. FilesystemId with subpath and access point Id:  fs-e8a95a42:/my/subpath:fsap-19f752f0068c22464.
	// FilesystemId with access point Id:   fs-e8a95a42::fsap-068c22f0246419f75
	// FileSystemId with subpath: 	 fs-e8a95a42:/dir1
	VolumeHandle string `json:"volumeHandle,omitempty"`

	// The attributes passed to the backend EFS
	Attributes map[string]string `json:"attributes,omitempty"`
}

func (*AWSEfs) DeepCopy

func (in *AWSEfs) DeepCopy() *AWSEfs

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSEfs.

func (*AWSEfs) DeepCopyInto

func (in *AWSEfs) DeepCopyInto(out *AWSEfs)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ImageBuildPhase

type ImageBuildPhase string
const (
	ImageBuilding       ImageBuildPhase = "ImageBuilding"
	ImageBuildFailed    ImageBuildPhase = "ImageBuildFailed"
	ImageBuildSucceeded ImageBuildPhase = "ImageBuildSucceeded"
)

type LocalStorage

type LocalStorage struct {
	// The local host path to export the model.
	// +required
	Path string `json:"path,omitempty"`

	// The mounted path inside the container.
	// The training code is expected to export the model artifacts under this path, such as storing the tensorflow saved_model.
	MountPath string `json:"mountPath,omitempty"`

	// The name of the node for storing the model. This node will be where the chief worker run to export the model.
	// +required
	NodeName string `json:"nodeName,omitempty"`
}

LocalStorage defines the local storage for storing the model version. For a distributed training job, the nodeName will be the node where the chief/master worker run to export the model.

func (*LocalStorage) DeepCopy

func (in *LocalStorage) DeepCopy() *LocalStorage

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalStorage.

func (*LocalStorage) DeepCopyInto

func (in *LocalStorage) DeepCopyInto(out *LocalStorage)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Model

type Model struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   ModelSpec   `json:"spec,omitempty"`
	Status ModelStatus `json:"status,omitempty"`
}

Model is the Schema for the models API

func (*Model) DeepCopy

func (in *Model) DeepCopy() *Model

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Model.

func (*Model) DeepCopyInto

func (in *Model) DeepCopyInto(out *Model)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Model) DeepCopyObject

func (in *Model) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ModelList

type ModelList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Model `json:"items"`
}

ModelList contains a list of Model

func (*ModelList) DeepCopy

func (in *ModelList) DeepCopy() *ModelList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelList.

func (*ModelList) DeepCopyInto

func (in *ModelList) DeepCopyInto(out *ModelList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ModelList) DeepCopyObject

func (in *ModelList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ModelSpec

type ModelSpec struct {
	// Description is an arbitrary string that describes what this model for.
	Description *string `json:"description,omitempty"`
}

func (*ModelSpec) DeepCopy

func (in *ModelSpec) DeepCopy() *ModelSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelSpec.

func (*ModelSpec) DeepCopyInto

func (in *ModelSpec) DeepCopyInto(out *ModelSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ModelStatus

type ModelStatus struct {
	// LatestVersion indicates the latest ModelVersion
	LatestVersion *VersionInfo `json:"latestVersion,omitempty"`
}

ModelStatus defines the observed state of Model

func (*ModelStatus) DeepCopy

func (in *ModelStatus) DeepCopy() *ModelStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelStatus.

func (*ModelStatus) DeepCopyInto

func (in *ModelStatus) DeepCopyInto(out *ModelStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ModelVersion

type ModelVersion struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   ModelVersionSpec   `json:"spec,omitempty"`
	Status ModelVersionStatus `json:"status,omitempty"`
}

ModelVersion is the Schema for the modelversions API

func (*ModelVersion) DeepCopy

func (in *ModelVersion) DeepCopy() *ModelVersion

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelVersion.

func (*ModelVersion) DeepCopyInto

func (in *ModelVersion) DeepCopyInto(out *ModelVersion)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ModelVersion) DeepCopyObject

func (in *ModelVersion) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ModelVersionList

type ModelVersionList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ModelVersion `json:"items"`
}

ModelVersionList contains a list of ModelVersion

func (*ModelVersionList) DeepCopy

func (in *ModelVersionList) DeepCopy() *ModelVersionList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelVersionList.

func (*ModelVersionList) DeepCopyInto

func (in *ModelVersionList) DeepCopyInto(out *ModelVersionList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ModelVersionList) DeepCopyObject

func (in *ModelVersionList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ModelVersionSpec

type ModelVersionSpec struct {
	// The Model name for this ModelVersion
	// +required
	ModelName string `json:"modelName,omitempty"`

	// CreatedBy indicates the entity that creates the model version. e.g. the name of the tfjob that creates the ModelVersion. the name
	// of the user that creates the ModelVersion
	// +optional
	CreatedBy string `json:"createdBy,omitempty"`

	// Storage is the location where this ModelVersion is stored.
	// +optional
	Storage *Storage `json:"storage,omitempty"`

	// ImageRepo is the image repository to push the generated model image. e.g. docker hub.  "modelhub/mymodel"
	// A particular image tag is automatically generated by the system when ImageTag is nil, e.g.
	// "modelhub/mymodel:v9epgk"
	// +required
	ImageRepo string `json:"imageRepo,omitempty"`

	// ImageTag is the image tag suffixed with image repo, which indicates a specific image version/variant.
	// If empty, the first 5 digits of this ModelVersion object UID will be used as image tag.
	// +optional
	ImageTag string `json:"imageTag,omitempty"`
}

ModelVersionSpec defines a particular version of the Model. Each time a new ModelVersion crd is created, the ModelVersionController will create an image that incorporates the model.

func (*ModelVersionSpec) DeepCopy

func (in *ModelVersionSpec) DeepCopy() *ModelVersionSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelVersionSpec.

func (*ModelVersionSpec) DeepCopyInto

func (in *ModelVersionSpec) DeepCopyInto(out *ModelVersionSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ModelVersionStatus

type ModelVersionStatus struct {
	// The image name of the model version
	Image string `json:"image,omitempty"`

	// ImageBuildPhase is the phase of the image building process
	ImageBuildPhase ImageBuildPhase `json:"imageBuildPhase,omitempty"`

	// FinishTime is the time when image building is finished.
	FinishTime *metav1.Time `json:"finishTime,omitempty"`

	// Any message associated with the building process
	Message string `json:"message,omitempty"`
}

ModelVersionStatus defines the observed state of ModelVersion

func (*ModelVersionStatus) DeepCopy

func (in *ModelVersionStatus) DeepCopy() *ModelVersionStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelVersionStatus.

func (*ModelVersionStatus) DeepCopyInto

func (in *ModelVersionStatus) DeepCopyInto(out *ModelVersionStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NFS

type NFS struct {
	// NFS server address, e.g. "***.cn-beijing.nas.aliyuncs.com"
	Server string `json:"server,omitempty"`

	// The path under which the model is stored, e.g. /models/my_model1
	Path string `json:"path,omitempty"`

	// The mounted path inside the container.
	// The training code is expected to export the model artifacts under this path, such as storing the tensorflow saved_model.
	MountPath string `json:"mountPath,omitempty"`
}

NFS represents the Alibaba Cloud Nas storage

func (*NFS) DeepCopy

func (in *NFS) DeepCopy() *NFS

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NFS.

func (*NFS) DeepCopyInto

func (in *NFS) DeepCopyInto(out *NFS)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Storage

type Storage struct {
	// NFS represents the alibaba cloud nas storage
	NFS *NFS `json:"nfs,omitempty"`

	// LocalStorage represents the local host storage
	LocalStorage *LocalStorage `json:"localStorage,omitempty"`

	// AWSEfs represents the AWS Elastic FileSystem
	AWSEfs *AWSEfs `json:"AWSEfs,omitempty"`
}

func (*Storage) DeepCopy

func (in *Storage) DeepCopy() *Storage

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Storage.

func (*Storage) DeepCopyInto

func (in *Storage) DeepCopyInto(out *Storage)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VersionInfo

type VersionInfo struct {
	// The name of the latest ModelVersion
	ModelVersion string `json:"modelVersion,omitempty"`

	// The image name of the latest model,  e.g. "modelhub/mymodel:v9epgk"
	ImageName string `json:"imageName,omitempty"`
}

func (*VersionInfo) DeepCopy

func (in *VersionInfo) DeepCopy() *VersionInfo

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VersionInfo.

func (*VersionInfo) DeepCopyInto

func (in *VersionInfo) DeepCopyInto(out *VersionInfo)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL