Documentation ¶
Overview ¶
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Package v1alpha2 contains API Schema definitions for the experiment v1alpha2 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/kubeflow/katib/pkg/api/operators/apis/experiment/v1alpha2 +k8s:defaulter-gen=TypeMeta +kubebuilder:subresource:status +groupName=experiment.kubeflow.org
Package v1alpha2 contains API Schema definitions for the experiment v1alpha2 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/kubeflow/katib/pkg/api/operators/apis/experiment/v1alpha2 +k8s:defaulter-gen=TypeMeta +kubebuilder:subresource:status +groupName=experiments.kubeflow.org
Index ¶
- Constants
- Variables
- type AlgorithmSetting
- type AlgorithmSpec
- type EarlyStoppingSpec
- type Experiment
- func (in *Experiment) DeepCopy() *Experiment
- func (in *Experiment) DeepCopyInto(out *Experiment)
- func (in *Experiment) DeepCopyObject() runtime.Object
- func (exp *Experiment) GetLastConditionType() (ExperimentConditionType, error)
- func (exp *Experiment) IsCompleted() bool
- func (exp *Experiment) IsCreated() bool
- func (exp *Experiment) IsFailed() bool
- func (exp *Experiment) IsRestarting() bool
- func (exp *Experiment) IsRunning() bool
- func (exp *Experiment) IsSucceeded() bool
- func (exp *Experiment) MarkExperimentStatusCreated(reason, message string)
- func (exp *Experiment) MarkExperimentStatusFailed(reason, message string)
- func (exp *Experiment) MarkExperimentStatusRunning(reason, message string)
- func (exp *Experiment) MarkExperimentStatusSucceeded(reason, message string)
- func (exp *Experiment) NeedUpdateFinalizers() (bool, []string)
- func (e *Experiment) SetDefault()
- type ExperimentCondition
- type ExperimentConditionType
- type ExperimentList
- type ExperimentSpec
- type ExperimentStatus
- type FeasibleSpace
- type GoTemplate
- type GraphConfig
- type MetricsCollectorSpec
- type NasConfig
- type Operation
- type OptimalTrial
- type ParameterSpec
- type ParameterType
- type TemplateSpec
- type TrialTemplate
Constants ¶
const ( // Default value of Spec.ParallelTrialCount DefaultTrialParallelCount = 3 // Default value of Spec.ConfigMapName for Trial template DefaultTrialConfigMapName = "trial-template" // Default env name of katib namespace DefaultKatibNamespaceEnvName = "KATIB_CORE_NAMESPACE" // Default value of Spec.TemplatePath DefaultTrialTemplatePath = "defaultTrialTemplate.yaml" // Default value of Spec.ConfigMapName for Metrics Collector template DefaultMetricsCollectorConfigMapName = "metrics-collector-template" )
const ( Group = "kubeflow.org" Version = "v1alpha2" )
Variables ¶
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 ¶
This section is empty.
Types ¶
type AlgorithmSetting ¶
type AlgorithmSetting struct { Name string `json:"name,omitempty"` Value string `json:"value,omitempty"` }
func (*AlgorithmSetting) DeepCopy ¶
func (in *AlgorithmSetting) DeepCopy() *AlgorithmSetting
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlgorithmSetting.
func (*AlgorithmSetting) DeepCopyInto ¶
func (in *AlgorithmSetting) DeepCopyInto(out *AlgorithmSetting)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AlgorithmSpec ¶
type AlgorithmSpec struct { AlgorithmName string `json:"algorithmName,omitempty"` // Key-value pairs representing settings for suggestion algorithms. AlgorithmSettings []AlgorithmSetting `json:"algorithmSettings"` EarlyStopping *EarlyStoppingSpec `json:"earlyStopping,omitempty"` }
func (*AlgorithmSpec) DeepCopy ¶
func (in *AlgorithmSpec) DeepCopy() *AlgorithmSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlgorithmSpec.
func (*AlgorithmSpec) DeepCopyInto ¶
func (in *AlgorithmSpec) DeepCopyInto(out *AlgorithmSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EarlyStoppingSpec ¶
type EarlyStoppingSpec struct { }
func (*EarlyStoppingSpec) DeepCopy ¶
func (in *EarlyStoppingSpec) DeepCopy() *EarlyStoppingSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EarlyStoppingSpec.
func (*EarlyStoppingSpec) DeepCopyInto ¶
func (in *EarlyStoppingSpec) DeepCopyInto(out *EarlyStoppingSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Experiment ¶
type Experiment struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ExperimentSpec `json:"spec,omitempty"` Status ExperimentStatus `json:"status,omitempty"` }
Structure of the Experiment custom resource. +k8s:openapi-gen=true +kubebuilder:subresource:status
func (*Experiment) DeepCopy ¶
func (in *Experiment) DeepCopy() *Experiment
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Experiment.
func (*Experiment) DeepCopyInto ¶
func (in *Experiment) DeepCopyInto(out *Experiment)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Experiment) DeepCopyObject ¶
func (in *Experiment) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Experiment) GetLastConditionType ¶
func (exp *Experiment) GetLastConditionType() (ExperimentConditionType, error)
func (*Experiment) IsCompleted ¶
func (exp *Experiment) IsCompleted() bool
func (*Experiment) IsCreated ¶
func (exp *Experiment) IsCreated() bool
func (*Experiment) IsFailed ¶
func (exp *Experiment) IsFailed() bool
func (*Experiment) IsRestarting ¶
func (exp *Experiment) IsRestarting() bool
func (*Experiment) IsRunning ¶
func (exp *Experiment) IsRunning() bool
func (*Experiment) IsSucceeded ¶
func (exp *Experiment) IsSucceeded() bool
func (*Experiment) MarkExperimentStatusCreated ¶
func (exp *Experiment) MarkExperimentStatusCreated(reason, message string)
func (*Experiment) MarkExperimentStatusFailed ¶
func (exp *Experiment) MarkExperimentStatusFailed(reason, message string)
func (*Experiment) MarkExperimentStatusRunning ¶
func (exp *Experiment) MarkExperimentStatusRunning(reason, message string)
func (*Experiment) MarkExperimentStatusSucceeded ¶
func (exp *Experiment) MarkExperimentStatusSucceeded(reason, message string)
func (*Experiment) NeedUpdateFinalizers ¶
func (exp *Experiment) NeedUpdateFinalizers() (bool, []string)
func (*Experiment) SetDefault ¶
func (e *Experiment) SetDefault()
type ExperimentCondition ¶
type ExperimentCondition struct { // Type of experiment condition. Type ExperimentConditionType `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 ExperimentCondition describes the state of the experiment at a certain point.
func (*ExperimentCondition) DeepCopy ¶
func (in *ExperimentCondition) DeepCopy() *ExperimentCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExperimentCondition.
func (*ExperimentCondition) DeepCopyInto ¶
func (in *ExperimentCondition) DeepCopyInto(out *ExperimentCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExperimentConditionType ¶
type ExperimentConditionType string
ExperimentConditionType defines the state of an Experiment.
const ( ExperimentCreated ExperimentConditionType = "Created" ExperimentRunning ExperimentConditionType = "Running" ExperimentRestarting ExperimentConditionType = "Restarting" ExperimentSucceeded ExperimentConditionType = "Succeeded" ExperimentFailed ExperimentConditionType = "Failed" )
type ExperimentList ¶
type ExperimentList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Experiment `json:"items"` }
ExperimentList contains a list of Experiments
func (*ExperimentList) DeepCopy ¶
func (in *ExperimentList) DeepCopy() *ExperimentList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExperimentList.
func (*ExperimentList) DeepCopyInto ¶
func (in *ExperimentList) DeepCopyInto(out *ExperimentList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ExperimentList) DeepCopyObject ¶
func (in *ExperimentList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ExperimentSpec ¶
type ExperimentSpec struct { // List of hyperparameter configurations. Parameters []ParameterSpec `json:"parameters,omitempty"` // Describes the objective of the experiment. Objective *common.ObjectiveSpec `json:"objective,omitempty"` // Describes the suggestion algorithm. Algorithm *AlgorithmSpec `json:"algorithm,omitempty"` // Template for each run of the trial. TrialTemplate *TrialTemplate `json:"trialTemplate,omitempty"` // How many trials can be processed in parallel. // Defaults to 3 ParallelTrialCount *int32 `json:"parallelTrialCount,omitempty"` // Max completed trials to mark experiment as succeeded MaxTrialCount *int32 `json:"maxTrialCount,omitempty"` // Max failed trials to mark experiment as failed. MaxFailedTrialCount *int32 `json:"maxFailedTrialCount,omitempty"` // Whether to retain historical data in DB after deletion. RetainHistoricalData bool `json:"retainHistoricalData,omitempty"` // For v1alpha2 we will keep the metrics collector implementation same as v1alpha1. MetricsCollectorSpec *MetricsCollectorSpec `json:"metricsCollectorSpec,omitempty"` NasConfig *NasConfig `json:"nasConfig,omitempty"` }
func (*ExperimentSpec) DeepCopy ¶
func (in *ExperimentSpec) DeepCopy() *ExperimentSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExperimentSpec.
func (*ExperimentSpec) DeepCopyInto ¶
func (in *ExperimentSpec) DeepCopyInto(out *ExperimentSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExperimentStatus ¶
type ExperimentStatus struct { // Represents time when the Experiment was acknowledged by the Experiment 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 Experiment 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 Experiment 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 Experiment. Conditions []ExperimentCondition `json:"conditions,omitempty"` // Current optimal trial parameters and observations. CurrentOptimalTrial OptimalTrial `json:"currentOptimalTrial,omitempty"` // Trials is the total number of trials owned by the experiment. Trials int32 `json:"trials,omitempty"` // How many trials have succeeded. TrialsSucceeded int32 `json:"trialsSucceeded,omitempty"` // How many trials have failed. TrialsFailed int32 `json:"trialsFailed,omitempty"` // How many trials have been killed. TrialsKilled int32 `json:"trialsKilled,omitempty"` // How many trials are currently pending. TrialsPending int32 `json:"trialsPending,omitempty"` // How many trials are currently running. TrialsRunning int32 `json:"trialsRunning,omitempty"` }
func (*ExperimentStatus) DeepCopy ¶
func (in *ExperimentStatus) DeepCopy() *ExperimentStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExperimentStatus.
func (*ExperimentStatus) DeepCopyInto ¶
func (in *ExperimentStatus) DeepCopyInto(out *ExperimentStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FeasibleSpace ¶
type FeasibleSpace struct { Max string `json:"max,omitempty"` Min string `json:"min,omitempty"` List []string `json:"list,omitempty"` Step string `json:"step,omitempty"` }
func (*FeasibleSpace) DeepCopy ¶
func (in *FeasibleSpace) DeepCopy() *FeasibleSpace
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeasibleSpace.
func (*FeasibleSpace) DeepCopyInto ¶
func (in *FeasibleSpace) DeepCopyInto(out *FeasibleSpace)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GoTemplate ¶
type GoTemplate struct { TemplateSpec *TemplateSpec `json:"templateSpec,omitempty"` RawTemplate string `json:"rawTemplate,omitempty"` }
func (*GoTemplate) DeepCopy ¶
func (in *GoTemplate) DeepCopy() *GoTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GoTemplate.
func (*GoTemplate) DeepCopyInto ¶
func (in *GoTemplate) DeepCopyInto(out *GoTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GraphConfig ¶
type GraphConfig struct { NumLayers *int32 `json:"numLayers,omitempty"` InputSizes []int32 `json:"inputSizes,omitempty"` OutputSizes []int32 `json:"outputSizes,omitempty"` }
GraphConfig contains a config of DAG
func (*GraphConfig) DeepCopy ¶
func (in *GraphConfig) DeepCopy() *GraphConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GraphConfig.
func (*GraphConfig) DeepCopyInto ¶
func (in *GraphConfig) DeepCopyInto(out *GraphConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MetricsCollectorSpec ¶
type MetricsCollectorSpec struct { Retain bool `json:"retain,omitempty"` GoTemplate GoTemplate `json:"goTemplate,omitempty"` }
Spec for metrics collectors. For v1alpha2 we will keep metrics collection as cron jobs. This can be replaced by a push-model when the metadata client lib is ready.
func (*MetricsCollectorSpec) DeepCopy ¶
func (in *MetricsCollectorSpec) DeepCopy() *MetricsCollectorSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricsCollectorSpec.
func (*MetricsCollectorSpec) DeepCopyInto ¶
func (in *MetricsCollectorSpec) DeepCopyInto(out *MetricsCollectorSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NasConfig ¶
type NasConfig struct { GraphConfig GraphConfig `json:"graphConfig,omitempty"` Operations []Operation `json:"operations,omitempty"` }
NasConfig contains config for NAS job
func (*NasConfig) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NasConfig.
func (*NasConfig) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Operation ¶
type Operation struct { OperationType string `json:"operationType,omitempty"` Parameters []ParameterSpec `json:"parameters,omitempty"` }
Operation contains type of operation in DAG
func (*Operation) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Operation.
func (*Operation) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OptimalTrial ¶
type OptimalTrial struct { // Key-value pairs for hyperparameters and assignment values. ParameterAssignments []common.ParameterAssignment `json:"parameterAssignments"` // Observation for this trial Observation common.Observation `json:"observation,omitempty"` }
func (*OptimalTrial) DeepCopy ¶
func (in *OptimalTrial) DeepCopy() *OptimalTrial
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OptimalTrial.
func (*OptimalTrial) DeepCopyInto ¶
func (in *OptimalTrial) DeepCopyInto(out *OptimalTrial)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ParameterSpec ¶
type ParameterSpec struct { Name string `json:"name,omitempty"` ParameterType ParameterType `json:"parameterType,omitempty"` FeasibleSpace FeasibleSpace `json:"feasibleSpace,omitempty"` }
func (*ParameterSpec) DeepCopy ¶
func (in *ParameterSpec) DeepCopy() *ParameterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParameterSpec.
func (*ParameterSpec) DeepCopyInto ¶
func (in *ParameterSpec) DeepCopyInto(out *ParameterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ParameterType ¶
type ParameterType string
const ( ParameterTypeUnknown ParameterType = "unknown" ParameterTypeDouble ParameterType = "double" ParameterTypeInt ParameterType = "int" ParameterTypeDiscrete ParameterType = "discrete" ParameterTypeCategorical ParameterType = "categorical" )
type TemplateSpec ¶
type TemplateSpec struct { ConfigMapName string `json:"configMapName,omitempty"` ConfigMapNamespace string `json:"configMapNamespace,omitempty"` TemplatePath string `json:"templatePath,omitempty"` }
func (*TemplateSpec) DeepCopy ¶
func (in *TemplateSpec) DeepCopy() *TemplateSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateSpec.
func (*TemplateSpec) DeepCopyInto ¶
func (in *TemplateSpec) DeepCopyInto(out *TemplateSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TrialTemplate ¶
type TrialTemplate struct { Retain bool `json:"retain,omitempty"` GoTemplate *GoTemplate `json:"goTemplate,omitempty"` }
func (*TrialTemplate) DeepCopy ¶
func (in *TrialTemplate) DeepCopy() *TrialTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrialTemplate.
func (*TrialTemplate) DeepCopyInto ¶
func (in *TrialTemplate) DeepCopyInto(out *TrialTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.