xgboost

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: 37 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// Reasons for job events.
	FailedDeleteJobReason     = "FailedDeleteJob"
	SuccessfulDeleteJobReason = "SuccessfulDeleteJob"
)

Variables

This section is empty.

Functions

func SetPodEnv

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

SetPodEnv sets the pod env set for: - XGBoost Rabit Tracker and worker - LightGBM master and workers

Types

type XGBoostJobReconciler

type XGBoostJobReconciler struct {
	common.JobController
	client.Client
	Log    logr.Logger
	Scheme *runtime.Scheme
	// contains filtered or unexported fields
}

XGBoostJobReconciler reconciles a XGBoostJob object

func NewReconciler

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

NewReconciler creates a XGBoostJob Reconciler

func (*XGBoostJobReconciler) ControllerName

func (r *XGBoostJobReconciler) ControllerName() string

func (*XGBoostJobReconciler) DeleteJob

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

DeleteJob deletes the job

func (*XGBoostJobReconciler) GetAPIGroupVersion

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

func (*XGBoostJobReconciler) GetAPIGroupVersionKind

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

func (*XGBoostJobReconciler) GetDefaultContainerName

func (r *XGBoostJobReconciler) GetDefaultContainerName() string

func (*XGBoostJobReconciler) GetDefaultContainerPortName

func (r *XGBoostJobReconciler) GetDefaultContainerPortName() string

func (*XGBoostJobReconciler) GetFrameworkName added in v1.7.0

func (r *XGBoostJobReconciler) GetFrameworkName() string

func (*XGBoostJobReconciler) GetGroupNameLabelValue

func (r *XGBoostJobReconciler) GetGroupNameLabelValue() string

func (*XGBoostJobReconciler) GetJobFromAPIClient

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

GetJobFromAPIClient returns the Job from API server

func (*XGBoostJobReconciler) GetJobFromInformerCache

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

GetJobFromInformerCache returns the Job from Informer Cache

func (*XGBoostJobReconciler) GetPodsForJob

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

GetPodsForJob returns the pods managed by the job. This can be achieved by selecting pods using label key "job-name" i.e. all pods created by the job will come with label "job-name" = <this_job_name>

func (*XGBoostJobReconciler) GetServicesForJob

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

GetServicesForJob returns the services managed by the job. This can be achieved by selecting services using label key "job-name" i.e. all services created by the job will come with label "job-name" = <this_job_name>

func (*XGBoostJobReconciler) IsMasterRole

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

func (*XGBoostJobReconciler) Reconcile

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

Reconcile reads that state of the cluster for a XGBoostJob object and makes changes based on the state read and what is in the XGBoostJob.Spec Automatically generate RBAC rules to allow the Controller to read and write Deployments

func (*XGBoostJobReconciler) SetClusterSpec

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

SetClusterSpec sets the cluster spec for the pod

func (*XGBoostJobReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

func (*XGBoostJobReconciler) UpdateJobStatus

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

UpdateJobStatus updates the job status and job conditions

func (*XGBoostJobReconciler) UpdateJobStatusInApiServer

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

UpdateJobStatusInApiServer updates the job status in to cluster.

Jump to

Keyboard shortcuts

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