v1beta1

package
v0.12.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2021 License: Apache-2.0 Imports: 8 Imported by: 48

Documentation

Overview

Package v1beta1 contains API Schema definitions for the trial v1beta1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1 +k8s:defaulter-gen=TypeMeta +kubebuilder:subresource:status +groupName=trial.kubeflow.org

Package v1beta1 contains API Schema definitions for the trial v1beta1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1 +k8s:defaulter-gen=TypeMeta +kubebuilder:subresource:status +groupName=trials.kubeflow.org

Index

Constants

View Source
const (
	Group   = "kubeflow.org"
	Version = "v1beta1"
)

Variables

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

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

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource is required by pkg/client/listers/...

Types

type Trial

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

	Spec   TrialSpec   `json:"spec,omitempty"`
	Status TrialStatus `json:"status,omitempty"`
}

Represents the structure of a Trial resource. +k8s:openapi-gen=true +kubebuilder:subresource:status

func (*Trial) DeepCopy

func (in *Trial) DeepCopy() *Trial

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

func (*Trial) DeepCopyInto

func (in *Trial) DeepCopyInto(out *Trial)

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

func (*Trial) DeepCopyObject

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

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

func (*Trial) GetLastConditionType

func (trial *Trial) GetLastConditionType() (TrialConditionType, error)

func (*Trial) IsCompleted

func (trial *Trial) IsCompleted() bool

func (*Trial) IsCreated

func (trial *Trial) IsCreated() bool

func (*Trial) IsEarlyStopped added in v0.10.0

func (trial *Trial) IsEarlyStopped() bool

func (*Trial) IsFailed

func (trial *Trial) IsFailed() bool

func (*Trial) IsKilled

func (trial *Trial) IsKilled() bool

func (*Trial) IsMetricsUnavailable added in v0.10.0

func (trial *Trial) IsMetricsUnavailable() bool

IsMetricsUnavailable returns true if Trial metrics are not available

func (*Trial) IsRunning

func (trial *Trial) IsRunning() bool

func (*Trial) IsSucceeded

func (trial *Trial) IsSucceeded() bool

func (*Trial) MarkTrialStatusCreated

func (trial *Trial) MarkTrialStatusCreated(reason, message string)

func (*Trial) MarkTrialStatusFailed

func (trial *Trial) MarkTrialStatusFailed(reason, message string)

func (*Trial) MarkTrialStatusKilled

func (trial *Trial) MarkTrialStatusKilled(reason, message string)

func (*Trial) MarkTrialStatusRunning

func (trial *Trial) MarkTrialStatusRunning(reason, message string)

func (*Trial) MarkTrialStatusSucceeded

func (trial *Trial) MarkTrialStatusSucceeded(status v1.ConditionStatus, reason, message string)

type TrialCondition

type TrialCondition struct {
	// Type of trial condition.
	Type TrialConditionType `json:"type"`

	// Status of the condition, one of True, False, Unknown.
	Status v1.ConditionStatus `json:"status"`

	// The reason for the condition's last transition.
	Reason string `json:"reason,omitempty"`

	// A human readable message indicating details about the transition.
	Message string `json:"message,omitempty"`

	// The last time this condition was updated.
	LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty"`

	// Last time the condition transitioned from one status to another.
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
}

+k8s:deepcopy-gen=true TrialCondition describes the state of the trial at a certain point.

func (*TrialCondition) DeepCopy

func (in *TrialCondition) DeepCopy() *TrialCondition

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

func (*TrialCondition) DeepCopyInto

func (in *TrialCondition) DeepCopyInto(out *TrialCondition)

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

type TrialConditionType

type TrialConditionType string

TrialConditionType describes the various conditions a Trial can be in.

const (
	TrialCreated      TrialConditionType = "Created"
	TrialRunning      TrialConditionType = "Running"
	TrialSucceeded    TrialConditionType = "Succeeded"
	TrialKilled       TrialConditionType = "Killed"
	TrialFailed       TrialConditionType = "Failed"
	TrialEarlyStopped TrialConditionType = "EarlyStopped"
)

type TrialList

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

TrialList contains a list of Trials

func (*TrialList) DeepCopy

func (in *TrialList) DeepCopy() *TrialList

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

func (*TrialList) DeepCopyInto

func (in *TrialList) DeepCopyInto(out *TrialList)

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

func (*TrialList) DeepCopyObject

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

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

type TrialSpec

type TrialSpec struct {
	// Describes the objective of the experiment.
	Objective *common.ObjectiveSpec `json:"objective,omitempty"`

	// Key-value pairs for hyperparameters and assignment values.
	ParameterAssignments []common.ParameterAssignment `json:"parameterAssignments"`

	// Rules for early stopping techniques.
	// Each rule should be met to early stop Trial.
	EarlyStoppingRules []common.EarlyStoppingRule `json:"earlyStoppingRules,omitempty"`

	// Raw text for the trial run spec. This can be any generic Kubernetes
	// runtime object. The trial operator should create the resource as written,
	// and let the corresponding resource controller (e.g. tf-operator) handle
	// the rest.
	RunSpec *unstructured.Unstructured `json:"runSpec,omitempty"`
	// Whether to retain the trial run object after completed.
	RetainRun bool `json:"retainRun,omitempty"`

	// Describes how metrics will be collected
	MetricsCollector common.MetricsCollectorSpec `json:"metricsCollector,omitempty"`

	// Label that determines if pod needs to be injected by Katib sidecar container
	PrimaryPodLabels map[string]string `json:"primaryPodLabels,omitempty"`

	// Name of training container where actual model training is running
	PrimaryContainerName string `json:"primaryContainerName,omitempty"`

	// Condition when trial custom resource is succeeded.
	// Condition must be in GJSON format, ref https://github.com/tidwall/gjson.
	// For example for BatchJob: status.conditions.#(type=="Complete")#|#(status=="True")#
	SuccessCondition string `json:"successCondition,omitempty"`

	// Condition when trial custom resource is failed.
	// Condition must be in GJSON format, ref https://github.com/tidwall/gjson.
	// For example for BatchJob: status.conditions.#(type=="Failed")#|#(status=="True")#
	FailureCondition string `json:"failureCondition,omitempty"`
}

TrialSpec is the specification of a Trial.

func (*TrialSpec) DeepCopy

func (in *TrialSpec) DeepCopy() *TrialSpec

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

func (*TrialSpec) DeepCopyInto

func (in *TrialSpec) DeepCopyInto(out *TrialSpec)

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

type TrialStatus

type TrialStatus struct {
	// Represents time when the Trial was acknowledged by the Trial controller.
	// It is not guaranteed to be set in happens-before order across separate operations.
	// It is represented in RFC3339 form and is in UTC
	StartTime *metav1.Time `json:"startTime,omitempty"`

	// Represents time when the Trial was completed. It is not guaranteed to
	// be set in happens-before order across separate operations.
	// It is represented in RFC3339 form and is in UTC
	CompletionTime *metav1.Time `json:"completionTime,omitempty"`

	// Represents last time when the Trial was reconciled. It is not guaranteed to
	// be set in happens-before order across separate operations.
	// It is represented in RFC3339 form and is in UTC.
	LastReconcileTime *metav1.Time `json:"lastReconcileTime,omitempty"`

	// List of observed runtime conditions for this Trial.
	Conditions []TrialCondition `json:"conditions,omitempty"`

	// Results of the Trial - objectives and other metrics values.
	Observation *common.Observation `json:"observation,omitempty"`
}

TrialStatus is the current status of a Trial.

func (*TrialStatus) DeepCopy

func (in *TrialStatus) DeepCopy() *TrialStatus

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

func (*TrialStatus) DeepCopyInto

func (in *TrialStatus) DeepCopyInto(out *TrialStatus)

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