mxnet

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetPodEnv

func SetPodEnv(job interface{}, podTemplate *corev1.PodTemplateSpec, rtype, index string) error

Types

type ClusterSpec

type ClusterSpec map[string][]UrlPort

ClusterSpec represents a cluster Mxnet specification.

type LabelsSpec

type LabelsSpec map[string]string

LabelsSpec represents a label specification.

type MXConfig

type MXConfig struct {
	// Cluster represents a Mxnet ClusterSpec.
	Cluster ClusterSpec `json:"cluster"`
	// Labels include all label of task.
	Labels LabelsSpec `json:"labels"`
	// Task include information of current node.
	Task TaskSpec `json:"task"`
}

MXConfig is a struct representing the distributed Mxnet config. This struct is turned into an environment variable MX_CONFIG which is used by Mxnet processes to configure themselves.

type MXJobReconciler

type MXJobReconciler struct {
	common.JobController
	client.Client
	Log      logr.Logger
	Recorder record.EventRecorder

	Scheme *runtime.Scheme
	// contains filtered or unexported fields
}

MXJobReconciler reconciles a MXJob object

func NewReconciler

func NewReconciler(mgr manager.Manager, gangSchedulingSetupFunc common.GangSchedulingSetupFunc) *MXJobReconciler

NewReconciler creates a MXJob Reconciler

func (*MXJobReconciler) ControllerName

func (r *MXJobReconciler) ControllerName() string

ControllerName is ControllerInterface's implementation

func (*MXJobReconciler) DeleteJob

func (r *MXJobReconciler) DeleteJob(job interface{}) error

func (*MXJobReconciler) GetAPIGroupVersion

func (r *MXJobReconciler) GetAPIGroupVersion() schema.GroupVersion

func (*MXJobReconciler) GetAPIGroupVersionKind

func (r *MXJobReconciler) GetAPIGroupVersionKind() schema.GroupVersionKind

func (*MXJobReconciler) GetDefaultContainerName

func (r *MXJobReconciler) GetDefaultContainerName() string

func (*MXJobReconciler) GetDefaultContainerPortName

func (r *MXJobReconciler) GetDefaultContainerPortName() string

func (*MXJobReconciler) GetFrameworkName added in v1.7.0

func (r *MXJobReconciler) GetFrameworkName() string

func (*MXJobReconciler) GetGroupNameLabelValue

func (r *MXJobReconciler) GetGroupNameLabelValue() string

func (*MXJobReconciler) GetJobFromAPIClient

func (r *MXJobReconciler) GetJobFromAPIClient(namespace, name string) (metav1.Object, error)

func (*MXJobReconciler) GetJobFromInformerCache

func (r *MXJobReconciler) GetJobFromInformerCache(namespace, name string) (metav1.Object, error)

func (*MXJobReconciler) GetPodsForJob

func (r *MXJobReconciler) GetPodsForJob(obj interface{}) ([]*corev1.Pod, error)

func (*MXJobReconciler) GetServicesForJob

func (r *MXJobReconciler) GetServicesForJob(job interface{}) ([]*corev1.Service, error)

func (*MXJobReconciler) IsMasterRole

func (r *MXJobReconciler) IsMasterRole(replicas map[kubeflowv1.ReplicaType]*kubeflowv1.ReplicaSpec,
	rtype kubeflowv1.ReplicaType, index int) bool

func (*MXJobReconciler) Reconcile

func (r *MXJobReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*MXJobReconciler) SetClusterSpec

func (r *MXJobReconciler) SetClusterSpec(job interface{}, podTemplate *corev1.PodTemplateSpec, rtype, index string) error

func (*MXJobReconciler) SetupWithManager

func (r *MXJobReconciler) SetupWithManager(mgr ctrl.Manager, controllerThreads int) error

SetupWithManager sets up the controller with the Manager.

func (*MXJobReconciler) UpdateJobStatus

func (r *MXJobReconciler) UpdateJobStatus(job interface{}, replicas map[kubeflowv1.ReplicaType]*kubeflowv1.ReplicaSpec, jobStatus *kubeflowv1.JobStatus) error

func (*MXJobReconciler) UpdateJobStatusInApiServer

func (r *MXJobReconciler) UpdateJobStatusInApiServer(job interface{}, jobStatus *kubeflowv1.JobStatus) error

UpdateJobStatusInApiServer updates the status of the given MXJob.

type TaskSpec

type TaskSpec struct {
	Type  string `json:"type"`
	Index int    `json:"index"`
}

TaskSpec is the specification for a task (server or worker ...) of the MXJob.

type UrlPort

type UrlPort struct {
	Url  string `json:"url"`
	Port int    `json:"port"`
}

Jump to

Keyboard shortcuts

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