v1beta1

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2022 License: Apache-2.0 Imports: 3 Imported by: 21

Documentation

Overview

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

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

Index

Constants

View Source
const (
	StdOutCollector CollectorKind = "StdOut"

	FileCollector   CollectorKind = "File"
	DefaultFilePath string        = "/var/log/katib/metrics.log"

	TfEventCollector              CollectorKind = "TensorFlowEvent"
	DefaultTensorflowEventDirPath string        = "/var/log/katib/tfevent/"

	PrometheusMetricCollector CollectorKind = "PrometheusMetric"
	DefaultPrometheusPath     string        = "/metrics"
	DefaultPrometheusPort     int           = 8080

	CustomCollector CollectorKind = "Custom"

	// When model training source code persists metrics into persistent layer
	// directly, metricsCollector isn't in need, and its kind is "noneCollector"
	NoneCollector CollectorKind = "None"

	MetricsVolume = "metrics-volume"
)
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 AlgorithmSetting

type AlgorithmSetting struct {
	// Name is setting name.
	Name string `json:"name,omitempty"`

	// Value is the setting value.
	Value string `json:"value,omitempty"`
}

AlgorithmSetting represents key-value pair for HP or NAS algorithm settings.

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 {
	// HP or NAS algorithm name.
	AlgorithmName string `json:"algorithmName,omitempty"`

	// Key-value pairs representing settings for suggestion algorithms.
	AlgorithmSettings []AlgorithmSetting `json:"algorithmSettings,omitempty"`
}

AlgorithmSpec is the specification for a HP or NAS algorithm. +k8s:deepcopy-gen=true

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 CollectorKind

type CollectorKind string

type CollectorSpec

type CollectorSpec struct {
	Kind CollectorKind `json:"kind,omitempty"`
	// When kind is "customCollector", this field will be used
	CustomCollector *v1.Container `json:"customCollector,omitempty"`
}

+k8s:deepcopy-gen=true

func (*CollectorSpec) DeepCopy

func (in *CollectorSpec) DeepCopy() *CollectorSpec

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

func (*CollectorSpec) DeepCopyInto

func (in *CollectorSpec) DeepCopyInto(out *CollectorSpec)

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

type ComparisonType added in v0.10.0

type ComparisonType string

ComparisonType is the type of comparison, one of equal, less or greater.

const (
	// ComparisonTypeEqual means that metric value = early stopping rule value.
	ComparisonTypeEqual ComparisonType = "equal"

	// ComparisonTypeLess means that metric value < early stopping rule value.
	ComparisonTypeLess ComparisonType = "less"

	// ComparisonTypeGreater means that metric value > early stopping rule value.
	ComparisonTypeGreater ComparisonType = "greater"
)

type EarlyStoppingRule added in v0.10.0

type EarlyStoppingRule struct {
	// Name contains metric name for the rule.
	Name string `json:"name,omitempty"`

	// Value contains metric value for the rule.
	Value string `json:"value,omitempty"`

	// Comparison defines correlation between name and value.
	Comparison ComparisonType `json:"comparison,omitempty"`

	// StartStep defines quantity of intermediate results
	// that should be received before applying the rule.
	// If start step is empty, rule is applied from the first recorded metric.
	StartStep int `json:"startStep,omitempty"`
}

EarlyStoppingRule represents each rule for early stopping.

func (*EarlyStoppingRule) DeepCopy added in v0.10.0

func (in *EarlyStoppingRule) DeepCopy() *EarlyStoppingRule

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

func (*EarlyStoppingRule) DeepCopyInto added in v0.10.0

func (in *EarlyStoppingRule) DeepCopyInto(out *EarlyStoppingRule)

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

type EarlyStoppingSetting

type EarlyStoppingSetting struct {
	// Name is the setting name.
	Name string `json:"name,omitempty"`

	// Value is the setting value.
	Value string `json:"value,omitempty"`
}

EarlyStoppingSetting represents key-value pair for early stopping algorithm settings.

func (*EarlyStoppingSetting) DeepCopy

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

func (*EarlyStoppingSetting) DeepCopyInto

func (in *EarlyStoppingSetting) DeepCopyInto(out *EarlyStoppingSetting)

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

type EarlyStoppingSpec

type EarlyStoppingSpec struct {
	// Early stopping algorithm name.
	AlgorithmName string `json:"algorithmName,omitempty"`

	// Key-value pairs representing settings for early stopping algorithm.
	AlgorithmSettings []EarlyStoppingSetting `json:"algorithmSettings,omitempty"`
}

EarlyStoppingSpec is the specification for a early stopping algorithm. +k8s:deepcopy-gen=true

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 FileSystemKind

type FileSystemKind string
const (
	DirectoryKind FileSystemKind = "Directory"
	FileKind      FileSystemKind = "File"
	InvalidKind   FileSystemKind = "Invalid"
)

type FileSystemPath

type FileSystemPath struct {
	Path string         `json:"path,omitempty"`
	Kind FileSystemKind `json:"kind,omitempty"`
}

+k8s:deepcopy-gen=true

func (*FileSystemPath) DeepCopy

func (in *FileSystemPath) DeepCopy() *FileSystemPath

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

func (*FileSystemPath) DeepCopyInto

func (in *FileSystemPath) DeepCopyInto(out *FileSystemPath)

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

type FilterSpec

type FilterSpec struct {
	// When the metrics output follows format as this field specified, metricsCollector
	// collects it and reports to metrics server, it can be "<metric_name>: <float>" or else
	MetricsFormat []string `json:"metricsFormat,omitempty"`
}

+k8s:deepcopy-gen=true

func (*FilterSpec) DeepCopy

func (in *FilterSpec) DeepCopy() *FilterSpec

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

func (*FilterSpec) DeepCopyInto

func (in *FilterSpec) DeepCopyInto(out *FilterSpec)

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

type Metric

type Metric struct {
	Name   string `json:"name,omitempty"`
	Min    string `json:"min,omitempty"`
	Max    string `json:"max,omitempty"`
	Latest string `json:"latest,omitempty"`
}

func (*Metric) DeepCopy

func (in *Metric) DeepCopy() *Metric

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

func (*Metric) DeepCopyInto

func (in *Metric) DeepCopyInto(out *Metric)

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

type MetricStrategy added in v0.10.0

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

func (*MetricStrategy) DeepCopy added in v0.10.0

func (in *MetricStrategy) DeepCopy() *MetricStrategy

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

func (*MetricStrategy) DeepCopyInto added in v0.10.0

func (in *MetricStrategy) DeepCopyInto(out *MetricStrategy)

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

type MetricStrategyType added in v0.10.0

type MetricStrategyType string

MetricStrategyType describes the various approaches to extract objective value from metrics.

const (
	ExtractByMin    MetricStrategyType = "min"
	ExtractByMax    MetricStrategyType = "max"
	ExtractByLatest MetricStrategyType = "latest"
)

type MetricsCollectorSpec

type MetricsCollectorSpec struct {
	Source    *SourceSpec    `json:"source,omitempty"`
	Collector *CollectorSpec `json:"collector,omitempty"`
}

+k8s:deepcopy-gen=true

func (*MetricsCollectorSpec) DeepCopy

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 ObjectiveSpec

type ObjectiveSpec struct {
	// Type for Experiment optimization.
	Type ObjectiveType `json:"type,omitempty"`

	// Goal is the Experiment's objective goal that should be reached.
	// In case of empty goal, Experiment is running until MaxTrialCount = TrialsSucceeded.
	Goal *float64 `json:"goal,omitempty"`

	// ObjectiveMetricName represents primary Experiment's metric to optimize.
	ObjectiveMetricName string `json:"objectiveMetricName,omitempty"`

	// AdditionalMetricNames represents metrics that should be collected from Trials.
	// This can be empty if we only care about the objective metric.
	// Note: If we adopt a push instead of pull mechanism, this can be omitted completely.
	AdditionalMetricNames []string `json:"additionalMetricNames,omitempty"`

	// MetricStrategies defines various rules (min, max or latest) to extract metrics values.
	// This field is allowed to missing, experiment defaulter (webhook) will fill it.
	MetricStrategies []MetricStrategy `json:"metricStrategies,omitempty"`
}

ObjectiveSpec represents Experiment's objective specification. +k8s:deepcopy-gen=true

func (*ObjectiveSpec) DeepCopy

func (in *ObjectiveSpec) DeepCopy() *ObjectiveSpec

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

func (*ObjectiveSpec) DeepCopyInto

func (in *ObjectiveSpec) DeepCopyInto(out *ObjectiveSpec)

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

type ObjectiveType

type ObjectiveType string

ObjectiveType is the type of Experiment optimization, one of minimize or maximize.

const (
	ObjectiveTypeUnknown  ObjectiveType = ""
	ObjectiveTypeMinimize ObjectiveType = "minimize"
	ObjectiveTypeMaximize ObjectiveType = "maximize"
)

type Observation

type Observation struct {
	// Key-value pairs for metric names and values
	Metrics []Metric `json:"metrics,omitempty"`
}

+k8s:deepcopy-gen=true

func (*Observation) DeepCopy

func (in *Observation) DeepCopy() *Observation

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

func (*Observation) DeepCopyInto

func (in *Observation) DeepCopyInto(out *Observation)

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

type ParameterAssignment

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

func (*ParameterAssignment) DeepCopy

func (in *ParameterAssignment) DeepCopy() *ParameterAssignment

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

func (*ParameterAssignment) DeepCopyInto

func (in *ParameterAssignment) DeepCopyInto(out *ParameterAssignment)

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

type SourceSpec

type SourceSpec struct {
	// Model-train source code can expose metrics by http, such as HTTP endpoint in
	// prometheus metric format
	HttpGet *v1.HTTPGetAction `json:"httpGet,omitempty"`
	// During training model, metrics may be persisted into local file in source
	// code, such as tfEvent use case
	FileSystemPath *FileSystemPath `json:"fileSystemPath,omitempty"`
	// Default metric output format is {"metric": "<metric_name>",
	// "value": <int_or_float>, "epoch": <int>, "step": <int>}, but if the output doesn't
	// follow default format, please extend it here
	Filter *FilterSpec `json:"filter,omitempty"`
}

+k8s:deepcopy-gen=true

func (*SourceSpec) DeepCopy

func (in *SourceSpec) DeepCopy() *SourceSpec

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

func (*SourceSpec) DeepCopyInto

func (in *SourceSpec) DeepCopyInto(out *SourceSpec)

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