v1beta1

package
v0.0.0-...-38689a3 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package v1beta1 contains API Schema definitions for the foundation-model-stack.github.com.github.com v1beta1 API group +kubebuilder:object:generate=true +groupName=foundation-model-stack.github.com.github.com

Index

Constants

View Source
const (
	GroupName     = "foundation-model-stack.github.com.github.com"
	Version       = "v1beta1"
	KindName      = "LMEvalJob"
	FinalizerName = "lm-eval-job.foundation-model-stack.github.com.github.com/finalizer"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: GroupName, Version: Version}

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

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

Functions

This section is empty.

Types

type Arg

type Arg struct {
	Name  string `json:"name"`
	Value string `json:"value,omitempty"`
}

func (*Arg) DeepCopy

func (in *Arg) DeepCopy() *Arg

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

func (*Arg) DeepCopyInto

func (in *Arg) DeepCopyInto(out *Arg)

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

type EnvSecret

type EnvSecret struct {
	// Environment's name
	Env string `json:"env"`
	// The secret is from a secret object
	// +optional
	SecretRef *corev1.SecretKeySelector `json:"secretRef,omitempty"`
	// The secret is from a plain text
	// +optional
	Secret *string `json:"secret,omitempty"`
}

type FileSecret

type FileSecret struct {
	// The secret object
	SecretRef corev1.SecretVolumeSource `json:"secretRef,omitempty"`
	// The path to mount the secret
	MountPath string `json:"mountPath"`
}

type JobState

type JobState string

Represent a job's status +kubebuilder:validation:Enum=New;Scheduled;Running;Complete;Cancelled

const (
	// The job is just created
	NewJobState JobState = "New"
	// The job is scheduled and waiting for available resources to run it
	ScheduledJobState JobState = "Scheduled"
	// The job is running
	RunningJobState JobState = "Running"
	// The job is complete
	CompleteJobState JobState = "Complete"
	// The job is cancelled
	CancelledJobState JobState = "Cancelled"
)

type LMEvalJob

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

	Spec   LMEvalJobSpec   `json:"spec,omitempty"`
	Status LMEvalJobStatus `json:"status,omitempty"`
}

LMEvalJob is the Schema for the lmevaljobs API

func (*LMEvalJob) DeepCopy

func (in *LMEvalJob) DeepCopy() *LMEvalJob

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

func (*LMEvalJob) DeepCopyInto

func (in *LMEvalJob) DeepCopyInto(out *LMEvalJob)

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

func (*LMEvalJob) DeepCopyObject

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

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

func (*LMEvalJob) Default

func (r *LMEvalJob) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*LMEvalJob) SetupWebhookWithManager

func (r *LMEvalJob) SetupWebhookWithManager(mgr ctrl.Manager) error

SetupWebhookWithManager will setup the manager to manage the webhooks

func (*LMEvalJob) ValidateCreate

func (r *LMEvalJob) ValidateCreate() (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*LMEvalJob) ValidateDelete

func (r *LMEvalJob) ValidateDelete() (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*LMEvalJob) ValidateJob

func (r *LMEvalJob) ValidateJob() error

func (*LMEvalJob) ValidateLimit

func (r *LMEvalJob) ValidateLimit() *field.Error

func (*LMEvalJob) ValidateUpdate

func (r *LMEvalJob) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type LMEvalJobList

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

LMEvalJobList contains a list of LMEvalJob

func (*LMEvalJobList) DeepCopy

func (in *LMEvalJobList) DeepCopy() *LMEvalJobList

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

func (*LMEvalJobList) DeepCopyInto

func (in *LMEvalJobList) DeepCopyInto(out *LMEvalJobList)

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

func (*LMEvalJobList) DeepCopyObject

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

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

type LMEvalJobSpec

type LMEvalJobSpec struct {

	// Model name
	Model string `json:"model"`
	// Args for the model
	// +optional
	ModelArgs []Arg `json:"modelArgs,omitempty"`
	// Evaluation tasks
	Tasks []string `json:"tasks"`
	// Sets the number of few-shot examples to place in context
	// +optional
	NumFewShot *int `json:"numFewShot,omitempty"`
	// Accepts an integer, or a float between 0.0 and 1.0 . If passed, will limit
	// the number of documents to evaluate to the first X documents (if an integer)
	// per task or first X% of documents per task
	// +optional
	Limit string `json:"limit,omitempty"`
	// Map to `--gen_kwargs` parameter for the underlying library.
	// +optional
	GenArgs []Arg `json:"genArgs,omitempty"`
	// If this flag is passed, then the model's outputs, and the text fed into the
	// model, will be saved at per-document granularity
	// +optional
	LogSamples *bool `json:"logSamples,omitempty"`
	// Assign secrets to the environment variables
	// +optional
	EnvSecrets []EnvSecret `json:"envSecrets,omitempty"`
	// Use secrets as files
	FileSecrets []FileSecret `json:"fileSecrets,omitempty"`
}

LMEvalJobSpec defines the desired state of LMEvalJob

func (*LMEvalJobSpec) DeepCopy

func (in *LMEvalJobSpec) DeepCopy() *LMEvalJobSpec

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

func (*LMEvalJobSpec) DeepCopyInto

func (in *LMEvalJobSpec) DeepCopyInto(out *LMEvalJobSpec)

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

type LMEvalJobStatus

type LMEvalJobStatus struct {

	// The name of the Pod that runs the evaluation job
	// +optional
	PodName string `json:"podName,omitempty"`
	// State of the job
	// +optional
	State JobState `json:"state,omitempty"`
	// Final result of the job
	// +optional
	Reason Reason `json:"reason,omitempty"`
	// Message about the current/final status
	// +optional
	Message string `json:"message,omitempty"`
	// Information when was the last time the job was successfully scheduled.
	// +optional
	LastScheduleTime *metav1.Time `json:"lastScheduleTime,omitempty"`
	// Information when the job's state changes to Complete.
	// +optional
	CompleteTime *metav1.Time `json:"completeTime,omitempty"`
	// Evaluation results
	// +optional
	Results string `json:"results,omitempty"`
}

LMEvalJobStatus defines the observed state of LMEvalJob

func (*LMEvalJobStatus) DeepCopy

func (in *LMEvalJobStatus) DeepCopy() *LMEvalJobStatus

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

func (*LMEvalJobStatus) DeepCopyInto

func (in *LMEvalJobStatus) DeepCopyInto(out *LMEvalJobStatus)

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

type Reason

type Reason string

+kubebuilder:validation:Enum=NoReason;Succeeded;Failed;Cancelled

const (
	// Job is still running and no final result yet
	NoReason Reason = "NoReason"
	// Job finished successfully
	SucceedReason Reason = "Succeeded"
	// Job failed
	FailedReason Reason = "Failed"
	// Job is cancelled
	CancelledReason Reason = "Cancelled"
)

Jump to

Keyboard shortcuts

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