converters

package
v0.5.0 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: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RemarkEnableTensorBoard = "EnableTensorBoard"
)

Variables

View Source
var (
	ErrNoDependentOwner   = errors.New("object has no dependent owner")
	ErrNoReplicaTypeLabel = fmt.Errorf("object has no replica type label [%s]", apiv1.ReplicaTypeLabel)
)

Functions

func ConvertEventToDMOEvent

func ConvertEventToDMOEvent(event v1.Event, region string) (*dmo.Event, error)

ConvertEventToDMOEvent converts a native event object to dmo event.

func ConvertJobToDMOJob

func ConvertJobToDMOJob(job metav1.Object, kind string, specs map[v1.ReplicaType]*v1.ReplicaSpec, jobStatus *v1.JobStatus, region string) (*dmo.Job, error)

ConvertJobToDMOJob converts a native job object to dmo job.

func ConvertNotebookToDMONotebook added in v0.4.2

func ConvertNotebookToDMONotebook(notebook *v1alpha1.Notebook, region string) (*dmo.Notebook, error)

func ConvertPodToDMOPod

func ConvertPodToDMOPod(pod *v1.Pod, defaultContainerName string, region string) (*dmo.Pod, error)

ConvertPodToDMOPod converts a native pod object to dmo pod.

func ExtractTypedJobInfos

func ExtractTypedJobInfos(job metav1.Object) (kind string, spec map[v1.ReplicaType]*v1.ReplicaSpec, status v1.JobStatus, err error)

ExtractTypedJobInfos extract common-api struct and infos from different typed job objects.

Types

This section is empty.

Jump to

Keyboard shortcuts

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